OpenSprinkler › Forums › OpenSprinkler Mobile and Web App › Mobile Web App with Screenshots (Updated)
- This topic is empty.
-
AuthorPosts
-
June 17, 2013 at 11:05 pm #23913
SamerKeymasterOkay, I had some sloppy coding that worked on my particular setup but clearly isn’t the best way to do things. I updated the code try now please.
June 17, 2013 at 11:08 pm #23914
ubestbsteppinMemberWhat would I need to add to the php.ini to allow file operations?
June 17, 2013 at 11:11 pm #23915
SamerKeymaster@ubestbsteppin If i remember correctly, you are presented a login screen just lack credentials (doing a manual install). I would suggest continuing down this path by adding a username:password as suggested before trying the installer again. Otherwise, I am not quite sure what is needed other than permissions. If you can edit the php.ini are you sure you cannot get any Apache/PHP error logs?
Edit: In order to debug could you private message me your config but remove any sensitive information, please (password and IP). Then do a detailed file list on your log/password files so I may ascertain their permissions to try and pinpoint the issue. Send the file list via PM as well.
June 17, 2013 at 11:22 pm #23916
Oasiz37ParticipantYou can add Synology to the list of conquered servers now 🙂
The latest version work like a charm, here’s some Synology specific details (assuming you have default Synology setup with PHP running in a Safe Mode)
1. There is no crontab script on Synology, you have to edit /etc/crontab file manually.
2. The cron line parameters (* * * *) must be separated by tabs
3. Cron service has to be restarted manually after updating the crontab by running /usr/syno/etc/rc.d/S04crond.sh stop ; /usr/syno/etc/rc.d/S04crond.sh start as per http://forum.synology.com/wiki/index.php/Basic_commands_to_get_around_the_Synology_Box_using_the_CLIThank you, thank you, thank you!
Cheers,
Oasiz37June 17, 2013 at 11:23 pm #23917
SamerKeymasterFantastic news!
Thank you for this information, I will update the install instructions on the Github page for Synology soon!
June 17, 2013 at 11:33 pm #23918
Oasiz37ParticipantMy only concern here is that calling php module every minute will prevent hard drives from hibernating (which is not only power saving option but will greatly affect HDD life span). Is there an option to query watcher.php from a timer script in main.php? This way the watcher will be invoked only when the application is in use.
I’ll check tonight whether Synology goes into HDD hibernation with your modules executed by cron. If not, it will be an issue.
Thank you,
Oasiz37.June 17, 2013 at 11:38 pm #23919
SamerKeymasterI honestly hate running that script every minute and if you have any alternatives I am all ears.
The watcher script runs every minute and gets the current status, then compares that to last minutes status. This is the only way to properly log data from the OpenSprinkler since it keeps no logs of its own.
I suppose it might be better to just have watcher run on @reboot, store the current value in memory, and sleep 60 seconds in between runs. This way the HD isn’t woken up to read the script file, isn’t reading the old values off HD each minute, and is only writing new changes to disk (which should only happen when sprinklers are actually run).
I will look into this and get back to you.
June 17, 2013 at 11:59 pm #23920
Oasiz37ParticipantThank you, seems like a much better option to me.
June 18, 2013 at 2:10 am #23921
slobrewerMemberShouldn’t any halfway decent file system cache the contents of a file so that the hard drive doesn’t spin up each time? The only time it should spin up would be if the file contents changed, which only happens on write.
Totally unrelated to that I have a few bug reports:
1. The values in the sprinkler log are getting adjusted by the timezone offset. For example, if my sprinkler went off at 1:00 PM and I’m in the -8:00 offset timezone then the log is showing that they went off at 5:00 AM. I took a look at the SprinklerChanges.txt file and see that it is recording times and dates without timezones. It appears that your log display code is incorrectly assuming those times in the file are UTC but in fact they’re being recorded in local time.
2. Program preview shows all the zones starting at the same time. When I look at the interval program and when I actually observe the program running it actually does the zones sequentially. It seems like even though the Interval program for Pi doesn’t have the sequential option to select, it defaults to running the zones sequentially.
June 18, 2013 at 2:13 am #23922
wyoneParticipantwell I am anxious to use the mobile web app.. but I have to honestly say.. you people are talking like greek and on top of that I am deaf and can’t even HEAR the greek. lol.. I think you are way more technical than I understand. I was able to build the sprinkler control, and have it on my local network, but I have no clue how to do the things you are talking about. But I would LOVE to as the web interface looks AWESOME.
Anyway, thanks for all the interesting reading… lol.. I will wait for the 5th grade version though I guess. lol
June 18, 2013 at 3:28 am #23923
SamerKeymaster@slobrewer you might have a good point! I really don’t know much about how often the disk would be accessed. I personally use an SSD and am not worried about spin up/down. Maybe I will wait until @Oasiz37 gets back to me about his Synology and we can go from there.
1) In regards to the time zone problem. Just to make sure are you using the newer files or the older ones? Reason I ask is I made some changes to the code, and also to the configuration that would require some hand editing if you were using the old one (mainly changing the config timezone to UTC and removing the old log data). If all of that is done, then let me know and I can look further into the problem.
Edit: I think I am noticing the problems as well now in regards to the time being saved incorrectly. I have some traveling to do tomorrow but when I get some time I will sit down and think this through because the date’s are a mess now, since the recent change. My goal is to eliminate setting a timezone in the web app and in the OpenSprinkler. I feel like we could set it once and use it twice. Obviously, I don’t think I implemented it very well, yet. Hopefully soon though!
2) So, the problem with this bullet is, my preview script interprets the sequential variable from the OS and since the OSPi does not return one, it assumes its checked off and displays the preview in that fashion. This one has been communicated to Dan who ported the interval program to the RPi and told me he would take a look when he got some time (might be a bit though, tied up from my understanding). I might take a look and see if I can solve this because I spoke with Ray about this and I was told sequential option was taken out in 1.7 and returned in 1.8.3. The code base used for OSPi interval program is 1.8.2 so the relation might make it easy to port. I will keep you guys posted on this one.
@wyone I will honestly say despite the jargon this app is somewhat easy to deploy if you have any Linux server laying around or use a Raspberry Pi OpenSprinkler. If you need any assistance I would be happy to help and I am sure most of the people who have gotten this working at this point could chime in as well. I have had a range of responses from worked instantly to a lot of work to get it started. So, with some luck, I am sure you could get this running in no time.June 18, 2013 at 3:46 am #23924
wyoneParticipantWell I can tell you guys know your stuff.. and enjoy the challenge of making it PERFECT. I am a lot the same way, but do not have the technical expertease you have. I do have an old XP computer that is basically not really being used for anything, so I am thinking, this might be the time to make the jump and learn some new things. I think I will be doing some research on how to build that this week. See you guys have inspired an old dog to learn new tricks. I am hoping it will go well! lol
And btw… my name is Mitch, I just use wyone as my typical login.
Thanks in advance for not only the ideas, but the inspiration to educate myself further!
June 18, 2013 at 3:50 am #23925
Oasiz37ParticipantI hear what you saying about the server caching hibernated drives, it’ll take some time to confirm.
Another issue I have to report – “view/change programs” gets programs information totally wrong. Zone 1 is shown active in every program, unused stations shown as having schedule, etc.
Program preview works correctly.
Thank you.
June 18, 2013 at 3:56 am #23926
SamerKeymaster@Oasiz37 I haven’t dealt with unused stations personally. The first thing to mind would be, are all the stations named? Is there anything in particular in your program that you think would trigger this? Do you use a master valve (something I do not use)? Need more information to help debug. I only have one example I am able to work with and that is a 16 station and no master setup. Is it showing up incorrectly persistently? Or does it fix if you close/reopen the web app?
Also, are you using the RPi version or the normal OS?
June 18, 2013 at 4:33 am #23927
Oasiz37ParticipantI have 16 stations and they split in a way that first 8 pertain to the front yard while the latter used in the back; I don’t, however have all 8 stations used per each controller. The unused stations retain their default names, e.g. S07, S15
They programmed, for instance (I removed actual station names for simplicity)
P1: Tue,Fri -> 07:05 – 07:40 , Every 0 hrs 20 mins for 5 min, stations: S01, S02, S09, S10
P2: Mon Tue Wed Thur Fri Sat Sun (Even days only), Time: 07:50 – 10:00 , Every 4 hrs 0 mins for 9 min, stations: S03, S11, S13.Your app reports the same as:
P1: Tue,Fri ->07:05 – 07:40 , Every 0 hrs 20 mins for 5 min, stations: S01, S02, S03, S04
P2: Mon Tue Wed Thur Fri Sat Sun (Even days only), Time: 07:50 – 10:00 , Every 240 mins for 9 min, stations: S01, S04, S06I’ve highlighted the errors.
Edit: it’s a regular OpenSprinkler controler, not PI. 1 extension board, firmware 2.0 beta
June 18, 2013 at 4:49 am #23928
VaughanoParticipantJust like to say that this is moving very quickly and I very much appreciate you effort, Salbhara!
I’m also having issues with the saving of programmes, or more specifically the loading of programmes to the UI form. For me, the stations always get reset to have only the first one checked. I can see that changes are correctly being applied in the interval webapp, so I suspect this is isolated to the form loading code.
Cheers
VaughanoEdit: Opened an issue for this in Git repo, see https://github.com/salbahra/OpenSprinkler-Controller/issues/1. Maybe if a few of us are testing this it would be better to track issues there?
June 18, 2013 at 12:44 pm #23929
SamerKeymaster@Oasiz37 and @Vaughano thank you for the detailed information! Your feedback was invaluable and I was able to hunt down and fix the specific bug. Turned out I wasn’t doing the decimal to binary conversion correctly. That has been fixed now. Please try the new push on Github and let me know if this fixes your problem.
Also, @Vaughano, has the timezone issues been resolved at this point?
Thanks!
June 18, 2013 at 1:30 pm #23930
Oasiz37ParticipantThe programs are loading correctly now, I can confirm the issue’s been fixed.
Would it be possible to change interval to show hours and minute as oppose to minutes only? It shows 240 minutes instead of 4 hours 0 minutes, I find the latter to be more convenient.
Thank you.
June 18, 2013 at 1:33 pm #23931
SamerKeymasterNot using a slider, no. I could change the entire scale to hours though.
Edit: I also just realized I could remove the small text input to the left of the slider, add my own text that reads the slider minute input and translates it into HH:MM. I will play with this option and get back to you. I also could use a select input but that might be too limiting.
Edit 2: The reason I am using slider’s and other unique inputs is because on the iPhone typing HH:MM is annoying. Even on the desktop its a bit cumbersome compared to just sliding something over. I agree it is hard to quickly interpret what 240 minutes is however I do think minutes scale provided more flexibility in the long run as do the slider inputs.
June 18, 2013 at 2:16 pm #23932
Oasiz37ParticipantGood news: I was waiting for the today’s schedule to verify the log; it looks like HDD hibernation is not impacted by the cron job, at least for my Synology model.
Thank you!
June 18, 2013 at 2:33 pm #23933
SamerKeymasterAwesome, I won’t worry about using a minute crontab anymore.
Thanks.
June 18, 2013 at 3:19 pm #23934
wyoneParticipantOk quick question.. off topic.. but related.. ready to convert my older XP computer to Linux Web Server and wanted to know if any of you had a favorite Linux…. was thinking Ubuntu desktop… will be using this for other things, but primary reason is to use the Mobile Web App for OpenSprinkler
Thanks in advance!
June 18, 2013 at 3:32 pm #23935
SamerKeymasterUbuntu is a great introduction into Linux especially if you need a GUI. Because its based on Debian you can use the exact instructions available on the Github page. You would run those commands in a terminal window.
June 18, 2013 at 6:30 pm #23936
guyliorParticipantHi,
I am trying to use this new apps on Windows running XAMPP which is a bundle of Apache and PHP.
In some pages I am getting different errors, for example, in the Ciew/Change Programs I am getting the following error:Notice: Undefined offset: 4 in C:xampp-portablehtdocsOpenSprinklermain.php on line 535
In the Program Review page I am gettinig:
Notice: Undefined index: seq in C:xampp-portablehtdocsOpenSprinklermain.php on line 168
Notice: Undefined index: seq in C:xampp-portablehtdocsOpenSprinklermain.php on line 225
Front 04:00:00->04:07:00 P5 7minutesNotice: Undefined index: seq in C:xampp-portablehtdocsOpenSprinklermain.php on line 239
Notice: Undefined index: seq in C:xampp-portablehtdocsOpenSprinklermain.php on line 188
Notice: Undefined index: seq in C:xampp-portablehtdocsOpenSprinklermain.php on line 168
Notice: Undefined index: seq in C:xampp-portablehtdocsOpenSprinklermain.php on line 225
Balcony 04:30:00->04:40:00 P2 10minutesNotice: Undefined index: seq in C:xampp-portablehtdocsOpenSprinklermain.php on line 239
Notice: Undefined index: seq in C:xampp-portablehtdocsOpenSprinklermain.php on line 188
Notice: Undefined index: seq in C:xampp-portablehtdocsOpenSprinklermain.php on line 168
Notice: Undefined index: seq in C:xampp-portablehtdocsOpenSprinklermain.php on line 225
Grapes 05:00:00->05:08:00 P3 8minutesAny idea?
Thanks
GuyJune 18, 2013 at 6:55 pm #23937
SamerKeymasterAre you using the OSPi version of the OpenSprinkler? If so, the sequence option doesn’t exist and this is what’s throwing the warnings. From my understanding you can safely ignore them because the app will still function fine (notices shouldn’t be displayed to you, if they are your using a very old version of PHP or need to change your php.ini to hide notices).
This is what you need to change in your php.ini to hide the errors:
error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
display_errors = Off
Source: http://stackoverflow.com/questions/10160859/turn-php-error-reporting-off-in-xampp
As the discussion on Stack Overflow suggests, bugs should be fixed not suppressed however in this case I am expecting something to be reported and unfortunately it isn’t supported yet. I could write some code to handle that properly but I am hoping it will be fixed on the OSPi side soon and find it redundant to add checking for this particular event.
The very first error you pasted from the View/Change program screen I am not sure about (because your version at this point differs from the latest on Github) however I venture to guess a station is not named or something weird like that. If you could update to latest code and run again let me know.
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › OpenSprinkler Mobile and Web App › Mobile Web App with Screenshots (Updated)