Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. How does the S_SCENE_CONTROLLER work?

How does the S_SCENE_CONTROLLER work?

Scheduled Pinned Locked Moved Development
2 Posts 2 Posters 1.0k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Tore André RosanderT Offline
    Tore André RosanderT Offline
    Tore André Rosander
    wrote on last edited by
    #1

    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 button 
    

    I 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 buttons
    

    I 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 buttons
    

    Now 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?

    1 Reply Last reply
    0
    • H Offline
      H Offline
      hek
      Admin
      wrote on last edited by
      #2

      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
      
      
      1 Reply Last reply
      0

      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
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      8

      Online

      12.0k

      Users

      11.2k

      Topics

      113.4k

      Posts


      Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • MySensors
      • OpenHardware.io
      • Categories
      • Recent
      • Tags
      • Popular