OpenSprinkler / OpenSprinkler-Firmware

OpenSprinkler Unified Firmware for OpenSprinkler, OpenSprinkler Pi, and OpenSprinkler Beagle.
http://www.opensprinkler.com
GNU General Public License v3.0
471 stars 283 forks source link

constant network drops and timeouts since latest update #273

Closed ecto1a2003 closed 2 months ago

ecto1a2003 commented 3 months ago

since applying the latest update the opensprinkler web page will regularly timeout or refuse to load, the mobile app will fail to connect as well.

The device still pings fine but no data is shown in app or browser. a power cycle will immediately fix the issue.

rayshobby commented 3 months ago

Please specify which hardware version you have, and which firmware are you referring to as the 'latest update'.

mmorys commented 3 months ago

I have the exact same issue and symptoms. HW: Raspberry Pi Zero 2 W OS: Raspbian Buster Git repo hash: e0f567b

mmorys commented 3 months ago

I have the exact same issue and symptoms. HW: Raspberry Pi Zero 2 W OS: Raspbian Buster Git repo hash: e0f567b

I just reinstalled an updated OS (Raspberry Pi OS Bookworm) on a new SD Card to rule that out as the culprit, but it's still happening. I can't seem to find any good logs being generated by OpenSprinkler. Yes, I did check that it is enabled in System options.

rayshobby commented 3 months ago

I cannot reproduce this issue. Tried Raspberry Pi 0 W with Raspbian Buster, the latest Master branch, ran overnight with a script that automatically polls the firmware's /ja endpoint for status every 5 seconds, and run a program every 10 minutes. It has been 16 hours and the connection is stable with no data loss.

If you go to demo.opensprinkler.com, do you observe the same issues? That site is running the current master branch, the only difference is it's built with DEMO flag and not OSPI (because it doesn't have GPIOs). Other than that, the demo site runs the same firmware as rpi.

Also, you can turn on your browser's console window when testing, this way, when it loses connection the console window should show the error messages.

mmorys commented 3 months ago

Thanks for testing it out. The demo page seems to work fine.

Later today I will try debugging further. I initially dismissed HW issues because other services running on the pi and ssh all continued to work fine, but I'll try swapping for a different RPi zero board. I'll also try reverting back to older versions of Open Sprinkler to narrow down where a breaking change occured, or find out that it's not the firmware at all but something else.

mmorys commented 3 months ago

Also, to elaborate on the original description of the issue, I can use the page for about 5-10 seconds before it becomes unresponsive. Rebooting fixes the issue, but waiting ~1 minutes also fixes the issue, at which point I can use the page/API for a few more seconds before disconnect.

rayshobby commented 3 months ago

When it becomes unresponsive, do you see any error message on the screen? Like the bottom banner becomes red? If you turn on browser's console, does it display any error message? The symptom you are experiencing could be UI related instead of firmware related. To check the UI version, at the homepage swipe left to right to open the side menu, then 'About'. The 'App Version' is the UI version.

mmorys commented 3 months ago

First, this 'may' not be an OpenSprinkler issue. I am still trying to diagnose...

I am not using an App, I am using the web interface (http://ip_address:8080), so no App Version to check.

My setup is a RPi Zero 2 W connected via Ethernet using a PoE Ethernet Hat.

I have a second Raspberry Pi Zero 2 W used for a different purpose. I temporarily installed OpenSprinkler on it and it worked without an issue. At this point I am not completely sure what the problem may be, but the original post by OP may be coincidental with my situation. The Raspberry Pi Zero 2 W running the sprinklers is not exhibiting any other symptoms of networking or HW issues, other than web page disconnects, where the page seems to load forever, returning a 504 error. Eventually it loads, but disconnects within a minute.

Next I will replace the Raspberry Pi Zero 2 W with my second one. and wire up all GPIO pins and see if it still experiences issues. If not, I will have to chalk it up to some unknown hardware issue. Will post updates when I get the chance to do some hardware reconfiguration.

rayshobby commented 2 months ago

Due to lack of reproducibility I am closing this ticket. We can't reproduce this issue on our side, and I haven't heard of this issue from other users/customers.