How about a small math exam for your Vera?

Please post the results for your Vera and the version (V1,V2):

luup.log('MYVERSION: '..luup.version_branch ..'.'..luup.version_major..'.'..luup.version_minor)
luup.log('CORRECT (1234567890)? '..tonumber(math.max(1234567890, 0)))
luup.log('CORRECT (seconds = 00)? '..os.date('%c',1301191800))

I know that I am being stupid, but ah… where do I put this programming script at in Vera?

MiOS developers → Test Luup code (Lua)

… then extract the result from /var/log/cmh/LuaUPnP.log

luup_log:0: MYVERSION: 1.1.1186 <0x340e>
luup_log:0: CORRECT (1234567890)? 1234567936 <0x340e>
luup_log:0: CORRECT (seconds = 00)? Sat Mar 26 22:10:08 2011 <0x340e>

luup_log:0: MYVERSION: 1.1.1234
luup_log:0: CORRECT (1234567890)? 1234567936
luup_log:0: CORRECT (seconds = 00)? Sat Mar 26 2

V2 (as you would suspect from the below)
luup_log:0: MYVERSION: 1.1.1234 <0x340e>
luup_log:0: CORRECT (1234567890)? 1234567936 <0x340e>
luup_log:0: CORRECT (seconds = 00)? Sat Mar 26 19:10:08 2011 <0x340e>

It’s OpenWrt’s fault. r18159 changed the Lua number representation to float, ostensibly to save memory. r23284 changed it back to double, given Lua’s unwillingness to turn numbers back into integers, it messes with epoch times.

Here is the email discussion: https://lists.openwrt.org/pipermail/openwrt-devel/2010-October/008193.html

Vera’s build of Backfire (r21639) is during the reign of float. The fix is for MCV to update the version of Backfire that it installs.

A big “Thank you!” to all posters.

@futzle

Yes, I know. I’m desperately trying to convince MCV that something is seriously wrong with the Lua component of the current OpenWRT builds for Vera V2 - no acknowledgement so far …

Yeah, I agree. The fact that the OpenWrt developers chose to switch it back too is a bit of a giveaway, isn’t it?

Of course, if MCV released the OpenWrt source code like they are legally required to do we could just compile our own…

do I see a suggestion to a custom firmware? lol! :slight_smile:

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

Vera has finally passed the math exam! :slight_smile:

[url=http://bugs.micasaverde.com/view.php?id=1451]http://bugs.micasaverde.com/view.php?id=1451[/url]

Vera V3 or (Vera V2 and Vera V3)?

Only Vera 3 for now.

If its only V3 for now then why has the mantis been closed? :wink:

Now that its closed, then my guess is that it will get forgotten and never fixed for the V1 and V2!

CJ said that he will try to fix this for Vera 2, but didn’t have time last week.
You can reopen the ticket if you like.

Now fixed for Vera 2.

Is this related to vera’s inability to get non-integer values from temperature and other sensors?

Not related.

Is this related to vera's inability to get non-integer values from temperature and other sensors?

On the surface Vera’s inability to provide non-integer values is caused by not adhering to the UPnP specification. The UPnP specification clearly states that temperature values are centi-degrees, not degrees. In consequence, all temperature related UPnP variables are off by a factor of 100 - and there is no way left to put non-integer values into the UPnP variables.

MCV shouldn’t use the [tt]upnp-org[/tt] namespace for non-compliant variables - now it’s too late. I cannot think of a fix that wouldn’t break existing Luup code that assumes that temperature values are integer degrees. In other words: don’t expect a fix soon …