=================
scenes Adapter can create scenes and execute them in ioBroker environment.
This adapter can create three types of scenes:
- scenes
- groups
- virtual groups
Scenes will be created if setting "set on false" are not used. Every scene can be configured individually, so you can have scenes and groups in one instance of adapter. The scene is just list of states id and values, that these states must have by activation of the scene. E.g. we have created on scene "scene.allLightInBath":
scene.allLightInBath
|- hm-rpc.0.BOTTOM_LIGHT.STATE - true
+- hm-rpc.0.TOP_LIGHT.STATE - true
To activate scene we must set "scene.allLightInBath" to true (e.g over script or vis). Then both states will be set to desired values, to true. The value of scene.allLightInBath will be true too. If we manually switch of the top light the value of the scene.allLightInBath will go to false. And again to true if we will switch manually the light on.
Let's add to the scene the fan:
scene.allLightInBath
|- hm-rpc.0.BOTTOM_LIGHT.STATE - true
|- hm-rpc.0.TOP_LIGHT.STATE - true
|- hm-rpc.0.FAN.STATE - true
|- hm-rpc.0.FAN.STATE - false (delay 60000ms)
In this case the fan will be switched on ba activation of the scene and will be switched off in one minute. After the fan will be switched off the value of scene.allLightInBath will go to false, because not all states are equal to desired values. States with delay are not participate in calculations.
You can test the scene with a "play" button. Additionally you can link this scene direct with other scene ID. E.g if you have a sensor on the door you can select it as a trigger:
trigger
id: hm-rpc.0.DOOR_SENSOR.STATE
condition: ==
value: true
And every time you will open the door in the bath all lights with fan will be switched on.
Groups are like virtual channels. You can create with the help of groups virtual device from several actuators and control them together, like one device. Let's modify our sample with bath's lights.
scene.allLightInBath "set on true" "set on false"
|- hm-rpc.0.BOTTOM_LIGHT.STATE - true false
+- hm-rpc.0.TOP_LIGHT.STATE - true false
If you will link this group with the door sensor like:
trigger on true
id: hm-rpc.0.DOOR_SENSOR.STATE
condition: ==
value: true
trigger on false
id: hm-rpc.0.DOOR_SENSOR.STATE
condition: ==
value: false
Every time you will open the door all lights in a bath will be switched on. The value of the scene.allLightInBath will go to true. If you will close the door the lights will be switched off. And the value of scene.allLightInBath will go to false.
It is useless, but it is good as an example.
If you will manually switch on one light, the value of the scene.allLightInBath will go to uncertain.
Delays can be used in the group too, but the states with delay are not participate in calculations of the current value of group.
Virtual groups are like virtual channels and like groups, but can have any kind of values: numbers, strings and so on. You can create virtual group to control all shutters in living room. By writing 40% into virtual group all shutters will be set to 40%.
- (bluefox) Works now with Admin3
- (bluefox) use new select ID dialog
- (DeepCoreSystem) translations
- (paul53) text fixes
- (bluefox) fix false scenes
- (bluefox) Support of iobroker.pro
- (bluefox) add read/write settings to scene object
- (bluefox) update node-schedule
- (bluefox) fix error disabled states in scene
- (bluefox) fix error with trigger on false
- (bluefox) fix error with restart adapter
- (bluefox) delete triggers if virtual groups enabled
- (bluefox) support of virtual groups
- (bluefox) show set value if 0 or false in settings
- (bluefox) add translations
- (bluefox) try to fix error by renaming
- (bluefox) allow description for states in scene
- (bluefox) check by rename if the scene with the same name yet exists
- (bluefox) allow copy scene
- (bluefox) fix error with delay and stopAllDelays settings
- (bluefox) fix error with delays and config change
- (bluefox) implement replace
- (bluefox) change configuration schema
- (bluefox) add cron
- (bluefox) add burst interval
- (bluefox) initial commit
iobroker add scenes