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


      11

      Online

      11.7k

      Users

      11.2k

      Topics

      113.0k

      Posts


      Copyright 2019 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