Closed The-JC closed 3 years ago
Added support for more complex(nested) MQTT messages, as some devices publish nested contents (for example Tasmota). To handle this, the metrics are recursively get parsed, to extract all metrics from a message.
An example would be this MQTT message:
{ "Time": "2021-10-03T11:05:21", "ENERGY": { "Total": 152.657, "Yesterday": 1.758, "Today": 0.178, "Power": 143, "ApparentPower": 184, "ReactivePower": 117, "Factor": 0.77, "Voltage": 235, "Current": 0.784 } }
It will parse into:
mqtt_ENERGY_Total mqtt_ENERGY_Yesterday mqtt_ENERGY_Today mqtt_ENERGY_Power mqtt_ENERGY_ApparentPower mqtt_ENERGY_ReactivePower mqtt_ENERGY_Factor mqtt_ENERGY_Voltage mqtt_ENERGY_Current
Thanks for the PR :)
Added support for more complex(nested) MQTT messages, as some devices publish nested contents (for example Tasmota). To handle this, the metrics are recursively get parsed, to extract all metrics from a message.
An example would be this MQTT message:
It will parse into: