I'm trying out several new systems simultaneously. For the last week or so I've had 1-Wire temperature sensors -> owfs -> BBB -> Node-RED -> emoncms. The emoncms web service has been saving my data with 1/16 of a unit precision rounded to two decimal places, which draws smooth graphs, though it shows values rounded to one decimal in text displays.
Yesterday it mysteriously changed to saving 1/2 unit precision (28.0, 28.5, 29.0) and drawing jagged graphs, even though I can see the raw data I'm sending is always 1/16 unit and three decimal places. Somehow during my poking around this morning it has gone back to saving two decimal places, no idea why. Yesterday is still shown in jagged, 1/2 degree chunks.
Is there some setting for this? I haven't seen one. I was offline right before the change... Looks like the first new value after re-connecting fit exactly into 1/2 unit resolution, while the first value on previous re-connects happened to require 1/16 unit. Could it be that the system locks onto the minimum resolution required for the first data point in a series, and doesn't increase the resolution if it sees more precise later values?
Is two decimal places the maximum, or why doesn't it ever save all three I'm sending?
Also, is there some place to tell emoncms my numbers are temperatures rather than Watts?
Re: Feed data precision dropped to half-unit, then fixed itself ???
Hello Loren, not sure whats happening there, emoncms should just log what you give it, it doesnt try to do anything clever with the number of decimal places before data storage. It is only afterwards that rounding is applied for things like the dial and text widgets but the rawdata vis should show the data in the stored precision (The data is stored as 4 byte floats)
Are you sure that the 1-wire temperature sensors where posting at the higher resolution for that period?
Some of the visualizations do have the options to specify units, you can certainly do this with rawdata via the vis -> rawdata tab and with widgets such as the dial.
Re: Feed data precision dropped to half-unit, then fixed itself ???
My raw data is never stored with the three decimal digits I send. At least I think I'm sending them...
Node-RED Debug output shows them each time, and showed the same three digits even during the strange 1/2 degree steps period. And what you store is a rounded version of the three digits, not just truncated to two, so you must be seeing all of them.
Something other than the float data type must be limiting the resolution. And occasionally limiting it even more.
Re: Feed data precision dropped to half-unit, then fixed itself ???
My previous report was about emoncms not storing the precision that owfs was reporting. I'm still pretty sure that was really happening, but since I added a debug display of your actual http response, so I can see what you think you received, I have not caught that problem happening. Will keep watching.
It is clear, though, that you receive three decimal digits, and only report back two in any display I've found.
05 Jun 2014 00:34:05.756[file payload]
32.187
05 Jun 2014 00:34:06.174[emoncms resp]
1/1
(Object) { "payload": "ok", "topic": "1/1", "url": "http://emoncms.org/input/post.json?node=1&json=32.187&apikey=xxxxxxxxxxxxxxx", "statusCode": 200, "headers": { "date": "Thu, 05 Jun 2014 00:34:02 GMT", "server": "Apache/2.2.22 (Ubuntu)", "x-powered-by": "PHP/5.3.10-1ubuntu3.11", "vary": "Accept-Encoding", "content-length": "2", "connection": "close", "content-type": "text/html" } }
Even the csv files are only two places:
1400977200 30.19
1400977500 30.19
1400977800 30.13
I have discovered a different problem, though - not yours, for sure. It looks like the owfs web server component sometimes leaves the 1-Wire chips or some part of the plumbing following them in a low-resolution mode. Their web viewer shows the temperature in 9, 10, 11, and 12-bit modes. It seems not to check each mode each time it updates - sometimes changes visible in one mode are clearly not shown in others. And sometimes the value received by my Node-RED query is not the 12-bit value, but one of the lower precision ones. So far, I've only seen this happen while the owserver was actually open in my browser. If it has not been opened, the report always seems to be 12-bit.
And then there is another problem... Sometimes for over an hour at a time, the same exact temperature is logged, when it should clearly be changing. I haven't caught this while it is happening, but I totally don't suspect emoncms. All the updates are recorded individually, in a straight line... Somewhere in owfs or Node-RED somebody must be using a stored value instead of actually doing the query.
Will report back if I pin any of this down more securely.