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

Ability to Disable Door Notifications for Fridge Freezer Devices #132

Closed
mattcostell opened this issue Mar 8, 2023 · 14 comments
Closed
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@mattcostell
Copy link

Description of Enhancement

Hi there - using the plugin for a Bosch Fridge Freezer - unfortunately I had to disable it as every time anyone opens or closes a door on the fridge or freezer everyone gets a notification in the home app. Would be great if it just notified on the Door Open alarms rather than every time the door was opened or closed. Otherwise like the functionality and ability to control settings...

Thanks!

Home Connect Mapping

In place of using the Door State event it would be more helpful to surface the Door Alarm Freezer Event and Door Alarm Refrigerator Event as those only fire when the door is left open for a period of time. The Temperature Alarm Freezer event would be helpful in this scenario as well.

HomeKit Mapping

No response

Home Connect Appliance(s)

Bosch Refrigerator B36CL80SNS/07

@mattcostell mattcostell added the enhancement New feature or request label Mar 8, 2023
@thoukydides
Copy link
Owner

You can disable the door notifications for specific appliances within the Home app. Go to the Home Settings (from the ... icon at the top of the screen), and then under Doors you will see a list of accessories, and can then toggle the Activity Notifications option. This is configured separately on each iPhone/iPad.

Home Connect Events are essentially stateless. There is no API for checking whether an event is active when Homebridge starts, or following any Home Connect errors or loss of connectivity. Even when the event stream is active, the reporting of events is inconsistent, especially whether any event is reported when the condition clears. Hence, they are not suitable for mapping to stateful HomeKit services such as the Door.

All Home Connect events are already supported by this plugin, but they are mapped to Stateless Programmable Switch services, which can be used to trigger automations. For a FridgeFreezer appliance the following events are supported:

  • Refrigeration.FridgeFreezer.Event.DoorAlarmFreezer (as Freezer Door Alarm)
  • Refrigeration.FridgeFreezer.Event.DoorAlarmRefrigerator (as Refrigerator Door Alarm)
  • Refrigeration.FridgeFreezer.Event.TemperatureAlarmFreezer (as Freezer Temperature Alarm)

Finally, I do not have access to a Home Connect Fridge, Freezer, or FridgeFreezer... so am unable to test functionality like this. The simulated appliances on the Home Connect Developer portal do not accurately model this sort of behaviour, so are not a suitable substitute. Hence, I want to keep the Door functionality common with appliances that I do own (Oven and Dishwasher), for which the current implementation is the most appropriate.

@thoukydides
Copy link
Owner

Quickly trying this with the FridgeFreezer simulator, the event stream looks like this...

Fridge and Freezer doors opened:

event: STATUS
data: {"items":[{"level":"hint","handling":"none","key":"BSH.Common.Status.DoorState","value":"BSH.Common.EnumType.DoorState.Open","uri":"/api/homeappliances/SIEMENS-HCS05FRF1-5B4AFB1A4255/status/BSH.Common.Status.DoorState","timestamp":1678348235}]}
id: SIEMENS-HCS05FRF1-5B4AFB1A4255

event: STATUS
data: {"items":[{"level":"hint","handling":"none","key":"BSH.Common.Status.DoorState","value":"BSH.Common.EnumType.DoorState.Open","uri":"/api/homeappliances/SIEMENS-HCS05FRF1-5B4AFB1A4255/status/BSH.Common.Status.DoorState","timestamp":1678348251}]}
id: SIEMENS-HCS05FRF1-5B4AFB1A4255

30 seconds later:

event: EVENT
data: {"items":[{"level":"hint","handling":"none","key":"Refrigeration.FridgeFreezer.Event.DoorAlarmRefrigerator","value":"BSH.Common.EnumType.EventPresentState.Present","timestamp":1678348266}]}
id: SIEMENS-HCS05FRF1-5B4AFB1A4255

event: EVENT
data: {"items":[{"level":"hint","handling":"none","key":"Refrigeration.FridgeFreezer.Event.DoorAlarmRefrigerator","value":"BSH.Common.EnumType.EventPresentState.Present","timestamp":1678348267}]}
id: SIEMENS-HCS05FRF1-5B4AFB1A4255

event: EVENT
data: {"items":[{"level":"hint","handling":"none","key":"Refrigeration.FridgeFreezer.Event.DoorAlarmRefrigerator","value":"BSH.Common.EnumType.EventPresentState.Present","timestamp":1678348268}]}
id: SIEMENS-HCS05FRF1-5B4AFB1A4255

event: EVENT
data: {"items":[{"level":"hint","handling":"none","key":"Refrigeration.FridgeFreezer.Event.DoorAlarmRefrigerator","value":"BSH.Common.EnumType.EventPresentState.Present","timestamp":1678348269}]}
id: SIEMENS-HCS05FRF1-5B4AFB1A4255

event: EVENT
data: {"items":[{"level":"hint","handling":"none","key":"Refrigeration.FridgeFreezer.Event.DoorAlarmRefrigerator","value":"BSH.Common.EnumType.EventPresentState.Present","timestamp":1678348270}]}
id: SIEMENS-HCS05FRF1-5B4AFB1A4255

event: EVENT
data: {"items":[{"level":"hint","handling":"none","key":"Refrigeration.FridgeFreezer.Event.DoorAlarmRefrigerator","value":"BSH.Common.EnumType.EventPresentState.Present","timestamp":1678348271}]}
id: SIEMENS-HCS05FRF1-5B4AFB1A4255

event: EVENT
data: {"items":[{"level":"hint","handling":"none","key":"Refrigeration.FridgeFreezer.Event.DoorAlarmRefrigerator","value":"BSH.Common.EnumType.EventPresentState.Present","timestamp":1678348272}]}
id: SIEMENS-HCS05FRF1-5B4AFB1A4255

event: EVENT
data: {"items":[{"level":"hint","handling":"none","key":"Refrigeration.FridgeFreezer.Event.DoorAlarmRefrigerator","value":"BSH.Common.EnumType.EventPresentState.Present","timestamp":1678348273}]}
id: SIEMENS-HCS05FRF1-5B4AFB1A4255

event: KEEP-ALIVE
data: ""

event: EVENT
data: {"items":[{"level":"hint","handling":"none","key":"Refrigeration.FridgeFreezer.Event.DoorAlarmRefrigerator","value":"BSH.Common.EnumType.EventPresentState.Present","timestamp":1678348274}]}
id: SIEMENS-HCS05FRF1-5B4AFB1A4255

event: EVENT
data: {"items":[{"level":"hint","handling":"none","key":"Refrigeration.FridgeFreezer.Event.DoorAlarmRefrigerator","value":"BSH.Common.EnumType.EventPresentState.Present","timestamp":1678348275}]}
id: SIEMENS-HCS05FRF1-5B4AFB1A4255

Fridge and Freezer doors closed:

event: STATUS
data: {"items":[{"level":"hint","handling":"none","key":"BSH.Common.Status.DoorState","value":"BSH.Common.EnumType.DoorState.Closed","uri":"/api/homeappliances/SIEMENS-HCS05FRF1-5B4AFB1A4255/status/BSH.Common.Status.DoorState","timestamp":1678348275}]}
id: SIEMENS-HCS05FRF1-5B4AFB1A4255

event: STATUS
data: {"items":[{"level":"hint","handling":"none","key":"BSH.Common.Status.DoorState","value":"BSH.Common.EnumType.DoorState.Closed","uri":"/api/homeappliances/SIEMENS-HCS05FRF1-5B4AFB1A4255/status/BSH.Common.Status.DoorState","timestamp":1678348276}]}
id: SIEMENS-HCS05FRF1-5B4AFB1A4255

No event is provided indicating that the DoorAlarm is no longer active. That can only be implied by the event no longer being reported periodically... but that is not really a viable technique. Other events are not repeated periodically (and even this one wasn't when I previously investigated it). The API documentation does not describe this repeating behaviour, so there is no particular timeout period that will definitely be reliable, and not subject to change.

I assume that TemperatureAlarm will operate similarly, but it is not supported by the appliance simulators.

These events are not suited to controlling stateful HomeKit services.

@thoukydides thoukydides added the wontfix This will not be worked on label Mar 9, 2023
@mattcostell
Copy link
Author

Thanks for the info - appreciate your response.

@ravny
Copy link

ravny commented May 6, 2023

Hi, so this events abot opened / closed doors can not be desabled, because push notifications are really annoying.

Tnx

@thoukydides
Copy link
Owner

@ravny please see my first reply to this issue:

You can disable the door notifications for specific appliances within the Home app. Go to the Home Settings (from the ... icon at the top of the screen), and then under Doors you will see a list of accessories, and can then toggle the Activity Notifications option. This is configured separately on each iPhone/iPad.

@ravny
Copy link

ravny commented May 6, 2023

Hi @thoukydides yes I disable push notifications https://ibb.co/qDjH0kW but I still get notifications when fridge door are opened.

@thoukydides
Copy link
Owner

That doesn't look like the Apple Home app, which explains why the Home app is still generating notifications...

image

@ravny
Copy link

ravny commented May 6, 2023 via email

@thoukydides
Copy link
Owner

That screenshot is from the Home Connect app, not the Apple Home app.

The Apple Home app is completely different, and has its own separate configuration to disable its notifications.

@mattcostell
Copy link
Author

mattcostell commented May 6, 2023 via email

@ravny
Copy link

ravny commented May 7, 2023

It was realy hiiden in App Home app now Im not getting push notifications for opened and closed doors.

Tnx for help

@jensmoes
Copy link

No event is provided indicating that the DoorAlarm is no longer active. That can only be implied by the event no longer being reported periodically... but that is not really a viable technique. Other events are not repeated periodically (and even this one wasn't when I previously investigated it). The API documentation does not describe this repeating behaviour, so there is no particular timeout period that will definitely be reliable, and not subject to change.

This is what I am seeing in the homebridge log suggesting there could be an alarm off event :

[10/11/2023, 11:37:20 AM] [HomeConnect] [Fridge] Door open
[10/11/2023, 11:38:20 AM] [HomeConnect] [Fridge] Event Freezer Door Alarm
[10/11/2023, 11:38:35 AM] [HomeConnect] [Fridge] Door closed
[10/11/2023, 11:38:35 AM] [HomeConnect] [Fridge] Event Freezer Door Alarm off (ignored)

unless it deduced from the door closed event 🤔

@thoukydides
Copy link
Owner

As I wrote previously, the handling of the end of events is inconsistent - both between event types, and between the same event type from different appliances.

I do not have a Home Connect fridge/freezer, but trying the appliance simulators again shows that the behaviour is unchanged:

  • While the alarm is active the Refrigeration.FridgeFreezer.Event.DoorAlarmFreezer event is reported as BSH.Common.EnumType.EventPresentState.Present, repeated once per second.
  • When the alarm clears the events just stop being reported. There is no BSH.Common.EnumType.EventPresentState.Off status.

Just because you happen to have an appliance that does report the Off status for that event doesn't mean it works for all fridge/freezer appliances. Even if it did, that still leaves my other objections, such as there being no API to read the current alarm status (e.g. on start-up on following interruption of the event stream).

I will not be changing this behaviour of the plugin. The only door-related change that I might make at some point is to treat each door independently (this information was added to the the Home Connect API on 22nd August 2023).

@thoukydides
Copy link
Owner

v0.32.0 provides per-appliance configuration options to remove the Door services (as well as selectively enabling the Switch services for appliance mode settings and the Stateless Programmable Switch services for appliance events).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

4 participants