kabbi / zigbee2mqtt-adapter

zigbee2mqtt adapter for WebThings gateway
Mozilla Public License 2.0
21 stars 13 forks source link

Xiaomi Mi Wireless Switch #36

Closed tim-hellhake closed 3 years ago

tim-hellhake commented 3 years ago

First of all, awesome addon! I successfully managed to pair my Xiaomi Mi Wireless Switch using this add-on. The problem is the button's clicks are represented as property rather than as an event. Thus the rule-engine will only detect a change from single click to long click but not two single clicks after another.

tim-hellhake commented 3 years ago

I'm already on it. I had some progress today.

flatsiedatsie commented 3 years ago

Hmm. I've disabled legacy click support, as that was Zigbee2MQTT's recommendation. You could try setting process.env.ZIGBEE2MQTT_CONFIG_ADVANCED_LEGACY_API = false; to true in the code and see what that does.

In general the idea is to make this addon follow the Zigbee2MQTT exposes API closely, so that there is as little custom stuff as possible.

Careful making big new features, as the addon is still under heavy initial construction.

tim-hellhake commented 3 years ago

Careful making big new features, as the addon is still under heavy initial construction.

No big features. Just a new profile and little fixes.

flatsiedatsie commented 3 years ago

I've just uploaded version 0.6

flatsiedatsie commented 3 years ago

Out of curiosity: "double click" or something like it doesn't show up as the value of the enum property? I would have thought that the xiaomi device itself handles a double click recognition? It would then be pushed down the line.

tim-hellhake commented 3 years ago

Unfortunately, my changes were lost during the 0.6 update. I'm using the zigbee-adapter now.

Out of curiosity: "double click" or something like it doesn't show up as the value of the enum property? I would have thought that the xiaomi device itself handles a double click recognition?

I think it does. When I double click I see double click in the property.