For the purpose of debuging can one print variable status to the message display in the UI?
Tim
Install WAI (http://forum.micasaverde.com/index.php?topic=6441.0) and use [tt]luup.variable_set( ‘urn:upnp-ap15e-com:serviceId:WAI1’, ‘Location’, ‘Your message’, dev_ID )[/tt]? ![]()
Are you saying that it is bad practice to use the UI for displaying debug info or that this is a good way to do it?
Your other thread mentions that this plugin is to raise security awareness…
I just want to have timer status readout somewhere to help debug Luup coding.
Also in regards to timers…you have mentioned in many of your threads that some will get lost in the Vera Reboots…
For rock solid timers in code should one use the seconds since midnight so that reboots can’t reset the timers?
Regards
Tim
@TimAlls,
My guess is @Ap15e was hinting that the WAI device’s UI shows a variable named ‘Location’. Location is set with the output from a Google reverse location look-up. But you could overwrite that value with Luup. That way you can ‘print’ something to the GUI in an easy way.
luup.variable_set( 'urn:upnp-ap15e-com:serviceId:WAI1', 'Location', 'Your message', dev_ID )
You’d change Your Message to whatever you want to print, and dev_ID to WAI’s Device#.
(And that can be HTML: luup.variable_set( ‘urn:upnp-ap15e-com:serviceId:WAI1’, ‘Location’, ‘Dude!’, 123) )