Weatherbit.io - Current Weather and Forecast data

Did this get removed from HACS? I tried searching for it and it isn’t finding it. (on the newest version of HA and HACS)

Not to my knowledge. I just tried to search for it under Integrations and it was there.
Maybe HACS has not completed updating your repository?

With some help from the HACS discord I figured it out. Was searching in the wrong place.

1 Like

think we haver a mapper error in the wether bit icon?

Schermafbeelding 2020-11-20 om 09.09.52

dark_sky is off too at the moment, so maybe after updating to 118 some local timezone issue? otoh, the state is correct so should map according to state?

yes, at this moment in time, both weatherbit and dark_sky_icon flipped from night to day, so most likely a timezone problem?

Could you let me know if this continues. As you write it, it seems to be a HA issue with timezones, that might get fixed.

yeah, seems there’s a few things going on in the timezone/timestamp area…
will keep you posted. I am UTC +1, so maybe anyone else in that zone could check to see the same thing happening.

I’m unable to add this intergration to 0.118.2. Added via HACS, when adding integration i get the following screen:

Some textual issues but following the github instructions i know what they mean. But as soon as i click “opslaan” (= save) the changes are made are lost , nothing happens…

EDIT: sorry found it the first textbox needs to be the API key, not a name…WORKS

Your post just made me aware that the last release had eliminated the English (Default) version of the translation, so therefore you do not see any descriptions for the field. You can copy en.json from here and place it in custom_components/weatherbit/translations/ and then try and re-add the Integration.

But the first field is the Weatherbit API Key. It seems like you typed Thuis, but that is not a valid key. Have you acquired an API Key as per instructions in the README file?

EDIT: I Just released 0.34.1 which has the English file re-added. Try and upgrade the Integration first, and then set it up. You should now get an error message if something goes wrong.

Thx indeed all options are explained now!

has been like this for me for the last couple of days:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 144, in async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 132, in _async_update_data
    return await self.update_method()
  File "/usr/local/lib/python3.8/site-packages/weatherbitpypi/client.py", line 51, in async_get_forecast_daily
    return await self._get_forecast_daily()
  File "/usr/local/lib/python3.8/site-packages/weatherbitpypi/client.py", line 123, in _get_forecast_daily
    json_data = await self.async_request("get", endpoint)
  File "/usr/local/lib/python3.8/site-packages/weatherbitpypi/client.py", line 272, in async_request
    raise RequestError(f"Error requesting data from {BASE_URL}: {str(err)}")
weatherbitpypi.errors.RequestError: Error requesting data from https://api.weatherbit.io/v2.0: Server disconnected
Logger: custom_components.weatherbit
Source: helpers/update_coordinator.py:132 
Integration: Weatherbit (documentation, issues) 
First occurred: January 4, 2021, 1:34:27 PM (3 occurrences) 
Last logged: 9:39:45 AM

Unexpected error fetching weatherbit data: Error requesting data from https://api.weatherbit.io/v2.0: Server disconnected
Unexpected error fetching weatherbit data: Error requesting data from https://api.weatherbit.io/v2.0: 503, message='Service Temporarily Unavailable', url=URL('https://api.weatherbit.io/v2.0/forecast/daily?lat=xxx&lon=xxx&lang=nl&units=M&key=83redacted88')

can reload the integration but it doesn’t get data.

when using the api directly like https://api.weatherbit.io/v2.0/current?city=Amsterdam&key=83redacted88 all data is available…

Not sure, but it may have started after updating to 2020.12.2?

edit

well what do you know, hitting reload integration for a third time now made all data available once again…

Where do you get the postcode if living in europe/denmark ? how do i then setup the links ?

Anyone experiencing issues with Weatherbit? For 2 days already it seems like their API service is not working… or is it just me?

2021-03-02 07:05:00 ERROR (MainThread) [custom_components.weatherbit] Unexpected error fetching weatherbit data: Error requesting data from https://api.weatherbit.io/v2.0: 503, message='Service Temporarily Unavailable', url=URL('https://api.weatherbit.io/v2.0/forecast/daily?lat=53.311181144614345&lon=22.161198168993&lang=en&units=M&key=xxxxxxxxxxxxxxxxxxxxxxxxx')
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/weatherbitpypi/client.py", line 263, in async_request
    resp.raise_for_status()
  File "/usr/local/lib/python3.8/site-packages/aiohttp/client_reqrep.py", line 1000, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 503, message='Service Temporarily Unavailable', url=URL('https://api.weatherbit.io/v2.0/forecast/daily?lat=52.311181144614345&lon=21.161198168993&lang=en&units=M&key=b47f373c1afe41bd9de24f0e7ab0fb23')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 149, in async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 137, in _async_update_data
    return await self.update_method()
  File "/usr/local/lib/python3.8/site-packages/weatherbitpypi/client.py", line 51, in async_get_forecast_daily
    return await self._get_forecast_daily()
  File "/usr/local/lib/python3.8/site-packages/weatherbitpypi/client.py", line 123, in _get_forecast_daily
    json_data = await self.async_request("get", endpoint)
  File "/usr/local/lib/python3.8/site-packages/weatherbitpypi/client.py", line 272, in async_request
    raise RequestError(f"Error requesting data from {BASE_URL}: {str(err)}")
weatherbitpypi.errors.RequestError: Error requesting data from https://api.weatherbit.io/v2.0: 503, message='Service Temporarily Unavailable', url=URL('https://api.weatherbit.io/v2.0/forecast/daily?lat=52.311181144614345&lon=21.161198168993&lang=en&units=M&key=b47f373c1afe41bd9de24f0e7ab0fb23')

I just tested this https://api.weatherbit.io/v2.0/forecast/daily?lat=52.311181144614345&lon=21.161198168993&lang=en&units=M&key=YOUR_API_KEY
and this gives me data. Both with my own and your key (Which I think you should remove from your post)

OK, will need to dig more… restarted HA few times already and still the same result… Wandering, if some changes in network configuration I made recently might affect this… Where the message ‘Service Temporarily Unavailable’ comes from? Is if from integration or really service message?
BTW, thanks for pointing to API key!

OK, one more restart and everything back to normal… no idea what happened, but glad to see this grat integration working again for me :slight_smile:

1 Like

happening quite a lot actually, seems sometimes HA startup is too fast (or some other reason) for the integration to connect properly.

reason in my setup to have this as hold action:

type: entities
entities:
  - type: custom:hui-element
    card_type: entities
    entities: []
    style: |
      ha-card {
        box-shadow: none;
        margin: -16px -16px 0px -16px;
      }
    header:
      type: picture
      image: /local/weather/weatherbit.png
      tap_action:
        action: url
        url_path: !secret weatherio_api_url
      hold_action:
        action: call-service
        service: rest_command.reload_integration
        service_data:
          entry_id: 79ae77f927714985b1046191c05f2b5c

clicking the (still way tooo big) image takes me to the api page to check if it is live, holding it reloads the integration :wink:

When I have the time, I will try and implement some retry mechanism in the Integration if it fails upon startup.

all of a sudden Weatherbit seems to think I live in Nepal…countrycode is ok though :wink:

is this a user error (haven’t changed the setup for months now) or a server issue at Weaherbits?

this was the template I used:

          Description: >
            {% if states('sensor.weatherbit_weather_alerts')|int > 0 %}
              {{state_attr('sensor.weatherbit_weather_alerts','alerts')
                [0].description.split('nederlands:')[1].split('français')[0]}}
            {% else %} No alert
            {% endif %}

but the server returns some strange things now, anyone else seeing this?

This is an error on meteo alarm side. :thinking:
(ne-NL) instead of (nl-NL)

https://meteoalarm.org/en/EMMA_ID/NL802/d99e74c5-3c5a-478e-a8d5-63aba1ba5cc0
——
Nepali version

Wind - Waarschuwingen voor Hoek van Holland - Nederland

noord tot noordwest 8 bft
——

Why Meteoalarm? This is the Weatherbit integration?

Meteoalarm is ok here