Hi
It’s something that has rumbled on for a while on the forum, where Vera cannot report the decimal point ? So it got me thinking (and this may have been covered elsewhere, if so I’ll delete)
Would it be possible to create something that convert the UI Fahrenheit reading into Celsius ?
Maybe some watch variable in the Luup/Lua start up, so you choose Fahrenheit as your default temp value of choice but this bit of code (plugin ) runs the F to C conversion for you ?
E.g if it’s not easy at the Vera UI level - then maybe the mobile apps could do it e.g HomeWave could have an option to convert Fahrenheit to Celsius ? That way you can have an accurate Celsius reading down to the decimal point you want ?
My RFXtrx433 sensors already report the decimal point in the UI, so there’s hope that a back end conversion of the z-wave value could act as a work around ?
No doubt I’ve overlooked something critical in the above - if so please let me know ?
[u][b]How to convert Fahrenheit to Celsius[/b][/u]
0 degrees Fahrenheit is equal to -17.77778 degrees Celsius:
0 F = -17.77778 C
The temperature T in degrees Celsius (?C) is equal to the temperature T in degrees Fahrenheit (?F) minus 32, times 5/9:
T(C) = (T(F) - 32) ? 5/9
Example
Convert 68 degrees Fahrenheit to degrees Celsius:
T(C) = (68F - 32) ? 5/9 = 20.55 C
Taken from - Fahrenheit to Celsius Conversion | (°F to °C)
The problem is not only the display (already possible) but the correct handling by the Vera for example for scene triggers. Currently values with decimal are considered by Vera as integers in scene triggers.
Hi @lolodomo
Thanks for the input…
If the displaying of the values is possible, is scene triggering / calculations the only issue ?
As an interim solution, could temperature related triggers be handled in another way - e.g via a separate ‘Temp Trigger’ app/plugin that would treat the new C decimal values in the right way ?
Obviously there is an effort involved in creating the code that would convert F to C, and also to do the triggering, but it sounds like it would be of interest to many to be able to see xx.x.
I have a number of z-wave temps - so it would be cool to see their exact reading - even if it was just a mask for Fahrenheit on the UI…
You’d have a higher precision conversion of the rounded Fahrenheit value. Having the sensor report in Fahrenheit is key to getting a better accuracy. Whether you let Vera convert that to Celsius, or DIY and show decimals, shouldn’t matter (assuming Vera converts after rounding). Say a sensor reports 73.4F to Vera. She shows you 73F or 23C. Conversely, based on that display and knowing the sensor reports in F, the reported temp could have been 72.5-73.4F / 22.5-23.0C. If you convert yourself based on 73F, you get 22.78C. Whereas the actual temp is 23.00C.
(BTW: 68.0F = 20.0C. Copy/paste error in the example?)
The key is that Vera doesn’t supply the value in full precision, as reported by the sensor. There currently is no access to the ‘real’ value; MCV would have to add it. As @lolodomo mentioned, the display part (of values with decimals) does not appear to be a big deal; most control points handle this ok as well (when I tested this quite a while back). The event handling is another area that needs attention, as said, but could possibly be worked around.
Hi @Oti
The idea being floated here is indeed only as a work around while these limitations continue to exist in Vera.
The user could choose to use Fahrenheit (as their default settings) and then have an app/script that converts them (on update, luup_variable.watch) to their corresponding and very specific Celsius value.
If this was appealing , the draw back would be that you would need to create your triggers in F, but they are a one time set up, where as for the UI, you could always have a specific C value presented.
I love floating ideas out there - just to see if they have any legs 