OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › All valves engaged on boot
- This topic is empty.
-
AuthorPosts
-
April 29, 2014 at 1:22 am #22858
mstormoMemberHi,
I’ve been running the sprinkler_pi until now with great success, the board is working fine. However, yesterday I wanted to switch to the OpenSprinkler Pi Interval, to be able to use the new mobile app with it. But, after I switched daemons on the Pi and rebooted, all the valves were turned on at the same time. I actually didn’t notice at first, thinking that some configuration was wrong and I couldn’t get it to work, so I updated to the latest version on github, and rebooted again. Same problem, nothing happened, or so I though.
Given that it was already late, I gave up, and went inside. At bed time, I checked the outside like I always do, and noticed streams of water. That’s when I noticed that all the zones were on, but without enough pressure, water was just streaming, not spraying. Uh oh.. Not entirely sure what to do, I simply pulled the plug on the Pi, and everything stopped.
Today I’ve done some more debugging, and it turns out that the configuration and operation is fine, as long as I manually turn “Operations off” manually after boot. Then all the zones turn off, and I can manually start each zone like normal. Running the self-test cycles each zone just fine.
So, I’m wondering what’s wrong with my setup!?
Given that I’ve been using sprinkler_pi until now, I’m not using Zone 0, so that one is not connected, and Master Valve is set to “None” in OSPI. All other settings are as default. My setup is a Raspberry Pi, rev A (no screw holes) running the pre-configured SD card image for OSPi from some time ago, but with an OSPI updated to current master from Dan’s repo on GitHub. It’s hooked up to the first revision of the OpenSprinkler Pi board.
Any ideas ❓
April 29, 2014 at 2:16 am #26601
Dan in CAParticipantI just pushed an update to GitHub (master branch only) that should fix this problem.
Try updating and let me know how it goes.Dan
April 29, 2014 at 2:25 am #26602
mstormoMember@Dan in CA wrote:
I just pushed an update to GitHub (master branch only) that should fix this problem.
Try updating and let me know how it goes.Thanks Dan,
I’ve give it a go tomorrow!
April 29, 2014 at 10:14 pm #26603
mstormoMember@Dan in CA wrote:
I just pushed an update to GitHub (master branch only) that should fix this problem.
Try updating and let me know how it goes.Great! The zone are now off when the system starts up.
However, I’ve noticed some instabilities in the state handling. To test the system I’ve been running the zones manually, but after a certain time (not sure if it’s time or state change based) the system will not react to manual changes. Even if I use commands such as Stop Operations, Manual Off, etc I cannot change the current state. My only choice is to reboot 😯 (or terminate the daemon and restart it).
It happens consistently for me, and one time it stopped while one of my zones were on, and I couldn’t shut it off..
The log file is not helping, as it stops logging when I get to this state. Also, my first zone is “”, since I don’t use it due to having used Sprinkler_pi before and it uses Zone 0 as Master Valve. Maybe it’s due to that, but my log file does not indicate which zones I have been triggering, it’s always empty:
Program, Zone, Duration, Finish Time, Date
Manual, ,, 0m28s, 16:41:20, Tue. 29 Apr 2014
Manual, ,, 0m13s, 16:40:41, Tue. 29 Apr 2014
Manual, ,, 0m15s, 16:40:23, Tue. 29 Apr 2014
Manual, ,, 0m6s, 16:40:03, Tue. 29 Apr 2014
Manual, ,, 0m6s, 16:39:52, Tue. 29 Apr 2014
Manual, ,, 0m7s, 16:39:41, Tue. 29 Apr 2014
Manual, ,, 0m9s, 16:39:29, Tue. 29 Apr 2014
Manual, ,, 0m7s, 16:39:14, Tue. 29 Apr 2014
Manual, ,, 0m6s, 16:39:01, Tue. 29 Apr 2014
Manual, ,, 0m6s, 16:38:51, Tue. 29 Apr 2014
Manual, ,, 0m11s, 16:38:07, Tue. 29 Apr 2014The log file only contains this many entries, even though the settings says 999?
My last run had the following zone changes until it hung:
Zone 2: Toggle x 20 times
Zone 5: Toggle x 1 time
Zone 7: Toggle x 1 time
Now if I try to toggle zone 6 it won’t change the state. The daemon is operational, and I can change the site pages. The same happens when I use the Mobile App against the OpenSprinkler Pi Interval daemon, it stops responding and the mobile app gets out of sync.I’m not a Python expert, so not sure how to debug this in more detail. If you want to populate a branch with tons of printf’s or other instrumentations, I be willing to run that for you to figure out what’s going on 😆
Might be prudent to have some sort of test framework in place, as these sort of failures can get very expensive if someone is not home to monitor the water usage..
Thanks!
April 29, 2014 at 10:47 pm #26604
scottshParticipantDan, just FYI – I pulled this version and it looks like my plugins quit working. At least it seems that way – I am trying to add a plug-in so I might have caused it. I removed my plug-in and the other ones still won’t load (ma or mobile_app.)
I can’t quite figure out how to debug a plug-in yet so I’m not exactly sure what is going on.
April 30, 2014 at 12:22 am #26605
mstormoMemberAh, here we go! Ok, ran the ospi.py directly with console output, and here’s what I got
pi@ospi ~/OSPi $ sudo python ospi.py
plugins loaded:
[]
Starting timing loophttp://0.0.0.0:8080/
10.0.0.29:1837 – – [29/Apr/2014 19:16:47] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1837 – – [29/Apr/2014 19:16:47] “HTTP/1.1 GET /static/scripts/java/svc1.8.3/home.js” – 304 Not Modified
10.0.0.29:1835 – – [29/Apr/2014 19:16:47] “HTTP/1.1 GET /static/images/icons/svc_options.png” – 304 Not Modified10.0.0.29:1839 – – [29/Apr/2014 19:16:47] “HTTP/1.1 GET /static/images/icons/svc_log.png” – 304 Not Modified10.0.0.29:1836 – – [29/Apr/2014 19:16:47] “HTTP/1.1 GET /static/images/icons/svc_edit.png” – 304 Not Modified10.0.0.29:1838 – – [29/Apr/2014 19:16:47] “HTTP/1.1 GET /static/images/icons/svc_cal.png” – 304 Not Modified10.0.0.29:1837 – – [29/Apr/2014 19:16:47] “HTTP/1.1 GET /static/images/icons/svc_reset.png” – 304 Not Modified
10.0.0.29:1835 – – [29/Apr/2014 19:16:47] “HTTP/1.1 GET /static/images/icons/svc_rain.png” – 304 Not Modified10.0.0.29:1840 – – [29/Apr/2014 19:16:47] “HTTP/1.1 GET /static/scripts/java/svc1.8.3/manualmode.js” – 304 Not Modified10.0.0.29:1839 – – [29/Apr/2014 19:16:47] “HTTP/1.1 GET /static/images/icons/svc_start.png” – 304 Not Modified10.0.0.29:1836 – – [29/Apr/2014 19:16:47] “HTTP/1.1 GET /static/images/icons/svc_auto.png” – 304 Not Modified
10.0.0.29:1838 – – [29/Apr/2014 19:16:47] “HTTP/1.1 GET /static/images/icons/svc_reboot.png” – 304 Not Modified
10.0.0.29:1839 – – [29/Apr/2014 19:16:57] “HTTP/1.1 GET /sn7=1&t=0” – 303 See Other
10.0.0.29:1839 – – [29/Apr/2014 19:16:57] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1839 – – [29/Apr/2014 19:17:00] “HTTP/1.1 GET /sn7=0” – 303 See Other
10.0.0.29:1839 – – [29/Apr/2014 19:17:00] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1839 – – [29/Apr/2014 19:17:02] “HTTP/1.1 GET /sn7=1&t=0” – 303 See Other
10.0.0.29:1839 – – [29/Apr/2014 19:17:02] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1839 – – [29/Apr/2014 19:17:06] “HTTP/1.1 GET /sn7=0” – 303 See Other
10.0.0.29:1839 – – [29/Apr/2014 19:17:06] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1839 – – [29/Apr/2014 19:17:09] “HTTP/1.1 GET /sn7=1&t=0” – 303 See Other
10.0.0.29:1839 – – [29/Apr/2014 19:17:09] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1839 – – [29/Apr/2014 19:17:12] “HTTP/1.1 GET /sn7=0” – 303 See Other
10.0.0.29:1839 – – [29/Apr/2014 19:17:12] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1839 – – [29/Apr/2014 19:17:15] “HTTP/1.1 GET /sn7=1&t=0” – 303 See Other
10.0.0.29:1839 – – [29/Apr/2014 19:17:15] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1839 – – [29/Apr/2014 19:17:19] “HTTP/1.1 GET /sn7=0” – 303 See Other
10.0.0.29:1839 – – [29/Apr/2014 19:17:19] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1839 – – [29/Apr/2014 19:17:22] “HTTP/1.1 GET /sn7=1&t=0” – 303 See Other
10.0.0.29:1839 – – [29/Apr/2014 19:17:22] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1839 – – [29/Apr/2014 19:17:25] “HTTP/1.1 GET /sn7=0” – 303 See Other
10.0.0.29:1839 – – [29/Apr/2014 19:17:25] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1839 – – [29/Apr/2014 19:17:28] “HTTP/1.1 GET /sn7=1&t=0” – 303 See Other
10.0.0.29:1839 – – [29/Apr/2014 19:17:28] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1839 – – [29/Apr/2014 19:17:32] “HTTP/1.1 GET /sn7=0” – 303 See Other
10.0.0.29:1839 – – [29/Apr/2014 19:17:32] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1839 – – [29/Apr/2014 19:17:35] “HTTP/1.1 GET /sn7=1&t=0” – 303 See Other
10.0.0.29:1839 – – [29/Apr/2014 19:17:35] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1839 – – [29/Apr/2014 19:17:39] “HTTP/1.1 GET /sn7=0” – 303 See Other
10.0.0.29:1839 – – [29/Apr/2014 19:17:39] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1839 – – [29/Apr/2014 19:17:42] “HTTP/1.1 GET /sn7=1&t=0” – 303 See Other
10.0.0.29:1839 – – [29/Apr/2014 19:17:42] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1839 – – [29/Apr/2014 19:17:45] “HTTP/1.1 GET /sn7=0” – 303 See Other
10.0.0.29:1839 – – [29/Apr/2014 19:17:45] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1839 – – [29/Apr/2014 19:17:48] “HTTP/1.1 GET /sn7=1&t=0” – 303 See Other
10.0.0.29:1839 – – [29/Apr/2014 19:17:48] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1839 – – [29/Apr/2014 19:17:51] “HTTP/1.1 GET /sn7=0” – 303 See Other
10.0.0.29:1839 – – [29/Apr/2014 19:17:51] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1839 – – [29/Apr/2014 19:17:55] “HTTP/1.1 GET /sn7=1&t=0” – 303 See Other
10.0.0.29:1839 – – [29/Apr/2014 19:17:55] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1839 – – [29/Apr/2014 19:17:59] “HTTP/1.1 GET /sn7=0” – 303 See Other
10.0.0.29:1852 – – [29/Apr/2014 19:17:59] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1852 – – [29/Apr/2014 19:18:03] “HTTP/1.1 GET /sn6=1&t=0” – 303 See Other
10.0.0.29:1852 – – [29/Apr/2014 19:18:03] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1852 – – [29/Apr/2014 19:18:09] “HTTP/1.1 GET /sn6=0” – 303 See Other
10.0.0.29:1852 – – [29/Apr/2014 19:18:09] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1852 – – [29/Apr/2014 19:18:11] “HTTP/1.1 GET /sn8=1&t=0” – 303 See Other
10.0.0.29:1852 – – [29/Apr/2014 19:18:11] “HTTP/1.1 GET /” – 200 OK
Unhandled exception in thread started by
Traceback (most recent call last):
File “ospi.py”, line 249, in timing_loop
log_run()
File “ospi.py”, line 98, in log_run
‘s, ‘+time.strftime(“%H:%M:%S, %a. %d %b %Y”, time.gmtime(gv.now))+’n’)
IndexError: list index out of range
# !!!!!
# After this none of the zones would trigger anymore, even though server reports ok, web page does indicate that zones don’t change
# !!!!!
10.0.0.29:1852 – – [29/Apr/2014 19:18:21] “HTTP/1.1 GET /sn8=0” – 303 See Other
10.0.0.29:1852 – – [29/Apr/2014 19:18:21] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1852 – – [29/Apr/2014 19:18:28] “HTTP/1.1 GET /sn7=1&t=0″ – 303 See Other
10.0.0.29:1852 – – [29/Apr/2014 19:18:28] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1852 – – [29/Apr/2014 19:18:34] “HTTP/1.1 GET /sn7=1&t=0″ – 303 See Other
10.0.0.29:1852 – – [29/Apr/2014 19:18:34] “HTTP/1.1 GET /” – 200 OK
10.0.0.29:1852 – – [29/Apr/2014 19:18:38] “HTTP/1.1 GET /sn7=1&t=0″ – 303 See Other
10.0.0.29:1852 – – [29/Apr/2014 19:18:38] “HTTP/1.1 GET /” – 200 OK
April 30, 2014 at 1:34 am #26606
Dan in CAParticipantArgh!!
I posted a development rev that seemed to be working properly.
@scottsh,
The reason the plugins are not loading is that they now need to be set as executable. This will allow plugins to be enabled/disabled by simply setting permissions. for each plugin you need to issue the following command from the Pi home directory:sudo chmod +x ./OSPi/plugins/mobile_app.py
replace the name of each plugin in the plugins folder in the command and they should load.
@mstormo
The error message you posted gives me something to go on. One of the other changes in this rev involves having the software automatically adjust for time changes like daylight time.I will post here as soon as I fix the problem.
Sorry for the mess.Dan
April 30, 2014 at 2:09 am #26607
Dan in CAParticipantmstormo,
I’ve been trying but have not been able to get the system to fail as you describe.
On thing that is interesting is the fact that the log entries are stopping and not showing all data. SD cards have a limited number of write cycles. The recommendation is to use something else like a flash drive to store log data.
How long have you been using the SD card in your system?
I use a SanDisk Cruzer Fit 8GB USB Flash Drive in My system. it is small enough to fit inside the OSPi case. Instructions for the setup are on the wiki:
http://rayshobby.net/mediawiki/index.php?title=Set_Up_RPi,_RTC,_WiFi,_Data_Log#Data_Logging_on_the_Raspberry_PiI don’t know if it is a problem with your SC card but that is one possibility. I will keep testing but so far I can’t find the problem.
Dan
April 30, 2014 at 2:22 am #26608
mstormoMember@Dan in CA wrote:
I’ve been trying but have not been able to get the system to fail as you describe.
I’ve tested a bit more, and it seems to only happen when Zone 0 has an empty name? At least that’s when it’s reproducible for me.
pi@ospi ~/OSPi/data $ cat snames.txt
@Dan in CA wrote:
On thing that is interesting is the fact that the log entries are stopping and not showing all data. SD cards have a limited number of write cycles. The recommendation is to use something else like a flash drive to store log data.
Sorry, I meant that when the ospi daemon starts failing it also stops logging anything. The card is fine, and I have an 8GB High Performance (30MB/s) SanDisk card in there.
pi@ospi ~/OSPi/static/log $ cat water_log.csv
Program, Zone, Duration, Finish Time, Date
# Back to original setup, got failure again
Manual, ,, 0m7s, 19:18:07, Tue. 29 Apr 2014
Manual, ,, 0m6s, 19:17:58, Tue. 29 Apr 2014
Manual, ,, 0m5s, 19:17:50, Tue. 29 Apr 2014
Manual, ,, 0m5s, 19:17:44, Tue. 29 Apr 2014
Manual, ,, 0m5s, 19:17:38, Tue. 29 Apr 2014
Manual, ,, 0m5s, 19:17:31, Tue. 29 Apr 2014
Manual, ,, 0m5s, 19:17:24, Tue. 29 Apr 2014
Manual, ,, 0m4s, 19:17:17, Tue. 29 Apr 2014
Manual, ,, 0m5s, 19:17:11, Tue. 29 Apr 2014
Manual, ,, 0m5s, 19:17:05, Tue. 29 Apr 2014
Manual, ,, 0m4s, 19:16:59, Tue. 29 Apr 2014
# Changes Zone 0 to ‘Master Valve’, even if I don’t use it
# Couldn’t reproduce the issue in this setup
Manual, Front left, 0m10s, 19:13:49, Tue. 29 Apr 2014
Manual, Front right, 0m16s, 19:13:37, Tue. 29 Apr 2014
Manual, Curb, 0m4s, 19:13:16, Tue. 29 Apr 2014
Manual, Front left, 0m12s, 19:13:09, Tue. 29 Apr 2014
Manual, Curb, 0m11s, 19:13:05, Tue. 29 Apr 2014
Manual, Drive way, 0m9s, 19:12:52, Tue. 29 Apr 2014
Manual, Curb, 0m6s, 19:12:38, Tue. 29 Apr 2014
Manual, Front right, 0m15s, 19:12:30, Tue. 29 Apr 2014
Manual, Front left, 0m12s, 19:12:12, Tue. 29 Apr 2014
Manual, Curb, 0m6s, 19:11:54, Tue. 29 Apr 2014
Manual, Curb, 0m5s, 19:11:46, Tue. 29 Apr 2014
Manual, Curb, 0m4s, 19:11:39, Tue. 29 Apr 2014
Manual, Curb, 0m5s, 19:11:32, Tue. 29 Apr 2014
Manual, Curb, 0m5s, 19:11:25, Tue. 29 Apr 2014
Manual, Curb, 0m4s, 19:11:15, Tue. 29 Apr 2014
Manual, Curb, 0m4s, 19:11:08, Tue. 29 Apr 2014
Manual, Curb, 0m4s, 19:11:01, Tue. 29 Apr 2014
Manual, Curb, 0m7s, 19:10:55, Tue. 29 Apr 2014
Manual, Curb, 0m8s, 19:10:45, Tue. 29 Apr 2014
# Orignal setup, with a blank Zone 0
Manual, ,, 0m28s, 16:41:20, Tue. 29 Apr 2014
Manual, ,, 0m13s, 16:40:41, Tue. 29 Apr 2014
Manual, ,, 0m15s, 16:40:23, Tue. 29 Apr 2014
Manual, ,, 0m6s, 16:40:03, Tue. 29 Apr 2014
Manual, ,, 0m6s, 16:39:52, Tue. 29 Apr 2014
Manual, ,, 0m7s, 16:39:41, Tue. 29 Apr 2014
Manual, ,, 0m9s, 16:39:29, Tue. 29 Apr 2014
Manual, ,, 0m7s, 16:39:14, Tue. 29 Apr 2014
Manual, ,, 0m6s, 16:39:01, Tue. 29 Apr 2014
Manual, ,, 0m6s, 16:38:51, Tue. 29 Apr 2014
Manual, ,, 0m11s, 16:38:07, Tue. 29 Apr 2014
As you can see from the log, when I have a blank name for Zone 0, the log file always says , ,, and I think that’s key to the problem, and when you suddenly get Index Out of Range issues.
April 30, 2014 at 2:26 am #26609
scottshParticipantApril 30, 2014 at 2:28 am #26610
mstormoMemberOk, just set first zone to ”, and click zone 8 on/off in manual mode, and *poof*. Reproducable 100% 🙂
April 30, 2014 at 2:33 am #26611
SamerKeymasterMaybe wrap the log write within a try? Or anything interacting with the SD card?
April 30, 2014 at 2:39 am #26612
Dan in CAParticipantmstormo
With the system in ‘fail’ mode, could you post a cat of the file OSPi/data/snames.txt ?
That may be where the problem is.
I get when the first name is blank.Dan
April 30, 2014 at 2:42 am #26613
mstormoMember@salbahra wrote:
Maybe wrap the log write within a try? Or anything interacting with the SD card?
While that would technically solve the issue, it’s more hiding a symptom rather than fixing the cause. Really, empty zone names should be fine, as zone names are just convenience for humans. The control system shouldn’t care about the name, and just report it as is, empty or not. However, log files missing entries because the zone name happens to be empty is not so good.
I’m not saying the logging functionality shouldn’t be protected by a try/catch. Obviously, having the control system barf due to an issue with logging isn’t good. I’m just afraid that try/catch can make a programmer lazy 🙂
April 30, 2014 at 2:44 am #26614
mstormoMember@Dan in CA wrote:
With the system in ‘fail’ mode, could you post a cat of the file OSPi/data/snames.txt ?
That may be where the problem is.
I get when the first name is blank.pi@ospi ~/OSPi/data $ cat snames.txt
Yes, that’s what I see on my side. If first entry is blank, and you click Zone 8 on and off again, **poof**
April 30, 2014 at 2:50 am #26615
Dan in CAParticipantOK. I am able to reproduce the bug.
Now to fix it…
Dan
April 30, 2014 at 2:51 am #26616
SamerKeymasterI wasn’t suggesting, by any means, we ignore the blank station issue. Anyways, you understood my point.
Also, for what it’s worth, I am not able to reproduce this error.
git clone https://github.com/Dan-in-CA/OSPi
cd OSPi
python ospi.py
ctrl + c //Bug with location preventing UI to load first time (for me at least)
python ospi.py
Navigate to the UI http://127.0.0.1:8080 or appropriate IP
1) Stations: Set station 1 to blank, save
2) Switch to manual mode
3) Turn station 8 on, no error
4) Turn station 8 off, no error
5) Repeat 4 and 5 in tandem 4 times, no errorErrors are both web and python output.
April 30, 2014 at 3:05 am #26617
mstormoMember@salbahra wrote:
I wasn’t suggesting, by any means, we ignore the blank station issue. Anyways, you understood my point.
Indeed 🙂 Yes, to protect it, yes to support blank zones.
Here’s an idea: Maybe a control system like this should be two processes: One really small kernel, only responsible for changing the zone states, and “watch-dog” checking iff any zone is currently on, how long it has been since the zone state has changed. If zone-state has not changed in say (configurable) 60 minutes, turn off all zones and stop the kernel. Then a separate process will do all the rest, keeping schedules, communicating with apps, weather checking etc etc. If the second process does something unthinkable and crashes, at least the kernel will detect an issue after 60 minutes and kill the flow.
Obviously you have HW watchdogs etc, but a HW watchdog wouldn’t work in the case we’ve seen right now. The Pi didn’t crash, the control program didn’t crash, it just didn’t change the states anymore.
*shrug*
April 30, 2014 at 3:12 am #26618
mstormoMember@salbahra wrote:
Also, for what it’s worth, I am not able to reproduce this error.
…
1) Stations: Set station 1 to blank, save
2) Switch to manual mode
3) Turn station 8 on, no error
4) Turn station 8 off, no error
5) Repeat 4 and 5 in tandem 4 times, no errorHuh, odd.. You wouldn’t see any error in the web interface though, except that zones are not getting enabled anymore. But this works for you?
@salbahra wrote:
Errors are both web and python output.
/me not parse. You mean you see no error neither on web nor python output? Very odd..
April 30, 2014 at 3:41 am #26619
SamerKeymasterI was explaining what I meant by “no errors”
Well, I am on OS X not a Raspberry Pi. So my conditions are 100% different.
April 30, 2014 at 5:11 am #26620
Dan in CAParticipantmstormo
I just pushed an update that I think fixed the bug.
There was a bad regex in log_run() on line ~90. This is some early code in the program and I am not even sure why the regex was there.
I deleted lines 89 and 90 and changed the reference to ‘zones’ on line 97 to ‘gv.snames’ and it seems to be working as expected now.I appreciate your reporting this bug. If you find any more, don’t hesitate to let me know.
Dan
April 30, 2014 at 5:16 am #26621
mstormoMemberDan,
Saw the commit come through, and looks reasonable indeed. Will check it tomorrow.
Really appreciate the work!
Thanks!
April 30, 2014 at 3:41 pm #26622
Dan in CAParticipantStill needed work. The zone names in the log were not correct. This is why the regex was there.
changed “zones=re.findall(r”‘(.+?)'”,gv.snames)” to “zones=re.findall(r”‘(.*?)'”,gv.snames)” on line ~89Dan
April 30, 2014 at 9:56 pm #26623
scottshParticipantWhat do we all think about empty zone/station names? I get that they are just an attribute but given the ways we want to present data it seems odd to allow for empty names?
Also – the current code is highly optimized (which I appreciate) and assumes that zone/station limits are on the boundary of how many expansion boards you have. That seems odd – especially if you have 18 real zones, but have to see 24 in the UI. I’ve taken to using the name ‘Unused’ for unused zones, for example.
Is it worth investing in specifying a zone limit value and then restricting the display to that? I was thinking of changing the options page to input the # of zones, deriving the # of expansion boards from that, and letting the core code keep using number of boards but changing the UI pages to restrict to a specific # of zones.
April 30, 2014 at 10:17 pm #26624
mstormoMember@Dan in CA wrote:
Still needed work. The zone names in the log were not correct. This is why the regex was there.
changed “zones=re.findall(r”‘(.+?)'”,gv.snames)” to “zones=re.findall(r”‘(.*?)'”,gv.snames)” on line ~89Awesome, works for me now!
Thank you Dan!Btw, with your last change you’re outputting all the zone names to stdout on every Zone Off, intentional or debug output left behind? 🙂
Again, thanks!
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › All valves engaged on boot