Some device variables are missing in service description

Hello,

I have posted a more specific version of my question here: [url=http://forum.micasaverde.com/index.php/topic,37181.0.html]http://forum.micasaverde.com/index.php/topic,37181.0.html[/url], but since it didn’t get any answer I suspected that I have written it in the wrong place. Below, I try to paraphrase the problem in a more general way. Any help/feedback is much appreciated.

We have added Nodon soft remote scene controller (as a generic device) to Vera Edge with UI7. Based on a tutorial, I have to add a piece of luup code so that the device supports 16 distinct scenarios (generated by 4 physical buttons each supporting 4 types of press). The reference luup code refers to the variable LastSceneID, which I see in the Device > Control > Advanced tab. I have verified that the value of LastSceneID changes according to the way each button is pressed.

The problem is that LastSceneID is not listed in the S_SceneController1 service file, which is associated with this device. When I try to read its value,

local scenarioID = luup.variable_get("urn:micasaverdecom:serviceId:SceneController1","LastSceneID", 9)

the value returned by scenarioID is nil. Is this because LastSceneID is not listed in service file? How do you justify that a variable is shown in Advanced tab of device, but is missing in the service file?

Thank you very much. I am still very new to luup and Vera, and really want to learn from others’ experience :slight_smile:
Mona

It looks very much like you have the serviceId incorrectly in your function call.

Should be:

local scenarioID = luup.variable_get("urn:micasaverde-com:serviceId:SceneController1","LastSceneID", 9)

Thank you a world! I could waste a long time on such a small typo!

By the way, why is it that I can’r see LastSceneID in service file, but it is working and listed in the interface?

Additional device serviceIds and variables can be generated dynamically. I suppose that that particular variable is not actually part of the formal service definition.

…although it is, in fact, mentioned here http://wiki.micasaverde.com/index.php/Luup_UPnP_Variables_and_Actions#SceneController1

The Service file is mostly for UPNP connectivity.
Devices do not have to post all of there state as UPnP variables.