Replies: 3 comments 2 replies
-
Actually, I solved it by transforming the data in node-red instead of the PLC. |
Beta Was this translation helpful? Give feedback.
-
I would solve it with a script, if it is an array you will have an id to identify the topic and creating an UI to do this kind of configuration can be a challenge. you make a subscription of the array as object and in a script you bind the array value to server tags |
Beta Was this translation helpful? Give feedback.
-
@unocelli , could you shine some light on 'script you bind the array value to server tags' |
Beta Was this translation helpful? Give feedback.
-
Hi
I have set up a PLC to publish json-string MQTT messages to an MQTT-broker.
First I set up the json string to look like this:
{
"Room": "LM_Frukting",
"Type": "CO2-sensor",
"sensor_id": "RY001_PV",
"CO2": 1109
}
When I tried to read this in Fuxa, I could read all the variables.
It turned out though, that if I want to get the data logged into influxdb, I have to set up the json string like this (think it's an array..):
[
{
"CO2": 1109
},
{
"Room": "LM_Frukting",
"Type": "CO2-sensor",
"sensor_id": "RY001_PV"
}
]
Then it turns out that I can not read the variables anymore. Is there a way to solve this?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions