Toggle multiple switch state Luup

I have found some luup code for Vera to change current state of a Switch or light but I need to be able to change the state of two lights at the same time. The below code works every time when testing in Vera under develop apps/test luup code bit when I add it to a scene it does not work. Any ideas?
luup.call_action(“urn:micasaverde-com:serviceId:HaDevice1”, “ToggleState”, {}, 51)
luup.call_action(“urn:micasaverde-com:serviceId:HaDevice1”, “ToggleState”, {}, 3)

Hello,

Please know that I have mailed you with some information regarding your question.

Thank you. :slight_smile:

It would be great if you would post the information here too so others can learn and we can search for this in the future. Thanks

The option proposed was to use:
Lua:
luup.call_action(?urn:micasaverde-com:serviceId:ZWaveNetwork1?, ?SendData?, {Node=7, Data=?x20 1 xFF?}, 1)"

This is turning the switch, which has the node id 7, which is the equivalent of the altid in parameters to that device and not the device ID.
Which just throw an error when run under test luup code. I am a bit confused, the luup code I provided works every time when run under test luup code (turns off 2x light if they are currently on and turns on 2x lights if they are currently off) but when saved to a scene and then run the scene doesn?t work…

Just an update that I got my original code working in a scene (with the help of aeotec support)and in the scene I set the trigger as ?tap button 3? on my wallmote quad as opposed to assigning a scene to a button in the wallmote device. I use this method now as assigning a button to control a device directly through group assignment sometimes requires pressing the action button twice if the device (2x lights in my case) is also controlled by another trigger (motion sensor trigger/hub in my case) and the wallmote doesn?t know the current state of the device and first press actually send a request to turn it into the state it is already in.
Hope this makes sense and is of help to someone…
Forgot to add that a hub restart was also required to get the scene working