I am currently using a raspberry pi to process a device transmitting a JSON string and use Bacpypes to transmit the data over Bacnet IP. I am having an issues breaking down the JSON string so that I can send the multiple data points as a Bacnet Analog Value Object. The JSON string is similar to:
{'sn':1, 'sampletime'123, 'device_1':{'p1':100,'p2':200}, 'device_2':{'p1':100,'p2':200}, 'temp': 50, 'hum': 23}
Right now I am able to pass the string to a list where I can access one data point at a time. This single data point is passed to all of the objects on our Bacnet system.
I am trying to figure out how to either break up this JSON string so that I can list each data point as it's own Bacnet object or pass the whole string through as a single object.
Any help or tips would be greatly appreciated!