Using note.add, I send data to the Notehub. Here is the debug text for the template used and the actual note.add.
{“req”:“note.template”,“file”:“sensor.qos”,“body”:{“temp”:12.1,“battery”:12.1,“CL1”:12.1,“CL2”:12.1,“CL3”:12.1,“CL4”:12.1,“CL5”:12.1,“CL6”:12.1,“CL7”:12.1,“CL8”:12.1,“CL9”:12.1,“timestamp”:18,“version”:“10”}}
{“bytes”:51}
{“req”:“note.add”,“file”:“sensor.qos”,“body”: “temp”:29.2,“battery”:43.5,“timestamp”:7,“CL1”:1130,“CL2”:772,“CL3”:23,“CL4”:4511,“CL5”:4210,“CL6”:65448,“CL7”:4513,“CL8”:4347,“CL9”:4145},“sync”:false,“version”:“1.1.2”}
{“template”:true}
The data in the Notehub is:
{
“CL1”: 1130,
“CL2”: 772,
“CL3”: 23,
“CL4”: 4512,
“CL5”: 4212,
“CL6”: 65440,
“CL7”: 4512,
“CL8”: 4348,
“CL9”: 4144,
“battery”: 43.5,
“temp”: 29.203125,
“timestamp”: 7
}
The values for CL4, CL5, CL6, CL7, CL8 and CL9 in Notehub are different by 1 or 2 (or 8 for CL6) from the values written.
Is this caused by specifying the fields as float in the template, and then rounding errors, or is this a bug of some sort?
Thanks