Automation- Water Pump Cycle

8 years 11 months ago #1362 by bobl
Would like to run a pump for 15 minutes every hour. Cron would be very easy to set up for this, but I have been reading a lot of people on here say that cron slows everything down. What would be the best way to do this?

Please Log in or Create an account to join the conversation.

8 years 11 months ago #1387 by EasyIoT

bobl wrote: Would like to run a pump for 15 minutes every hour. Cron would be very easy to set up for this, but I have been reading a lot of people on here say that cron slows everything down. What would be the best way to do this?


Cron is not bad if you are using it for right purpose. If you want to check some input when it is changed use EventHelper. It's faster and consumes less server resources than cron job. If you want to execute some task every 15 minutes, then cron job is way to go.
The following user(s) said Thank You: bobl

Please Log in or Create an account to join the conversation.

8 years 11 months ago #1527 by choncba
Hi, I'm developing a similar project where I need to drive 8 water valves for a hydroponic rain at regular times whit Raspberry GPIO driver.
I need, for example, turn on the #1 valve from 00:00 to 23:59 during 2 minutes every 15 minutes, and #2 valve from 00:00 to 23:59 during 5 minutes every 10 minutes, I mean:
00:00 --> Water Valve 1 ON
00:00 --> Water Valve 2 ON
00:02 --> Water Valve 1 OFF
00:05 --> Water Valve 2 OFF
00:15 --> Water Valve 2 ON
00:17 --> Water Valve 1 ON
00:19 --> Water Valve 1 OFF
00:20 --> Water Valve 2 OFF
...
Can I do that with CRON?

Please Log in or Create an account to join the conversation.

8 years 11 months ago #1566 by bobl
Replied by bobl on topic Automation- Water Pump Cycle
Is automation limited to one cron program enabled at a time??
I set the RPiGPIO Pin_P1_07 with Control On, followed by Control Off two minutes later. The pin will turn on, but no response for off. Nothing shows in the terminal either. I then tried the Control Off being the only program enabled and didn't have a problem??

Please Log in or Create an account to join the conversation.

8 years 11 months ago #1583 by EasyIoT

bobl wrote: Is automation limited to one cron program enabled at a time??
I set the RPiGPIO Pin_P1_07 with Control On, followed by Control Off two minutes later. The pin will turn on, but no response for off. Nothing shows in the terminal either. I then tried the Control Off being the only program enabled and didn't have a problem??


I've tested more cron jobs and it works for me.

Please Log in or Create an account to join the conversation.

8 years 11 months ago #1584 by EasyIoT

choncba wrote: Hi, I'm developing a similar project where I need to drive 8 water valves for a hydroponic rain at regular times whit Raspberry GPIO driver.
I need, for example, turn on the #1 valve from 00:00 to 23:59 during 2 minutes every 15 minutes, and #2 valve from 00:00 to 23:59 during 5 minutes every 10 minutes, I mean:
00:00 --> Water Valve 1 ON
00:00 --> Water Valve 2 ON
00:02 --> Water Valve 1 OFF
00:05 --> Water Valve 2 OFF
00:15 --> Water Valve 2 ON
00:17 --> Water Valve 1 ON
00:19 --> Water Valve 1 OFF
00:20 --> Water Valve 2 OFF
...
Can I do that with CRON?


Try with cron job every minute and then check time in cron job and switch on and off your valves.

Please Log in or Create an account to join the conversation.

Time to create page: 0.262 seconds

Forum latest

  • No posts to display.