Cayenne scheduling options


#1

Hi,
I have built automated irrigation control for a large vineyard and olive grove in NSW Australia. I use an Arduino mega and WS5100 ethernet shield for connectivity to the net via Cayenne. From the Arduino I use Xbee Pro radios to turn pumps and valves in the field on or off. The Xbees are in a digimesh network which has proved to be very robust over say a 5000 acre property with a few buildings/hills etc which prevent Line of Site communication.
I am concerned about what might happen if the internet goes down whilst a scheduled irrigation is taking place. The pumps/valves will stay on indefinitely I think when the scheduled stop time is missed? (I am less worried about missing a whole irrigation if the internet is down before the time of starting).
Most conventional (wired) irrigation controllers use a scheduled start date/time and then a “time to run” rather than a date/time to stop. e.g. Start at 10:00pm and run for 4 hours.
I am wondering if something like this might be possible with Cayenne? i.e. have a widget that schedules both the start time AND the time to run and sends that to the Arduino for processing at the scheduled start time. That way if there is an issue with the internet the scheduled stop event would still occur.
Just thought it would be worth asking the question!
Craig


#2

Hello Sir and welcome to the Cayenne Community. Your question as well as the project are very good! In my experience with Cayenne, I have seen that when the internet connection is down, and in the same time there was a trigger involving a relay module for example, the relay module is staying on…which is a problem and can cause a lot of problems.

Until they release some kind of local package (I have heard that they discussed this question) it is better to write the logic on the main device that you use to control all the nodes! You can program the logic and use the Cayenne platform to monitor the states. Also you can write logic, to turn of a specific function after some time or at some time and monitor this state in Cayenne! You can use some RTC module for real time.


#3

mmmm… I wonder can I have Cayenne dictate a start time AND the run time and transfer that to the Arduino at the time the schedule starts? I don’t really want to code in the run times because irrigation run times vary according to the weather and it would be nice to enter that each day or so on the dashboard somehow.


#4

@bestes
Hey team, you can put this in the roadmap :slight_smile:


#5

Hi @cr.stubbs,

Thanks for writing this suggestion and letting us know of the use case! So, a couple things.

For Raspberry Pi, when the schedule is created, it is actually stored locally on the Pi so that in cases of internet failure the schedule will still run. This is a neat feature for the Pi.

However, for the Arduino, the schedules are stored in cloud so if there is internet loss, then the scheduled event will not fire.

As @ognqn.chikov mentioned, we are considering a ‘local’ version of Cayenne that could run w/out connection to internet. But this is large undertaking and we have other large projects in the works right now.

We have a ‘timer’ feature that is being designed that will be able to start an actuator and then automatically turn it off after a pre-set amount of time.

I will have to check with the team if we would be able to transfer run time to the Arduino at time of the schedule start…not sure if this would be possible unless maybe there was some cloud IDE to flash the new code, and I don’t know if this would create other problems as well. Do you have idea how this would be possible?

Thanks for bring this to our attention :slight_smile:

-Benny