Skip to main content

Communicate with Simarine devices using asyncio and Python

Project description

spymarine

A library for spying on Simarine devices and their sensor values using asyncio and Python

Based on the fantastic reverse engineering work of https://github.com/htool/pico2signalk

Only tested with Simarine Pico rev2 and firmware 1.17

Library Installation

pip install spymarine

Getting Started

Make sure your Simarine device is configured to use AP or STA Wifi mode. It's not possible to connect via a local network while in REMOTE mode.

Run the following code on the same network that the Simarine device is connected to:

import asyncio
import spymarine

async def main():
    # Print all devices and their latest sensor values every second
    async with spymarine.DeviceReader() as reader:
        while True:
            await reader.read_sensors()
            print(reader.devices)
            await asyncio.sleep(1)

if __name__ == "__main__":
    asyncio.run(main())

Troubleshooting

Q: DeviceReader is stuck while establishing a connection when using STA Wifi mode

  • Update the Pico's firmware

Known Issues

  • Non-ASCII characters in device names will not be represented correctly and replaced with a placeholder. A non-standard encoding seems to be used.

Reporting issues

  • Run tools/make-debug-report.py
  • Create a new issue on GitHub and attach the debug.log

Author

Christopher Strack

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spymarine-0.7.0.tar.gz (33.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spymarine-0.7.0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file spymarine-0.7.0.tar.gz.

File metadata

  • Download URL: spymarine-0.7.0.tar.gz
  • Upload date:
  • Size: 33.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.11

File hashes

Hashes for spymarine-0.7.0.tar.gz
Algorithm Hash digest
SHA256 a3c7761c2c729d1f1f6089ab8e90c5dba51b8b7b14d38b7ceed03c810730119a
MD5 3f96f2be05e079e3615396579c3e4544
BLAKE2b-256 42bc4bb90b58442b5e884abf040c622099623532b1c2d23fd162bbff049de9c3

See more details on using hashes here.

File details

Details for the file spymarine-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: spymarine-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.11

File hashes

Hashes for spymarine-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e11336d8c4d566f04de22596bacf930b6203f53f177318ea8d358613bd7aac94
MD5 b756d04db3b70a0c72a2fc171a47da33
BLAKE2b-256 e1ec75116bdfa2ca8592c85fcf820488dc6e21754298f48cf69d8d8cb9a4674e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page