Page 1 of 1

How to define a new type of switch

Posted: Tuesday 19 February 2019 1:43
by randomdune
I've recently purchased one of these switches, and I am able to make Domoticz see it with Zigbee2MQTT plugin.
https://www.aliexpress.com/item/2018-Up ... 11201.html

The double switch is recognized as a multi-selector switch by Domoticz. This is not correct. These are actually 2 momentary push buttons. (they show up in the logs as Left Click, Right Click, Both Click)

Is there a way to define this as a new switch type? (dual push button)
I can provide logs etc if that helps, or I can do some programming, so if it needs some coding, I can try to contribute that.

Re: How to define a new type of switch

Posted: Sunday 03 March 2019 15:17
by angrycat
You need to contact the seller. I'm pretty sure they will help you.

Re: How to define a new type of switch

Posted: Monday 04 March 2019 7:33
by randomdune
uhh.. no. I don't want to physically change the switch, I want to change how Domoticz sees the switch.

In essence, contribute a new switch type to Domoticz. (Dual push button. i.e. two momentary push buttons)

I found a workaround for the moment - in this forum, there was a person who had asked for something similar - and the solution was to set an automatic OFF time.
That worked for me - I defined an OFF-Time of 1 second. This allows the switch selector to move to either of the two ON states when it gets the message, and then back to OFF. This works, though it think its a bit of a hack.

However, if there is a way for me to help develop a new switch type, I'd be happy to try to help.