custom variable to domoticz to trigger scripts then reset...

  • I have a gesture sensor incorporated into a node that I want to use to trigger logic scripts in Domoticz.

    There are 6 possible gestures (up, down, left, right, near,far). Currently I have presented it as 3 binary switches:

    1. GestureUpDown, S_Binary, gesture up turns on switch, gesture down turns off switch
    2. GestdureLeftRight, S_Binary, left = on, right = off
    3. GestureNearFar, S_Binary, near=on, far = off.

    The problem is that some of the events it will trigger are not binary e.g. I want to link the up/down to my kitchen light that has 3 settings (Off, On 50%,, On 100%). So I'd like to gesture up and then Domoticz will check current light setting and increment up one step e.g. if it is off then it will switch to 50%, if it is already at 50% then it will increase to 100%, and the opposite with downward gestures.

    I am fine getting this to work on a single iteration, but the problem is that once I have swiped up once then Domoticz regards the GestureUpDown switch as already on so doesn't trigger any event as the switch state hasn't changed.

    What I'd like to do is have the 6 gestures report to Domoticz as e.g. integers 1,2,3,4,5,6 which will then trigger an event and subsequently Domoticz will reset the sensor that it is linked to back to 0. Then every time I e.g. swipe up, it will trigger the script.

    I am having trouble working out what sensor to present this as - I could present it as a Dimmer switch so that the gestures set the dimmer at e.g. 10%...60% but it feels like a bit of a bodge. I also thought about presented it as 6 separate V_TRIPPED sensors but it feels messy. I'm also finding that the switches tab in Domoticz is becoming full of random switches that aren't really switches if you know what I mean!

    Anyone got any ideas of a nice workaround?

  • Mod

    I remember there was a thread about making a custom dimmer for Domoticz, it could be a solution

  • Cheers @gohan - I solved it in the end:

    First tried to set as a text sensor but changing the text on a sensor doesn't trigger an event in Domoticz (or at least I couldn't make it happen). Instead I present it as a light level sensor which can be used and is hidden away on a different tab in Domoticz....

Log in to reply

Suggested Topics

  • 1
  • 3
  • 5
  • 1
  • 6
  • 198