-
Notifications
You must be signed in to change notification settings - Fork 0
Description
I ran a simple test with an error in the JSON post. Compare the POST with "ID" vs "DEVICE_ID:
url= http://einstein/sensors json= {"id": "test1", "timestamp":200000, "junk1": "100", "junk2": "200"} r= saved
url= http://einstein/lastest_readings_from_all_devices/junk1/json r.text= [{"timestamp":200000,"sensor_type":"junk1","value":0,"device_id":"test1"},,{"timestamp":300000,"sensor_type":"junk1","value":0,"device_id":"test2"}]
Note that I put the sensor values as strings, rather than integers. It doesnt convert, doesnt complain, just posts 0
url= http://einstein/sensors json= {"device_id": "test3", "timestamp":200000, "junk1": "100", "junk2": "200"} r= some not saved: [device_id, null, 200000, 0.0
, junk1, null, 200000, 0.0
, junk2, null, 200000, 0.0
]
What are all those NULL fields
url= http://einstein/lastest_readings_from_all_devices/junk1/json r.text= [{"timestamp":200000,"sensor_type":"junk1","value":0,"device_id":"test1"},{"timestamp":300000,"sensor_type":"junk1","value":0,"device_id":"test2"}]