We have moved at community.getvera.com

Author Topic: Howto read temperature values with more decimal places  (Read 27238 times)

Offline Chris

  • Hero Member
  • *****
  • Posts: 821
  • Karma: +3/-0
Re: Howto read temperature values with more decimal places
« Reply #15 on: July 17, 2013, 11:15:23 am »
@dali,
You're right to continue to push MCV on this. However, I originally raised this with them nearly 2 years ago, and I don't see them changing it  >:(. They've (incorrectly!) linked this issue to events - this isn't right. Maybe they can't use floats with events, but they can change the temperatures to support floats (as shown by other devices such as the One Wire, or RFX).

However, @parkerc is also right. The facts are that MCV are unlikely to change this, and actually, other solutions work better. I have Oregon sensors, OneWire sensors, and my own wireless sensors. I also have a couple of ZWave temperature sensors. The ZWave sensors actually update much less often than other sensors - probably for power reasons. If you wind the report period down, they chew through batteries. ZWave sensors are also very expensive for what they are, while Oregon, or OneWire are a lot cheaper (and a home brew system is even cheaper!).

So, keep pushing. I really think MCV should fix this. However, if you want to have a good system, then it's worth thinking about an alternative along the lines of those suggested above.

Cheers
Chris

Offline dali

  • Sr. Newbie
  • *
  • Posts: 31
  • Karma: +0/-0
Re: Howto read temperature values with more decimal places
« Reply #16 on: July 18, 2013, 04:47:42 pm »
So, I got another email from MCV today. It took them four days to respond this time. One would think that it would be a detailed and response to my last email, since it was quite long and with a lot of questions. But no, it was just a standardized reply: "sorry for your inconvenience", and a request that I write the whole thing again on their new support page.

So I asked them if they had even read what I wrote to them, and that I want them to motivate why they aren't going to fix this.
« Last Edit: July 19, 2013, 02:05:37 am by dali »

Offline watou

  • Community Beta
  • Hero Member
  • ******
  • Posts: 889
  • Karma: +44/-12
Re: Howto read temperature values with more decimal places
« Reply #17 on: July 19, 2013, 10:12:23 am »
Part way through writing the Nest plugin, I encountered the "no decimals" issue and was forced to round to whole degrees.  It seemed to *almost* work to use tenths of a degree, but there was odd behavior.  At one point I did have tenths of a degree Fahrenheit showing on the dashboard, but a remote client app would crash and there was other weirdness, too. 

It's conceivable that, if you have access to a particular plugin's source code, you could try to hack it to use decimals, and then see where the problems with doing so appear.  It's unfortunate that MCV veered away from the strict UPnP spec of using Celsius times 100, so that all temperature variables would be in one format, but the presentation layer would be entirely responsible for converting to Fahrenheit, truncating unneeded precision, etc.  It would now be a huge job to rewind the clock and fix all the code to handle all temperatures in one uniform way.

Offline Chris

  • Hero Member
  • *****
  • Posts: 821
  • Karma: +3/-0
Re: Howto read temperature values with more decimal places
« Reply #18 on: July 19, 2013, 10:27:40 am »
For simply displaying a number,  there should be no issue. You can display as many decimals as you like (I do this in many plugins).

The only issue here (I believe) is that the zwave driver needs to not truncate the decimals. Apparently they did this as notifications need integers - fine, but clearly this can be limited just to notifications as is clearly shown by other plugins.

There is no need to do a wholesale change to standardise all temperatures.

Chris

Offline Da_JoJo

  • Hero Member
  • *****
  • Posts: 1380
  • Karma: +16/-78
  • If something aint work, we can allways try n make
Re: Howto read temperature values with more decimal places
« Reply #19 on: July 19, 2013, 11:11:08 am »
just wonder why fibaro can do it and is based on mios and the same miosbased vera can't ...
most tempsensor wouldnt even have this precision the dallas tempsensor has but it is clearly stated in UPnP specs that it should conform to .01 degrees celcius.. not using fahrenheit is coz only amerika uses this and is ihmo a stupid way to display temps. its like saying the windspeed is 5 steps of a human per second .
Vera lite (1.5.622), 2x an-158/2, dead usb pl2302 rs-232, 2x greenwave 6 port, 4x Fibaro FGD211 v1.6, FGBS001, few FGS - 221, etc. AuthomationHD 3 for android :-)
Dutch & German translator http://wiki.micasaverde.com/index.php/Special:AllPages http://support.micasaverde.com http://domotica-shop.nl

Offline watou

  • Community Beta
  • Hero Member
  • ******
  • Posts: 889
  • Karma: +44/-12
Re: Howto read temperature values with more decimal places
« Reply #20 on: July 19, 2013, 11:40:56 am »
Chris, I was just sharing my experiences in hopes of helping the interested parties, and noting the lost opportunity to have integer-only temperature values throughout all code if the UPnP spec had been adhered to.  And there are indeed presentation-layer issues in displaying decimals for temperature values, but you may not have encountered them in your work.

Apologies to anyone who misconstrued my comments to suggest that all temperature-handling code needs to be rewritten in order to address the specific need here.

watou

Offline Chris

  • Hero Member
  • *****
  • Posts: 821
  • Karma: +3/-0
Re: Howto read temperature values with more decimal places
« Reply #21 on: July 19, 2013, 11:53:42 am »
Hi Watou,
No probs - I just wanted to be clear that there is a "simple" fix if MCV were to do this since they seem to have linked it to a major rewrite.

As with many things in Vera, it's not well implemented but we can't rewrite everything (unfortunately!). Most things can be worked around, but this particular issue is (IMHO) primarily related to the way MCV handle their Z Wave code.

Cheers
Chris

Offline walberg

  • Sr. Newbie
  • *
  • Posts: 42
  • Karma: +0/-0
Re: Howto read temperature values with more decimal places
« Reply #22 on: July 23, 2013, 02:23:00 pm »
Hi @dali

I feel your pain,  but z-waver is right there is a long list of items that need addressing and this sadly will keep slipping down the list.

If you did want to see the decimal point on Vera, you would need to looks at something like the RFXrtx433 plugin and invest in some Oregon Scientific sensors.

For me this set up actually works much better than the Zwave devices i have and can work out cheaper too.

Nope.. As i have written elsewhere  i have tried this with the rfxcom  and the Oregon 132Ts  When the real temperature is 25 celsius,  Vera gives about 40 degrees. Thats about 15 degrees mistaken.  In the past i use Siemens Logo and the acuracy was about +/- 0.25 c.  That was for me not sufficient, but for temperature reasonable.  But RLV had an offset aboud 1% rlv  and that is not good. But now i should try an everspring 814 but it have an offset from 5%  See the pdf: The humidity of trigger-ON and trigger-OFF cannot be set equal; there MUST be at least 5% difference in between.  TERRIBLE  5% .  For my exotic heliamphora plants i need a maximum of about  1 RLV    so switch on at 70 and turn off at 71.  I bought Vera for serious use, not als children toys!  And temperature : Once the detector has been triggered, the temperature must increase or cool down at least 2。Cfrom the preset value before it can be triggered again.  Even a Bi metal schould respond better.

Offline korttoma

  • Hero Member
  • *****
  • Posts: 729
  • Karma: +26/-5
Re: Howto read temperature values with more decimal places
« Reply #23 on: July 23, 2013, 02:43:29 pm »
Attached a picture of the measurement resolution you can expect using RFXtrx and an Oregon THGN132 sensor. Also you should be able to expect quite accurate readings from an Oregon sensor. If you are not getting correct readings I guess there is a bug either in the RFXtrx firmware or in the Vera RFXtrx433 plugin.
- Tomas

Offline walberg

  • Sr. Newbie
  • *
  • Posts: 42
  • Karma: +0/-0
Re: Howto read temperature values with more decimal places
« Reply #24 on: July 23, 2013, 02:54:01 pm »
Yes thats what i am saying,  the software is not good!   I have connect the Oregon on my weather system and there the temperature was -0,7 different from my sensor in the shielding house.   Thats a lot better than 15 c.

Offline korttoma

  • Hero Member
  • *****
  • Posts: 729
  • Karma: +26/-5
Re: Howto read temperature values with more decimal places
« Reply #25 on: July 23, 2013, 03:03:55 pm »
I have had similar issues with other type of sensors on the RFXtrx. I got greate support from RFXcom and got corrected firmware within days. Just provide good logfiles and explain the problem.
- Tomas

Offline watou

  • Community Beta
  • Hero Member
  • ******
  • Posts: 889
  • Karma: +44/-12
Re: Howto read temperature values with more decimal places
« Reply #26 on: July 23, 2013, 03:49:41 pm »
Attached a picture of the measurement resolution you can expect using RFXtrx and an Oregon THGN132 sensor. Also you should be able to expect quite accurate readings from an Oregon sensor. If you are not getting correct readings I guess there is a bug either in the RFXtrx firmware or in the Vera RFXtrx433 plugin.

I don't know anything about the RFXtrx plugin, but I think the plugin code that decodes the THGN132's temp and humidity is here:

http://code.mios.com/trac/mios_rfxtrx/browser/trunk/L_RFXtrx.lua#L2222

Too many unknowns to me as to why you are getting such wildly incorrect readings.  Either there is something different about this model sensor, firmware bug, corrupted values, etc., etc.

Offline korttoma

  • Hero Member
  • *****
  • Posts: 729
  • Karma: +26/-5
Re: Howto read temperature values with more decimal places
« Reply #27 on: July 24, 2013, 12:39:47 am »
Attached a picture of the measurement resolution you can expect using RFXtrx and an Oregon THGN132 sensor. Also you should be able to expect quite accurate readings from an Oregon sensor. If you are not getting correct readings I guess there is a bug either in the RFXtrx firmware or in the Vera RFXtrx433 plugin.

Too many unknowns to me as to why you are getting such wildly incorrect readings.  Either there is something different about this model sensor, firmware bug, corrupted values, etc., etc.

I don't know if you misunderstood me or not but just to be clear I am not getting any incorrect readings in my setup.
The picture I attached is from my outside temperature and it was a cold day yesterday until the evening when the sun came out + the sensor is hit with direct sunlight in the evening so sometimes I get a little spike at the end of the day.

I'm quite new to Vera and z-wave but for me the best thing about Vera is the RFXtrx433 setup. I have a hand full of cheep sensors working perfectly with both resolution and accuracy. My first impression of z-wave is that sensors are expensive some even ridiculously expensive and it sometimes takes you hours just to include one sensor correctly. One could expect that at that price you could also get some usability and resolution more than 1?C.

Best Regards,
Tomas

- Tomas

Offline a-lurker

  • Hero Member
  • *****
  • Posts: 872
  • Karma: +66/-8
Re: Howto read temperature values with more decimal places
« Reply #28 on: July 24, 2013, 03:54:40 am »
heliamphora :o  hope your not breeding a new gigantic species - what do you feed them - small rats   :-X

Offline dali

  • Sr. Newbie
  • *
  • Posts: 31
  • Karma: +0/-0
Re: Howto read temperature values with more decimal places
« Reply #29 on: July 26, 2013, 05:43:42 pm »
So, I got another email from MCV today. It took them four days to respond this time. One would think that it would be a detailed and response to my last email, since it was quite long and with a lot of questions. But no, it was just a standardized reply: "sorry for your inconvenience", and a request that I write the whole thing again on their new support page.

So I asked them if they had even read what I wrote to them, and that I want them to motivate why they aren't going to fix this.

A week has gone by, without any life signs from MCV support. It just shows how they don't give a c**p about their customers.