How does the S_SCENE_CONTROLLER work?
-
Im building a scene controller with touch modules as buttons.
Right now i have 2 buttons that is presented as S_SCENE_CONTROLLER
present(CHILD_ID_3, S_SCENE_CONTROLLER); // Present button present(CHILD_ID_4, S_SCENE_CONTROLLER); // Present buttonI want to make each button activate a specified scene.
At first i tried to use this:MyMessage msg1(CHILD_ID_3,V_SCENE_ON); // Added message for buttons MyMessage msg2(CHILD_ID_4,V_SCENE_ON); // Added message for buttonsI then added the node to domoticz and i got 3 devices (the node as scenecontroller and 2 devices that represent each button), i added each button as scene activators for different scenes.
The problem is that i can only activate a scene once, so i edited my sketch to use these messages:
MyMessage msg1(CHILD_ID_3,V_SCENE_ON); // Added message for buttons MyMessage msg2(CHILD_ID_4,V_SCENE_OFF); // Added message for buttonsNow i can activate the scene, but i need to use my second button to deactivate it before i can activate it again.
In domoticz its no need to deactivate scenes since turning a scene off does nothing (groups can be tuned on and off).
How do i add a V_SCENE_OFF to the same button that sends V_SCENE_ON?
-
What payload do you send in the message? Each scene controller can have multiple buttons. Example:
MyMessage msg1(CHILD_ID_3,V_SCENE_ON); MyMessage msg2(CHILD_ID_3,V_SCENE_OFF); send(msg1.set(1)); // Turn on scene button 1 send(msg2.set(1)); // Turn off scene button 1 send(msg1.set(2)); // Turn on scene button 2 send(msg2.set(2)); // Turn off scene button 2
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login