Start a new topic

Format MQTT data i My Data DIY


I am using my newly bought LaMetric Time to integrate my Ferroamp Energyhub with it using MQTT. It is working just fine. However, I do have two questions regarding two issues I can not seem to solve:

1. The MQTT API is only providing the solar output in watts and I would like to divide the value of the data coming in with 1000. Is that possible?

2. Another thing that bugs me is the output from the Energyhub. Each attribute begins with a val:. So what I am doing is targeting the speific val: I am looking for by using {val[2]} in the text field. Not a perfect solution (since it requires that the  attributes are always present in the exact same order), so if anyone knows how I can get the val: from the ppv field, I would be more than grateful. Here is a sample of the MQTT output. I have deleted a lot because the message is much more extensive.

{"gridfreq": {"val": "49.982"},"iavblq_3p": {"val": "25.476"}, "sext": {"val": "3419.843"}, "ppv": {"val": "0.000"}, "wextprodq_3p": {"val": "43776471186081"}, "wextconsq_3p": {"val": "77117786446715"}, "winvprodq_3p": {"val": "50992465921777"}, "winvconsq_3p": {"val": "1821153718727"}, "wloadprodq_3p": {"val": "24387159472"}, "wloadconsq_3p": {"val": "82537014623156"}, "wpv": {"val": "52977074835967"}, "state": {"val": "4101"}, "ts": {"val": "2024-02-22T18:44:53UTC"}}

1 Comment


We'd like to inform you that recently we released new version of My Data DIY (no-code possibilities) app (v.2.0.5) with some bug fixes according to nested JSON.

Please check it and let us know if you have any questions.

Login or Signup to post a comment