OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › Programs only seem to run when website or app is open
- This topic has 8 replies, 3 voices, and was last updated 9 years, 9 months ago by davidjb.
-
AuthorPosts
-
April 13, 2015 at 1:11 pm #36655
TonyParticipantThis is my first post so, I’ll just say a group ‘Hi!’.
My problem is that on the latest firmware 2.1.3, the triggering of programs only seems to occur when the website or app is open. If I close the app the programs run until I re-open it.
I’ve trawled through the forums and I can find nearly the problem but not exactly.
I’ve used both the sd-image and I’ve installed it manually and the result is the same.
What am I doing wrong!
TIA
Attachments:
April 13, 2015 at 4:33 pm #36658
davidjbParticipantThis could be related to the previous forum post; where station runs are running forever. It seemed to me in my case (same firmware) that opening the app or website stopped the over-time station, which sounds like it could be related to this issue.
On another similar note, my scheduled runs have seemingly ceased to run automatically & I’m forced to trigger them manually.
April 14, 2015 at 2:58 am #36669
TonyParticipantI read that post and yeah it’s broadly similar, except mine never trigger automatically unless the app or website is open. And when I manually trigger them, unless I keep the app or website open they just run forever.
There does seem to be a theme developing here…
April 14, 2015 at 3:00 am #36670
TonyParticipantI’m wondering if the problem lies with the web server.
April 15, 2015 at 7:26 am #36711
davidjbParticipantOkay, sounds like my issue appears to now the same as yours then, I have the same symptoms. The programs used to run automatically on most days but they’re not running at all now unless I trigger manually. Separately, I tried a manual program this evening for 1 minute and it continued to run forever until I opened the app.
April 15, 2015 at 10:13 pm #36740
RayKeymasterI can confirm the issue. I am really shocked to see it, that as soon as the browser is closed, the program seems to have lost response. This is quite alarming. I am sorry that the issue wasn’t discovered during testing because we’ve always had the browser or app open. Now the issue can be reproduced we are trying to figure out the solution. It looks like this either has to do with the usleep introduced in the main loop, or the way non-block SOCKET is implemented. We will immediately look for solutions. Thanks.
April 15, 2015 at 11:49 pm #36743
RayKeymasterUPDATE: I think I’ve found the issue. It’s a bug in setting a socket non-block. It actually has nothing to do with usleep. The bug caused the firmware to stop program time keeping when there is no connection (i.e. socket is blocked). The bug is now fixed. Please perform a ‘git pull’, then do ‘./build.sh ospi’, and restart. Let me know if this solves the issue. Thanks!
April 16, 2015 at 10:19 am #36760
TonyParticipantHi Ray,
Thanks for looking into this for me.
I’m happy to report that so far this fixes the issue for me.
I even put my phone in airplane mode and it still worked.
Yay! Thanks☺
April 17, 2015 at 2:45 pm #36810
davidjbParticipantLooks good from my point of view too, automatic programs succeeded last night and manual runs compete with the app forcibly closed. Thanks!
Will report back if any issues persist.
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › Programs only seem to run when website or app is open