Skip to main content

A small python library for discovery and interacting with Melnor, Aquastar, etc bluetooth water timers.

Project description

Melnor Bluetooth

PyPI Codecov branch GitHub Workflow Status (branch) PyPI - Downloads

Melnor Bluetooth is a reverse engineered implementation of the Bluetooth protocol for all "smart" bluetooth-enabled watering valves under the Melnor, EcoAquastar, Eden, and other brands.

The library should run on MacOS, Linux, or Windows. It's primarily developed on MacOS and other platforms likely have bugs. PRs and tests are welcome to improve quality across all platforms.

Getting Started

CLI

A simple CLI has been provided for basic debugging purposes. It's not intended for any real use and isn't suitable for running a valve in the real world.

This project uses poetry for dependency management and building. Running this project locally is as simple as the following steps:

  1. Clone the repository
  2. poetry install
  3. poetry run cli.py

The python API has been designed to be as easy to use as possible. A few examples are provided below:

Read battery state

  import asyncio

  from melnor_bluetooth.constants import BATTERY_UUID
  from melnor_bluetooth.device import Device

  address = '00:00:00:00:00' # fill with your device mac address

  async main():
    device = Device(address, 4)
    await device.connect()

    print(device.battery_life);

    await device.disconnect();

  asyncio.run(main())

Turn on a zone

  import asyncio

  from melnor_bluetooth.device import Device

  address = '00:00:00:00:00' # fill with your device mac address

  async main():
    device = Device(address, 4)
    await device.connect()

    device.zone1.is_watering = True;

    await device.push_state();
    await device.disconnect();

  asyncio.run(main())

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

melnor-bluetooth-0.0.1.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

melnor_bluetooth-0.0.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file melnor-bluetooth-0.0.1.tar.gz.

File metadata

  • Download URL: melnor-bluetooth-0.0.1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for melnor-bluetooth-0.0.1.tar.gz
Algorithm Hash digest
SHA256 33aa62f4c2db3a74865d6055ed98b10b5a5ea0c215825c8491a8e54411156f01
MD5 0a50ae39f545938016cff3528c567b58
BLAKE2b-256 c0e5c7085bbab9e96e3d0a8ab4a2c50cc8f815e34b05e900aecac836beb0ce77

See more details on using hashes here.

File details

Details for the file melnor_bluetooth-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for melnor_bluetooth-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 20e3dc94402cae862997d6ba92f61e8cc9bbff436b1d02c0146666bc8a471c9b
MD5 9e051ee360c3428331cab7a9f6264546
BLAKE2b-256 9ba79f70a5d60143a01d9730009ea8321119de292713d5b1308f1fe28f7dc1ef

See more details on using hashes here.

Supported by

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