MQTT powermeter values are re-published via MQTT #1248
-
While looking through the output messages of the DTU i discovered that there is a I am feeding my DTU with powermeter data via MQTT and i am wondering if there is a reason to re-publish the same data to MQTT?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I was probably avoiding a regression. Someone subscribes the PowerMeter to topic A but uses a script that subscribes to the PowerMeter topic... I agree that this is nonsensical. It is obvious now that the power meter refactoring is complete. Previously, this wasn't so obvious, as the power meter values were shared among all providers and the MQTT publish function did not care/know whether or not the original values were subscribed from MQTT. That's what I remember. When removing this, how to we handle the MQTT publish function in the base class? Should it publish the total value? That would at least be something that OpenDTU-OnBattery adds, in case three values are subscribed to and OpenDTU-OnBattery publishes the total, which previously might not have been available on the broker. |
Beta Was this translation helpful? Give feedback.
I was probably avoiding a regression. Someone subscribes the PowerMeter to topic A but uses a script that subscribes to the PowerMeter topic... I agree that this is nonsensical. It is obvious now that the power meter refactoring is complete. Previously, this wasn't so obvious, as the power meter values were shared among all providers and the MQTT publish function did not care/know whether or not the original values were subscribed from MQTT. That's what I remember.
When removing this, how to we handle the MQTT publish function in the base class? Should it publish the total value? That would at least be something that OpenDTU-OnBattery adds, in case three values are subscribed to and OpenD…