Scene devices

  • 41 Views
  • Last Post 27 February 2013
Axial-User posted this 27 February 2013

Can i get a list of devices for a scene

I have a script that will - when the conditions are met - start a scene
This scene turns a switch off
When the switch is turned off - even if its already off - blinks its light (what is not nice in a bedroom)

So i like to see if the device(s) in the scene are already off before calling the scene


wow, a switch blinks lights even if off? Strange switch! What brand is it?

I need to know a little bit more about when you need the device list and how you plan to use it. Can you reply with that info?

Order By: Standard | Newest | Votes
Ryan-Scott posted this 27 February 2013

Can i get a list of devices for a scene

I have a script that will - when the conditions are met - start a scene
This scene turns a switch off
When the switch is turned off - even if its already off - blinks its light (what is not nice in a bedroom)

So i like to see if the device(s) in the scene are already off before calling the scene


wow, a switch blinks lights even if off? Strange switch! What brand is it?

I need to know a little bit more about when you need the device list and how you plan to use it. Can you reply with that info?

Axial-User posted this 27 February 2013

It's a düwi ;)

05439 plugin dimmer - http://www.rev.de/DEprodukt11136.ahtml
and the
05437 plugin switch - http://www.rev.de/DEprodukt11133.ahtml

But that's not really relevant.

Axial-User posted this 27 February 2013

And here's the relevant part of the script

if (runScript) {
// See if a Scene was supplied, and if so, activate it
if (sceneName != null) {
[b]//getSceneDevice(s) and check if any of them is on before running the scene[/b]
activateScene(sceneName);
writeFileLog(" Scene "+ sceneName +" started");
}
}

Ryan-Scott posted this 27 February 2013

And here's the relevant part of the script

if (runScript) {
// See if a Scene was supplied, and if so, activate it
if (sceneName != null) {
[b]//getSceneDevice(s) and check if any of them is on before running the scene[/b]
activateScene(sceneName);
writeFileLog(" Scene "+ sceneName +" started");
}
}


Could you do this with a condition instead? Add a condition for each device in the scene... either way, this approach could have a downside in that if one of your devices is not already off, the scene won't fire and therefore none of your other devices would turn off.

Close