home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.22k stars 30.58k forks source link

Scheduled automations not running since upgrading to 2023.08 #98114

Closed khilzinger closed 11 months ago

khilzinger commented 1 year ago

The problem

Forgive me if this is the wrong place to put this but I have been struggling with this since upgrading to 2023.08, and I have since upgraded to 2023.08.01.

I have a nightly automation that runs at 10:00PM local time to go to bed. It runs maybe one or two steps into the automation and stops.

If I reboot my H/A box during the day, it seems to run fine that night.

When it fails, if I open the automation and run each step manually, it runs just fine, which indicates to me that this is not a problem with the automation I created.

This is not the only automation that fails. I have a motion control on my bathroom lights that fails at times but works fine at other times...no rhyme or reason but it seems to work better after the reboot.

What this almost seems to me is a process just sits there dumb after a while, almost like a memory leak or just getting hung. I know a lot of these automations require services to run to do things. Which service? I do not know, since I can manually run them.

It seems to me that Q/A kind of failed on the 2023.08 release. Kasa/TP-Link broke. I had some Z-Wave problems until another patch.

What version of Home Assistant Core has the issue?

2023.8

What was the last working version of Home Assistant Core?

2023.7

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Automation

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

tdejneka commented 1 year ago

Post the trace file produced by the automation that gets 'stuck'.

khilzinger commented 1 year ago

I got this when it ran the step "Call a service 'Light: Turn off' on Goodnight Lights - Home":

Error running action Failed to send request: Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>

I did not see a way to attach the file but here is the text from it:

{ "trace": { "last_step": "action/2", "run_id": "5a09e7202ae8d91418e18fb6ac5ffc32", "state": "stopped", "script_execution": "error", "timestamp": { "start": "2023-08-11T03:00:00.125268+00:00", "finish": "2023-08-11T03:00:27.768687+00:00" }, "domain": "automation", "item_id": "1676308175968", "error": "Failed to send request: Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>", "trigger": "time", "trace": { "trigger/0": [ { "path": "trigger/0", "timestamp": "2023-08-11T03:00:00.125389+00:00", "changed_variables": { "this": { "entity_id": "automation.goodnight_s_th", "state": "on", "attributes": { "id": "1676308175968", "last_triggered": "2023-08-10T03:00:00.128309+00:00", "mode": "single", "current": 0, "friendly_name": "Schedule: Goodnight S-Th Home-Night" }, "last_changed": "2023-08-09T19:26:12.853368+00:00", "last_updated": "2023-08-10T03:00:08.100532+00:00", "context": { "id": "01H7EP67S4HVF9W1YDB0MK63ZH", "parent_id": null, "user_id": null } }, "trigger": { "id": "0", "idx": "0", "alias": null, "platform": "time", "now": "2023-08-10T22:00:00.124797-05:00", "description": "time", "entity_id": null } } } ], "condition/0": [ { "path": "condition/0", "timestamp": "2023-08-11T03:00:00.125449+00:00", "result": { "after": { "__type": "<class 'datetime.time'>", "isoformat": "00:00:00" }, "now_time": { "type": "<class 'datetime.time'>", "isoformat": "22:00:00.125484" }, "before": { "type": "<class 'datetime.time'>", "isoformat": "23:59:59.999999" }, "weekday": [ "sun", "mon", "tue", "wed", "thu" ], "now_weekday": "thu", "result": true } } ], "condition/1": [ { "path": "condition/1", "timestamp": "2023-08-11T03:00:00.125565+00:00", "result": { "result": true } } ], "condition/1/entity_id/0": [ { "path": "condition/1/entity_id/0", "timestamp": "2023-08-11T03:00:00.125617+00:00", "result": { "result": true, "state": "home", "wanted_state": "home" } } ], "condition/2": [ { "path": "condition/2", "timestamp": "2023-08-11T03:00:00.125697+00:00", "result": { "result": true } } ], "condition/2/entity_id/0": [ { "path": "condition/2/entity_id/0", "timestamp": "2023-08-11T03:00:00.125735+00:00", "result": { "result": true, "state": "Home", "wanted_state": "Home" } } ], "action/0": [ { "path": "action/0", "timestamp": "2023-08-11T03:00:00.126401+00:00", "changed_variables": { "context": { "id": "01H7H8JPZXN25P87HRTFHXQENJ", "parent_id": null, "user_id": null } }, "result": { "params": { "domain": "light", "service": "turn_on", "service_data": { "brightness_pct": 1, "entity_id": [ "light.kitchen_undercabinet_2_lights" ] }, "target": { "entity_id": [ "light.kitchen_undercabinet_2_lights" ] } }, "running_script": false } } ], "action/1": [ { "path": "action/1", "timestamp": "2023-08-11T03:00:00.199670+00:00", "result": { "result": true, "state": 1.8 } } ], "action/2": [ { "path": "action/2", "timestamp": "2023-08-11T03:00:12.951729+00:00", "error": "Failed to send request: Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>", "result": { "result": false, "state": 189.9, "wanted_state_below": 25 } } ] }, "config": { "id": "1676308175968", "alias": "Schedule: Goodnight S-Th Home-Night", "description": "", "trigger": [ { "platform": "time", "at": "22:00:00" } ], "condition": [ { "condition": "time", "weekday": [ "sun", "mon", "tue", "wed", "thu" ] }, { "condition": "state", "entity_id": "device_tracker.kirks_cell_phone_2", "state": "home", "enabled": true }, { "condition": "state", "entity_id": "input_select.house_mode", "state": "Home" } ], "action": [ { "service": "light.turn_on", "data": { "brightness_pct": 1 }, "target": { "entity_id": "light.kitchen_undercabinet_2_lights" } }, { "service": "switch.turn_off", "data": {}, "target": { "entity_id": [ "switch.goodnight_switches_home", "switch.kasa_leds" ] } }, { "service": "light.turn_off", "data": {}, "target": { "entity_id": "light.goodnight_lights_home" } }, { "service": "light.turn_on", "data": { "brightness_pct": 10 }, "target": { "entity_id": "light.patio_ground_lights" } }, { "service": "light.turn_on", "data": { "brightness_pct": 20 }, "target": { "entity_id": "light.bedroom_1_nightstand_light" } }, { "service": "switch.turn_on", "data": {}, "target": { "entity_id": [ "switch.bedroom_1_cpap", "switch.bedroom_1_entertainment", "switch.bedroom_1_harmony_remote_charge" ] } }, { "service": "input_select.select_option", "data": { "option": "Night" }, "target": { "entity_id": "input_select.house_mode" } }, { "service": "cover.close_cover", "data": {}, "target": { "entity_id": "cover.garage_door" } }, { "service": "lock.lock", "data": {}, "target": { "entity_id": [ "lock.front_door_lock", "lock.garage_entry_door_lock", "lock.side_door_lock" ] } }, { "service": "alarm_control_panel.alarm_arm_away", "data": {}, "target": { "entity_id": "alarm_control_panel.home_ring_mode" } }, { "service": "climate.set_preset_mode", "data": { "preset_mode": "Sleep" }, "target": { "entity_id": "climate.kah_therm_01" } } ], "mode": "single" }, "blueprint_inputs": null, "context": { "id": "01H7H8JPZXN25P87HRTFHXQENJ", "parent_id": null, "user_id": null } }, "logbookEntries": [ { "name": "Schedule: Goodnight S-Th Home-Night", "message": "triggered by time", "source": "time", "entity_id": "automation.goodnight_s_th", "context_id": "01H7H8JPZXN25P87HRTFHXQENJ", "when": 1691722800.125955, "domain": "automation" }, { "when": 1691722800.834199, "state": "off", "entity_id": "switch.kitchen_window_outlet_led", "icon": "mdi:led-off", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722800.842091, "state": "off", "entity_id": "switch.kitchen_toaster_oven_outlet_led", "icon": "mdi:led-off", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722800.847291, "state": "off", "entity_id": "switch.dining_room_outlet_led", "icon": "mdi:led-off", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722800.864059, "state": "off", "entity_id": "switch.dining_room_fountain_outlet_led", "icon": "mdi:led-off", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722800.869418, "state": "off", "entity_id": "switch.dryer_outlet_led", "icon": "mdi:led-off", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722800.912024, "state": "off", "entity_id": "switch.kitchen_air_fryer_outlet_led", "icon": "mdi:led-off", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722800.945073, "state": "off", "entity_id": "switch.washing_machine_outlet_led", "icon": "mdi:led-off", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722800.953017, "state": "off", "entity_id": "switch.tp_link_power_strip_6a6b_led", "icon": "mdi:led-off", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722800.954595, "state": "off", "entity_id": "switch.bedroom_1_cpap_led", "icon": "mdi:led-off", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722801.052971, "state": "off", "entity_id": "switch.garage_ps1_led", "icon": "mdi:led-off", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722801.078829, "state": "off", "entity_id": "switch.tp_link_power_strip_7c92_led", "icon": "mdi:led-off", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722801.094015, "state": "off", "entity_id": "switch.tp_link_power_strip_36fb_led", "icon": "mdi:led-off", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722801.104224, "state": "off", "entity_id": "switch.unfinished_basement_ps3_led", "icon": "mdi:led-off", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722801.108968, "state": "off", "entity_id": "switch.tp_link_power_strip_781e_led", "icon": "mdi:led-off", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722801.122334, "state": "off", "entity_id": "switch.tp_link_power_strip_5c98_led", "icon": "mdi:led-off", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722801.133308, "state": "off", "entity_id": "switch.tp_link_power_strip_36fd_led", "icon": "mdi:led-off", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722801.137906, "state": "off", "entity_id": "switch.office_ps4_led", "icon": "mdi:led-off", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722801.14567, "state": "off", "entity_id": "switch.tp_link_power_strip_45fc_led", "icon": "mdi:led-off", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722801.150594, "state": "off", "entity_id": "switch.tp_link_power_strip_36da_led", "icon": "mdi:led-off", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722801.236289, "state": "off", "entity_id": "switch.tp_link_power_strip_4856_led", "icon": "mdi:led-off", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722801.249507, "state": "off", "entity_id": "switch.tp_link_power_strip_7f67_led", "icon": "mdi:led-off", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722801.263865, "state": "off", "entity_id": "switch.tp_link_power_strip_4870_led", "icon": "mdi:led-off", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722801.280133, "state": "off", "entity_id": "switch.tp_link_power_strip_7d38_led", "icon": "mdi:led-off", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722801.535062, "state": "off", "entity_id": "switch.tp_link_power_strip_7e3e_led", "icon": "mdi:led-off", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722801.645541, "state": "off", "entity_id": "switch.backyard_ps1_led", "icon": "mdi:led-off", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722801.651261, "state": "off", "entity_id": "switch.kasa_leds", "icon": "mdi:led-on", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722812.968098, "state": "off", "entity_id": "light.backyard_overhead_lights_01", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722813.039228, "state": "off", "entity_id": "light.backyard_overhead_lights_02", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722813.050127, "state": "off", "entity_id": "light.patio_overhead_lights", "icon": "mdi:lightbulb-group", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722813.164927, "state": "off", "entity_id": "light.garage_entry_lights", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722813.608595, "state": "off", "entity_id": "light.porch_light", "icon": "mdi:coach-lamp-variant", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722813.782216, "state": "off", "entity_id": "light.side_door_light", "icon": "mdi:coach-lamp", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722813.784071, "state": "off", "entity_id": "light.alarm_lights_off_overnight", "icon": "mdi:lightbulb-group", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722813.784556, "state": "off", "entity_id": "light.goodnight_lights_home", "icon": "mdi:lightbulb-group", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" }, { "when": 1691722813.785351, "state": "off", "entity_id": "light.goodnight_lights_away", "icon": "mdi:lightbulb-group", "context_event_type": "automation_triggered", "context_domain": "automation", "context_name": "Schedule: Goodnight S-Th Home-Night", "context_message": "triggered by time", "context_source": "time", "context_entity_id": "automation.goodnight_s_th" } ] }

khilzinger commented 1 year ago

I did verify every light in that group was valid.

allenporter commented 1 year ago

@khilzinger we need to report the issue against the specific integration for the device. There was a change to service calls in automations where it removed a default timeout and now what we want to do is fix the underling root cause of the integration which is hanging.

Two questions:

issue-triage-workflows[bot] commented 11 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.