Closed sddgit closed 2 years ago
Wireless connection isn't a good idea for error free operation - when I ran the script from terminal for weeks during testing, I'd get an occasional error like that but not hundreds at a time. My Envoy is hardwire connected. I'd guess the number of errors you get are related to wifi signal strength - you might consider testing with a repeater to see if the errors reduce/go away?
Thanks. Yes, I’ll rig something up to try to improve signal strength, or get an Ethernet cable run. Since this script adds so much to the visibility of solar systems, it’ll be worth the effort.
How did you go with improving signal strength? Are you still seeing errors?
Well, I strung a temporary Ethernet cable to the Envoy (pending a guy coming to run a permanent one). Everything looked good. Just the odd
Exception fetching stream data: HTTPConnectionPool(host='192.168.0.251', port=80): Read timed out.
maybe 3 a day. Then I saw your post and checked again. I saw
Exception fetching stream data: HTTPConnectionPool(host='192.168.0.251', port=80): Read timed out.
Exception fetching stream data: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))
Exception fetching stream data: HTTPConnectionPool(host='192.168.0.251', port=80): Max retries exceeded with url: /stream/meter (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f8ad3958e80>: Failed to establish a new connection: [Errno 61] Connection refused'))
Exception fetching stream data: HTTPConnectionPool(host='192.168.0.251', port=80): Max retries exceeded with url: /stream/meter (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f8ad3967040>: Failed to establish a new connection: [Errno 61] Connection refused'))
Exception fetching stream data: HTTPConnectionPool(host='192.168.0.251', port=80): Max retries exceeded with url: /stream/meter (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f8ad3967f10>: Failed to establish a new connection: [Errno 61] Connection refused'))
and hundreds of that last message repeated. The script is currently still providing data though.
Would it be possible for you to check over a period of 3 or 4 days to see what errors you see? Also, do you know if there's any way to get a timestamp on these errors, so I can see if they come along in chunks?
Thanks for the follow up!
Give the new version a go - I included Date/Time for output messages.
I'm not getting any errors like yours
Thanks very much for doing that. I'll monitor to see if I can pick any patterns.
I do notice that even going to the Envoy's web page from a browser is sometimes very slow (even though the script is running fine at the time). How does yours respond?
Thanks for the help.
For completeness, my issue seems to have settled down now. No errors for a few days, mainly since I had a new Ethernet cable run. Still get slow response accessing the Envoy's web page sometimes though. Not sure if that's normal.
I have the script running on a Mac via launchctl. I have added
to the plist. I’ve noticed that stdout.log will sometimes have hundreds of connection error messages like this:
I'm not sure what the timespan between the messages is, because there are no timestamps. I'm wondering whether anyone sees these errors on their system. My Envoy is currently connected wirelessly, with what is says is a couple of bars of reception. For clarity, the errors also happen running the script directly in a Terminal window. Thank you.