Simple Scheduler Addon

hey, thanks for making this very useful scheduler.

sorry, I want to ask, I’ve managed to use this scheduler to my home assistant.

It is correct that at such an hour and such a day it can light up. However, sometimes it cannot turn off according to the off time that has been entered in the form when creating the scheduler for the smart breaker / smart switch.

Then, sometimes I don’t know why the smart breaker / smart switch that I use is sometimes unavailable when it’s close to off time / between the time it’s on until it’s off, I check the history logbook, it’s always sometimes unavailable

Apart from that, I checked the history logbook, sometimes the turn off / turn on appears not only once, even though the smart breaker / smart switch is on.

Maybe I make mistakes or are there settings that I haven’t done?

Thank you in advance

Probably this is the cause.
Please check the addon log: if the device is unavailable the addon will retry 3 times (by default, but you can change that) and after that, the addon gives up.
You can read all of this in the addon log.
If you are not sure or you have any doubts, you could post the log here, so I can help you to understand the issue.

Oh okay, i will try. But I want to ask what do you mean by max retry? 3 times means every 1 minute up to 3 times or what?

The first attempt happens after 5 seconds, all the others are every minute.
Eg:
14:30:00 - Original schedule timer that fails
14:30:05 - 1st attempt
14:31:00 - 2nd attempt
14:32:00 - 3rd attempt

hey sorry for the late reply. after I try, I get the log like this, and the logbook is like this.

I don’t know why, when it’s time to die it turns back on for a second then turns off. I don’t know if I have an error?

is it possible that the effect of my slow internet wifi?

I need to see the log of the addon. The button near the add button, at the top of the scheduler list.

Hi there,

I’m getting the following errors in the debug log:

[2023-04-13 16:00:05] DEBUG: Finished Queue management - Queue length: 0
[2023-04-13 16:01:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-13 16:01:05] DEBUG: Max Retry: 3
[2023-04-13 16:01:05] DEBUG: Starting Queue management - Queue length: 0
[2023-04-13 16:01:05] DEBUG: Finished Queue management - Queue length: 0
[2023-04-13 16:01:57] ERROR: Unable to obtain entities info from Home Assistant
[2023-04-13 16:01:57] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-13 16:02:00] ERROR: Unable to obtain entities info from Home Assistant
[2023-04-13 16:02:01] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-13 16:02:06] DEBUG: Max Retry: 3

Have tried the follwing:

  • Uninstall
  • Remove SimpleSchdule folder in share
  • re Install

Running current version Simple Schedule

HA is currently up to date:
image

any advice would be appreciated.

Thanks

Sorry for the late response. I miss the notification.

That basically means that the addon is unable to communicate with HA.
Usually, you get that error when you restart or update HA.
Should be only temporary.

Thanks for the reply

It’s been like it for a couple of days now…

[2023-04-19 17:45:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 17:46:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 17:47:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 17:48:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 17:49:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 17:50:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 17:51:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 17:52:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 17:53:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 17:54:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 17:55:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 17:56:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 17:57:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 17:58:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 17:59:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 18:00:01] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 18:01:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 18:02:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 18:03:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 18:04:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 18:05:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 18:06:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 18:07:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 18:08:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 18:09:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 18:10:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 18:13:13] STATUS: Starting scheduler
[2023-04-19 18:13:13] STATUS: Starting main program
[2023-04-19 18:13:15] STATUS: Starting WebServer
[2023-04-19 18:13:35] ERROR: Unable to obtain entities info from Home Assistant
[2023-04-19 18:13:35] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-19 18:13:40] ERROR: Unable to obtain entities info from Home Assistant

I’ve restarted a few time but the same errors keep appearing and the entities don’t update.

Anything else to check, logs etc?

This is very odd.
Try to enable the DEBUG MODE in the addon configuration.
image
(don’t keep it on too long, 'cause the log can easily become huge)

Can you also post the ADDON log manifest?

Thanks

Sure

[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Add-on: Simple Scheduler
 Simple timer on weekly base
-----------------------------------------------------------
 Add-on version: 2.11
 You are running the latest version of this add-on.
 System: Home Assistant OS 10.0  (amd64 / qemux86-64)
 Home Assistant Core: 2023.4.5
 Home Assistant Supervisor: 2023.04.0
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[20:19:42] INFO: Starting service.d [Interface]
[20:19:42] INFO: Starting service.d [Scheduler]
[20:19:42] INFO: Running scheduler.sh
[20:19:42] INFO: Running interface.sh

And debugging is now turned on
image

Appreciate your help on this

Good. Have you taken a look at the log?

From in the add on

[2023-04-20 19:49:05] DEBUG: Finished Queue management - Queue length: 0
[2023-04-20 19:50:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-20 19:50:00] DEBUG: Parsing [Bathroom Towel Rail - Mornings]
[2023-04-20 19:50:00] DEBUG: Parsing [Bathroom Towel Rail - Evening]
[2023-04-20 19:50:00] DEBUG: Parsing [Spa Pool - Week Days]
[2023-04-20 19:50:00] DEBUG: Parsing [Spa Pool - Weekends]
[2023-04-20 19:50:00] DEBUG: Parsing [Bathroom Automation ]
[2023-04-20 19:50:05] DEBUG: Max Retry: 3
[2023-04-20 19:50:05] DEBUG: Starting Queue management - Queue length: 0
[2023-04-20 19:50:05] DEBUG: Finished Queue management - Queue length: 0
[2023-04-20 19:51:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-20 19:51:00] DEBUG: Parsing [Bathroom Towel Rail - Mornings]
[2023-04-20 19:51:00] DEBUG: Parsing [Bathroom Towel Rail - Evening]
[2023-04-20 19:51:00] DEBUG: Parsing [Spa Pool - Week Days]
[2023-04-20 19:51:00] DEBUG: Parsing [Spa Pool - Weekends]
[2023-04-20 19:51:00] DEBUG: Parsing [Bathroom Automation ]
[2023-04-20 19:51:05] DEBUG: Max Retry: 3
[2023-04-20 19:51:05] DEBUG: Starting Queue management - Queue length: 0
[2023-04-20 19:51:05] DEBUG: Finished Queue management - Queue length: 0
[2023-04-20 19:52:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-20 19:52:00] DEBUG: Parsing [Bathroom Towel Rail - Mornings]
[2023-04-20 19:52:00] DEBUG: Parsing [Bathroom Towel Rail - Evening]
[2023-04-20 19:52:00] DEBUG: Parsing [Spa Pool - Week Days]
[2023-04-20 19:52:00] DEBUG: Parsing [Spa Pool - Weekends]
[2023-04-20 19:52:00] DEBUG: Parsing [Bathroom Automation ]
[2023-04-20 19:52:05] DEBUG: Max Retry: 3
[2023-04-20 19:52:05] DEBUG: Starting Queue management - Queue length: 0
[2023-04-20 19:52:05] DEBUG: Finished Queue management - Queue length: 0
[2023-04-20 19:53:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-20 19:53:00] DEBUG: Parsing [Bathroom Towel Rail - Mornings]
[2023-04-20 19:53:00] DEBUG: Parsing [Bathroom Towel Rail - Evening]
[2023-04-20 19:53:00] DEBUG: Parsing [Spa Pool - Week Days]
[2023-04-20 19:53:00] DEBUG: Parsing [Spa Pool - Weekends]
[2023-04-20 19:53:00] DEBUG: Parsing [Bathroom Automation ]
[2023-04-20 19:53:05] DEBUG: Max Retry: 3
[2023-04-20 19:53:05] DEBUG: Starting Queue management - Queue length: 0
[2023-04-20 19:53:05] DEBUG: Finished Queue management - Queue length: 0
[2023-04-20 19:53:23] ERROR: Unable to obtain entities info from Home Assistant
[2023-04-20 19:53:23] ERROR: Unable to obtain entities names from Home Assistant

Or from in the share folder?

That one is correct.
Can you post a piece of the log where one event should be triggered?

Sure

[2023-04-20 14:00:00] DEBUG: Parsing [Bathroom Automation ]
[2023-04-20 14:00:05] DEBUG: Max Retry: 3
[2023-04-20 14:00:05] DEBUG: Starting Queue management - Queue length: 1
[2023-04-20 14:00:05] DEBUG: ID:1d6d64b26d5b41a69d8db2373624b9e5 | Entity status:ON | Queue item:{'entity_id': 'switch.bramley_spa_economy_mode', 'sched_id': '5f428eaf6a628', 'state': 'on', 'value': '', 'countdown': 3, 'max_retry': 3}
[2023-04-20 14:00:05] SCHED: [switch.bramley_spa_economy_mode] is ON as requested!
[2023-04-20 14:00:05] DEBUG: Finished Queue management - Queue length: 0
[2023-04-20 14:01:00] ERROR: Unable to obtain entities names from Home Assistant
[2023-04-20 14:01:00] DEBUG: Parsing [Bathroom Towel Rail - Mornings]
[2023-04-20 14:01:00] DEBUG: Parsing [Bathroom Towel Rail - Evening]
[2023-04-20 14:01:00] DEBUG: Parsing [Spa Pool - Week Days]
[2023-04-20 14:01:00] DEBUG: Parsing [Spa Pool - Weekends]
[2023-04-20 14:01:00] DEBUG: Parsing [Bathroom Automation ]

Like that?

yes
But the switch.bramley_spa_economy_mode does turn on?

It does, I did have to manually edit the json to add the entity, but it does seems to turn off and on. So it appears to be working just none of the entities are populating in the drop down.

Ok, I think we found the cause.
There is probably some entity name that blew the routine.
This is not affecting the schedules.
We need to find the entity name that causes the issue, so I can correct the bug.

To do it quickly just think if you have added/renamed some entities when the problem started.
Otherwise, we should find a way to export your entity names and send them to me.

Thanks - have not added/renamed anything in a while - I can’t confirm when it became a problem, the schedule has been running without issue, I only noticed it when I tried to add a new schedule.

I can look through the entities, what should I be looking for, something malformed? Strange characters?

Any non-alphanumeric character.
If you have some clues, just rename them one at a time trying to add a new scheduler each time.
When the list will finally populates, you find the cause.