Buienradar hasn't been working for days

I found out that Buienradar has not been working for days.

Is it only my system or is it an issue with Buienradar? I had something similar about two years ago when no data was produced for a couple of weeks.

The log produces an error:

Logger: homeassistant
Source: components/buienradar/util.py:147
First occurred: 25 novembre 2021, 09:09:03 (4 occurrences)
Last logged: 11:39:34

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/buienradar/util.py", line 147, in async_update
    result = parse_data(
  File "/usr/local/lib/python3.9/site-packages/buienradar/buienradar.py", line 37, in parse_data
    return parse_json_data(content, raincontent,
  File "/usr/local/lib/python3.9/site-packages/buienradar/buienradar_json.py", line 306, in parse_json_data
    data = __parse_precipfc_data(raincontent, timeframe)
  File "/usr/local/lib/python3.9/site-packages/buienradar/buienradar_json.py", line 574, in __parse_precipfc_data
    mmu = 10**(float((int(val) - 109)) / 32)
ValueError: invalid literal for int() with base 10: '101,90084001227659'

I tried to download the JSON data from buienradar and it is there.

Any idea how to solve the issue?

3 Likes

Open an issue for the component.
Apparently, the API returns a value with a comma decimal separator while the component expects a decimal point.

A correction for the bug has been proposed but the developer of the python module is not active anymore…

same here. What i did was remove the integration and restart HA. Add it again and it was working for 2 days. Now its broken again.

An HA ticket should still be opened to see how Core devs want to proceed.

I see 3 options:

  • Pre-process the data: The actual data is fetched by the HA component before being sent to the python module, so that’s possible.
  • Fork the python module
  • Deprecate the functionality

Same issue here; at this moment it won’t load either after restarts and I see the same issue where input is not an int

Logger: homeassistant
Source: components/buienradar/util.py:147
First occurred: 25 November 2021, 17:27:24 (12 occurrences)
Last logged: 16:02:02

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/buienradar/util.py", line 147, in async_update
    result = parse_data(
  File "/usr/local/lib/python3.9/site-packages/buienradar/buienradar.py", line 37, in parse_data
    return parse_json_data(content, raincontent,
  File "/usr/local/lib/python3.9/site-packages/buienradar/buienradar_json.py", line 306, in parse_json_data
    data = __parse_precipfc_data(raincontent, timeframe)
  File "/usr/local/lib/python3.9/site-packages/buienradar/buienradar_json.py", line 574, in __parse_precipfc_data
    mmu = 10**(float((int(val) - 109)) / 32)
ValueError: invalid literal for int() with base 10: '96,2659197224948'
1 Like

There are three tickets already, I would just wait.

After a restart of HA for some new sensors the Buienradar is fully back…
Very strange behavior…

It all depends on whether https://gpsgadget.buienradar.nl/data/raintext returns values with decimal comma when you start up.

No rain, no issues :wink:

Same poblem here… guess just wait for an update?

A friend using a virtual environment installation just corrected the bug, but I’m using docker so that’s not an option and I don’t want to create a custom component.

I hope it gets fixed soon.

Rain forecast works fine.
It’s the wind speeds etc that don’t work after a while.

Mine shows ‘NaN’ for temperature and precipitation for about a week now. I hope it gets fixed soon too.

This is merged buienradar invalid literal · Issue #60200 · home-assistant/core · GitHub but HA is not released yet, should be available with 2021.12.0 or later