Is there a way to increase digit precision for floats?
I’m feeding Emoncms via MQTT.
MQTT → Emoncms (feed view)
12.34 → 12.34
123.45 → 123.5
1234.56 → 1235
1234567890 → 1234567890
Emoncms round the values.
Is there a way to keep 1 or 2 decimal places for larger values?
x100 → MQTT → Emoncms → x0.01 → Feed??
(…not at home to try)
this work around might work, but Emoncms is not the only listener of the data.
I would like to avoid this kind of detour in all MQTT listeners.
Furthermore, the source is an Arduino.
I’m already struggling there not to lose any precision.
Only the UI display is rounded due to space constrains, not the underlaying data used for calculations.
@Tricx - Oh I see what you mean. It’s the rounding that occurs whilst viewing feed values via the feeds table.
I think that it’s rounded to ensure that data with lot’s of decimals does not interfere with the layout and structure of the table.
If you need to display greater precision, then use the dashboard, as many of the widgets allow you to select the number of decimals. For example, the feedvalue allows up to a precision of 5 decimals.
@nchaveiro, the ‘digit precision’ viewed versus stored confused me as well. Are the space constraints that big? At the pages Input, Feeds or Graps (moving over a graph or downloading a CSV output) there seems to be lots of space to have extra decimals . Maybe a lot less on a smartphone, but certainly not on a widescreen.
The workaround of @Paul to work with a dashboard helps, but providing enough decimals on the other pages seems better to me.