HotNoob / PythonProtocolGateway

Python Protocol Gateway reads data via Modbus RTU or other protocols and translates the data for MQTT. In the long run, Python Protocol Gateway will become a general purpose protocol gateway to translate between more than just modbus and mqtt. Growatt, EG4, Sigineer, SOK, PACE
Apache License 2.0
4 stars 0 forks source link

Todo: dynamic entires for register ranges ect... #28

Open HotNoob opened 3 months ago

HotNoob commented 3 months ago

this is especially needed for pylon rs485 protocol. some other protocols could benefit as well.

step 1. post pone loading config for unloadable dynamic registers ( and commands ) step 2. do a full scan and loop until completed, or more complicated, identify required "variables" and load. step 3. apply skipped entries to memory / register list.

down side is, this initially doesnt allow for further dynamic loading. ie if a value changes... could be added later i guess.

the pending csv rows can be stored in a variable / memory, and edited on the fly as variables arrive.

for a format, can maybe do {{variable_name}} or, [[variable_name]] to avoid json conflicts.

example usage:

document_name = cell_count

documented_name = battery_1cell[0-[cell_count]] register = x4642.[(0-[cell_count])+1]

shit... going to need to implement a basic math implementation as well... ranges will have to be done exclusively with ~ when within [] which will trigger "maths"