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. Controllers
  3. Domoticz
  4. Handling push buttons events

Handling push buttons events

Scheduled Pinned Locked Moved Domoticz
3 Posts 2 Posters 2.5k Views 2 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.
  • N Offline
    N Offline
    napo7
    Hardware Contributor
    wrote on last edited by napo7
    #1

    Hi !

    I'm planning to drive lights with my MySensors devices :

    I have some Mysensors devices with 8 light outputs (dimmers boards and relay boards),
    and I have some Mysensors devices with 8 push button inputs.

    I'm used to have 3 functions on the same button with my previous home automation system :
    I have the "short press" event, "long press begining" event, and the "long press release" event.
    Using these events, I usually set different actions on short press events and on long press begin events.
    This allows me , i.e., to drive 2 differents lights with the same button, or to set a dim level with a long press, and an ON/OFF command on a short press.

    How should I define my Mysensors devices to return the short press/long press/release events , that can be handled by domoticz ?
    What would be the best way to handle those kind of events in Domoticz ?

    Perhaps using the "V_TEXT" subdevice type could allow me to report differents events "PULSE/HOLD/RELEASE", but I suppose then I'll have to use nothing else but scripts to handle these on domoticz ?

    A 1 Reply Last reply
    0
    • N napo7

      Hi !

      I'm planning to drive lights with my MySensors devices :

      I have some Mysensors devices with 8 light outputs (dimmers boards and relay boards),
      and I have some Mysensors devices with 8 push button inputs.

      I'm used to have 3 functions on the same button with my previous home automation system :
      I have the "short press" event, "long press begining" event, and the "long press release" event.
      Using these events, I usually set different actions on short press events and on long press begin events.
      This allows me , i.e., to drive 2 differents lights with the same button, or to set a dim level with a long press, and an ON/OFF command on a short press.

      How should I define my Mysensors devices to return the short press/long press/release events , that can be handled by domoticz ?
      What would be the best way to handle those kind of events in Domoticz ?

      Perhaps using the "V_TEXT" subdevice type could allow me to report differents events "PULSE/HOLD/RELEASE", but I suppose then I'll have to use nothing else but scripts to handle these on domoticz ?

      A Offline
      A Offline
      AWI
      Hero Member
      wrote on last edited by
      #2

      @napo7 I am doing something similar. At first I tried to have Domoticz handle the short/long keypresses. Not very succesfull because of timing. i.e. I was not able to get dimming realiable. In my case I have the actuator (key fob) time the key-press and send the dimming level. As there is no up/down dimming command I use the V_UP/ V_DOWN of the S_COVER.

      1 Reply Last reply
      0
      • N Offline
        N Offline
        napo7
        Hardware Contributor
        wrote on last edited by napo7
        #3

        Handling the short press/long press/release by the arduino is quite easy.
        I can already send a different event regarding what happens on each button, but the event has to be handled by domoticz ;)

        Previously, I was using a custom-made software for all my home automation.
        I handled the thing like this :
        When event is "pulse" :
        if timer is OFF and light is OFF :
        - Turn a timer ON for 5 seconds.
        - Turn light to 1st dim level (levels are 2, 5, 10, 30, 50 and 100%)
        if light is ON and timer is ON :

        • Reset timer to 5s.
        • Turn light to next dim level
          If light is ON but timer is OFF :
        • Turn light OFF

        when event is "hold" :
        -do another action (ie. turn on/off another light)...

        That was working corretly, I did put this script in a function that I could reuse for each light easily, but it was my own home automation system software, and now I want to turn to another system, no more time to fix/enhance my own software !

        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


        17

        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