nebhead / irrigator

Smart Sprinkler Controller for the Raspberry Pi
MIT License
27 stars 3 forks source link

weather and relays #9

Closed nealw8 closed 5 months ago

nealw8 commented 5 months ago

Ben. Still trying to get the system up with the updated software but I'm still having issues. The first is the link to open weather seems to not work with the old or new API keys, i.e. temp show 0 degrees and rain fall 0 in. do I have to do something at the openweather site?

Secondly and more troubling is that when I manually activate any zone relays go high including the gate relay thus killing power to the zone relay but since all the zone relays are high then all zones would be turned on. the hardware in the system has not change from last season only the update to the latest software. Neal

nealw8 commented 5 months ago

another anomaly is the zone 3 show as red but the log does not show it on. if you click to stop it the dashboard disappears showing 502 Bad Gateway but the ri shows with SSHing. rebooting does not change the on status of zone 3.

nebhead commented 5 months ago

Odd... the only thing that I changed since the last update was the weather API... everything else is the same. Do you have your relays set to active high or active low as you did before?

nealw8 commented 5 months ago

set to high with no zones activater the voltage on the pins from the zpi are 0.25v when activating any single zone all pins read 3v even the gale

nealw8 commented 5 months ago

that should be gate not gale here is log for last reboot image

nealw8 commented 5 months ago

here is a shot of the zones with Z3 in on state clicking it will cause the 505

image

nealw8 commented 5 months ago

here it is with Z1 clicked

image

nebhead commented 5 months ago

What do your settings look like? Did you change any GPIOs in your design?

nealw8 commented 5 months ago

nope, like I said nothing but the software is different 29 gate, 31 z1, 32 z2.,33 z3

nebhead commented 5 months ago

So, you brought your old settings file over? Or did you start from a fresh one?

nealw8 commented 5 months ago

started a fresh one

nealw8 commented 5 months ago

with gpio as above

nealw8 commented 5 months ago

also I did a fresh reinstall to be sure it was not a glitch of the first one still behave the same

nebhead commented 5 months ago

Are you able to SSH into your pi and cat /usr/local/bin/irrigator/irrigator.json? Like to see the output. You can erase any personally identifying data from it (i.e. API Key or location).

nealw8 commented 5 months ago

I did not go in and input new pin designation I took the one that were there

nebhead commented 5 months ago

Deleting that since it had your API key in it...

nebhead commented 5 months ago

I did not go in and input new pin designation I took the one that were there

OK, yes you need to make sure you have the right GPIO's setup in the settings or it will not work properly.

nealw8 commented 5 months ago

all GPIO pins reset to gate 29,z1 31, z1 32, z3 33

still all relays go high when i activate zone 1, or zone 2 zone 3 seems to be on all the time on the dashboard but not in the history

nealw8 commented 5 months ago

a reboot does not clear it

nealw8 commented 5 months ago

I am going to do yet another install with a new card to see if that works. will get back to you above the results

nebhead commented 5 months ago

Alright... The only other thing I can think of is that maybe your relays are actually active low?

nealw8 commented 5 months ago

ok, new software installed tested active high trigger and active low trigger. Active high shows the same problem, all relays (gate ,z1 ,z2, z3) turn on when you manual z1, z2, or z3. active low trigger set shows the following when you manual z1 relays gate, z2 and z3 turn on; manual z2 relay gate, z1 and z3 turn on; and manual z3 relays gate, z1 and z2 turn on. In all cases when a zone is activated the Gate relay turns on and since I have that wired from the 24V source NC to com whenever that relay turn on it cuts the AC to the zone relays. This is the wiring show in your wiring schematics.

nealw8 commented 5 months ago

I might add that this wiring worked last season flawlessly.

nebhead commented 5 months ago

In all cases when a zone is activated the Gate relay turns on and since I have that wired from the 24V source NC to com whenever that relay turn on it cuts the AC to the zone relays. This is the wiring show in your wiring schematics.

Odd... the gate relay should not activate in any case. It's designed only as a gate in the case where all relays flip at the same time (when not controlled by the software). Thus it should remain off when in operation. Since it's on the normally connected pin and common, it should feed power to the other relays when the relay is off. If the relay activates, it would cut power. I'm tempted to reflash my setup and see if I see any oddities.

Do you have any shorts in your wiring or perhaps did any of your Dupont connections come loose since last season?

nealw8 commented 5 months ago

rewired the zero to relay connections, used a GPIO pin=out connector to separate the close connection on the zero.GPIO. behaves the same as before, all relays go on with active high and a zone actuation. Can't be a short unless it is on the zeero.

nebhead commented 5 months ago

OK, I'll try to re-install on my setup and see if I can replicate.

nebhead commented 5 months ago

Just did a clean install and setup. Tested all three of my connected relays and it all worked flawlessly.

One thing I wanted to check on your side... are you setting your system to RasPi?

image

Are you clicking save in each section after putting the correct information in?

nealw8 commented 5 months ago

yes set to Raspi, yes to clicking save. here once again is the content of irrigator.json: nealw@irrigator:~ $ cat /usr/local/bin/irrigator/irrigator.json { "controls": { "manual_override": false, "active": false }, "settings": { "target_sys": "RasPi", "zone_gate": 29, "relay_trigger": 1 }, "wx_data": { "apikey": , "lat": "38.9529442", "long": "-76.9408647", "location": "Hyattsville, MD,USA", "temp_enable": true, "min_temp": 32, "max_temp": 100, "precip": 0.2, "history_enable": true, "history_days": 2, "forecast_days": 2, "forecast_enable": true, "forecast_history_enable": true, "units": "F" }, "zonemap": { "zone_01": { "GPIO_mapping": 31, "enabled": true, "active": false }, "zone_02": { "GPIO_mapping": 32, "enabled": true, "active": false }, "zone_03": { "GPIO_mapping": 33, "enabled": true, "active": false } }, "schedules": { "FrontYard": { "start_time": { "enabled": false, "minute": 30, "hour": 6, "day_of_month": "", "month": "", "day_of_week": "", "cron_string": "30 6 ", "human_readable": "At 06:30 AM", "active": false }, "zones": { "zone_01": { "duration": 10 }, "zone_02": { "duration": 10 } } }, "BackYard": { "start_time": { "enabled": false, "minute": 0, "hour": 18, "day_of_month": "", "month": "", "day_of_week": "SUN,MON,TUE,WED,THU,FRI,SAT", "cron_string": "0 18 SUN,MON,TUE,WED,THU,FRI,SAT", "human_readable": "At 06:00 PM, only on Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday", "active": false }, "zones": { "zone_01": { "duration": 1 }, "zone_02": { "duration": 1 }, "zone_03": { "duration": 1 } } } }

nebhead commented 5 months ago

OK, send pictures of the wiring, I think that is what we need to look at next. I'm mainly concerned with the Pi -> Relay wiring with GPIOs.

nealw8 commented 5 months ago

picture below. I doubt it's wunnamedreing since when I changed the gate GPIO number from 29 to 35 then activated zone 1 all relays turned on except the gate relay.

![Uploading unnamed.jpg…]()

nealw8 commented 5 months ago

On another not, if you look at the relay to the left of the pi you can see 4 yellow jumpers on the board. Can these be jumpers to convert relay from high to low activation?

nebhead commented 5 months ago

On another not, if you look at the relay to the left of the pi you can see 4 yellow jumpers on the board. Can these be jumpers to convert relay from high to low activation?

You know, I'm not familiar with that kind of relay, but it might be the case. Can you take a picture of the relay wiring?

nealw8 commented 5 months ago

unnamed

nebhead commented 5 months ago

Oh yes, looks like you can select high or low level trigger with that relay. That's pretty cool. I mean, it's worth a shot to try it out. I think the wiring looks ok, but since I'm not super familiar with that exact relay board it's possible that it could be flipped from what I expect. For example, IN1 could control the relay on the left or the right side of the board which would be important to know. Do you happen to know if that is the case?

nealw8 commented 5 months ago

That's exactly what the jumpers are for. I switch the relays and irrigator to low with the same result, all relays turned on

nealw8 commented 5 months ago

The inputs are labeled from right to left corresponding to the relays from right to left.

nealw8 commented 5 months ago

the first two on the right are power

nebhead commented 5 months ago

Gotta be honest, this is really stumping me. The logic just doesn't seem to behaving at all.

The inputs are labeled from right to left corresponding to the relays from right to left.

OK, so basically, same order of the IN pins, corresponds to the order of the relays at the bottom. So I think you have it wired properly.

Back to basics maybe... I thinking about what tests we can run. Maybe ssh into your pi and manually run the control script...

cd /usr/local/bin/irrigator
sudo python control.py -i
sudo python control.py -z zone_01 -d 1 -f 
sudo python control.py -z zone_02 -d 1 -f
sudo python control.py -z zone_03 -d 1 -f

Then maybe share output and/or what the actual relays appear to be doing each time.

Basically what we are doing here is just running each zone for one minute, manually. (-f is force in case there is a rain event)

nealw8 commented 5 months ago

All relays turned on together holding for one minute then shut off. This happened for each zone command. Still misbehaving.

nebhead commented 5 months ago

Is there any output on the command line?

Is the gate relay going active or is it remaining off?

nealw8 commented 5 months ago

all relays turned on including the gate.

nealw@irrigator:~ $ cd /usr/local/bin/irrigator nealw@irrigator:/usr/local/bin/irrigator $ sudo python control.py -i nealw@irrigator:/usr/local/bin/irrigator $ sudo python control.py -z zone_01 -d 1 -f

nealw@irrigator:/usr/local/bin/irrigator $ nealw@irrigator:/usr/local/bin/irrigator $ sudo python control.py -z zone_02 -d 1 -f nealw@irrigator:/usr/local/bin/irrigator $ sudo python control.py -z zone_03 -d 1 -f nealw@irrigator:/usr/local/bin/irrigator $

nebhead commented 5 months ago

OK, let's take a look at the logs and see what we can see.

cat /usr/local/bin/irrigator/events.log
nealw8 commented 5 months ago

nealw@irrigator:/usr/local/bin/irrigator $ cat /usr/local/bin/irrigator/events.log 2024-05-18 13:27:10 Exception occurred when reading irrigator.json. File not found. Creating the file with default settings. 2024-05-18 13:28:01 Control Script Starting 2024-05-18 13:28:02 Initializing Relays on NONE. Prototype Mode. 2024-05-18 13:28:02 Current Temperature: 0F Precipitation History: 0 inches Precipitation Forecast: 0.0 inches 2024-05-18 13:28:02 Initialize Relays Selected. 2024-05-18 13:28:02 Exiting with errorcode = 0 2024-05-18 13:28:02 Control Script Ended 2024-05-18 13:37:29 Control Script Starting 2024-05-18 13:37:29 Initializing Relays on Raspberry Pi. 2024-05-18 13:37:29 Current Temperature: 0F Precipitation History: 0.0 inches Precipitation Forecast: 0.0 inches 2024-05-18 13:37:29 Force run selected. Ignoring weather. 2024-05-18 13:37:29 Manual Run Selected. 2024-05-18 13:37:29 Turning on Zone: zone_01 for 10 minutes. 2024-05-18 13:39:12 Turning off Zone: zone_01. 2024-05-18 13:39:12 Exiting with errorcode = 42 2024-05-18 13:39:12 Control Script Ended 2024-05-18 13:39:49 Control Script Starting 2024-05-18 13:39:49 Initializing Relays on Raspberry Pi. 2024-05-18 13:39:49 Current Temperature: 0F Precipitation History: 0.0 inches Precipitation Forecast: 0.0 inches 2024-05-18 13:39:49 Force run selected. Ignoring weather. 2024-05-18 13:39:49 Manual Run Selected. 2024-05-18 13:39:49 Turning on Zone: zone_01 for 10 minutes. 2024-05-18 13:40:12 Turning off Zone: zone_01. 2024-05-18 13:40:13 Exiting with errorcode = 42 2024-05-18 13:40:13 Control Script Ended 2024-05-18 13:41:02 Control Script Starting 2024-05-18 13:41:02 Initializing Relays on Raspberry Pi. 2024-05-18 13:41:02 Current Temperature: 0F Precipitation History: 0.0 inches Precipitation Forecast: 0.0 inches 2024-05-18 13:41:02 Force run selected. Ignoring weather. 2024-05-18 13:41:02 Manual Run Selected. 2024-05-18 13:41:02 Turning on Zone: zone_01 for 10 minutes. 2024-05-18 13:41:13 Turning off Zone: zone_01. 2024-05-18 13:41:13 Exiting with errorcode = 42 2024-05-18 13:41:13 Control Script Ended 2024-05-18 13:41:23 Control Script Starting 2024-05-18 13:41:23 Initializing Relays on Raspberry Pi. 2024-05-18 13:41:23 Current Temperature: 0F Precipitation History: 0.0 inches Precipitation Forecast: 0.0 inches 2024-05-18 13:41:23 Force run selected. Ignoring weather. 2024-05-18 13:41:23 Manual Run Selected. 2024-05-18 13:41:23 Turning on Zone: zone_02 for 10 minutes. 2024-05-18 13:41:32 Turning off Zone: zone_02. 2024-05-18 13:41:32 Exiting with errorcode = 42 2024-05-18 13:41:32 Control Script Ended 2024-05-18 13:41:40 Control Script Starting 2024-05-18 13:41:40 Initializing Relays on Raspberry Pi. 2024-05-18 13:41:40 Current Temperature: 0F Precipitation History: 0.0 inches Precipitation Forecast: 0.0 inches 2024-05-18 13:41:40 Force run selected. Ignoring weather. 2024-05-18 13:41:40 Manual Run Selected. 2024-05-18 13:41:40 Turning on Zone: zone_03 for 10 minutes. 2024-05-18 13:41:55 Turning off Zone: zone_03. 2024-05-18 13:41:55 Exiting with errorcode = 42 2024-05-18 13:41:55 Control Script Ended 2024-05-18 13:42:37 Control Script Starting 2024-05-18 13:42:38 Initializing Relays on Raspberry Pi. 2024-05-18 13:42:38 Current Temperature: 0F Precipitation History: 0.0 inches Precipitation Forecast: 0.0 inches 2024-05-18 13:42:38 Force run selected. Ignoring weather. 2024-05-18 13:42:38 Manual Run Selected. 2024-05-18 13:42:38 Turning on Zone: zone_02 for 10 minutes. 2024-05-18 13:42:44 Turning off Zone: zone_02. 2024-05-18 13:42:44 Exiting with errorcode = 42 2024-05-18 13:42:44 Control Script Ended 2024-05-18 13:44:09 Control Script Starting 2024-05-18 13:44:10 Initializing Relays on Raspberry Pi. 2024-05-18 13:44:10 Current Temperature: 0F Precipitation History: 0.0 inches Precipitation Forecast: 0.0 inches 2024-05-18 13:44:10 Force run selected. Ignoring weather. 2024-05-18 13:44:10 Manual Run Selected. 2024-05-18 13:44:10 Turning on Zone: zone_02 for 10 minutes. 2024-05-18 13:44:32 Turning off Zone: zone_02. 2024-05-18 13:44:32 Exiting with errorcode = 42 2024-05-18 13:44:32 Control Script Ended 2024-05-18 13:55:03 Control Script Starting 2024-05-18 13:55:03 Initializing Relays on Raspberry Pi. 2024-05-18 13:55:03 Current Temperature: 0F Precipitation History: 0.0 inches Precipitation Forecast: 0.0 inches 2024-05-18 13:55:03 Force run selected. Ignoring weather. 2024-05-18 13:55:03 Manual Run Selected. 2024-05-18 13:55:03 Turning on Zone: zone_01 for 10 minutes. 2024-05-18 13:55:15 Turning off Zone: zone_01. 2024-05-18 13:55:15 Exiting with errorcode = 42 2024-05-18 13:55:15 Control Script Ended 2024-05-18 14:22:42 Control Script Starting 2024-05-18 14:22:42 Initializing Relays on Raspberry Pi. 2024-05-18 14:22:42 Current Temperature: 0F Precipitation History: 0.0 inches Precipitation Forecast: 0.0 inches 2024-05-18 14:22:42 Force run selected. Ignoring weather. 2024-05-18 14:22:42 Manual Run Selected. 2024-05-18 14:22:42 Turning on Zone: zone_01 for 10 minutes. 2024-05-18 14:23:10 Turning off Zone: zone_01. 2024-05-18 14:23:10 Exception occurred when reading irrigator.json. Value Error Exception - JSONDecodeError. Retrying. 2024-05-18 14:23:10 Exception occurred when reading irrigator.json. Value Error Exception - JSONDecodeError. Retrying. 2024-05-18 14:23:10 Exception occurred when reading irrigator.json. Value Error Exception - JSONDecodeError. Retrying. 2024-05-18 14:23:10 Exiting with errorcode = 42 2024-05-18 14:23:10 Control Script Ended 2024-05-18 14:23:10 Exception occurred when reading irrigator.json. Value Error Exception - JSONDecodeError. Retrying. 2024-05-18 14:31:16 Control Script Starting 2024-05-18 14:31:16 Initializing Relays on Raspberry Pi. 2024-05-18 14:31:16 Current Temperature: 0F Precipitation History: 0.0 inches Precipitation Forecast: 0.0 inches 2024-05-18 14:31:16 Force run selected. Ignoring weather. 2024-05-18 14:31:16 Manual Run Selected. 2024-05-18 14:31:16 Turning on Zone: zone_03 for 10 minutes. 2024-05-18 14:31:28 Turning off Zone: zone_03. 2024-05-18 14:31:28 Exiting with errorcode = 42 2024-05-18 14:31:28 Control Script Ended 2024-05-18 16:44:14 Admin: Shutdown 2024-05-18 16:45:10 Control Script Starting 2024-05-18 16:45:10 Initializing Relays on Raspberry Pi. 2024-05-18 16:45:10 Current Temperature: 63F Precipitation History: 0.0 inches Precipitation Forecast: 0.4 inches 2024-05-18 16:45:10 Initialize Relays Selected. 2024-05-18 16:45:10 Exiting with errorcode = 0 2024-05-18 16:45:10 Control Script Ended 2024-05-18 16:45:32 Error getting data from Geolocator, using stored Lat/Long instead. 2024-05-18 18:22:27 Control Script Starting 2024-05-18 18:22:27 Initializing Relays on Raspberry Pi. 2024-05-18 18:22:27 Current Temperature: 63F Precipitation History: 0.0 inches Precipitation Forecast: 0.4 inches 2024-05-18 18:22:27 Force run selected. Ignoring weather. 2024-05-18 18:22:27 Manual Run Selected. 2024-05-18 18:22:27 Turning on Zone: zone_01 for 10 minutes. 2024-05-18 18:22:36 Turning off Zone: zone_01. 2024-05-18 18:22:36 Exiting with errorcode = 42 2024-05-18 18:22:36 Control Script Ended 2024-05-18 18:23:36 Control Script Starting 2024-05-18 18:23:36 Initializing Relays on Raspberry Pi. 2024-05-18 18:23:36 Current Temperature: 63F Precipitation History: 0.0 inches Precipitation Forecast: 0.4 inches 2024-05-18 18:23:36 Force run selected. Ignoring weather. 2024-05-18 18:23:36 Manual Run Selected. 2024-05-18 18:23:36 Turning on Zone: zone_01 for 10 minutes. 2024-05-18 18:23:46 Turning off Zone: zone_01. 2024-05-18 18:23:46 Exiting with errorcode = 42 2024-05-18 18:23:46 Control Script Ended 2024-05-18 18:23:54 Control Script Starting 2024-05-18 18:23:54 Initializing Relays on Raspberry Pi. 2024-05-18 18:23:54 Current Temperature: 63F Precipitation History: 0.0 inches Precipitation Forecast: 0.4 inches 2024-05-18 18:23:54 Force run selected. Ignoring weather. 2024-05-18 18:23:54 Manual Run Selected. 2024-05-18 18:23:54 Turning on Zone: zone_02 for 10 minutes. 2024-05-18 18:24:05 Turning off Zone: zone_02. 2024-05-18 18:24:05 Exiting with errorcode = 42 2024-05-18 18:24:05 Control Script Ended 2024-05-18 18:24:11 Control Script Starting 2024-05-18 18:24:11 Initializing Relays on Raspberry Pi. 2024-05-18 18:24:11 Current Temperature: 63F Precipitation History: 0.0 inches Precipitation Forecast: 0.4 inches 2024-05-18 18:24:11 Force run selected. Ignoring weather. 2024-05-18 18:24:11 Manual Run Selected. 2024-05-18 18:24:11 Turning on Zone: zone_03 for 10 minutes. 2024-05-18 18:24:25 Turning off Zone: zone_03. 2024-05-18 18:24:25 Exiting with errorcode = 42 2024-05-18 18:24:25 Control Script Ended 2024-05-18 18:27:54 Control Script Starting 2024-05-18 18:27:54 Initializing Relays on Raspberry Pi. 2024-05-18 18:27:54 Current Temperature: 63F Precipitation History: 0.0 inches Precipitation Forecast: 0.4 inches 2024-05-18 18:27:54 Force run selected. Ignoring weather. 2024-05-18 18:27:54 Schedule Run Selected with Schedule: BackYard 2024-05-18 18:27:54 BackYard found in JSON file. Running Now. 2024-05-18 18:27:54 Turning on Zone: zone_01 for 1 minutes. 2024-05-18 18:28:02 Turning off Zone: zone_01. 2024-05-18 18:28:02 Turning on Zone: zone_02 for 1 minutes. 2024-05-18 18:28:02 Turning off Zone: zone_02. 2024-05-18 18:28:02 Turning on Zone: zone_03 for 1 minutes. 2024-05-18 18:28:02 Turning off Zone: zone_03. 2024-05-18 18:28:02 Exiting with errorcode = 42 2024-05-18 18:28:02 Control Script Ended 2024-05-18 18:29:10 Control Script Starting 2024-05-18 18:29:10 Initializing Relays on Raspberry Pi. 2024-05-18 18:29:10 Current Temperature: 63F Precipitation History: 0.0 inches Precipitation Forecast: 0.4 inches 2024-05-18 18:29:10 Force run selected. Ignoring weather. 2024-05-18 18:29:10 Manual Run Selected. 2024-05-18 18:29:10 Turning on Zone: zone_01 for 10 minutes. 2024-05-18 18:29:18 Turning off Zone: zone_01. 2024-05-18 18:29:18 Exiting with errorcode = 42 2024-05-18 18:29:18 Control Script Ended 2024-05-18 18:29:25 Control Script Starting 2024-05-18 18:29:25 Initializing Relays on Raspberry Pi. 2024-05-18 18:29:25 Current Temperature: 63F Precipitation History: 0.0 inches Precipitation Forecast: 0.4 inches 2024-05-18 18:29:25 Force run selected. Ignoring weather. 2024-05-18 18:29:25 Manual Run Selected. 2024-05-18 18:29:25 Turning on Zone: zone_02 for 10 minutes. 2024-05-18 18:29:35 Turning off Zone: zone_02. 2024-05-18 18:29:35 Exiting with errorcode = 42 2024-05-18 18:29:35 Control Script Ended 2024-05-18 18:29:42 Control Script Starting 2024-05-18 18:29:42 Initializing Relays on Raspberry Pi. 2024-05-18 18:29:42 Current Temperature: 63F Precipitation History: 0.0 inches Precipitation Forecast: 0.4 inches 2024-05-18 18:29:42 Force run selected. Ignoring weather. 2024-05-18 18:29:42 Manual Run Selected. 2024-05-18 18:29:42 Turning on Zone: zone_03 for 10 minutes. 2024-05-18 18:29:50 Turning off Zone: zone_03. 2024-05-18 18:29:50 Exiting with errorcode = 42 2024-05-18 18:29:50 Control Script Ended 2024-05-18 18:30:26 Control Script Starting 2024-05-18 18:30:26 Initializing Relays on Raspberry Pi. 2024-05-18 18:30:26 Current Temperature: 63F Precipitation History: 0.0 inches Precipitation Forecast: 0.37 inches 2024-05-18 18:30:26 Force run selected. Ignoring weather. 2024-05-18 18:30:26 Manual Run Selected. 2024-05-18 18:30:26 Turning on Zone: zone_01 for 10 minutes. 2024-05-18 18:31:00 Turning off Zone: zone_01. 2024-05-18 18:31:00 Exiting with errorcode = 42 2024-05-18 18:31:00 Control Script Ended 2024-05-18 18:43:44 Admin: Shutdown 2024-05-18 18:44:36 Control Script Starting 2024-05-18 18:44:37 Initializing Relays on Raspberry Pi. 2024-05-18 18:44:37 Current Temperature: 63F Precipitation History: 0.0 inches Precipitation Forecast: 0.37 inches 2024-05-18 18:44:37 Initialize Relays Selected. 2024-05-18 18:44:37 Exiting with errorcode = 0 2024-05-18 18:44:37 Control Script Ended 2024-05-19 09:37:57 Admin: Shutdown 2024-05-19 09:38:48 Control Script Starting 2024-05-19 09:38:49 Initializing Relays on Raspberry Pi. 2024-05-19 09:38:49 Current Temperature: 64F Precipitation History: 0.0 inches Precipitation Forecast: 0.01 inches 2024-05-19 09:38:49 Initialize Relays Selected. 2024-05-19 09:38:49 Exiting with errorcode = 0 2024-05-19 09:38:49 Control Script Ended 2024-05-19 09:48:53 Control Script Starting 2024-05-19 09:48:53 Initializing Relays on Raspberry Pi. 2024-05-19 09:48:54 Current Temperature: 64F Precipitation History: 0.6 inches Precipitation Forecast: 0.01 inches 2024-05-19 09:48:54 Force run selected. Ignoring weather. 2024-05-19 09:48:54 Manual Run Selected. 2024-05-19 09:48:54 Turning on Zone: zone_01 for 10 minutes. 2024-05-19 09:49:03 Turning off Zone: zone_01. 2024-05-19 09:49:03 Exiting with errorcode = 42 2024-05-19 09:49:03 Control Script Ended 2024-05-19 09:49:42 Control Script Starting 2024-05-19 09:49:42 Initializing Relays on Raspberry Pi. 2024-05-19 09:49:42 Current Temperature: 64F Precipitation History: 0.6 inches Precipitation Forecast: 0.01 inches 2024-05-19 09:49:42 Force run selected. Ignoring weather. 2024-05-19 09:49:42 Manual Run Selected. 2024-05-19 09:49:42 Turning on Zone: zone_01 for 10 minutes. 2024-05-19 09:50:09 Turning off Zone: zone_01. 2024-05-19 09:50:09 Exiting with errorcode = 42 2024-05-19 09:50:09 Control Script Ended 2024-05-19 10:47:17 Admin: Shutdown 2024-05-19 10:48:09 Control Script Starting 2024-05-19 10:48:10 Initializing Relays on Raspberry Pi. 2024-05-19 10:48:10 Current Temperature: 65F Precipitation History: 0.6 inches Precipitation Forecast: 0.01 inches 2024-05-19 10:48:10 Initialize Relays Selected. 2024-05-19 10:48:10 Exiting with errorcode = 0 2024-05-19 10:48:10 Control Script Ended 2024-05-19 11:30:11 Control Script Starting 2024-05-19 11:30:12 Initializing Relays on Raspberry Pi. 2024-05-19 11:30:12 Current Temperature: 67F Precipitation History: 0.6 inches Precipitation Forecast: 0.01 inches 2024-05-19 11:30:12 Force run selected. Ignoring weather. 2024-05-19 11:30:12 Manual Run Selected. 2024-05-19 11:30:12 Turning on Zone: zone_01 for 10 minutes. 2024-05-19 11:30:30 Turning off Zone: zone_01. 2024-05-19 11:30:30 Exiting with errorcode = 42 2024-05-19 11:30:30 Control Script Ended 2024-05-19 11:31:01 Control Script Starting 2024-05-19 11:31:01 Initializing Relays on Raspberry Pi. 2024-05-19 11:31:01 Current Temperature: 67F Precipitation History: 0.6 inches Precipitation Forecast: 0.01 inches 2024-05-19 11:31:01 Force run selected. Ignoring weather. 2024-05-19 11:31:01 Manual Run Selected. 2024-05-19 11:31:01 Turning on Zone: zone_01 for 10 minutes. 2024-05-19 11:31:09 Turning off Zone: zone_01. 2024-05-19 11:31:09 Exiting with errorcode = 42 2024-05-19 11:31:09 Control Script Ended 2024-05-19 11:31:20 Control Script Starting 2024-05-19 11:31:20 Initializing Relays on Raspberry Pi. 2024-05-19 11:31:20 Current Temperature: 67F Precipitation History: 0.6 inches Precipitation Forecast: 0.01 inches 2024-05-19 11:31:20 Force run selected. Ignoring weather. 2024-05-19 11:31:20 Manual Run Selected. 2024-05-19 11:31:20 Turning on Zone: zone_02 for 10 minutes. 2024-05-19 11:31:27 Turning off Zone: zone_02. 2024-05-19 11:31:27 Exiting with errorcode = 42 2024-05-19 11:31:27 Control Script Ended 2024-05-19 11:31:33 Control Script Starting 2024-05-19 11:31:33 Initializing Relays on Raspberry Pi. 2024-05-19 11:31:34 Current Temperature: 67F Precipitation History: 0.6 inches Precipitation Forecast: 0.01 inches 2024-05-19 11:31:34 Force run selected. Ignoring weather. 2024-05-19 11:31:34 Manual Run Selected. 2024-05-19 11:31:34 Turning on Zone: zone_03 for 10 minutes. 2024-05-19 11:31:45 Turning off Zone: zone_03. 2024-05-19 11:31:45 Exiting with errorcode = 42 2024-05-19 11:31:45 Control Script Ended 2024-05-19 11:33:24 Control Script Starting 2024-05-19 11:33:24 Initializing Relays on Raspberry Pi. 2024-05-19 11:33:24 Current Temperature: 67F Precipitation History: 0.6 inches Precipitation Forecast: 0.01 inches 2024-05-19 11:33:24 Force run selected. Ignoring weather. 2024-05-19 11:33:24 Manual Run Selected. 2024-05-19 11:33:24 Turning on Zone: zone_01 for 10 minutes. 2024-05-19 11:33:34 Turning off Zone: zone_01. 2024-05-19 11:33:34 Exiting with errorcode = 42 2024-05-19 11:33:34 Control Script Ended 2024-05-19 11:34:38 Control Script Starting 2024-05-19 11:34:38 Initializing Relays on Raspberry Pi. 2024-05-19 11:34:38 Current Temperature: 67F Precipitation History: 0.6 inches Precipitation Forecast: 0.01 inches 2024-05-19 11:34:38 Force run selected. Ignoring weather. 2024-05-19 11:34:38 Manual Run Selected. 2024-05-19 11:34:38 Turning on Zone: zone_01 for 10 minutes. 2024-05-19 11:34:46 Turning off Zone: zone_01. 2024-05-19 11:34:46 Exiting with errorcode = 42 2024-05-19 11:34:46 Control Script Ended 2024-05-19 11:35:24 Control Script Starting 2024-05-19 11:35:24 Initializing Relays on Raspberry Pi. 2024-05-19 11:35:24 Current Temperature: 67F Precipitation History: 0.6 inches Precipitation Forecast: 0.01 inches 2024-05-19 11:35:24 Force run selected. Ignoring weather. 2024-05-19 11:35:24 Manual Run Selected. 2024-05-19 11:35:24 Turning on Zone: zone_02 for 10 minutes. 2024-05-19 11:35:32 Turning off Zone: zone_02. 2024-05-19 11:35:32 Exiting with errorcode = 42 2024-05-19 11:35:32 Control Script Ended 2024-05-19 12:15:16 Admin: Shutdown 2024-05-19 11:55:45 Control Script Starting 2024-05-19 11:55:46 Initializing Relays on Raspberry Pi. 2024-05-19 11:55:46 Current Temperature: 68F Precipitation History: 0.6 inches Precipitation Forecast: 0.01 inches 2024-05-19 11:55:46 Initialize Relays Selected. 2024-05-19 11:55:46 Exiting with errorcode = 0 2024-05-19 11:55:46 Control Script Ended 2024-05-19 12:18:08 Control Script Starting 2024-05-19 12:18:09 Initializing Relays on Raspberry Pi. 2024-05-19 12:18:09 Current Temperature: 68F Precipitation History: 0.6 inches Precipitation Forecast: 0.01 inches 2024-05-19 12:18:09 Initialize Relays Selected. 2024-05-19 12:18:09 Exiting with errorcode = 0 2024-05-19 12:18:09 Control Script Ended 2024-05-19 12:24:21 Control Script Starting 2024-05-19 12:24:21 Initializing Relays on Raspberry Pi. 2024-05-19 12:24:21 Current Temperature: 68F Precipitation History: 0.6 inches Precipitation Forecast: 0.01 inches 2024-05-19 12:24:21 Force run selected. Ignoring weather. 2024-05-19 12:24:21 Manual Run Selected. 2024-05-19 12:24:21 Turning on Zone: zone_01 for 10 minutes. 2024-05-19 12:24:47 Turning off Zone: zone_01. 2024-05-19 12:24:47 Exiting with errorcode = 42 2024-05-19 12:24:47 Control Script Ended 2024-05-19 12:24:55 Control Script Starting 2024-05-19 12:24:55 Initializing Relays on Raspberry Pi. 2024-05-19 12:24:55 Current Temperature: 68F Precipitation History: 0.6 inches Precipitation Forecast: 0.01 inches 2024-05-19 12:24:55 Force run selected. Ignoring weather. 2024-05-19 12:24:55 Manual Run Selected. 2024-05-19 12:24:55 Turning on Zone: zone_02 for 10 minutes. 2024-05-19 12:25:00 Turning off Zone: zone_02. 2024-05-19 12:25:00 Exiting with errorcode = 42 2024-05-19 12:25:00 Control Script Ended 2024-05-19 12:44:12 Control Script Starting 2024-05-19 12:44:13 Initializing Relays on Raspberry Pi. 2024-05-19 12:44:13 Current Temperature: 68F Precipitation History: 0.6 inches Precipitation Forecast: 0.01 inches 2024-05-19 12:44:13 Initialize Relays Selected. 2024-05-19 12:44:13 Exiting with errorcode = 0 2024-05-19 12:44:13 Control Script Ended 2024-05-19 12:44:36 Control Script Starting 2024-05-19 12:44:36 Initializing Relays on Raspberry Pi. 2024-05-19 12:44:36 Current Temperature: 68F Precipitation History: 0.6 inches Precipitation Forecast: 0.01 inches 2024-05-19 12:44:36 Force run selected. Ignoring weather. 2024-05-19 12:44:36 Manual Run Selected. 2024-05-19 12:44:36 Turning on Zone: zone_01 for 1 minutes. 2024-05-19 12:45:36 Turning off Zone: zone_01. 2024-05-19 12:45:36 Exiting with errorcode = 0 2024-05-19 12:45:36 Control Script Ended 2024-05-19 12:46:07 Control Script Starting 2024-05-19 12:46:07 Initializing Relays on Raspberry Pi. 2024-05-19 12:46:07 Current Temperature: 69F Precipitation History: 0.6 inches Precipitation Forecast: 0.01 inches 2024-05-19 12:46:07 Force run selected. Ignoring weather. 2024-05-19 12:46:07 Manual Run Selected. 2024-05-19 12:46:07 Turning on Zone: zone_02 for 1 minutes. 2024-05-19 12:47:07 Turning off Zone: zone_02. 2024-05-19 12:47:07 Exiting with errorcode = 0 2024-05-19 12:47:07 Control Script Ended 2024-05-19 12:47:29 Control Script Starting 2024-05-19 12:47:29 Initializing Relays on Raspberry Pi. 2024-05-19 12:47:29 Current Temperature: 69F Precipitation History: 0.6 inches Precipitation Forecast: 0.01 inches 2024-05-19 12:47:29 Force run selected. Ignoring weather. 2024-05-19 12:47:29 Manual Run Selected. 2024-05-19 12:47:29 Turning on Zone: zone_03 for 1 minutes. 2024-05-19 12:48:29 Turning off Zone: zone_03. 2024-05-19 12:48:29 Exiting with errorcode = 0 2024-05-19 12:48:29 Control Script Ended

nebhead commented 5 months ago

With the -i (init) command, did you see the relays go active or are they off?

Do you have a multi-meter? Can you measure continuity between the GPIO pins? For example probe the IN1, IN2 pins with a multi-meter in continuity mode and see if there is a connection there? Probably do this with the system off.

nealw8 commented 5 months ago

don;t understand "the -i (init) command" this terminal commands or the dashboard no continuity between any of the relay input pins

nebhead commented 5 months ago

don;t understand "the -i (init) command" this terminal commands or the dashboard

Terminal command: sudo python control.py -i

nealw8 commented 5 months ago

all 4 relays just blinked on briefly. gate, z1, z2, z3.

nebhead commented 5 months ago

all 4 relays just blinked on briefly. gate, z1, z2, z3.

Just so we are clear, are your relays currently set to active high or low? Is irrigator set to active high or low?
Let's set it back all to active high if it isn't already.

We can try to write a simple python program to activate the pins one by one and see what is going on.

It's possible your Pi is the culprit. :( Let's hope not, but we can see with a pretty simple test.

Let's copy the following program into your terminal:

First, open a new file:

nano test.py

Then paste the below program into the file:

import RPi.GPIO as GPIO
import time
import sys

# Check for command line arguments
if len(sys.argv) != 2:
  print("Usage: python gpio_output.py <pin_number>")
  sys.exit(1)

# Get the pin number from command line argument
pin_number = int(sys.argv[1])

# Set GPIO mode to BOARD
GPIO.setmode(GPIO.BOARD)

# Set the specified pin as output
GPIO.setup(pin_number, GPIO.OUT)

# Turn the pin on (output HIGH)
GPIO.output(pin_number, GPIO.HIGH)

# Wait for 10 seconds
print(f"Outputting HIGH to pin {pin_number} for 10 seconds...")
time.sleep(10)

# Turn the pin off (output LOW)
GPIO.output(pin_number, GPIO.LOW)

# Clean up GPIO resources
GPIO.cleanup()

print(f"Pin {pin_number} set to LOW")

Then ctrl-o to save the file. Then ctrl-x to quit nano and then we can run:

python test.py 29

Try this with each of the pins that are connected to the relay (31, 32, 33, 29).

You should see only one relay go high.

Let me know how it goes.

nebhead commented 5 months ago

I think I may have found the issue in my code. I'll fix and push an update. Stay tuned.

nebhead commented 5 months ago

OK, new updated pushed.

cd /usr/local/bin/irrigator
sudo git pull

It'll give you some warnings and such, but you can ignore those.

Once that is done, maybe try the same command lines that you did to activate your zones above and see if it behaves.

nealw8 commented 5 months ago

Great, update worked. I must have been the first to upload the new (pre fix) software. thanks again for the assistance and your hard work. By the way the weather is now working, it sees that openweather.org has change the way the free rain data is accessed. They now require you to subscribe to the free version leaving a credit card. The free version allows 1000 calls per day any overages are charge .15 cents per. This is essentially totally free for this application.