While implementing Luup events for local dose rates (see http://forum.micasaverde.com/index.php?topic=5466.0), I came across a strange phenomenon:
UPnP variable [tt]DoseRateCosmical[/tt] is defined as [tt]dataType number[/tt].
Scene has event ‘Cosmical dose rate goes above’ [0.1] ‘microSv/h’.
Hook for [tt]DoseRateCosmical[/tt] seems to be OK.
Setting [tt]DoseRateCosmical[/tt] to [tt]0.9[/tt] doesn’t trigger the event.
Setting [tt]DoseRateCosmical[/tt] to [tt]1.1[/tt] does trigger the event …
According to http://forum.micasaverde.com/index.php?topic=5988.msg35515#msg35515 [tt]number[/tt] is a 8 byte float.
Edit:
How to reproduce:
[ul][li]Install DAD V0.13 BETA from http://forum.micasaverde.com/index.php?topic=5466.0.[/li]
[li]Create a scene with event Cosmical dose rate goes above’ [0.1] ‘microSv/h’.[/li][/ul]
luup.variable_set( "urn:upnp-ap15e-com:serviceId:DAD1", 'DoseRateCosmical' , '1.99', DAD_ID )
does trigger the event, whereas
luup.variable_set( "urn:upnp-ap15e-com:serviceId:DAD1", 'DoseRateCosmical' , '0.99', DAD_ID )
doesn’t trigger the event.