celsworth / lxp-bridge

A bridge to MQTT/InfluxDB/Postgres for communications with LuxPower inverters
MIT License
9 stars 14 forks source link

Rewrite packet parsing code #249

Open celsworth opened 5 months ago

celsworth commented 5 months ago

This will be a long-lived PR to try and address the list in https://github.com/celsworth/lxp-bridge/issues/245

I'll create smaller separate PRs and merge into this to try and keep it manageable.

This adds a new configuration option, publish_inputs_all_trigger. This lives at the root of the config (ie next to loglevel). By default, this is 80. If you have an inverter which publishes 4 sets of inputs data packets (like newer EG4 inverters with generator inputs) you probably need to bump this to 120 to get inputs/all sent with all the correct data.

However, with this release I'm heavily deprecating the MQTT messages inputs/1 (and 2 / 3 / 4) and inputs/all. Please do not use them in any new projects. Instead, use the individual messages published when each register is received. These have topics like input/status/parsed, input/e_pv_day_1/parsed etc and the payloads are equivalent to the old ones.

TODO:

presto8 commented 5 months ago

This looks great, can't wait for it to land!