-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service stops if shelly is not reachable #44
Comments
Hi @jgracio , thanks for your feedback - I think there are more possibilities to gain more resilience, but can you give more details about the situation? Is the device not reachable via network (WIFI lost, etc). Because based on code the error should result in one miss measurement and a retry after ~500ms. |
Thanks @fabian-lauer for your prompt reply I do not have any further information about connection failures, but I can say I'm using a wifi connection on Shelly and also on Cerbo GX. As I wrote before my Unify system is not detecting any grid failure. Where is set the retry after ~500ms? Thanks again |
The 500ms is the time where the main "loop" for getting data is running. Hmmm... difficult |
Thanks, @fabian-lauer I did increase the timeout of the HTTP response from 5 to 10. It seems the failure are decreasing but still failing, but I notice a pattern with daily failures @ 00:01:
_ Do you have a view of why the failure is happening with this regularity? |
Hi @jgracio - not sure what the reason is really, but looks like a problem with network - maybe regular router restart configures or something else? But will check what happens when Shelly Connection goes away like while rebooting |
Hmmm...just realizing that my log file looks the same:
But I have no problem with the script - never do a restart either of Cebro nor script |
Hello @fabian-lauer After the exception, I include the following line to have more information about it:
My knowledge of Python is null, so the result was not worth as I got
Can you please help me better understand why this error (or errors) happens? |
Hi @jgracio , that style of logging is not correct - please change it like this:
After that and after making Shelly unavailable - error msg look like this:
But when checking the details - you will see that the error is thrown by own code based on "if not meter_r:". |
@fabian-lauer , I used your script and the error log stopped with the following
During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): Thats a long message and very different from the one you got. Any clue what's wrong? |
Puhh...still hard to rate for me - looks like a "network" issue - but can also be a problem with the endpoint on Shelly device. Let's focus more on the fact that the device is not reachable for a few seconds (why - no idea at the moment) and focus on the fact that it should recover automatically - this is still not happening right? |
Agreed. |
Hi @jgracio, no idea so far why the script is crashing - will try to reproduce in a few minutes by changing the IP address of my Shelly during normal script run..... |
Thanks @fabian-lauer |
Hi @jgracio, this doing fell into oblivion, but I finaly did the test.
And when changing the IP back to the normal value it starts working again:
So I have no good idea at the moment what may cause your problem. |
I encounter the same issue: after a
Since nobody has a clue on how to reproduce this until now, what do you think about simply exiting the program and let the service do a restart? We at least know that a manual restart of the server helps. That could be automated. I know, turning it off and on is not a desirable fix ;) |
Although there is not a persistent problem with the network nor with shelly 3em, the service stops after some minutes with the following message on current.log "CRITICAL Error getting data from Shelly - check network or Shelly status. Setting power values to 0".
After I restart the service manually and it starts working again for more some minutes/hour.
There is a way to make this access more resilient not being necessary o keep restarting it?
Thanks
The text was updated successfully, but these errors were encountered: