ele-dev / Huawei-PSU-Regulator

An automatic power regulator for linux systems
GNU General Public License v3.0
2 stars 0 forks source link

[Feature] Extend energy meter interface and add Modbus/TCP as alternative to UDP #12

Open ele-dev opened 2 days ago

ele-dev commented 2 days ago

The non blocking UDP listener works very well but is very specialized to my personal setup with the Berry script running the tasmota energy meter. A more generic interfaces class for energy meters would allow implementation of additional protocols such as HTTP or Modbus/TCP for other energymeters (e.g. Shelly Pro 3em)

ele-dev commented 2 days ago

POC for a Modbus/TCP client in C++ with libmodbus-dev was successfully tested on WSL2 with a Shelly Pro 3em.

ele-dev commented 1 day ago

First local build of the energy manager with modbus powermeter support is finished and will undergo testing

ele-dev commented 3 hours ago

Basic tests passed. After some hours sometimes it suddenly receives invalid modbus data and does not auto recover from it yet. Taken measures: