New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ambient Light not detected if hood switched off (Bosch DWF97RW65) #24
Comments
Thank you @josiasmontag for reporting this problem and diagnosing the cause. You are probably the first person to try this feature. I do not have access to a Home Connect equipped Hood, the simulator does not include a Hood appliance, and the other users who tested the Hood support do not have ambient lights in their appliances. Does the ambient light support otherwise work as expected? Having checked the API documentation again I spot a note that "the brightness can't be set if the ambient light color is set to CustomColor" so I suspect that there might be other issues. The Home Connect API is very frustrating. There is no suggestion in the documentation that these settings can only be queried when the ambient light is switched on... although it is consistent with the way that the settings for programs behave. There are also significant differences between appliances in how they implement the API. The API is clearly designed for use by a phone app or website, where the UI can be dynamically modified. Some other projects require the user to manually configure the capabilities of each appliance for this reason... I am thinking that probably the best way to handle this issue is to temporarily switch the ambient light on when the plugin is first used. This is similar to the way that program settings are now handled. Unfortunately, this is going to add complexity to a section of the code that I am unable to test myself... and based on previous experience of implementing Hood support it will probably take a few attempts to get right... |
Hi @thoukydides, thanks for these insights. Yes, other than that, the ambient light is working fine via HomeKit. I just wanted to note this down for others facing the same issue wondering why their color settings are missing. I don't see any easy way to fix this either. Thanks a lot for your work on this plugin! |
@josiasmontag, is there any chance that you could provide a debug log (with Do NOT share the I would like to see whether these settings are missing from the Hopefully it is the latter because that almost provides sufficient information for the plugin to create the appropriate HomeKit services and characteristics. The only thing that would be missing is the brightness range, and if necessary that can be updated later when the setting is available. |
@thoukydides You have mail. Not really related to this issue: If the ambient light is detected correctly, I see the following error in the log:
It works fine though. |
Good news is....there seems to be major updates to the API coming soon. Bad news is....it may break things for us and @thoukydides will have to fix it! : P |
Thank you. Unfortunately the provided files confirm that the
I suspect that you will find that changes to the colour of the light made outside of HomeKit will not be shown in HomeKit. That error occurs due to use of an incorrect variable in the log statement just before the Hue and Saturation characteristics are updated. At least that's an easy fix - should be sorted in v0.17.3. Still need to do something about discovering the ambient light capabilities if it is switched off when the plugin is first started... |
Actually, the "Major Updates" they are pre-announcing are for the Developer Portal (developer tools and documentation). They have not actually announced any major updates to the API.
Possible, but I suspect that they will be quite conservative with changes to the API. It is more likely to be a case of new capabilities that I will have to decide whether to support. The newsletter does not actually promise any new API features though. It only highlights that they have "been adding new programs and options for our appliances". So, let's take a quick look at the change log to see the API changes they have released so far this year...
These changes only affect the simulated appliances that I use for developing the plugin. They have no affect on real physical appliances. All of these changes are actually to fix issues that I reported.
Again, these changes only affect the simulated appliances, and are mostly to fix issues that I reported.
These just allow selection of the units used by the API to measure liquid volumes (coffee fill levels) and temperatures. They are not relevant to HomeKit since Apple has not defined any characteristics for oven temperatures or coffee sizes. The only impact on the plugin is for the configuration schema to allow customisation of programs, and I am not going to bother supporting different units for that. Not exactly major updates to the API during the first third of 2020. |
All good points @thoukydides . I was hoping the changes would make things easier and better for you and bring some more reliability to their API and services. They made it sound more impressive than it really is. |
@josiasmontag version 0.18.0 now attempts to switch Hood/Dishwasher functional and ambient lights on before reading the settings that they support. This has only had rudimentary testing because, as mentioned previously, I do not have access to an appliance with either of these features... |
Thanks for working on that.
|
Thank you for trying that @josiasmontag. I have spotted the stupid mistake - even though the plugin is now switching the light on, it is still only attempting to read the details of settings that existed previously. Oops. I have also just realised that it will repeat switching the light on every time that the plugin is started, even if the settings have been previously read and cached. I need to do something about that too... When I have a bit more time I will check the log that you provided for any other issues that I need to address at the same time... |
Looking at the provided log more carefully, it looks like there is a further complication:
When the plugin switched the ambient light on the events stream did not provide a value for
Currently the plugin attempts to use To actually determine all of the ambient light's supported settings it looks like the following will be required:
(Additional special cases are required to keep the code common between the functional and ambient lights...) Given that the non-custom colours cannot be properly supported, I then propose to:
|
Yes seems correct for me. Additionally, when automatically switching on the light, the plugin should set |
Thanks for checking.
The plugin already does that when the |
@josiasmontag, hopefully version 0.18.1 will fix the discovery of ambient light capabilities and also properly support its brightness (both with custom and non-custom colours). |
@josiasmontag, have you had the opportunity to try version 0.18.1 yet to see whether it fixes the handling of the Hood ambient light? |
Sorry for the delay. Yes, it seems to work fine for me. The light was detected correctly after several Homebridge restarts. If I see further issues I will reopen this. Thanks! |
Wonderful! Thank you for confirming. |
Description of Issue
If the hood and the ambient light is switched off and I start Homebridge, the plugin does not detect the ambient light. The settings for color and brightness are missing. Only the on/off switch for the ambient light is available.
It seems the
BSH.Common.Setting.AmbientLightBrightness
andBSH.Common.Setting.AmbientLightCustomColor
settings are only available via the API, if the ambient light is currently switched on.Workaround:
Plugin Version
0.17.2
Home Connect Appliance(s)
BOSCH-DWF97RW65
HomeKit App(s)
/
Log File
/
The text was updated successfully, but these errors were encountered: