How do I delete a misstyped entry in the device variable?

I made an error creating a variable. How do I delete it? Can’t determine where they live.

Thanks,
Roger

According to the Wiki:

Starting with firmware versions 1.7.1036 (Vera 3 and Vera Lite), 1.7.3917 (Vera Edge), 1.7.3918 (Vera Plus), and 1.7.3919 (Vera Secure), it is possible to delete a variable by setting its value to nil :

luup.variable_set(“urn:upnp-org:serviceId:SwitchPower1”, “Status”, nil, 7)

You might be able to do this from Apps -> Develop apps -> Test Luup Code (Lua)
Of course you need to supply the correct service ID, variable name, and device number.

trying to use luup.variable_get to confirm I have the parameters correct but do not get any return when I run it in the Test Luup Code window. How do I return the results?

It’s not clear to me what you expect to see using luup.variable_get(…). I would expect that if using luup.variable_set(…) to delete a variable would result in that variable disappearing from the variables tab of the device.
But if you really want to see the result of a variable_get you could log what is returned using luup.log(…) and then look at the contents of the log file (/tmp/log/cmh/LuaUPnP.log). In fact if the parameters you’re using in your call to variable_set are invalid you’ll probably see an error in the log.

Figured if I had the syntax correct it would return a value, if I had it wrong it would return an error. Solved the problem by removing and reinstalling DEMII. Thanks for your help.

© 2019 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy