Vera temperature units vs urn:schemas-upnp-org:service:TemperatureSensor:1

I’m getting ready to implement a “remote temperature” feature in my thermostat plugin, which will allow any Vera supported temperature sensor to override the thermostats built-in temperature sensor. (the thermostat firmware supports a “push API” for current temperature) Obviously, if I’m going to push a temperature value to the thermostat, I’d like it to be as accurate and as fine grained as possible. In this case, the thermostat supports values in half-degree Fahrenheit resolution so I’d like the value to be at least that fine grained.

In poking around in the services files, I noticed that all the UPnP temperature state variables are defined as (i4) integer values. I was surprised UPnP had declared them this way, as it didn’t seem to give much fine-grained resolution to the values. (1 degree Celsius is, after all, a big change in temperature)

So, I went back to the original UPnP temperature sensor spec (and other UPnP specs that support temperature values), and it looks like although the values were declared as i4, the values were intended to be stored in units of 0.01 degrees Celsius. (i.e. 35 degrees Celsius = 3500 stored in the state variable) However, in Vera, 35 degrees Celcius is stored as 35, and also, 78 degrees Fahrenheit is just stored as 78. (essentially unit less values of whole temperature degrees)

So, although it would be a huge change that potentially affects every temperature device, I think there’s a need for supporting higher resolution temperature values than whole degrees, especially when it comes to climate control using Celsius values. This would mean storing the values according to the original UPnP spec, or, if that’s not possible, redefining the data type in the Vera service files to hold floating point values. This would obviously depart from the UPnP spec, but as is, I believe the current implementation is not UPnP complaint anyway.

Does anyone else have any interest in this, or am I out in left field here? :slight_smile: Is this something that MCV would see enough value in to implement? I know, for example, that many of the one wire sensors have much higher resolution that one degree.

Hugh

Yes, MiOS once again is in violation of the UPnP standard - and once again MCV doesn’t seem to care about it:

[tt]http://forum.micasaverde.com/index.php/topic,9697.msg64887.html#msg64887[/tt]
[tt]http://forum.micasaverde.com/index.php/topic,6097.msg56683.html#msg56683[/tt]

@Ap15e

Thanks! Looks like I should have searched better as it sounds like you’ve already given this topic some good coverage.

Shame there’s no response from MCV… it would be nice to have a fix, especially with the recent temperature related development.

On the bright side, I see now there is a bug that was just (4/10/2012) assigned to “c_team” by mcvflorin. Hopefully that means they’re giving it some consideration.

http://bugs.micasaverde.com/view.php?id=1817

Hugh

Even if the type is i4, it is possible to assign a decimal value. It is what I do with the RFXtrx plugin for Oregon Scientific sensors and I get decimal values displayed on the device.
Is it normal ?