ebaauw / homebridge-hue

Homebridge plugin for Philips Hue
Apache License 2.0
901 stars 91 forks source link

Changing only brightness works with Home+ but not with Home App #928

Closed dibimuc closed 3 years ago

dibimuc commented 3 years ago

70C5106E-FB3C-430C-BDB0-2D768A5F414F B7545D90-A1E9-4417-AFE2-EFE35FFF6624

Issue

I have the following scenario - a bit more sophisticated. Have hue running with HomeBridge.

I created a scene in the Home+ App which modifies the brightness but lets the state on/off untouched (see screenshot). Setting the scene in Home+ works. The lamps remain off but the brightness changes. In case of Setting the scene in the Apple Home App the following errors occur.

- sporadically some lamps are shown as „not reacting“
- actually they are not. If you turn the light off the error disappears 

I prepared a log file by setting the scene in Home+ (change brightness to 35%) and home app (brightness to 100%). In any case, setting the scene in Home+ makes the warnings in the home app disappear.

What does the Home App differently than the Home+?

Hint: several versions before it worked also in the HomeApp. why is it important that I have to set this scene in HomeApp? Because I use a simple time trigger (sunset).

Log Messages


Setting the scene in Home+ (which works fine)

14.2.2021, 17:19:31 [Hue] Strahler: set homekit on from true to false
14.2.2021, 17:19:31 [Hue] Golden Globe: set homekit on from true to false
14.2.2021, 17:28:11 [Hue] LED Licht: homekit on changed from false to true
14.2.2021, 17:30:21 [Hue] Strahler: homekit on changed from false to true
14.2.2021, 17:30:23 [Hue] Strahler: homekit on changed from true to false
14.2.2021, 17:30:24 [Hue] Strahler: homekit on changed from false to true
14.2.2021, 17:36:59 [My TaHoma Box] Login TaHoma server...
14.2.2021, 17:42:16 [Hue] Strahler: set homekit on from true to false
14.2.2021, 17:47:11 [Hue] LED Licht: homekit on changed from true to false
14.2.2021, 17:48:05 [Hue] Strahler: homekit brightness changed from 50% to 35%
14.2.2021, 17:48:05 [Hue] Philips hue: request 33061: PUT /lights/20/state {"bri":89}
14.2.2021, 17:48:05 [Hue] Philips hue: request 33061: api error 201: parameter, bri, is not modifiable. Device is set to off.
14.2.2021, 17:48:05 [Hue] Iris: homekit brightness changed from 50% to 35%
14.2.2021, 17:48:05 [Hue] Philips hue: request 33062: PUT /lights/10/state {"bri":89}
14.2.2021, 17:48:05 [Hue] Philips hue: request 33062: api error 201: parameter, bri, is not modifiable. Device is set to off.
14.2.2021, 17:48:05 [Hue] Strahler: homekit brightness changed from 50% to 35%
14.2.2021, 17:48:05 [Hue] Philips hue: request 33063: PUT /lights/33/state {"bri":89}
14.2.2021, 17:48:05 [Hue] Philips hue: request 33063: api error 201: parameter, bri, is not modifiable. Device is set to off.
14.2.2021, 17:48:05 [Hue] Strahler: homekit brightness changed from 50% to 35%
14.2.2021, 17:48:05 [Hue] Philips hue: request 33064: PUT /lights/18/state {"bri":89}
14.2.2021, 17:48:05 [Hue] Philips hue: request 33064: api error 201: parameter, bri, is not modifiable. Device is set to off.
14.2.2021, 17:48:05 [Hue] Strahler: homekit brightness changed from 50% to 35%
14.2.2021, 17:48:05 [Hue] Philips hue: request 33065: PUT /lights/19/state {"bri":89}
14.2.2021, 17:48:05 [Hue] Philips hue: request 33065: api error 201: parameter, bri, is not modifiable. Device is set to off.
14.2.2021, 17:48:05 [Hue] Strahler: homekit brightness changed from 50% to 35%
14.2.2021, 17:48:05 [Hue] Philips hue: request 33066: PUT /lights/12/state {"bri":89}
14.2.2021, 17:48:05 [Hue] Philips hue: request 33066: api error 201: parameter, bri, is not modifiable. Device is set to off.
14.2.2021, 17:48:06 [Hue] Iris: set homekit brightness from 35% to 50%
14.2.2021, 17:48:06 [Hue] Strahler: set homekit brightness from 35% to 50%
14.2.2021, 17:48:06 [Hue] Strahler: set homekit brightness from 35% to 50%
14.2.2021, 17:48:06 [Hue] Strahler: set homekit brightness from 35% to 50%
14.2.2021, 17:48:06 [Hue] Strahler: set homekit brightness from 35% to 50%
14.2.2021, 17:48:06 [Hue] Strahler: set homekit brightness from 35% to 50%
14.2.2021, 17:48:16 [Hue] Strahler: set homekit brightness from 50% to 35%
14.2.2021, 17:48:21 [Hue] Strahler: set homekit brightness from 50% to 35%
14.2.2021, 17:48:21 [Hue] Strahler: set homekit brightness from 50% to 35%
14.2.2021, 17:48:25 [Hue] Strahler: homekit on changed from false to true
14.2.2021, 17:48:26 [Hue] Strahler: set homekit brightness from 50% to 35%
14.2.2021, 17:48:27 [Hue] Strahler: homekit on changed from true to false
14.2.2021, 17:48:36 [Hue] Iris: set homekit brightness from 50% to 35%
14.2.2021, 17:48:36 [Hue] Strahler: set homekit brightness from 50% to 35%
14.2.2021, 17:51:11 [Hue] Strahler: set homekit on from false to true
14.2.2021, 17:52:14 [Hue] LED Licht: homekit on changed from false to true
14.2.2021, 17:53:26 [Hue] Strahler: set homekit on from false to true
14.2.2021, 17:54:41 [Hue] Strahler: set homekit on from true to false
14.2.2021, 17:55:11 [Hue] Strahler: set homekit on from true to false
14.2.2021, 18:01:01 [Hue] Strahler: set homekit on from false to true
14.2.2021, 18:01:10 [Hue] Strahler: homekit on changed from true to false
14.2.2021, 18:06:59 [My TaHoma Box] Login TaHoma server...
14.2.2021, 18:07:34 [Hue] LED Licht: homekit on changed from true to false
14.2.2021, 18:22:46 [Hue] Iris: set homekit on from false to true
14.2.2021, 18:24:01 [Hue] Iris: set homekit on from true to false
14.2.2021, 18:25:06 [Hue] Strahler: set homekit on from false to true
14.2.2021, 18:26:56 [Hue] Strahler: set homekit on from true to false

Setting the scene in Home App (which occurs to the error)

14.2.2021, 18:44:00 [Hue] Strahler: homekit brightness changed from 35% to 100%
14.2.2021, 18:44:00 [Hue] Strahler: homekit brightness changed from 35% to 100%
14.2.2021, 18:44:00 [Hue] Strahler: homekit brightness changed from 35% to 100%
14.2.2021, 18:44:00 [Hue] Iris: homekit brightness changed from 35% to 100%
14.2.2021, 18:44:00 [Hue] Strahler: homekit brightness changed from 35% to 100%
14.2.2021, 18:44:00 [Hue] Strahler: homekit brightness changed from 35% to 100%
14.2.2021, 18:44:00 [Hue] Philips hue: request 33747: PUT /lights/33/state {"bri":254}
14.2.2021, 18:44:00 [Hue] Philips hue: request 33747: api error 201: parameter, bri, is not modifiable. Device is set to off.
14.2.2021, 18:44:01 [Hue] Strahler: set homekit brightness from 100% to 92%
14.2.2021, 18:44:36 [Hue] Strahler: set homekit brightness from 92% to 100%
![2C26A2A8-56CC-41FB-AA47-A31DC043BB1E](https://user-images.githubusercontent.com/61652682/107884569-0af87f80-6ef6-11eb-8def-2573dcd07d26.jpeg)
![4224F782-B853-4331-9563-BC33A2E2FD99](https://user-images.githubusercontent.com/61652682/107884570-0b911600-6ef6-11eb-96e9-25688c0b1d04.jpeg)

Debug Files

ebaauw commented 3 years ago

I think Home turns on the light when you change the brightness, but Home+ does not. Homebridge Hue, nor any other HomeKit accessory, can change the behaviour of these HomeKit apps.

Technically, Zigbee lights do not accept a state change (other than turning the light on) when they're off. This is specified in the Zigbee standard. The deCONZ API plugin returns API error 201 in this case.

dibimuc commented 3 years ago

The thing is: I know the theory but it worked with your plugin before the update end of December (guess V 0.12.11). It do not work with your later plugins. Do you know why and can you solve this? Many thanks.

Am 14.02.2021 um 20:57 schrieb Erik Baauw notifications@github.com:

 I think Home turns on the light when you change the brightness, but Home+ does not. Homebridge Hue, nor any other HomeKit accessory, can change the behaviour of these HomeKit apps.

Technically, Zigbee lights do not accept a state change (other than turning the light on) when they're off. This is specified in the Zigbee standard. The deCONZ API plugin returns API error 201 in this case.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

pjbarnett commented 3 years ago

I have a similar but not identical problem re friends of hue switches. Everything was working fine until yesterday. I had switches that the Hue app added to Apple home and I simply told hue not to configure them and set the configuration in Apple Home.

Yesterday morning I ran your update and I think unrelated to you but as it required the newer Node.js I ran the Node update. Homebridge then constantly crashed with an error relating to UUID of some sort that didnt happen previously. I then restored from earlier version of Homebridge backup but managed to get the Node updated and then updated your plugin. However I had issues with several switches now not responding at all. When I would click test the settings in Apple Home it worked fine but not when pressing the buttons. Cant tell you exactly what I did but I got them back working yesterday afternoon.

However I have returned home today to a disgruntled wife informing me that switches are not working again. They are still currently broke so I am not sure what to try next. I've adjusted the lights individually as its been a long day. I am hoping to get to the bottom of the problem tomorrow and just wondered if you can suggest any pointers? I can see the switches blink in Apple home so they are responding, just not reacting to the settings although as I mentioned, if you click the test, the lights respond correctly.

Hope you can help??

Many thanks.

pjbarnett commented 3 years ago

Sorry quick update but you can possibly help me understand this. When you setup the Apple Home it mentioned setting up my Apple TV as a device for remote connection. Where does the actually scene settings etc store? My Apple TV had been turned off at the mains. I've just plugged it back in and it has also just taken an update. Once the update and restart finished, all my switches are working again!! I didnt realise the scenes are stored in an Apple device on the network. Is this correct? As I also have Apple homepods, can they also be set to store as backups?

Sorry, as I didnt intend to hijack your post and clearly its nothing related to your issue or the Homebridge and your plugin. Unless this is purely coincidental.

ebaauw commented 3 years ago

The HomeKit configuration (incl. scenes and automations) is stored on every iDevice and synced (over iCloud) between them. Scenes can be restored (manually) from any HomeKit app on any iDevice. Automations, including the actions for Stateless Programmable Switches, only run on a home hub. You should be able to setup your HomePods as home hub as well, but I have no experience with them. I understand only one home hub is active at a time, the others are standby. I'm seeing reports suggesting the HomePod is less reliable than the AppleTV.

ebaauw commented 3 years ago

The thing is: I know the theory but it worked with your plugin before the update end of December (guess V 0.12.11). It do not work with your later plugins. Do you know why and can you solve this?

I changed the interaction with the Hue API to cope with the changes in the way the Hue bridge behaves with their latest firmware. Some API errors previously went unnoticed. The API error 201 is just a warning in the log, no error is reported back to HomeKit. Also I see nothing in the log indicating non-reachable lights.

why is it important that I have to set this scene in HomeApp? Because I use a simple time trigger (sunset).

In that case, the scene is actually recalled from your home hub.

pjbarnett commented 3 years ago

Thank you for the info. As you can gather I'm new to Homebridge and using the Apple Homekit. I'm trying to get my head around the pros and cons. 20 Years i've been in Home Automation selling and installing Crestron, Lutron, Clipsal, Rako, KNX and Control4 systems to name the main ones. I'm incredibly impressed with the simplicity but also nervous of the amount of hubs, failure diagnostic and like yesterday for example, having a failure of the homebridge, once I had it back up, all the renames and moving of items to the correct rooms etc had all defaulted! But obviously at this price point, I cant grumble. Just trying to keep my finger on the pulse of what I might be installing and importantly supporting in the future.

ebaauw commented 3 years ago

I only use HomeKit automations for controlling non-Zigbee devices; I use deCONZ / Hue bridge rules for controlling Zigbee devices (including controlling them from wireless switches). Quicker, more reliable, but less user friendly to setup. I even setup my Hue dimmer switches to control the lights directly as well, as a backup for when deCONZ is down.