Closed tmcmccann closed 1 year ago
I have a battery powered zigbee, 4 button switch. It gets discovered in Phoscon as a Switch but also 4 lightbulbs!!
Please attach the debug dump file. I don't know that type of switch, but apparently deCONZ exposes it using four lights
resources (for the four wired outputs) and a ZHASwitch
sensors
resource for the input buttons. Make sure to set sensors
in config.json, and don't exclude ZHASwitch
. If you scroll down in Eve, you should see the service for the buttons as well. Is this switch really battery-powered with four output wires? If not, it seems that deCONZ is exposing it wrongly.
In the Home App I see a group of 4 bulbs.
That's not a group; it's a single accessory with four Lightbulb services. Select Show as separate tiles to show each service as separate tile. Hopefully, you get to see a tile for the input buttons then as well, but I'm not sure about iOS 16.
Finally, the Homebridge logs do not log a button press on the switch either, it just seems to ping an update of the status every few minutes
Probably because Homebridge Hue doesn't know what button actions this switch supports. Unfortunately the deCONZ API doesn't expose this, so each wireless switch needs to be whitelisted separately. There should be a warning in the Homebridge log, shortly after startup. If you run Homebridge in DEBUG mode, you should see debug messages for the web socket notifications.
How can I make this switch show as a switch?
Do you mean four stateful, wired switches for the output wires corresponding to the lights
resources? Create a switch
resourcelink listing the lights
resources, see Wiki.
Do you mean a stateless, wireless switch for the input buttons corresponding to the sensors
resource? Please tell me what buttonevent
values this device supports, and I'll whitelist it.
[17/10/2022, 14:35:39] (Hue) On/Off light 24: set homekit on from false to null
[17/10/2022, 14:35:39] (homebridge-hue] This plugin generated a warning from the characteristic On: characteristic was supplied illegal value: null! Home App will reject null for Apple defined characteristics. See https://ho
mebridge.io/w/JtMGR for more info.
I suspect a deCONZ API bug, where it doesn't report a valid value for state.on
(on the lights
resource). If the switch is just a wireless switch with four buttons, deCONZ shouldn't expose the lights
resources. As a workaround, you could use a blacklist
resourcelink to have Homebridge Hue ignore these, but this really should be fixed in deCONZ.
Is this the log dump you need? Struggling to follow the instructions and get to the file - running the Homebridge image on a RPi homebridge.log.txt
Yep - I've set sensors
and have not excluded ZHASwitch
in the config and there is nothing else at the bottom of that page in the Eve app
Is this switch really battery-powered with four output wires?
Yes, here's the switch
Select Show as separate tiles to show each service as separate tile.
Yes, I can show as 4 separate tiles, but they are still lightbulbs so I'm not sure if that really helps? Does that help debug the issue?
Do you mean four stateful, wired switches for the output wires corresponding to the lights resources?
This is what one of my other Zigbee switches behaves like - buttons with options/triggers for single/double/long press. This is the exact same behaviour I'd like?
Please tell me what buttonevent values this device supports, and I'll whitelist it.
Do you mean support for Single/Double/Long etc? Here's the actual link to the switch I bought - Ajax Online Zignito 4 Gang Wireless Multifunction Wall Scene Switch
I suspect a deCONZ API bug, where it doesn't report a valid value for state.on (on the lights resource). If the switch is just a wireless switch with four buttons, deCONZ shouldn't expose the lights resources. As a workaround, you could use a blacklist resourcelink to have Homebridge Hue ignore these, but this really should be fixed in deCONZ.
I'm a bit confused on what you mean here? Is there a solution to this problem do you think?
Thanks so much for the help, this one has be totally lost - please let me know if there is anything else I can provide to help solve it
Config for reference
Is this the log dump you need?
That is the log file. Also useful, but I was looking for the dump file that Homebridge Hue creates on startup. You should be able to download it through the UI settings.
there is nothing else at the bottom of that page in the Eve app
Weird, it does show the battery, so Homebridge Hue did consider the sensors
resource. It didn't expose the buttons, since it doesn't know how (see also the warning below). Double-checked my code (it's been a long time) it does indeed expose the battery from the sensors
resource, even if it doesn't expose the buttons.
[17/10/2022, 16:49:04] [Hue] Phoscon-GW: CC86ECFFFE5CDC7B: _TZ3000_wkai4ga5 TS0044 "On/Off light 21"
[17/10/2022, 16:49:04] [Hue] Phoscon-GW: /lights/21: On/Off light "On/Off light 21"
[17/10/2022, 16:49:04] [Hue] Phoscon-GW: /lights/21: config: {"on":true,"bri":false,"ct":false,"xy":false,"alert":true,"speed":false,"colorLoop":false,"colorLoopSpeed":false,"lastSeen":true,"resetTimeout":500,"waitTimeUpdate":20,"unknown":true}
[17/10/2022, 16:49:04] [Hue] Phoscon-GW: /lights/22: On/Off light "On/Off light 22"
[17/10/2022, 16:49:04] [Hue] Phoscon-GW: /lights/22: config: {"on":true,"bri":false,"ct":false,"xy":false,"alert":true,"speed":false,"colorLoop":false,"colorLoopSpeed":false,"lastSeen":true,"resetTimeout":500,"waitTimeUpdate":20,"unknown":true}
[17/10/2022, 16:49:04] [Hue] Phoscon-GW: /lights/23: On/Off light "On/Off light 23"
[17/10/2022, 16:49:04] [Hue] Phoscon-GW: /lights/23: config: {"on":true,"bri":false,"ct":false,"xy":false,"alert":true,"speed":false,"colorLoop":false,"colorLoopSpeed":false,"lastSeen":true,"resetTimeout":500,"waitTimeUpdate":20,"unknown":true}
[17/10/2022, 16:49:04] [Hue] Phoscon-GW: /lights/24: On/Off light "On/Off light 24"
[17/10/2022, 16:49:04] [Hue] Phoscon-GW: /lights/24: config: {"on":true,"bri":false,"ct":false,"xy":false,"alert":true,"speed":false,"colorLoop":false,"colorLoopSpeed":false,"lastSeen":true,"resetTimeout":500,"waitTimeUpdate":20,"unknown":true}
[17/10/2022, 16:49:04] [Hue] Phoscon-GW: /sensors/23: ZHASwitch "Twin Room Switch"
[17/10/2022, 16:49:04] [Hue] Phoscon-GW: /sensors/23: warning: ignoring unknown ZHASwitch sensor {"config":{"battery":null,"on":true,"reachable":true},"ep":1,"etag":"f691f33e970f6e0f54833975b4147c49","lastannounced":"2022-10-17T15:48:19Z","lastseen":"2022-10-17T15:48Z","manufacturername":"_TZ3000_wkai4ga5","mode":1,"modelid":"TS0044","name":"Twin Room Switch","state":{"buttonevent":2002,"lastupdated":"2022-10-17T15:27:24.725"},"type":"ZHASwitch","uniqueid":"cc:86:ec:ff:fe:5c:dc:7b-01-0006"}
This also confirms four lights
resources and one sensors
resource.
Is this switch really battery-powered with four output wires?
Yes, here's the switch
Doesn't look like it has any output wires (to cut power to wired devices).
Do you mean support for Single/Double/Long etc?
Yes, but I need to know what they implemented when adding support for this switch to deCONZ. Doesn't look like they did a good job, as the lights
resources don't make sense, without any output wires.
Is this the file - it’s included in my original post, I downloaded it from the UI? https://github.com/ebaauw/homebridge-hue/files/9801113/homebridge-hue.json.gz
Yes, but I need to know what they implemented when adding support for this switch to deCONZ.
is there anything I can with that? Is there anything else you’d recommend or is this switch pretty useless?
thanks
Is this the file - it’s included in my original post, I downloaded it from the UI?
Sorry, I missed that.
is there anything I can with that?
You could try each of the buttons, single press, double press, long press, and note down what buttonevent
value is reported through the web socket.
Single Press
"19:19:46:757": { "e": "changed", "id": "24", "r": "sensors", "state": { "buttonevent": 1002, "lastupdated": "2022-10-17T18:19:46.884" }, "t": "event", "uniqueid": "cc:86:ec:ff:fe:5c:dc:7b-01-0006" }
Double Press
"19:20:18:303": { "e": "changed", "id": "24", "r": "sensors", "state": { "buttonevent": 1004, "lastupdated": "2022-10-17T18:20:18.432" }, "t": "event", "uniqueid": "cc:86:ec:ff:fe:5c:dc:7b-01-0006" }
Long Press
"19:21:36:738": { "e": "changed", "id": "24", "r": "sensors", "state": { "buttonevent": 1003, "lastupdated": "2022-10-17T18:21:36.869" }, "t": "event", "uniqueid": "cc:86:ec:ff:fe:5c:dc:7b-01-0006" }
This helpful? That's for one of the 4 buttons - I can post them all if needed
Response sometimes has more info
"19:23:26:444": { "attr": { "id": "24", "lastannounced": null, "lastseen": "2022-10-17T18:23Z", "manufacturername": "_TZ3000_wkai4ga5", "modelid": "TS0044", "name": "Switch", "swversion": null, "type": "ZHASwitch", "uniqueid": "cc:86:ec:ff:fe:5c:dc:7b-01-0006" }, "e": "changed", "id": "24", "r": "sensors", "t": "event", "uniqueid": "cc:86:ec:ff:fe:5c:dc:7b-01-0006" },
That's for one of the 4 buttons - I can post them all if needed
Which one? The upper left one with one dot? Yes please provide the info for the other buttons as well.
Yep that was the button with one dot - I'll post the rest below in the same format of single press, then double press, then long press...
Two dots;
{ "22:31:56:468": { "attr": { "id": "24", "lastannounced": null, "lastseen": "2022-10-17T21:31Z", "manufacturername": "_TZ3000_wkai4ga5", "modelid": "TS0044", "name": "Switch", "swversion": null, "type": "ZHASwitch", "uniqueid": "cc:86:ec:ff:fe:5c:dc:7b-01-0006" }, "e": "changed", "id": "24", "r": "sensors", "t": "event", "uniqueid": "cc:86:ec:ff:fe:5c:dc:7b-01-0006" }, "22:31:56:469": { "e": "changed", "id": "24", "r": "sensors", "state": { "buttonevent": 2002, "lastupdated": "2022-10-17T21:31:56.479" }, "t": "event", "uniqueid": "cc:86:ec:ff:fe:5c:dc:7b-01-0006" }, "22:32:03:385": { "e": "changed", "id": "24", "r": "sensors", "state": { "buttonevent": 2004, "lastupdated": "2022-10-17T21:32:03.395" }, "t": "event", "uniqueid": "cc:86:ec:ff:fe:5c:dc:7b-01-0006" }, "22:32:08:571": { "e": "changed", "id": "24", "r": "sensors", "state": { "buttonevent": 2003, "lastupdated": "2022-10-17T21:32:08.582" }, "t": "event", "uniqueid": "cc:86:ec:ff:fe:5c:dc:7b-01-0006" } }
Three dots;
{ "22:33:32:410": { "attr": { "id": "24", "lastannounced": null, "lastseen": "2022-10-17T21:33Z", "manufacturername": "_TZ3000_wkai4ga5", "modelid": "TS0044", "name": "Switch", "swversion": null, "type": "ZHASwitch", "uniqueid": "cc:86:ec:ff:fe:5c:dc:7b-01-0006" }, "e": "changed", "id": "24", "r": "sensors", "t": "event", "uniqueid": "cc:86:ec:ff:fe:5c:dc:7b-01-0006" }, "22:33:32:435": { "e": "changed", "id": "24", "r": "sensors", "state": { "buttonevent": 3002, "lastupdated": "2022-10-17T21:33:32.446" }, "t": "event", "uniqueid": "cc:86:ec:ff:fe:5c:dc:7b-01-0006" }, "22:33:34:593": { "e": "changed", "id": "24", "r": "sensors", "state": { "buttonevent": 3004, "lastupdated": "2022-10-17T21:33:34.604" }, "t": "event", "uniqueid": "cc:86:ec:ff:fe:5c:dc:7b-01-0006" }, "22:33:41:199": { "e": "changed", "id": "24", "r": "sensors", "state": { "buttonevent": 3003, "lastupdated": "2022-10-17T21:33:41.211" }, "t": "event", "uniqueid": "cc:86:ec:ff:fe:5c:dc:7b-01-0006" } }
Four dots;
{ "22:34:04:919": { "e": "changed", "id": "24", "r": "sensors", "state": { "buttonevent": 4002, "lastupdated": "2022-10-17T21:34:04.930" }, "t": "event", "uniqueid": "cc:86:ec:ff:fe:5c:dc:7b-01-0006" }, "22:34:08:8": { "e": "changed", "id": "24", "r": "sensors", "state": { "buttonevent": 4004, "lastupdated": "2022-10-17T21:34:08.021" }, "t": "event", "uniqueid": "cc:86:ec:ff:fe:5c:dc:7b-01-0006" }, "22:34:13:168": { "e": "changed", "id": "24", "r": "sensors", "state": { "buttonevent": 4003, "lastupdated": "2022-10-17T21:34:13.181" }, "t": "event", "uniqueid": "cc:86:ec:ff:fe:5c:dc:7b-01-0006" } }
Anything else you need? Thanks 🙏
Hey @ebaauw I notice a new commit above...is there anything I can try to see if it works now? Thanks
Yeah, the switch should work with that commit. I’ll cut a new version this weekend or so.
Fantastic - you are a hero! How could I update my instance or is the process to wait for your update in Homebridge? Thanks
Probably easiest to wait for the new release. Alternatively, you can close the repo or manually patch the updated file.
Hey @ebaauw any update on when you expect to cut a new version? 😊
Later this week, after NodeJS has switched LTS to v18, which should happen today (US time). See https://github.com/nodejs/release#release-schedule.
Published v0.13.47.
Issue
I have a battery powered zigbee, 4 button switch. It gets discovered in Phoscon as a Switch but also 4 lightbulbs!! In Phoscon, the events are captured in the logs too under the Switches filter. But Homebridge picks up the devices as lightbulbs. In the Home App I see a group of 4 bulbs. I've checked other questions and can't find the same issue, but I've looked at the FAQ and see that in the Eve app, the Resource is showing as /Lights/ where I'm guessing it should be Switch or Group? Finally, the Homebridge logs do not log a button press on the switch either, it just seems to ping an update of the status every few minutes
How can I make this switch show as a switch? The other Zigbee switch in Phoscon (different make) works perfectly! I'm stumped
Thanks
Debug Files
homebridge-hue.json.gz
Switch showing correctly![Screen Shot 2022-10-17 at 2 28 57 PM](https://user-images.githubusercontent.com/116001672/196189772-3acf15f8-f98a-482c-b1f6-5c6f6eaac3f9.png)
...but also as 4 bulbs!![Screen Shot 2022-10-17 at 2 29 52 PM](https://user-images.githubusercontent.com/116001672/196189891-3c0c59e4-eda6-45f7-a402-3a93dc7d5166.png)
Events of button press![Screen Shot 2022-10-17 at 2 31 42 PM](https://user-images.githubusercontent.com/116001672/196190661-9560148f-105c-41d9-9301-0ae8775c9259.png)
As bulbs in Homekit![Screen Shot 2022-10-17 at 2 33 04 PM](https://user-images.githubusercontent.com/116001672/196190675-ea6f1d9f-73a6-495d-9b60-efb39fe523ba.png)
As lights in Eve app![Screen Shot 2022-10-17 at 2 37 08 PM](https://user-images.githubusercontent.com/116001672/196191418-c046a3e0-89e6-48f2-b96d-1895beb81437.png)
Homebridge Debug![Screen Shot 2022-10-17 at 2 38 11 PM](https://user-images.githubusercontent.com/116001672/196191808-790db1c9-2acb-42b6-93fe-ba45eda06dad.png)