openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.86k stars 3.56k forks source link

[transform.JSONPath] sum aggregation isn't updated #11756

Open Novanic opened 2 years ago

Novanic commented 2 years ago

I'm trying to sum various values of a json received via MQTT. When the JSON path of the item is "$.intervalDatas[0].channelIntervalDatas[0].averageImportRMSActivePower", everything is working fine and it is updated every 5 minutes (a MQTT message is sent every 5 minutes).

When I try to sum all values of the array with this JSON path expression: "$.sum($.intervalDatas[].channelIntervalDatas[].averageImportRMSActivePower)" it seems to work at first, the correct value is set. But it is never updated. The next MQTT messages have no effect / the item is never updated.

OpenHAB 3.1 is used.

lsiepel commented 1 month ago

You might search some other transform related issues as the combination of transforms and mqtt are not always straight forward. Sorry not much details :-/