Hi,
I get the impression BIG5 should be able to do this, but I could be wrong..
I'm trying to use JSON string sent over a serial link, to create or update a device with a value.
A typical string is
These parsing lines work correctly in the test box, but used in the serial port input setup, I get JSON in the device name and no value?
HVAC_Sensor_${ JSON(input, "sig") }
${ JSON_Num(input, "val") }
I am using using the "unbraced" version in the serial input device name & value, eg.
HVAC_Sensor_${ JSON(input, "sig")}
JSON_Num(input, "val")
The result is just a single device like "Big5 SERIAL HVAC_Siemens - ${HVAC_Sensor_${JSON(input, "sig")}}"
What I was expecting was a set of eight devices named HVAC_Sensor_S1 to HVAC_Sensor_S8, with the temperature values being updated in them?
I'm pretty sure I am doing something really daft, but I cannot figure out what!
The data is being sent from my program in a Siemens PLC, a screen grab of "live" input serial as monitored on the homeseer machine using realterm is below, to show the existing data set.
It sends one line each second, so eight seconds to update all eight values; it's temperature data that only changes slowly so no need for high speed updates. I only have four sensors wired so far to test the system.
Any assistance appreciated!
Rob.
I get the impression BIG5 should be able to do this, but I could be wrong..
I'm trying to use JSON string sent over a serial link, to create or update a device with a value.
A typical string is
Code:
{"sig":"S1","val":" 68.7"} cr lf
HVAC_Sensor_${ JSON(input, "sig") }
${ JSON_Num(input, "val") }
I am using using the "unbraced" version in the serial input device name & value, eg.
HVAC_Sensor_${ JSON(input, "sig")}
JSON_Num(input, "val")
The result is just a single device like "Big5 SERIAL HVAC_Siemens - ${HVAC_Sensor_${JSON(input, "sig")}}"
What I was expecting was a set of eight devices named HVAC_Sensor_S1 to HVAC_Sensor_S8, with the temperature values being updated in them?
I'm pretty sure I am doing something really daft, but I cannot figure out what!
The data is being sent from my program in a Siemens PLC, a screen grab of "live" input serial as monitored on the homeseer machine using realterm is below, to show the existing data set.
It sends one line each second, so eight seconds to update all eight values; it's temperature data that only changes slowly so no need for high speed updates. I only have four sensors wired so far to test the system.
Any assistance appreciated!
Rob.
Comment