Skip to content
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

Entities Becoming Unavailable #7

Closed
NRutt2005 opened this issue Jun 3, 2021 · 9 comments
Closed

Entities Becoming Unavailable #7

NRutt2005 opened this issue Jun 3, 2021 · 9 comments

Comments

@NRutt2005
Copy link

Any reason why the entities keep becoming unavailable on a regular basis? Everyday I have to "reload". Something keeps causing the integration to break each day. Anyone else having this issue?

@siku2
Copy link
Owner

siku2 commented Jun 3, 2021

Logs would certainly help here

@lanky8804
Copy link

I also have this issue, some logs to help hopefully

`This error originated from a custom integration.

Logger: custom_components.weatherlink
Source: helpers/update_coordinator.py:193
Integration: WeatherLink (documentation, issues)
First occurred: 8:52:05 AM (14 occurrences)
Last logged: 11:20:37 AM

Error requesting state data: Cannot connect to host 192.168.1.199:80 ssl:default [Connect call failed ('192.168.1.199', 80)]`

`Logger: homeassistant.components.rest.data
Source: components/rest/data.py:69
Integration: RESTful (documentation, issues)
First occurred: 8:52:28 AM (6 occurrences)
Last logged: 11:02:19 AM

Error fetching data: http://192.168.1.199/v1/current_conditions failed with [Errno 111] Connect call failed ('192.168.1.199', 80)`

@lanky8804
Copy link

`Logger: homeassistant.components.rest.data
Source: components/rest/data.py:69
Integration: RESTful (documentation, issues)
First occurred: 8:52:28 AM (7 occurrences)
Last logged: 11:25:19 AM

Error fetching data: http://192.168.1.199/v1/current_conditions failed with [Errno 111] Connect call failed ('192.168.1.199', 80)`

@siku2
Copy link
Owner

siku2 commented Jun 4, 2021

This looks like the issue is with the WeatherLink hardware, not this integration.
Have you adjusted the polling interval by any chance? The WeatherLink station is not a powerful device by any means, so if you request data too often it will cause issues.

Either way, I believe this should be handled more gracefully. Perhaps the integration could only actually mark the data as "unavailable" if it failed more than 3 times in a row?

@lanky8804
Copy link

So for me personally I have the polling interval at 10sec mainly as I am after having the wind update as quickly as possibly, 2.5sec would be even better to match the live output.

Yes having a clause like after 3 failures is a good idea.

Or if possilbe split the rain and wind off with a poll rate of 2.5sec then the rest as 10, 20, 30 sec etc??

Keep up the good work this is an excellent integration.

@siku2
Copy link
Owner

siku2 commented Jun 5, 2021

Or if possilbe split the rain and wind off with a poll rate of 2.5sec then the rest as 10, 20, 30 sec etc??

Unfortunately that's not possible (the WeatherLink API is very underwhelming from a technical perspective). There's only a single API endpoint which yields all the data at once.
Hopefully that should no longer be a problem once I get around to #8 though.

@NRutt2005
Copy link
Author

@siku2 Here is my logs data. At least I think this is the information you're looking for. Let me know if this isn't it and I will try to find what you are looking for. My refresh interval is set to the default of 30. Thank you for your continued work!

Error requesting state data: Cannot connect to host 192.168.0.54:80 ssl:default [Connect call failed ('192.168.0.54', 80)]
5:03:20 PM – (ERROR) WeatherLink (custom integration) - message first occurred at June 4, 2021, 12:12:35 AM and shows up 10 times
TemplateError('UndefinedError: 'None' has no attribute 'conditions'') while processing template 'Template("{{ state_attr("sensor.davis_vantage_pro_curr", "data")["conditions"][0]["temp"] }}")' for attribute '_state' in entity 'sensor.temp'
5:03:18 PM – (ERROR) Template - message first occurred at June 5, 2021, 12:06:13 AM and shows up 40 times
Empty reply found when expecting JSON data
5:03:18 PM – (WARNING) RESTful - message first occurred at June 5, 2021, 12:06:13 AM and shows up 14 times

@NRutt2005
Copy link
Author

Also, when I clicked on the error in the logs I received these details.

"This error originated from a custom integration.

Logger: custom_components.weatherlink
Source: helpers/update_coordinator.py:200
Integration: WeatherLink (documentation, issues)
First occurred: June 4, 2021, 12:12:35 AM (10 occurrences)
Last logged: 5:03:20 PM

Error requesting state data: Cannot connect to host 192.168.0.54:80 ssl:default [Connect call failed ('192.168.0.54', 80)]
Error requesting state data: Server disconnected"

@siku2
Copy link
Owner

siku2 commented Jun 17, 2021

Should be fixed by #9 which will be released as part of v0.5.0

@siku2 siku2 closed this as completed Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants