home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.71k stars 30.45k forks source link

aemet: some sensors become unknown or unavailable altough api has the data #110494

Closed figorr closed 8 months ago

figorr commented 8 months ago

The problem

Around 19:00 Spanish local time there is a weird issue.

The is an error recovering some data (prepitation probability, storm probability and snow probability) ... and these sensors become "unavailable" or "unknown". And they became unavailable until midnight even if I reload the integration. I though this could be a problem with the station that provides the data ... but there are two weird things:

The only message I saw at logs ... and I don't think it is realated is

Logger: homeassistant.components.rest.util Source: components/rest/util.py:18 Integration: RESTful (documentation, issues) First occurred: 19:01:11 (1 occurrences) Last logged: 19:01:11 Empty reply found when expecting JSON data

Some screen captures.

A. Screen captures when the sensors become unknown or unavailable at 19:00h. IMG_0355 IMG_0356 IMG_0357

B. Screen captures after reloading the integration in order to see if the sensors become available again, without success. IMG_0358

What version of Home Assistant Core has the issue?

2024.2.1

What was the last working version of Home Assistant Core?

2024.1

What type of installation are you running?

Home Assistant OS

Integration causing the issue

AEMET

Link to integration documentation on our website

https://www.home-assistant.io/integrations/aemet

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.rest.util
Source: components/rest/util.py:18
Integration: RESTful (documentation, issues)
First occurred: 19:01:11 (1 occurrences)
Last logged: 19:01:11

Empty reply found when expecting JSON data

Additional information

No response

home-assistant[bot] commented 8 months ago

Hey there @noltari, mind taking a look at this issue as it has been labeled with an integration (aemet) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `aemet` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign aemet` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


aemet documentation aemet source (message by IssueLinks)

Noltari commented 8 months ago

I think that most of this or maybe even all will be fixed by https://github.com/home-assistant/core/pull/107795 So, I think it's better to wait until that PR is merged and the next Home Assistant version is released.

figorr commented 8 months ago

Thank you @Noltari.

Noltari commented 8 months ago

@home-assistant rename aemet: some sensors become unknown or unavailable altough api has the data

lluisd commented 8 months ago

I have the same problem all are unavailable since time ago. There is no solution for that as I see.

Also there is a lot of timezone bugs with AEMET with HA, depending of the hour of the day the next days shift by 1 day (https://github.com/home-assistant/core/issues/90837 they closed it because nobody says nothing). It's a pitty for spanish people that wants to get data from aemet insetad of other weather apis without these problems. As I understand this second issue will be fixed in next realease.

image

Noltari commented 8 months ago

I have the same problem all are unavailable since time ago. There is no solution for that as I see.

Not yet, I've invested my time on fixing the timezone issues, which I consider more important.

Also there is a lot of timezone bugs with AEMET with HA, depending of the hour of the day the next days shift by 1 day (#90837 they closed it because nobody says nothing). It's a pitty for spanish people that wants to get data from aemet insetad of other weather apis without these problems. As I understand this second issue will be fixed in next realease.

Yes, this is a long standing bug which should be finally fixed by https://github.com/home-assistant/core/pull/107795

Honestly, it would be great to get some support from you/other people in fixing AEMET integration rather than complaining... Did you know that it took me 6 months to fix the timezone bug? Just so you can understand the amount of work involved, the following PRs were needed to refactor the integration code and fix the timezone issues: https://github.com/home-assistant/core/pull/99015 https://github.com/home-assistant/core/pull/99261 https://github.com/home-assistant/core/pull/99273 https://github.com/home-assistant/core/pull/100117 https://github.com/home-assistant/core/pull/100818 https://github.com/home-assistant/core/pull/102954 https://github.com/home-assistant/core/pull/102972 https://github.com/home-assistant/core/pull/110890 https://github.com/home-assistant/core/pull/107795

And it would have been great if any of the AEMET integration users with SW development skills could have helped by reviewing any of those PRs. It certainly would have speed things up. But I guess that complaining is easier...

Best regards, Álvaro.

L0bit0 commented 7 months ago

Hi

I was happy to help, but I do not have enough development skills for this, sorry.

in case it helps it worked for me some hours yesterday: image

Thanks