Skip to main content

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 bleak import BleakScanner  # type: ignore - bleak has bad export types

from melnor_bluetooth.device import Device

ADDRESS = "00:00:00:00:00"  # fill with your device mac address


async def main():

    ble_device = await BleakScanner.find_device_by_address(ADDRESS)
    if ble_device is not None:
        device = Device(ble_device)
        await device.connect()
        await device.fetch_state()

        print(device.battery_level)

        await device.disconnect()


asyncio.run(main())

Turn on a zone

import asyncio

from bleak import BleakScanner  # type: ignore - bleak has bad export types

from melnor_bluetooth.device import Device

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


async def main():
    ble_device = await BleakScanner.find_device_by_address(ADDRESS)
    if ble_device is not None:
        device = Device(ble_device)
        await device.connect()
        await device.fetch_state()

        device.zone1.is_watering = True

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


asyncio.run(main())

Metadata

Release files for melnor-bluetooth 0.0.25

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for melnor-bluetooth 0.0.25
File Size Uploaded
melnor_bluetooth-0.0.25.tar.gz 11.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for melnor-bluetooth 0.0.25
File Interpreter ABI Platform
melnor_bluetooth-0.0.25-py3-none-any.whl Python 3 none any Details

Total release size: 24.7 kB

Release files / melnor_bluetooth-0.0.25.tar.gz

Download URL melnor_bluetooth-0.0.25.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
95a54cc9779174e44e021cd88a56926523bc89a2cf3d074c890709f4748ac314
BLAKE2b-256 checksum
How to use checksums
827ac10cf5ff3ccb2b69ed94f9a5d2008d59d29780bee2cf6cb32657edb489e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / melnor_bluetooth-0.0.25-py3-none-any.whl

Download URL melnor_bluetooth-0.0.25-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76e42e577466b4deed32e102f75983fa7f4689f77366e65abab736846ebed468
BLAKE2b-256 checksum
How to use checksums
f0d1e9285c0c5356e4cab81653f4ea831be5d5cab77203b02101cb89445f113a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.3

Release history Release notifications | RSS feed

This release

0.0.25 This release

2 release files

0.0.22

2 release files

0.0.21

2 release files

0.0.20

2 release files

0.0.19

2 release files

0.0.18

2 release files

0.0.17

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page