Scheduler bugs - unstable, some of the scheduled events work while others are not

Hi All,

I have a raspberry pi zero with a relay board controlling the valves of my irrigation system. I can manually set the relays on/off through the dashboard. I’ve created scheduled events for the 6 valves, 6 times on and 6 times off. Some of the scheduled events are working fine while others are not, I can’t guess what is the problem. E.g the relay switch on in time, but it doesn’t receive the scheduled off, other relays doesn’t receive any of the scheduled events. I tried to recreate the scheduling both via web and android app.

Hi @tamas.dekany,

We’re not aware of any ongoing issues with the Raspberry Pi scheduler. Perhaps as a test, you could add a notification email or text message to each scheduler event? I’d be interested in if each event is generating this email, even if you’re not seeing the physical relay change state on your Pi.

Hi rsiegel,

A few days ago I set sms notifications for all events.Only in case of 3 out of the 12 events I received the SMSs (later I deleted the SMS notifications but I still receive the 3 SMSs every day). Then I changed the notifications to email, but no emails are received at all. All other functions are working well (sensors, actuators, triggers with SMS notification).

Hi rsiegel,

Another strange thing: I deleted one of the scheduled event which had been working properly, but it still works after the deletion, every day on the scheduled time the relay goes on. It seems that the rules (change/new one/deletion) don’t update at the raspberry side.

Hey guys,

I’m also having issues on sheduled events. I have two schedules, one to turn on and another to turn off a relay, and only the Turn On triggers. I have set a notification so I can give you a little more details on this…
EDIT: Just checked and the notifications are not being sent too. Can you please verify this?

@tamas.dekany Have you rebooted your Pi since deleting the event? I’m curious to see if that fixes the issue.

Hi Adam,

Yes, I tried to reboot several times, the deleted event still active. I also tried to create new events, then restart, but unfortunately none of them works except some events created weeks before. Triggers and sensors are OK. SMSs are still received though all of them are deleted from the events.

Just to add more information regarding this issue, I was getting the same result but using an Arduino with a ESP01.
None of my schedules are working now :S

Hi Adam,

Yesterday I created a new account and reinstalled Cayenne on pi zero. I have created the events again with email notifications (4 times relay on and 4 times relay off). None of them are working and I received only 1 email. What can be the problem?

Hi @adam and @tamas.dekany,

I did the same thing but with my Arduino. I removed the device and added it again with a new token. I had remake my schedules but none of them works.

@tamas.dekany (and anyone else reading who is interested)

We’ve had so many one-off issues with the Arduino scheduler that we have decided to re-write it rather than continue to keep squashing bugs which often introduce or reveal new bugs. My apologies for the inconvenience.

If you would be interested in Beta testing a new Arduino scheduler when it is ready on a development server, please let me know via forum PM. You don’t need to do anything special for the test beyond use it. We’re looking to get a sample of people using the new scheduler as they normally would to get their feedback on its performance and design. We’re hoping for something ready to beta test in May.

Hi rsiegel,

Now I only have Raspberry pi zero, so assume that the new Arduino scheduler won’t help my problem. After the 2nd reinstall the first 3 scheduled events (daily repeat) out of 10 have started to work (email notification+relay state change), others still not work, neither notification nor relay. Is there any limitation on the number of events configured?

Hi rsiegel,

Another question: as I know the scheduled events are also stored locally in raspberry pi. Can I check it somehow (is it stored in a separate file?)? It would be useful to go further and debug the problem.

Hi again. Yes, confusion on my part, I didn’t read closely enough and thought you meant the Arduino scheduler that we were re-writing.

No, there shouldn’t be any limitation on number of scheduled events you can configure, so this does sound like an unexpected issue. I’m asking internally to see if I can find a place to view the Pi’s locally-stored scheduler events, and will get back to this when I know more.

Alright, I see how to view the events list stored locally on the Pi now. So you can at least see if all of the events have made it there, and if they functioning ones look any different in the DB than the non-functioning ones. Feel free to share with us as well.

The events are stored in an sqlite DB called agent.db located at /etc/myDevices

If you don’t have it already installed on your Pi, you’ll need sqlite to view the DB contents:

sudo apt-get install sqlite3

Once that is installed, then you can open the DB:

sqlite3 /etc/myDevices/agent.db

and finally, from the SQL prompt, list the scheduled events:

SELECT * FROM scheduled_settings;

1 Like

I have the same scheduler bugs with esp8266-01 and i am interest to test the beta scheduler version.

Hi rsiegel,

Thanks for the information! I checked the content of database, only the first few events are there which are working, others are not. I tried to modify the working ones (changing any of the parameters, delete, etc.) or add new events at the dashboard, but the database didn’t change, the content is the same as before. It should be a synchronisation problem between the database and dashboard. Do you have any idea?

Hi rsiegel,

I have found the solution for the synchronisation problem. As soon as I set the IP address of the raspberry into the DMZ, the database update works, so I think I should allow some ports at the firewall. It’s interesting, because all other functions are working properly without port forwarding. Do you know which ports should I forward? I don’t want to use DMZ.

That is interesting, since I’d expect if you had port 8181 closed for example, that the Raspberry Pi agent software wouldn’t be able to communicate with our server at all.

Here is the full list of ports I have for Cayenne as a general platform. Please note that you may not need all of them – for example, if you don’t run any Arduinos, no need to open port 8442.

443 for HTTPS
8442 for Arduino
8181 for Raspberry Pi
50xx for cloud server websockets
80 for regular HTTP
1883 and 8883 for MQTT

1 Like

For some time now scheduling has stopped working. Whenever I create a new event and save it, I always get the error message “Could not save the event to machine raspberry”.
Are there any suggestions?

I use a raspberry 3.
Thanks