I’m 100% new to Python. I’ve been able to get the UDP Broadcast but I don’t know how to parse the data/
The data comes in as follows:
b’{“serial_number”:“ST-00006839”,“type”:“rapid_wind”,“hub_sn”:“HB-00019566”,“ob”:[1591904071,2.59,247]}’
b’{“serial_number”:“ST-00006839”,“type”:“device_status”,“hub_sn”:“HB-00019566”,“timestamp”:1591904071,“uptime”:356173,“voltage”:2.56,“firmware_revision”:129,“rssi”:-91,“hub_rssi”:-94,“sensor_status”:0,“debug”:0}’
b’{“serial_number”:“ST-00006839”,“type”:“obs_st”,“hub_sn”:“HB-00019566”,“obs”:[[1591904071,0.36,1.97,3.17,230,3,1015.44,19.16,97.13,13664,0.47,114,0.127551,1,0,0,2.561,1]],“firmware_revision”:129}’
b’{“serial_number”:“ST-00006839”,“type”:“light_debug”,“hub_sn”:“HB-00019566”,“ob”:[1591904073,2633,207,0,0]}’
b’{“serial_number”:“HB-00019566”,“type”:“hub_status”,“firmware_revision”:“134”,“uptime”:313824,“rssi”:-61,“timestamp”:1591904077,“reset_flags”:“PIN,SFT”,“seq”:31319,“fs”:[1,0,15675411,524288],“radio_stats”:[22,1,0,3],“mqtt_stats”:[16,37]}’
My question for those that know Python, how to I assign the data in “obs” to different variables? I only are about some of the data for this project and it’s all in the UDP broadcast, but I don’t know how to reference it. Thanks!