Skip to content
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

Hood fan and light control (Thermador VCIN48GWS) #2

Closed
JerGitHub opened this issue Dec 27, 2019 · 53 comments
Closed

Hood fan and light control (Thermador VCIN48GWS) #2

JerGitHub opened this issue Dec 27, 2019 · 53 comments
Labels
enhancement New feature or request waiting for feedback Further information is requested

Comments

@JerGitHub
Copy link

First off - Thanks for getting this going!

I hooked this up to homebridge and HomeKit without any issues and it is running fine.

Now that it is hooked up, I wanted to try some basic things out but no such luck. I read the other issues thread and understand your thoughts around Apple having not defined HomeKit services and characteristics that are particularly suitable for these sorts of appliances.

However, I have a connected hood vent and would like to control the fan (0 thru 4 speeds - 0 = off and 4 is the highest) and the lights (dimmer control). (see screenshots) I figure these services are defined in HomeKit already so was hoping it would be possible to start there with this plug in.

It would be nice to know if my connected dishwasher is on or if the cycle has ended. And if my connected oven is on or not. But I am OK with trying to get the hood vent above working first!

I am not an AppDev coder but I am a tinkerer. If you need me to TCPDUMP and grab PCAPs from the Thermador HomeConnect app to help out or have any ideas what I can do to help, I am up for helping out. Here is my homebridge output when your plugin loads so you can get see the model numbers and the options that show up.

Let me know your thoughts when you have a sec.
Thanks!

[Homebridge] [12/27/2019, 6:09:27 PM] [HomeConnect] Home Connect authorization token saved
[Homebridge] [12/27/2019, 6:09:28 PM] [HomeConnect] Adding new accessory 'Hood'
[Homebridge] [12/27/2019, 6:09:28 PM] [HomeConnect] [Hood] Thermador Hood (E-Nr: VCIN48GWS/01)
[Homebridge] [12/27/2019, 6:09:28 PM] [HomeConnect] Adding new accessory 'Oven Left'
[Homebridge] [12/27/2019, 6:09:28 PM] [HomeConnect] [Oven Left] Thermador Oven (E-Nr: PRD486WDHU/01)
[Homebridge] [12/27/2019, 6:09:28 PM] [HomeConnect] Adding new accessory 'Oven Right'
[Homebridge] [12/27/2019, 6:09:28 PM] [HomeConnect] [Oven Right] Thermador Oven (E-Nr: PRD486WDHU/01)
[Homebridge] [12/27/2019, 6:09:28 PM] [HomeConnect] Adding new accessory 'Dishwasher'
[Homebridge] [12/27/2019, 6:09:28 PM] [HomeConnect] [Dishwasher] Thermador Dishwasher (E-Nr: DWHD660WPR/01)
[Homebridge] [12/27/2019, 6:09:28 PM] [HomeConnect] [Hood] Connected
[Homebridge] [12/27/2019, 6:09:28 PM] [HomeConnect] [Oven Left] Connected
[Homebridge] [12/27/2019, 6:09:28 PM] [HomeConnect] [Oven Right] Connected
[Homebridge] [12/27/2019, 6:09:28 PM] [HomeConnect] [Dishwasher] Connected
[Homebridge] [12/27/2019, 6:09:29 PM] [HomeConnect] [Oven Right] Inactive
[Homebridge] [12/27/2019, 6:09:29 PM] [HomeConnect] [Oven Right] Door closed
[Homebridge] [12/27/2019, 6:09:29 PM] [HomeConnect] [Oven Right] Inactive
[Homebridge] [12/27/2019, 6:09:29 PM] [HomeConnect] [Oven Right] Door closed
[Homebridge] [12/27/2019, 6:09:29 PM] [HomeConnect] [Oven Left] Inactive
[Homebridge] [12/27/2019, 6:09:29 PM] [HomeConnect] [Oven Left] Door closed
[Homebridge] [12/27/2019, 6:09:30 PM] [HomeConnect] [Dishwasher] Door open
[Homebridge] [12/27/2019, 6:09:30 PM] [HomeConnect] [Dishwasher] Inactive
[Homebridge] [12/27/2019, 6:09:30 PM] [HomeConnect] [Hood] Off
[Homebridge] [12/27/2019, 6:09:30 PM] [HomeConnect] [Oven Right] Off
[Homebridge] [12/27/2019, 6:09:30 PM] [HomeConnect] [Oven Left] Off
[Homebridge] [12/27/2019, 6:09:31 PM] [HomeConnect] [Dishwasher] Off

IMG_0451
IMG_0450
IMG_0449

@thoukydides
Copy link
Owner

However, I have a connected hood vent and would like to control the fan (0 thru 4 speeds - 0 = off and 4 is the highest) and the lights (dimmer control). (see screenshots) I figure these services are defined in HomeKit already so was hoping it would be possible to start there with this plug in.

Hood appliances are probably the only ones that do have reasonable HomeKit mappings. Unfortunately, I don't have a Home Connect Hood, and there isn't a simulator provided at https://developer.home-connect.com/simulator. This means that I am unable to test any support that I add. I could try coding something, but you would need to test and debug it.

Looking at the API documentation Hoods support two different types of light:

Presumably it is the first of these that your Hood has...

It would be nice to know if my connected dishwasher is on or if the cycle has ended. And if my connected oven is on or not. But I am OK with trying to get the hood vent above working first!

Both of those should already be supported as described in the README.

The Active and Status Active characteristics on the Home Appliance service indicate when the dishwasher or oven are on, and the Remaining Duration indicates how long is left in the current program. Unfortunately, none of these are supported by Apple's own Home app. However, they can be viewed (and used as triggers) in third-party apps such as Elgato's Eve and Matthias Hochgatterer's Home+.

Additionally, Stateless Programmable Switch services are provided as automation triggers. These work in any HomeKit app, including Apple's Home. For the Oven the triggers are:

  1. Program finished
  2. Timer finished
  3. Preheat finished

For the dishwasher they are:

  1. Program finished
  2. Program aborted

Once again, Apple's Home app is more limited - it only shows the numeric label for these triggers. However,the Eve and Home+ apps show their names which makes them easier to use.

If these don't work with your appliances then please provide the log output. Make sure that you run homebridge in debug mode (i.e. launched with DEBUG=* homebridge -D) to provide more detail. Please also perform a HomeKit Identify operation (with version 0.4.0 or later of this plugin) and include the log output for that. (Make sure you remove any ClientID or OAuth tokens from the log output before posting...)

I am not an AppDev coder but I am a tinkerer. If you need me to TCPDUMP and grab PCAPs from the Thermador HomeConnect app to help out

Unfortunately that would not be of any use. The Home Connect API uses https so the connections are encrypted.

@thoukydides
Copy link
Owner

There is now some prototype support for hoods in version 0.5.0 (c902042). This attempts to support the fan and functional light.

As mentioned above, I am unable to perform any testing of the hood support, so this version is likely to have serious problems. Please thoroughly test:

  • That the status shown by HomeKit accurately reflects changes made on the hood itself (or via the Home Connect app).
  • That control of the fan and light from HomeKit work as expected. Please try all combinations of settings.

For anything that does not work as expected please provide the log output (in debug mode, DEBUG=* homebridge -D) with an explanation of what you tried to do, what you expected, and what actually happened. Please also provide the log output for a HomeKit Identify operation.

The current code is a bit of a hack to get some quick feedback about how the hood appliances behave. It needs to be rewritten, e.g. to query the supported programs and their options and to only present appropriate services, characteristics, and ranges. Based on your description my expectation is that with your model the fan speeds will map to 0-80% in HomeKit, with 100% being unsupported.

Let me know how you get on...

@JerGitHub
Copy link
Author

Thanks - That was a quick response!

Let me try it out and get back to you.

@thoukydides
Copy link
Owner

I have just released version 0.6.0. There are a lot of changes under-the-hood, but the main functional difference is that it now attempts to autodetect the type(s) of light supported by Hood appliances.

@JerGitHub
Copy link
Author

haha!! just saw this - and I had updated to 0.5.0 after I wrote but will now update to 0.6.0 to try it out. will keep you posted. thanks!

@thoukydides
Copy link
Owner

Just spotted a small bug in the fan control. When starting the manual program it incorrectly sets Cooking.Common.Option.Hood.IntensiveLevel instead of Cooking.Common.Option.Hood.VentingLevel. Hence, turning on the fan from HomeKit will not set the initial speed.

@thoukydides
Copy link
Owner

Just spotted a small bug in the fan control. When starting the manual program it incorrectly sets Cooking.Common.Option.Hood.IntensiveLevel instead of Cooking.Common.Option.Hood.VentingLevel. Hence, turning on the fan from HomeKit will not set the initial speed.

That should now be fixed in version 0.7.0. This version should also autodetect the fan capabilities (number of power levels and whether it has an auto mode).

This version always attempts to start a program to set the fan speed and mode. I suspect that this might fail if the fan is already running, so please let me know (and provide logs, with debugging enabled).

@thoukydides thoukydides added the enhancement New feature or request label Dec 30, 2019
@thoukydides thoukydides changed the title Thermador Appliances Thermador VCIN48GWS/01 Hood (fan and light control) Dec 30, 2019
@thoukydides thoukydides changed the title Thermador VCIN48GWS/01 Hood (fan and light control) Hood fan and light control (Thermador VCIN48GWS) Dec 30, 2019
@JerGitHub
Copy link
Author

I didn't get a chance to test anything out yesterday but just saw the 0.8.0 update so will grab that. I should have time today to test it out. Thanks again!

@JerGitHub
Copy link
Author

Just installed 0.8.0 and did get an error on startup for the first time but looks like it is still running the plug-in. See below (5th from the bottom):

[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Oven Right] Program inactive; 0 seconds remaining
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Oven Right] Inactive
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Oven Right] Door closed
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Oven Right] Program inactive; 0 seconds remaining
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Oven Right] Inactive
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Oven Right] Door closed
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Oven Left] Program inactive; 0 seconds remaining
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Oven Left] Inactive
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Oven Left] Door closed
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Oven Right] Adding services for 6 programs
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Oven Right] 'Topbottom heating' (Cooking.Oven.Program.HeatingMode.TopBottomHeating)
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Oven Right] '4D Hot air' (Cooking.Oven.Program.HeatingMode.HotAir)
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Oven Right] 'Intensive heat' (Cooking.Oven.Program.HeatingMode.IntensiveHeat)
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Oven Right] 'Hot air grilling' (Cooking.Oven.Program.HeatingMode.HotAirGrilling)
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Oven Right] 'Keep warm' (Cooking.Oven.Program.HeatingMode.KeepWarm)
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Oven Right] 'Proof' (Cooking.Oven.Program.HeatingMode.Proof)
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Oven Right] Removing services for 0 programs
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Oven Right] Programs cannot be controlled without Control scope
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Dishwasher] Door closed
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Dishwasher] Program inactive; 0 seconds remaining
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Dishwasher] Inactive
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Hood] Off
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Dishwasher] Adding services for 5 programs
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Dishwasher] 'Intensive 70C' (Dishcare.Dishwasher.Program.Intensiv70)
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Dishwasher] 'Auto 45-65C' (Dishcare.Dishwasher.Program.Auto2)
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Dishwasher] 'Eco 50C' (Dishcare.Dishwasher.Program.Eco50)
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Dishwasher] 'Glass 40C' (Dishcare.Dishwasher.Program.Glas40)
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Dishwasher] 'Quick wash 45C' (Dishcare.Dishwasher.Program.Quick45)
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Dishwasher] Removing services for 0 programs
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Oven Left] Error GET programs: Home Connect API error: HomeAppliance reported an error [BSH.Common.Error.InvalidUIDValue]
[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Oven Left] Will retry when next connected: Home Connect API error: HomeAppliance reported an error [BSH.Common.Error.InvalidUIDValue]
[Homebridge] [12/30/2019, 11:23:15 AM] [HomeConnect] [Oven Right] Off
[Homebridge] [12/30/2019, 11:23:15 AM] [HomeConnect] [Dishwasher] Off
[Homebridge] [12/30/2019, 11:23:15 AM] [HomeConnect] [Oven Left] Off

@thoukydides
Copy link
Owner

Just installed 0.8.0 and did get an error on startup for the first time but looks like it is still running the plug-in. See below (5th from the bottom):

[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Oven Left] Error GET programs: Home Connect API error: HomeAppliance reported an error [BSH.Common.Error.InvalidUIDValue]

The only thing that error should affect is the creation of Switch services to allow programs to be started on your Oven Left. Everything else should operate as intended. You should be able to test the Hood fan and light control, as well as starting/stopping programs on your Dishwasher, and monitoring programs on your Oven Right.

Curiously, that BSH.Common.Error.InvalidUIDValue error is not one of those documented at https://developer.home-connect.com/docs/general/apierrors, there are no matches on Google, and I have never seen that error myself. The error code doesn't suggest any particular cause, so I have no idea why it occurred or how to fix it. Please can you try switching the Oven Left on and then restarting homebridge; it is possible that the oven may not respond correctly to the API when not switched on.

The log that you provided does not have debugging enabled, so only provides limited information. As requested in my earlier responses, for anything that does not work as expected please provide the log output (in debug mode, DEBUG=* homebridge -D). It probably won't help in this particular case though since I know exactly which operation failed.

@thoukydides
Copy link
Owner

I just noticed from your original comment that Oven Left and Oven Right are both the same model (Thermador Oven PRD486WDHU/01), and both were switched off, which makes it particularly odd that one returned the list of supported programs but the other returned an error. Can you think of any difference that might be relevant, such as one having remote start enabled but the other not?

@JerGitHub
Copy link
Author

JerGitHub commented Dec 30, 2019

I will turn debug on - I just wanted to send you a quick log of Homebridge starting up and getting those errors since those were the first errors I have seen on start up with your plugin. I am testing out the hood light/fans now and documenting some idiosyncrasies to reply to in a bit.

As for the oven - you are correct. My model PRD486WDHU which you mentioned has a main oven (right) which has support for remote start and also a smaller side oven (left) which does not support remote start.

Not that you need to look through the User Manual for it but page 11 here shows you what the range looks like with the 2 ovens. Page 38 talks about the HomeConnect features of the main oven (right)

https://media3.bsh-group.com/Documents/8001145887_C.pdf

@thoukydides
Copy link
Owner

I am testing out the hood light/fans now and documenting some idiosyncrasies to reply to in a bit.

Thank you. I wasn't expecting the Hood control to work perfectly first-time. Neither the simulators nor my own physical appliances operate quite how I would expect based on the API documentation (or even the same as each other). I look forward to your feedback.

As for the oven - you are correct. My model PRD486WDHU which you mentioned has a main oven (right) which has support for remote start and also a smaller side oven (left) which does not support remote start.

OK, that sort of makes sense... although I would have expected the API to either not advertise the left oven at all, or to return an empty list of programs in that case. There does not appear to be anything obvious in the API that can be used to determine that the left oven does not support programs, so I don't think there is any alternative to issuing the request and receiving the error.

I have contacted the Home Connect developer support to ask about this error, but unless they provide a useful response I probably won't do anything about this. Other than the entry in the log file the current behaviour is perfectly safe and should not affect any of the plugin's other functionality.

@JerGitHub
Copy link
Author

Did some testing on the Hood/Fan only to start. The fan turns on and off but I can't adjust the speed. Also, you are kind of right in regards to if the fan is already on before going into the app or using Siri to turn it off, it won't turn off. I got it to turn off after trying to turn off the button 3 times. I was able to reproduce that issue every time the fan was on prior to turning it on with Siri/HomeKit.

The light turned on fine but the weird thing was - sometimes even though the app showed the dimmer as off, the light would still be on at 10% brightness. Sometimes it would go off when turning it all the way off, but most of the time it would stop at 10% brightness and looking at the app, it would think it was off.

I'm not sure what the circle button below the light dimmer is for? I pressed it but it didn't seem to do anything. Also, as you can see in the UI screenshots, it says there is an unconfigured button but I don't see anything that is unconfigured?

I have included the debug and tried to remove any of the other plugin debug info so you don't have to be distracted.

Let me know what you think.

Thanks!
IMG_0465
IMG_0464
IMG_0463
debug.txt

@thoukydides
Copy link
Owner

Thank you @JerGitHub for this useful feedback. The log file is especially helpful, so starting with that...

  1. Both the Hood's fan and its functional light are controlled by multiple HomeKit characteristics. Whilst Homekit/Homebridge wait for a change to a characteristic to complete (either successfully or with an error) before issuing another request for the same characteristic, it overlaps changes to different characteristics. This is particularly common when a single action within the Home app results in multiple characeristics changing, e.g. turning on the light sets both On and Brightness. The plugin currently generates independent Home Connect requests for each HomeKit characteristic change, which ends up with unpredictable results when they are attempting to control the same feature. It also makes it more likely that the strict Home Connect rate limits will be exceeded. This problem is exacerbated by the Home Connect API being quite slow - usually taking 1 or 2 seconds to complete each request. I will change the plugin to wait to allow multiple simultaneous characteristic changes before issuing a Home Control request, and to ensure that successive requests triggered by different characteristics are sequences rather than overlapped. This should make the behaviour more reliable. It should also reduce the number of Home Connect requests, making it less likely that the rate limits will be exceeded, and resulting in quicker responses to HomeKit.
  2. The plugin currently attempts to change the fan speed by starting a new program. When you attempted to quickly change the speed multiple times this exceeded the Home Connect rate limits, resulting in the error The rate limit "5 start program calls in 1 minute" was reached. Requests are blocked during the remaining period of 35 seconds. [429]. I will try changing the plugin to adjust the fan speed without starting a new program. However, this may not work; the Home Connect documentation states that "Please note that changing options of the running program is currently only supported by ovens". If this does not work then I will need to revert to the current method.
  3. When you operated the Hood manually it locked out remote control via the Home Connect API. This resulted in the error Request cannot be performed temporarily! due to local actuated user intervention [BSH.Common.Error.LockedByLocalControl]. That is a Home Connect limitation which I cannot do anything about. However, the improvements that I am planning should reduce the number of requests issued in this state, which in turn should result in less chance of exceeding Home Connect rate limits, and quicker error responses back to HomeKit.

Did some testing on the Hood/Fan only to start. The fan turns on and off but I can't adjust the speed.

Looking at the log, the fan speed changes did actually work (which is a pleasant surprise because I was not expecting it to work):

[Homebridge] [12/30/2019, 3:20:36 PM] [HomeConnect] [Hood] SET fan manual 33%
[Homebridge] [12/30/2019, 3:20:36 PM] [HomeConnect] Home Connect request #71: PUT https://api.home-connect.com/api/homeappliances/THERMADOR-VCIN48GWS-68A40E1C48FB/programs/active
[Homebridge] [12/30/2019, 3:20:36 PM] [HomeConnect] [Hood] SET fan manual 67%
[Homebridge] [12/30/2019, 3:20:36 PM] [HomeConnect] Home Connect request #72: PUT https://api.home-connect.com/api/homeappliances/THERMADOR-VCIN48GWS-68A40E1C48FB/programs/active
[Homebridge] [12/30/2019, 3:20:37 PM] [HomeConnect] Home Connect request #2: STREAM DATA +216669ms
[Homebridge] [12/30/2019, 3:20:37 PM] [HomeConnect] [Hood] Event NOTIFY (2 items)
[Homebridge] [12/30/2019, 3:20:37 PM] [HomeConnect] [Hood] Cooking.Common.Option.Hood.VentingLevel=Cooking.Hood.EnumType.Stage.FanStage03 (1 listeners)
[Homebridge] [12/30/2019, 3:20:37 PM] [HomeConnect] [Hood] Fan 67%
[Homebridge] [12/30/2019, 3:20:37 PM] [HomeConnect] [Hood] BSH.Common.Option.ElapsedProgramTime=22 seconds (0 listeners)
[Homebridge] [12/30/2019, 3:20:37 PM] [HomeConnect] Home Connect request #72: OK +1037ms
[Homebridge] [12/30/2019, 3:20:37 PM] [HomeConnect] [Hood] BSH.Common.Root.ActiveProgram=Cooking.Common.Program.Hood.Venting (1 listeners)
[Homebridge] [12/30/2019, 3:20:37 PM] [HomeConnect] [Hood] Fan manual control
[Homebridge] [12/30/2019, 3:20:37 PM] [HomeConnect] [Hood] Cooking.Common.Option.Hood.VentingLevel=Cooking.Hood.EnumType.Stage.FanStage03 (1 listeners)
[Homebridge] [12/30/2019, 3:20:37 PM] [HomeConnect] [Hood] Fan 67%
[Homebridge] [12/30/2019, 3:20:37 PM] [HomeConnect] Home Connect request #71: OK +1140ms
[Homebridge] [12/30/2019, 3:20:37 PM] [HomeConnect] [Hood] BSH.Common.Root.ActiveProgram=Cooking.Common.Program.Hood.Venting (1 listeners)
[Homebridge] [12/30/2019, 3:20:37 PM] [HomeConnect] [Hood] Fan manual control
[Homebridge] [12/30/2019, 3:20:37 PM] [HomeConnect] [Hood] Cooking.Common.Option.Hood.VentingLevel=Cooking.Hood.EnumType.Stage.FanStage02 (1 listeners)
[Homebridge] [12/30/2019, 3:20:37 PM] [HomeConnect] [Hood] Fan 33%
[Homebridge] [12/30/2019, 3:20:37 PM] [HomeConnect] Home Connect request #2: STREAM DATA +216827ms
[Homebridge] [12/30/2019, 3:20:37 PM] [HomeConnect] [Hood] Event NOTIFY (1 item)
[Homebridge] [12/30/2019, 3:20:37 PM] [HomeConnect] [Hood] Cooking.Common.Option.Hood.VentingLevel=Cooking.Hood.EnumType.Stage.FanStage02 (1 listeners)
[Homebridge] [12/30/2019, 3:20:37 PM] [HomeConnect] [Hood] Fan 33%

The problem is that there are two overlapping requests:

  • The first request was probably triggered by either the Active (inactive/active) or the Target Fan State (manual/auto) characteristic, preserving the old Cooking.Hood.EnumType.Stage.FanStage02 (33%) fan speed. This resulted in Home Connect request #71.
  • The second request was presumably for the Rotation Speed characteristic, increasing the fan speed to Cooking.Hood.EnumType.Stage.FanStage03 (67%). This resulted in Home Connect request #72.

Both requests are attempting to start the same Cooking.Common.Program.Hood.Venting program, but with different options.

These requests completed in reverse order, resulting in the fan speed being increased, but then immediately being returned to its previous speed. Home Connect events are received confirming that the speed was really changed twice in quick succession.

The change that I am planning to defer and serialise Home Connect actions in response to multiple HomeKit characteristics changing should fix this problem. (Of course, the other change to try updating program options without starting a new program could break it again...)

By the way, does your fan support Automatic Mode and/or Delay Shut Off? I could not see any evidence of either being used in the log.

Also, you are kind of right in regards to if the fan is already on before going into the app or using Siri to turn it off, it won't turn off. I got it to turn off after trying to turn off the button 3 times. I was able to reproduce that issue every time the fan was on prior to turning it on with Siri/HomeKit.

I think this is a completely different issue.

It looks like operating the appliance locally locks out the Home Connect API for a period of time afterwards. There is nothing that I can do about that; it is a Home Connect limitation.

The light turned on fine but the weird thing was - sometimes even though the app showed the dimmer as off, the light would still be on at 10% brightness. Sometimes it would go off when turning it all the way off, but most of the time it would stop at 10% brightness and looking at the app, it would think it was off.

HomeKit treats On and Brightness as separate characteristics for a Lightbulb. Apple's Home app combines both of these into a single slider. For most of its range it controls the brightness; the minimum brightness for the Hood functional light is 10%, so the slider range is 10-100%. However, when the slide is pulled right to the bottom (or slightly below) it controls the power instead and shows the symbol of a bulb with a line through it.

I suspect that the inconsistent behaviour that you are seeing is due to the issue described above, where the actions triggered separately by the Brightness and On characteristics changing overlap. It should behave more predictably once I fix that.

I'm not sure what the circle button below the light dimmer is for? I pressed it but it didn't seem to do anything.

For coloured lights the Home app shows six circles below the slider to quickly change the colour - five with preset colours and one that can be edited. For simple on/off lights it just shows a switch instead of a slider, and there are no circles underneath.

The Hood functional light supports brightness control, but not colour. I don't have any dimmable lights without colour control so cannot test this. However, my guess is that the Home app is either adding a single circle to select a preset brightness, or is just putting a dummy placeholder so that it can use the same layour as for lights with colour control. Either way, this is a Home app specific issue that is nothing to do with this plugin.

Also, as you can see in the UI screenshots, it says there is an unconfigured button but I don't see anything that is unconfigured?

That is the Stateless Programmable Switch service that the plugin uses to report events. In the case of a Hood there is a single Stateless Programmable Switch that is used to generate an automation trigger from the BSH.Common.Event.ProgramFinished notification.

You should see two separate tiles for the Hood appliance within the Home app. One is the Switch tile that you have been using that has the fan and light controls. The second one will be paler with an icon of a square with a circle inside. That will show a BUTTON 1 with Single Press and Double Press that can be used to trigger automations.

Unless you want to trigger an automation when the fan switches off then you don't need to do anything with this.

@thoukydides
Copy link
Owner

I'm not sure what the circle button below the light dimmer is for? I pressed it but it didn't seem to do anything.

For coloured lights the Home app shows six circles below the slider to quickly change the colour - five with preset colours and one that can be edited. For simple on/off lights it just shows a switch instead of a slider, and there are no circles underneath.

If I fake a Hood then I get one circle underneath the fan speed control slider (which switches between manual and auto mode) and six underneath the ambient light slider (to quickly select different colours). However, there are no circles underneath the functional light slider.

@thoukydides
Copy link
Owner

Version 0.9.0 contains all of the changes that I described above.
Please let me know how you get on with it.

@JerGitHub
Copy link
Author

Happy New Year! And thanks for all of this. I just grabbed 0.9.1 and will test it out in debug and provide feedback.

Let me see if I can answer and/or comment on what you wrote above.

This problem is exacerbated by the Home Connect API being quite slow - usually taking 1 or 2 seconds to complete each request.

I definitely see this lag and even see it within their own Thermador HomeConnect app as well. When I get a chance to test 0.9.1, I will let you know how this performs.

  1. I was never able to change the fan speed in the last version I sent you the debug logs for at all so it's weird that it gave that error. I'm not sure what was shown in the log for fan speed was me attempting to change via homebridge or if that was me manually changing it and testing if I could change speeds and/or turn on and off when it was going? Either way, I will test it in this new build and see if I can adjust the fan speed from via HomeKit/HomeBridge/Your Plugin.

  2. I'll test the Hood fan manual start vs. app start response in 0.9.1

By the way, does your fan support Automatic Mode and/or Delay Shut Off? I could not see any evidence of either being used in the log.

My fan has both Auto Mode and Delay Shut Off mode. I have included screenshots below. I didn't test any of that in debug mode but I can for 0.9.1 and send you the debug logs.

the minimum brightness for the Hood functional light is 10%, so the slider range is 10-100%. However, when the slide is pulled right to the bottom (or slightly below) it controls the power instead and shows the symbol of a bulb with a line through it.I suspect that the inconsistent behaviour that you are seeing is due to the issue described above, where the actions triggered separately by the Brightness and On characteristics changing overlap. It should behave more predictably once I fix that.

I'll definitely test this and let you know if it is fixed. Thanks for the explanation - that makes complete sense. Also, I noticed in the Thermador HomeConnect app that the slider for the light does not go below 10% either, so then I was thinking that's why it was stuck at 10% even when the UI was showing the symbol with a line through it meaning it was off. Your explanation makes more sense so hopefully it is fixed in 0.9.1.

  1. Thanks for the explanation on the circle. I didn't even think of the HomeKit option of multicolor lights even though I have some. I had never seen just a single circle but I get it. No big deal - was just wondering what it was since when I pressed it, nothing happened.

The second one will be paler with an icon of a square with a circle inside. That will show a BUTTON 1 with Single Press and Double Press that can be used to trigger automations.

I had noticed this second icon but didn't think it did anything and thought it was just a status and/or a stateless switch that didn't have a function. Now looking into it, I see the single and double press. I will have to set something up and test it - thanks!

Thanks again for all of this - this is great stuff!

IMG_0472
IMG_0471
IMG_0470
IMG_0469
IMG_0468

@JerGitHub
Copy link
Author

This wasn't debug mode so I will get more logs for you but just realized I updated to 0.9.1 while writing the reply above, and was using the Thermador HomeConnect app to grab screenshots for you. Looks like whatever I did in the Thermador HomeConnect app killed homebridge. I didn't realize it until I just went to make sure everything was running after I updated to 0.9.1.

See below:

[Homebridge] [1/1/2020, 2:34:58 PM] [HomeConnect] [Hood] Active and program running
[Homebridge] [1/1/2020, 2:34:58 PM] [HomeConnect] [Hood] Fan running
[Homebridge] [1/1/2020, 2:34:58 PM] [HomeConnect] [Hood] On
[Homebridge] [1/1/2020, 2:34:58 PM] [HomeConnect] [Hood] Fan automatic control
[Homebridge] [1/1/2020, 2:34:58 PM] [HomeConnect] [Hood] Fan 67%
[Homebridge] [1/1/2020, 2:34:58 PM] [HomeConnect] [Hood] Program 600 seconds remaining
[Homebridge] [1/1/2020, 2:35:04 PM] [HomeConnect] [Hood] Program 594 seconds remaining
[Homebridge] [1/1/2020, 2:35:10 PM] [HomeConnect] [Hood] Program 588 seconds remaining
[Homebridge] [1/1/2020, 2:35:13 PM] [HomeConnect] [Hood] Program inactive; 0 seconds remaining
[Homebridge] [1/1/2020, 2:35:13 PM] [HomeConnect] [Hood] Inactive
[Homebridge] [1/1/2020, 2:35:13 PM] [HomeConnect] [Hood] Fan off
[Homebridge] [1/1/2020, 2:35:13 PM] [HomeConnect] [Hood] Off
[Homebridge] [1/1/2020, 2:35:13 PM] [HomeConnect] [Hood] Fan manual control
[Homebridge] [1/1/2020, 2:35:28 PM] [HomeConnect] [Hood] Active and program running
[Homebridge] [1/1/2020, 2:35:28 PM] [HomeConnect] [Hood] Fan running
[Homebridge] [1/1/2020, 2:35:28 PM] [HomeConnect] [Hood] On
[Homebridge] [1/1/2020, 2:35:28 PM] [HomeConnect] [Hood] Fan automatic control
[Homebridge] [1/1/2020, 2:35:28 PM] Error: Unsupported VentingLevel: Cooking.Hood.EnumType.Stage.FanOff
[Homebridge] at ApplianceHood.toFanSpeedPercent (/private/var/root/.hoobs/node_modules/homebridge-homeconnect/has_fan.js:157:32)
[Homebridge] at HomeConnectDevice. (/private/var/root/.hoobs/node_modules/homebridge-homeconnect/has_fan.js:90:32)
[Homebridge] at HomeConnectDevice.emit (events.js:210:5)
[Homebridge] at /private/var/root/.hoobs/node_modules/homebridge-homeconnect/homeconnect_device.js:65:18
[Homebridge] at Array.forEach ()
[Homebridge] at HomeConnectDevice.update (/private/var/root/.hoobs/node_modules/homebridge-homeconnect/homeconnect_device.js:62:15)
[Homebridge] at HomeConnectAPI.listener (/private/var/root/.hoobs/node_modules/homebridge-homeconnect/homeconnect_device.js:351:22)
[Homebridge] at HomeConnectAPI.emit (events.js:210:5)
[Homebridge] at /private/var/root/.hoobs/node_modules/homebridge-homeconnect/homeconnect_api.js:677:61
[Homebridge] at /private/var/root/.hoobs/node_modules/homebridge-homeconnect/homeconnect_api.js:723:31
[Homebridge] at /private/var/root/.hoobs/node_modules/homebridge-homeconnect/homeconnect_api.js:762:58
[Homebridge] at Array.forEach ()
[Homebridge] at IncomingMessage. (/private/var/root/.hoobs/node_modules/homebridge-homeconnect/homeconnect_api.js:762:42)
[Homebridge] at IncomingMessage.emit (events.js:215:7)
[Homebridge] at addChunk (_stream_readable.js:309:12)
[Homebridge] at readableAddChunk (_stream_readable.js:286:13)
[Homebridge] at IncomingMessage.Readable.push (_stream_readable.js:224:10)
[Homebridge] at HTTPParser.parserOnBody (_http_common.js:128:22)
[Homebridge] at TLSSocket.socketOnData (_http_client.js:456:22)
[Homebridge] at TLSSocket.emit (events.js:210:5)
[Homebridge] at addChunk (_stream_readable.js:309:12)
[Homebridge] at readableAddChunk (_stream_readable.js:290:11)
[Homebridge] at TLSSocket.Readable.push (_stream_readable.js:224:10)
[Homebridge] at TLSWrap.onStreamRead (internal/stream_base_commons.js:182:23)
[Homebridge] [1/1/2020, 2:35:28 PM] Got SIGTERM, shutting down service...

@thoukydides
Copy link
Owner

By the way, does your fan support Automatic Mode and/or Delay Shut Off? I could not see any evidence of either being used in the log.

My fan has both Auto Mode and Delay Shut Off mode. I have included screenshots below. I didn't test any of that in debug mode but I can for 0.9.1 and send you the debug logs.

  1. Thanks for the explanation on the circle. I didn't even think of the HomeKit option of multicolor lights even though I have some. I had never seen just a single circle but I get it. No big deal - was just wondering what it was since when I pressed it, nothing happened.

In that case, the circle that you see underneath the sliders is almost certainly a toggle between manual and auto mode for the fan. It is nothing to do with the lightbulb. You should be able to confirm this by looking at the Homebridge log when pressing the circle.

This is one of the many examples of Apple's Home app having a poor user interface. I strongly recommend using a third-party HomeKit app instead. Elgato's Eve app is free, so there really is no reason not to use it.

[Homebridge] [1/1/2020, 2:35:28 PM] Error: Unsupported VentingLevel: Cooking.Hood.EnumType.Stage.FanOff
[Homebridge] at ApplianceHood.toFanSpeedPercent (/private/var/root/.hoobs/node_modules/homebridge-homeconnect/has_fan.js:157:32)

I can see where this error is being thrown, but cannot immediately spot why it would happen, but will take a closer look this evening when I get home from work.

Hopefully a log with debug enabled will help...

@thoukydides
Copy link
Owner

[Homebridge] [1/1/2020, 2:35:28 PM] Error: Unsupported VentingLevel: Cooking.Hood.EnumType.Stage.FanOff
[Homebridge] at ApplianceHood.toFanSpeedPercent (/private/var/root/.hoobs/node_modules/homebridge-homeconnect/has_fan.js:157:32)

I can see where this error is being thrown, but cannot immediately spot why it would happen, but will take a closer look this evening when I get home from work.

I have tried, but an unable to either reproduce that error or spot anything that might cause it. I will investigate further when you provide a log with debug enabled.

@JerGitHub
Copy link
Author

Sorry - haven't had a chance to test yet. Will try to get to it today and send it over. I was able to get it to stop homebridge again when using the Thermador HomeConnect app so I'll try and capture when it happens and what I was doing.

@thoukydides
Copy link
Owner

Version 0.10.0 logs some additional information that may help with diagnosing the Unsupported VentingLevel crashes that you are seeing. It should also fail more gracefully in that case - just logging the problem rather than bringing down the whole Homebridge instance.

Please let me know how you get on.

@thoukydides thoukydides added the waiting for feedback Further information is requested label Jan 4, 2020
@JerGitHub
Copy link
Author

Thanks - just grabbed 0.10.0 and started it up without debug on and received a few new HAP warnings I hadn't seen before that I thought I would pass along below. I'm going to start testing everything now in debug and let you know what happens.

[Homebridge] [1/4/2020, 3:19:47 PM] [HomeConnect] Adding new accessory 'Hood'
[Homebridge] [1/4/2020, 3:19:48 PM] [HomeConnect] [Hood] Thermador Hood (E-Nr: VCIN48GWS/01)
[Homebridge] HAP Warning: Characteristic 000000D1-0000-1000-8000-0026BB765291 not in required or optional characteristics for service 61908960-e7a1-4eca-be29-9ab6027289d4. Adding anyway.
[Homebridge] [1/4/2020, 3:19:48 PM] [HomeConnect] Adding new accessory 'Oven Left'
[Homebridge] [1/4/2020, 3:19:48 PM] [HomeConnect] [Oven Left] Thermador Oven (E-Nr: PRD486WDHU/01)
[Homebridge] HAP Warning: Characteristic 000000D1-0000-1000-8000-0026BB765291 not in required or optional characteristics for service 61908960-e7a1-4eca-be29-9ab6027289d4. Adding anyway.
[Homebridge] [1/4/2020, 3:19:48 PM] [HomeConnect] Adding new accessory 'Oven Right'
[Homebridge] [1/4/2020, 3:19:48 PM] [HomeConnect] [Oven Right] Thermador Oven (E-Nr: PRD486WDHU/01)
[Homebridge] HAP Warning: Characteristic 000000D1-0000-1000-8000-0026BB765291 not in required or optional characteristics for service 61908960-e7a1-4eca-be29-9ab6027289d4. Adding anyway.
[Homebridge] [1/4/2020, 3:19:48 PM] [HomeConnect] Adding new accessory 'Dishwasher'
[Homebridge] [1/4/2020, 3:19:48 PM] [HomeConnect] [Dishwasher] Thermador Dishwasher (E-Nr: DWHD660WPR/01)
[Homebridge] HAP Warning: Characteristic 000000D1-0000-1000-8000-0026BB765291 not in required or optional characteristics for service 61908960-e7a1-4eca-be29-9ab6027289d4. Adding anyway.
[Homebridge] [1/4/2020, 3:19:48 PM] [HomeConnect] [Hood] Connected
[Homebridge] [1/4/2020, 3:19:48 PM] [HomeConnect] [Oven Left] Connected
[Homebridge] [1/4/2020, 3:19:48 PM] [HomeConnect] [Oven Right] Connected
[Homebridge] [1/4/2020, 3:19:48 PM] [HomeConnect] [Dishwasher] Connected
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Hood] Remote control/start allowed
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Hood] Program inactive; 0 seconds remaining
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Hood] Inactive
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Hood] Remote control/start allowed
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Hood] Remote control/start allowed
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Left] Program inactive; 0 seconds remaining
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Left] Inactive
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Left] Normal operation
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Left] Remote control/start allowed
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Left] Door closed
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Left] Remote control/start not allowed
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Left] Remote control/start not allowed
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Right] Program inactive; 0 seconds remaining
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Right] Inactive
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Right] Normal operation
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Right] Remote control/start allowed
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Right] Door closed
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Right] Remote control/start not allowed
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Right] Remote control/start not allowed
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Right] Program inactive; 0 seconds remaining
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Right] Inactive
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Right] Normal operation
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Right] Door closed
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Right] Adding services for 6 programs
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Right] 'Topbottom heating' (Cooking.Oven.Program.HeatingMode.TopBottomHeating)
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Right] '4D Hot air' (Cooking.Oven.Program.HeatingMode.HotAir)
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Right] 'Intensive heat' (Cooking.Oven.Program.HeatingMode.IntensiveHeat)
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Right] 'Hot air grilling' (Cooking.Oven.Program.HeatingMode.HotAirGrilling)
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Right] 'Keep warm' (Cooking.Oven.Program.HeatingMode.KeepWarm)
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Right] 'Proof' (Cooking.Oven.Program.HeatingMode.Proof)
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Right] Removing services for 0 programs
[Homebridge] [1/4/2020, 3:19:49 PM] [HomeConnect] [Oven Right] Programs cannot be controlled without Control scope
[Homebridge] [1/4/2020, 3:19:50 PM] [HomeConnect] [Oven Left] Home Connect API error: HomeAppliance reported an error [BSH.Common.Error.InvalidUIDValue]
[Homebridge] [1/4/2020, 3:19:50 PM] [HomeConnect] [Oven Left] GET programs
[Homebridge] [1/4/2020, 3:19:50 PM] [HomeConnect] [Oven Left] GET https://api.home-connect.com/api/homeappliances/THERMADOR-PRD486WDHU-68A40E268B0A-120/programs
[Homebridge] [1/4/2020, 3:19:50 PM] [HomeConnect] [Oven Left] Ignoring BSH.Common.Error.InvalidUIDValue error
[Homebridge] [1/4/2020, 3:19:50 PM] [HomeConnect] [Oven Left] Does not support any programs
[Homebridge] [1/4/2020, 3:19:50 PM] [HomeConnect] [Oven Left] Adding services for 0 programs
[Homebridge] [1/4/2020, 3:19:50 PM] [HomeConnect] [Oven Left] Removing services for 0 programs
[Homebridge] [1/4/2020, 3:19:50 PM] [HomeConnect] [Dishwasher] Remote control/start allowed
[Homebridge] [1/4/2020, 3:19:50 PM] [HomeConnect] [Dishwasher] Remote control/start not allowed
[Homebridge] [1/4/2020, 3:19:50 PM] [HomeConnect] [Dishwasher] Door closed
[Homebridge] [1/4/2020, 3:19:50 PM] [HomeConnect] [Dishwasher] Program inactive; 0 seconds remaining
[Homebridge] [1/4/2020, 3:19:50 PM] [HomeConnect] [Dishwasher] Inactive
[Homebridge] [1/4/2020, 3:19:50 PM] [HomeConnect] [Dishwasher] Normal operation
[Homebridge] [1/4/2020, 3:19:50 PM] [HomeConnect] [Dishwasher] No commands supported
[Homebridge] [1/4/2020, 3:19:50 PM] [HomeConnect] [Dishwasher] Adding services for 5 programs
[Homebridge] [1/4/2020, 3:19:50 PM] [HomeConnect] [Dishwasher] 'Intensive 70C' (Dishcare.Dishwasher.Program.Intensiv70)
[Homebridge] [1/4/2020, 3:19:50 PM] [HomeConnect] [Dishwasher] 'Auto 45-65C' (Dishcare.Dishwasher.Program.Auto2)
[Homebridge] [1/4/2020, 3:19:50 PM] [HomeConnect] [Dishwasher] 'Eco 50C' (Dishcare.Dishwasher.Program.Eco50)
[Homebridge] [1/4/2020, 3:19:50 PM] [HomeConnect] [Dishwasher] 'Glass 40C' (Dishcare.Dishwasher.Program.Glas40)
[Homebridge] [1/4/2020, 3:19:50 PM] [HomeConnect] [Dishwasher] 'Quick wash 45C' (Dishcare.Dishwasher.Program.Quick45)
[Homebridge] [1/4/2020, 3:19:50 PM] [HomeConnect] [Dishwasher] Removing services for 0 programs
[Homebridge] [1/4/2020, 3:19:50 PM] [HomeConnect] [Hood] Off
[Homebridge] [1/4/2020, 3:19:50 PM] [HomeConnect] [Oven Right] Off
[Homebridge] [1/4/2020, 3:19:50 PM] [HomeConnect] [Oven Left] Off
[Homebridge] [1/4/2020, 3:19:51 PM] [HomeConnect] [Dishwasher] Off
[Homebridge] [1/4/2020, 3:19:51 PM] [HomeConnect] [Hood] Home Connect API error: Setting not found for HomeAppliance [SDK.Error.UnsupportedSetting]
[Homebridge] [1/4/2020, 3:19:51 PM] [HomeConnect] [Hood] GET BSH.Common.Setting.AmbientLightEnabled
[Homebridge] [1/4/2020, 3:19:51 PM] [HomeConnect] [Hood] GET https://api.home-connect.com/api/homeappliances/THERMADOR-VCIN48GWS-68A40E1C48FB/settings/BSH.Common.Setting.AmbientLightEnabled
[Homebridge] [1/4/2020, 3:19:51 PM] [HomeConnect] [Hood] Ignoring SDK.Error.UnsupportedSetting error
[Homebridge] [1/4/2020, 3:19:51 PM] [HomeConnect] [Hood] Does not support ambient light

@JerGitHub
Copy link
Author

It appears to have been a bug in their server code...

Ah interesting!

Sorry I haven't had a chance to test - crazy week at work. Will hopefully get to testing the latest today or tomorrow.

@thoukydides
Copy link
Owner

[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Oven Left] Error GET programs: Home Connect API error: HomeAppliance reported an error [BSH.Common.Error.InvalidUIDValue]

Home Connect developer support have now responded with:

This error mean that this device – under specific UID is not supported by the API. From what I understand both ovens are recognized by our API after call GET /homeappliances? In correct behaviour API should return one oven only if device support Home Connect only on main one.
We are looking into that case, to make sure that nothing like that will appear in API, while it seems that user won't be able to use this specific oven remotely.

Further feedback from Home Connect developer support:

We checked this problem carefully, and result is, that indeed API shouldn't provide any information regarding not supported oven. This will be solved by update on our side – user will see only oven which is fully supported by Home Connect.

Thank you very much for reporting this case, thanks to that we are able to provide better software for our users.

@JerGitHub
Copy link
Author

Good to know we are finding bugs in their SaaS apps!

I still haven't had a chance to test but will report back once I do.

@thoukydides
Copy link
Owner

[Homebridge] [12/30/2019, 11:23:14 AM] [HomeConnect] [Oven Left] Error GET programs: Home Connect API error: HomeAppliance reported an error [BSH.Common.Error.InvalidUIDValue]

Latest from Home Connect developer support:

For your knowledge – update was released, and change should be visible on client side already. We would appreciate if you could let us know if everything is behaving correctly right now.

@JerGitHub, if you have any feedback on this issue then I will pass it back to the Home Connect team.

@JerGitHub
Copy link
Author

Sorry I have been MIA. Finally had a chance to try out the latest home-connect 0.14.0

Unfortunately, it looks like we took a step backwards. Now the hood fan doesn't work at all when using the app or Siri. The hood light ("Functional Light" button) still works perfectly though!

The only time the fan turns on is by using the "Hood Power Button" in the 4 toggles within the Hood accessory in the Home app (screenshots attached). This just turns the fan on and off. I cannot use the "Hood Fan" button to control fan speed as before. The "Hood Fan" button does not turn on the fan either if I just go straight to that button - there is no action sent in the logs to homebridge when I use the "Hood Fan" button either.

The last button "Hood Functional Light" has the same issue as the "Hood Fan" button as well. It does not do anything when pressed and does not post any action/event in the homebridge logs to show I pressed or slid the slider when used.

Hopefully the logs will be helpful in determining what is going on.

Thanks!

IMG_0490
IMG_0491
IMG_0492
IMG_0493
home-connect logs 1-20-2020.txt

@thoukydides
Copy link
Owner

Sorry I have been MIA. Finally had a chance to try out the latest home-connect 0.14.0

No problem. I really appreciate the time you take to test this plugin and provide very helpful feedback.

Unfortunately, it looks like we took a step backwards. Now the hood fan doesn't work at all when using the app or Siri.

Looking at the log, the plugin’s fan control failed very early during its initialisation due to a stupid error that I introduced when tidying up the code as part of an unrelated change. Unfortunately, this error stopped any of the fan functionality from being enabled. 😞

Really sorry about that. At least it will be trivial to rectify.

The power switch and light are handled completely independently so are unaffected by this screw-up.

The only time the fan turns on is by using the "Hood Power Button" in the 4 toggles within the Hood accessory in the Home app (screenshots attached). This just turns the fan on and off.

The hood light ("Functional Light" button) still works perfectly though!

That’s encouraging. 😌

@thoukydides
Copy link
Owner

Unfortunately, it looks like we took a step backwards. Now the hood fan doesn't work at all when using the app or Siri.

Looking at the log, the plugin’s fan control failed very early during its initialisation due to a stupid error that I introduced when tidying up the code as part of an unrelated change. Unfortunately, this error stopped any of the fan functionality from being enabled. 😞

Really sorry about that. At least it will be trivial to rectify.

Should be rectified in v0.15.0.

@JerGitHub
Copy link
Author

ha! OK - glad to see you knew right away what the issue looks to be. Let me try 0.15.0 out and report back. Thanks!

@thoukydides
Copy link
Owner

Thanks @JerGitHub. I look forward to seeing whether the new version works...

On the plus side, it looks like the changes that I made to improve error handling worked well. Earlier versions of the plugin would have logged an unhelpful message unrelated to the actual error cause, and all Hood functionality (and any appliances enumerated after it) would have failed completely. This time it logged the actual problem, and all functionality other than the fan control (and remaining duration, which is added to the Fan service) continued to work.

@JerGitHub
Copy link
Author

Unfortunately, running into the same issue as 0.14.0. Fan won't work via Home app or Siri. The only time the fan turns on is by using the "Hood Power Button" in the 4 toggles within the Hood accessory in the Home app. This just turns the fan on and off.

I had tried this on 0.15.0 and ran into the same issue but didn't tell you since I didn't have a chance to set it to debug mode. I just updated to 0.16.3 and tried again with the same issues as well.

Same exact tests and results as my 0.14.0 note above. #2 (comment)

HomeConnect 1-26-2020.txt

@thoukydides
Copy link
Owner

That’s very disappointing. Based on a quick look at the log this is a new problem parsing the fan programs returned by the appliance... but the net result is the same, i.e. the fan speed handling failed to initialise.

Unfortunately nothing obvious is leaping out as the cause, so I will look at it more carefully this evening.

Thank you @JerGitHub for your patience trying this again, and for the very helpful log file.

@thoukydides
Copy link
Owner

OK, just had an idea about the cause. To improve the handling of programs for all other cooking and cleaning appliance I split the function that reads the program details into two separate functions, but had not updated the fan speed code to use both of them. The net result is that it is only retrieving the list of programs but not their supported options... so it inevitably breaks when trying to parse the options.

@thoukydides
Copy link
Owner

Fingers crossed for 0.16.4...

@JerGitHub
Copy link
Author

ha! ok - here goes....give me a little bit to try it and get back to you. thanks!

@JerGitHub
Copy link
Author

Sorry - haven't had a chance to grab logs but the hood light isn't working anymore - that's the bad news. The good news is the hood fan looks to be fixed!

Will grab logs and post later today.This is on the latest 0.16.7 I grabbed when I saw there was an update.

@thoukydides
Copy link
Owner

Sorry - haven't had a chance to grab logs but the hood light isn't working anymore - that's the bad news.

I would guess that it is most likely to be due to a change in v0.16.7 the code that deals with lights. If you have the opportunity to try v0.16.6 then I would be interested in whether that is also broken.

The good news is the hood fan looks to be fixed!

Yeah! Finally... :-)

@JerGitHub
Copy link
Author

JerGitHub commented Feb 10, 2020

HomeBridge Logs 2-9-2020.txt
I didn't get a chance to revert back to v0.16.6 yet. I wanted to get you logs from the current v0.16.7 in case there was something in there that would pop up for you. I don't see any logs being written when I use the Home app or Siri to try and turn on the hood light. I'm not sure if these logs help you at all given the lack of any events logging.

I have to figure out how to revert back to v0.16.6 using HOOBS. I started using HOOBS at the end of last year because I like the UI and ease of use from a web interface. It's good at abstracting the details but not so good when you need to get advanced and revert to an older plugin it seems!

@thoukydides
Copy link
Owner

I think that I have spotted the bug that I introduced in v0.16.7. Don’t worry about v0.16.6.

I don’t use HOOBS myself - I prefer to manage everything manually. I took a quick look at what would be required to integrate this plugin with it properly, but it doesn’t look feasible. Unfortunately, it’s configuration system isn’t particularly good - it forces plugins to use a particular non-standard and inflexible configuration structure that is incompatible with other tools. Even worse, it attempts to use the schema created for homebridge-config-ui-x, doesn’t pick up the dynamically generated replacement schema, and throws half of it away anyway.

@thoukydides
Copy link
Owner

I didn't get a chance to revert back to v0.16.6 yet. I wanted to get you logs from the current v0.16.7 in case there was something in there that would pop up for you. I don't see any logs being written when I use the Home app or Siri to try and turn on the hood light. I'm not sure if these logs help you at all given the lack of any events logging.

The log did confirm what I suspected:

[Homebridge] [2/9/2020, 9:17:01 PM] [HomeConnect] Home Connect request #19: GET https://api.home-connect.com/api/homeappliances/THERMADOR-VCIN48GWS-68A40E1C48FB/settings
[Homebridge] [2/9/2020, 9:17:02 PM] [HomeConnect] Home Connect request #19: OK +987ms 
[Homebridge] [2/9/2020, 9:17:02 PM] [HomeConnect] [Hood] BSH.Common.Setting.PowerState=BSH.Common.EnumType.PowerState.Off (1 listeners)
[Homebridge] [2/9/2020, 9:17:02 PM] [HomeConnect] [Hood] Off
[Homebridge] [2/9/2020, 9:17:02 PM] [HomeConnect] [Hood] Cooking.Common.Setting.Lighting=false (0 listeners)
[Homebridge] [2/9/2020, 9:17:02 PM] [HomeConnect] [Hood] Cooking.Common.Setting.LightingBrightness=10 % (0 listeners)
[Homebridge] [2/9/2020, 9:17:02 PM] [HomeConnect] [Hood] Does not support Functional Light

The plugin was correctly reading the supported settings, which included the controls for the functional light. However, it then failed to read the details of those settings but instead just claimed that the functional light is not supported. This was caused by a bug in the code that avoids asking for details of unsupported settings.

Should be fixed in v0.16.8.

@JerGitHub
Copy link
Author

All fixed in v0.16.8 - both hood fan and hood light working via Siri and the Home app. Thanks!

One question since I don't know if this is possible - not sure if this is a Siri/Homekit limitation but could you make the plugin work so if you say:
"Hey Siri, turn the hood fan to 1", it would be equivalent to saying "Hey Siri, turn the hood fan to 25%"
"Hey Siri, turn the hood fan to 2", it would be equivalent to saying "Hey Siri, turn the hood fan to 50%"
"Hey Siri, turn the hood fan to 3", it would be equivalent to saying "Hey Siri, turn the hood fan to 75%"
"Hey Siri, turn the hood fan to 4", it would be equivalent to saying "Hey Siri, turn the hood fan to 100%"

If not, no big deal. Just wondering if that's possible.

As for HOOBS - I agree with you. I used to do everything via CLI but I saw HOOBS v3.x new UI and liked what I saw and wanted to give it a try. I like it so far but I still debate throwing it out and going with homebridge-config-ui-x. I don't blame you for not writing a "certified" plugin for HOOBS either. No real need. All "non-certified" plugins work perfectly with it since it is homebridge and all.

Time to test out the dishwasher and oven part of your plugin - I haven't focused on that since you were helping me with the hood and lights which we use every day.

Thanks again!

@thoukydides
Copy link
Owner

All fixed in v0.16.8 - both hood fan and hood light working via Siri and the Home app.

Wonderful!

Sorry that it took so long to reach this stage. I really appreciate your patience, clear feedback, and helpful log files.

One question since I don't know if this is possible - not sure if this is a Siri/Homekit limitation but could you make the plugin work so if you say:
"Hey Siri, turn the hood fan to 1", it would be equivalent to saying "Hey Siri, turn the hood fan to 25%"
"Hey Siri, turn the hood fan to 2", it would be equivalent to saying "Hey Siri, turn the hood fan to 50%"
"Hey Siri, turn the hood fan to 3", it would be equivalent to saying "Hey Siri, turn the hood fan to 75%"
"Hey Siri, turn the hood fan to 4", it would be equivalent to saying "Hey Siri, turn the hood fan to 100%"

Sorry, no. You can, however, use low, medium, and high to specify the fan speeds from Siri.

HomeKit defines the Rotation Speed characteristic for a Fan service to be a percentage. The only things that can be changes are the minimum and maximum percentages, and the step size. Siri further restricts it by always using 25%, 50%, and 100% for low, medium and, high.

Time to test out the dishwasher and oven part of your plugin - I haven't focused on that since you were helping me with the hood and lights which we use every day.

I will close this bug now since the hood support appears to be working.

However, if you find any new problems - with either the hood or dishwasher/oven support - then please raise separate issues for them.

@JerGitHub
Copy link
Author

No need to apologize to me - you are doing me a huge favor by releasing this and tweaking it and taking feedback to make things better. I appreciate all your work!

As far as the speed characteristics, that makes sense. I'm good with the way it is, but thought I would ask.

Thanks again and I will test out the dishwasher and oven and give you feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request waiting for feedback Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants