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.

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.6.1.tar.gz (9.7 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.6.1-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: spymarine-0.6.1.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.7 Linux/6.5.0-1025-azure

File hashes

Hashes for spymarine-0.6.1.tar.gz
Algorithm Hash digest
SHA256 acf27331f23aa3b6e44ec53d1912f49a2713eb8d82f79956294019f099794875
MD5 45e33d6c248229d31852a1092335edb4
BLAKE2b-256 201c0b57ff23d03f0dc11b502b514e056a1f6da7ac12b0d52bf1c2f9b612d363

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spymarine-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.7 Linux/6.5.0-1025-azure

File hashes

Hashes for spymarine-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f5ca5c163c014badfd8b26b48046be55101d521525dfdfde9095abfe4ad0b5b8
MD5 282a4db4d015368ba93dc4aeddc4ac1d
BLAKE2b-256 f738a6e5ad074d04d1b7eaf1c15eca6ffca5245d75fe4e70b8149527bb9922aa

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