ekutner / home-connect-hass

Alternative (and improved) Home Connect integration for Home Assistant
MIT License
549 stars 54 forks source link

Dishwasher - NEFF - issue with selected program 'BSH.Common.Program.Favorite.001' #182

Closed knights1 closed 1 year ago

knights1 commented 1 year ago

Describe the bug: On my NEFF dishwasher I have a button called Favorite. I used this button to start a specific automation (start dishwasher at 00:00 or when electricity is cheap etc). I used the entitiy 'Neff Vaatwasser - Selected Program' with program 'BSH.Common.Program.Favorite.001' to start a specific automation. This all worked fine.

But somehow the BSH.Common.Program.Favorite.001 is not seen anymore and thus my automation does not start. Last time I saw the program BSH.Common.Program.Favorite.001 in my logs was on 1st of March,

Version of the custom_component: 0.6.0

Add your configuration here: home_connect_alt: client_id: not importabt client_secret: not important


[2023-03-07 160106.060 INFO.txt](https://github.com/ekutner/home-connect-hass/files/10911007/2023-03-07.160106.060.INFO.txt)
ekutner commented 1 year ago
  1. Did this Favorite program used to show in the programs selection box?
  2. Did it show up in the selected or active program sensors?
  3. How did you receive the event in HA for triggering your automation, did you listen to a program_selected event or some other way?
  4. If you still have the log from March 1st with that value, can you please attach that too?
  5. Did you add log_mode: 7 to your config? It's not in the configuration you provided and the data I expect to see is not in the log.

In general, the integration responds to events it received from HC, if they are not sending the event there is nothing the integration can do about it. The log should tell us which one is it. Also, please note the exact time when you press that button, so I'll know where to look for it in the log.

knights1 commented 1 year ago

Thanks for looking into this. I really appreciate it.

FYI: They way the button favorite works on the appliance itself: you manually select a program on your dishwasher and when you hold the FAVORITE button it will 'bind' to the selected program. It's basically just creating a shortcut. What I remember is that the API sees the program as a different program that what it is binded to. So as program: BSH.Common.Program.Favorite.001.

To answer your questions:

  1. Did this Favorite program used to show in the programs selection box? I can't recall if it was in the programs selection box. I never used the program selection box.

  2. Did it show up in the selected or active program sensors? Yes, see the image. See February 28th, so it worked untill Feb :D image

  3. How did you receive the event in HA for triggering your automation, did you listen to a program_selected event or some other way? Correct, I 'listened' to the entity called 'sensor.011110425407005519_selected_program' and when this changed to 'BSH.Common.Program.Favorite.001' (after pressing the physical button on the appliance) my automation started.

  4. If you still have the log from March 1st with that value, can you please attach that too Answer: I dont have those logs, I only have the 'logbook' , see picture above.

  5. Did you add log_mode: 7 to your config? It's not in the configuration you provided and the data I expect to see is not in the log.

@ekutner : In which file do I need to add this line ? I did this to custom_components, config.flow or something. btw: if you search for 'BSH.Common.Program.Favorite.001' in my log you already will find some hits which you prolly understand better then I do :D

ekutner commented 1 year ago

You're right, it is in the log, and it has the following sequence of events: At 16:03:00.418 the selected program is changed to BSH.Common.Program.Favorite.001 At 16:03:14.485 the selected program is changed to Dishcare.Dishwasher.Program.NightWash

So for these 14 seconds or so the sensor should have been set to favorite value. This should definitely be enough time for the automation to be triggered and for the sensor log to show that value. When looking at your sensor log I see the same behavior on Feb. 27th. where the favorite state is changed after 3 seconds but on Feb. 28th, it didn't change. I suspect update events are being ignored but I can't say for sure if by the integration or by HA. I created a new beta version 0.6.1-b1 which adds logging when the event is published to HA, in order to verify that the integration is publishing it as expected. Please update to that version, and add the log_mode: 7 setting to the home_connect_alt section in configuration.yaml

knights1 commented 1 year ago

thanks for the steps needed. see the log. attached, to this reply.

below some interesting lines:

DEBUG (MainThread) [home_connect_async.appliance] Loaded 5 Options for selected/BSH.Common.Program.Favorite.001 2023-03-07 21:59:30.183 DEBUG (MainThread) [home_connect_async.appliance] Loaded data for selected Program 2023-03-07 21:59:30.184 DEBUG (MainThread) [home_connect_async.appliance] Skipping fetch_available_options() for selected program 2023-03-07 21:59:30.184 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: Events.PROGRAM_SELECTED = BSH.Common.Program.Favorite.001 2023-03-07 21:59:30.190 DEBUG (MainThread) [custom_components.home_connect_alt.sensor] Updating sensor 011110425407005519_selected_program => None 2023-03-07 21:59:30.193 DEBUG (MainThread) [custom_components.home_connect_alt.select] Current program BSH.Common.Program.Favorite.001 is not in available_programs 2023-03-07 21:59:30.198 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: Events.DATA_CHANGED = None 2023-03-07 21:59:30.200 DEBUG (MainThread) [custom_components.home_connect_alt.sensor] Updating sensor 011110425407005519_selected_program => None 2023-03-07 21:59:30.201 DEBUG (MainThread) [custom_components.home_connect_alt.select] Current program BSH.Common.Program.Favorite.001 is not in available_programs 2023-03-07 21:59:30.204 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: BSH.Common.Root.SelectedProgram = BSH.Common.Program.Favorite.001 2023-03-07 21:59:30.204 DEBUG (MainThread) [home_connect_async.api] HTTP GET /api/homeappliances/011110425407005519/programs/active (try=1 count=47)

ha log7.txt

ekutner commented 1 year ago

This may be related to bug #184 where the values were reversed between active and selected programs. Can you please check if it's working fine in 0.6.0-b2

knights1 commented 1 year ago

You rock. Your new release fixed the problem :) Is there a paypal site where I can buy you a a cup of coffee?

Op wo 8 mrt. 2023 om 20:45 schreef ekutner @.***>

This may be related to bug #184 https://github.com/ekutner/home-connect-hass/issues/184 where the values were reversed between active and selected programs. Can you please check if it's working fine in 0.6.0-b2

— Reply to this email directly, view it on GitHub https://github.com/ekutner/home-connect-hass/issues/182#issuecomment-1460756460, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEFMMJHBBMIW3Q6ZJIJXQL3W3DOXNANCNFSM6AAAAAAVSTVDNM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ekutner commented 1 year ago

Happy to hear that and thanks for the offer, no need.

woopstar commented 1 year ago

I can confirm this is an issue in 0.6.0 with the Favorite program. Updated to 0.6.1-b3 and now works.