PyPlumIO is a native ecoNET library for Plum ecoMAX controllers.
Project description
PyPlumIO is a native ecoNET library for Plum ecoMAX controllers.
Overview
This package aims to provide complete and easy to use solution for communicating with climate devices by Plum Sp. z o.o.
Currently it supports reading and writing parameters of ecoMAX automatic pellet boiler controllers, getting service password and sending network information to display on regulator panel.
Devices can be connected directly via RS485 to USB converter or through network by using serial port server (for example Elfin EW11)
This project is considered to be in Pre-Alpha state and there will be breaking changes down the road and a lot of bugs, please use with care.
Table of contents
Usage
To interact with devices, you must pass async callback to EcoNET.run(callback: Callable, interval: int)
method. Callback will receive pyplumio.DeviceCollection
instance devices
that will contain all found supported devices and pyplumio.EcoNET
class instance econet
that represents current connection.
Second optional parameter for EcoNET.run(callback: Callable, interval: int)
method - interval
defines how often the callback will be called in seconds. If unspecified, callback will be called every second.
You can find examples for each supported connection type below.
TCP
import pyplumio
async def my_callback(devices, econet):
# do something
...
connection = pyplumio.TcpConnection(host="localhost", port=8899)
connection.run(my_callback, interval=1)
Serial
import pyplumio
async def my_callback(devices, econet):
# do something
...
connection = pyplumio.SerialConnection(device="/dev/ttyUSB0", baudrate=115200)
connection.run(my_callback, interval=1)
Shortcuts
It's also possible to use following shortcuts to create connection instance and instantly run it.
import pyplumio
pyplumio.tcp(my_callback, host="localhost", port=8899, interval=1)
# or
pyplumio.serial(my_callback, device="/dev/ttyUSB0", baudrate=115200, interval=1)
Data and Parameters
Data is separated into immutable data
that you can't change and parameters
that you can. Both can be accessed via instance attributes devices.ecomax.data['HEATING_TEMP']
, devices.ecomax.parameters['HEATING_SET_TEMP']
or as shortcut devices.ecomax.heating_temp
, devices.ecomax.heating_set_temp
.
Each regulator supports different data attributes and parameters. You can check what your regulator supports by calling print()
on regulator instance.
async def my_callback(devices, econet):
if devices.ecomax:
print(devices.ecomax)
Reading
Interaction with device is mainly done through device class instances inside your callback.
For example you can read current feedwater temperature by reading heating_temp
attribute.
This example, once passed to EcoNET.run(callback: Callable, interval: int)
as demonstrated above, will print current feedwater temperature every second.
async def my_callback(devices, econet):
if devices.ecomax:
print(devices.ecomax.heating_temp) # 61.923828125
Writing
You can easily set regulator parameter by changing respective class attribute. Example below will set target temperature to 65 degrees Celsius and close the connection.
async def my_callback(devices, econet):
if devices.ecomax and devices.ecomax.heating_set_temp is not None:
"""This will set target heating temperature to 65 degrees Celsius.
and close the connection.
"""
devices.ecomax.heating_set_temp = 65
econet.close()
Please note that each parameter has range of acceptable values that you must check and honor by yourself. This package currently silently ignores out of range values. You can check allowed values by reading min_
and max_
attributes.
async def my_callback(devices, econet):
if devices.ecomax and devices.ecomax.heating_set_temp is not None:
print(devices.ecomax.heating_set_temp.min_) # Prints minimum allowed target temperature.
print(devices.ecomax.heating_set_temp.max_) # Prints maximum allowed target temperature.
Network and WIFI
You can send network information to the regulator to be displayed on regulator's LCD as illustrated below.
Currently it's used for informational purposes only and can be skipped altogether.
import pyplumio
from pyplumio.constants import WLAN_ENCRYPTION_WPA2
async def my_callback(devices, econet):
# do something
...
with pyplumio.TcpConnection(host="localhost", port=8899) as c:
c.set_eth(ip="10.10.1.100", netmask="255.255.255.0", gateway="10.10.1.1")
c.set_wifi(
ip="10.10.2.100",
netmask="255.255.255.0",
gateway="10.10.2.1",
ssid="My WIFI",
encryption=WLAN_ENCRYPTION_WPA2,
quality=100
)
c.run(my_callback)
Home Assistant Integration
There is companion Home Assistant integration that is being co-developed with this package and depends on it. You can find it here.
Attribution
Special thanks to econetanalyze project by twkrol for initial information about protocol.
License
This product is distributed under MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for PyPlumIO-0.0.22-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 480fcf1eb999ee2e8b58671a4990f49fa0f471b2e9e27b9a4f322b897eab0d31 |
|
MD5 | 9037286a8660d7aeace923a72057552f |
|
BLAKE2b-256 | e2e68f5ec6effdce0a4c79fa9c462bde492c0cf7e6b53bf9d4428db497456861 |