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.0.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.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: spymarine-0.6.0.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.0.tar.gz
Algorithm Hash digest
SHA256 8d9d4f8c6e340a25b4a75dfb6aa3418510f6db1135306b8d5f2a7564c6c8eedc
MD5 40df175cbfe7ade65e3e6ec07d55a60a
BLAKE2b-256 aa7149f9f21fb6d1364ea2752b2293307c8dac1af59bc30b2f5d741b85913d23

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spymarine-0.6.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 55af3a55f57f88685e87fc3bba9c3f65e380ee2b3d1386c521dbcfa251a86674
MD5 b70d68d7a7e33f09a4cfc9376988f269
BLAKE2b-256 0245c46dbda1124b75c8ed6b81e4a8982fcca39b1345af8d087c89530b04b6b4

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