I am working on it; I have a version running locally, which includes your solution as well
It will return all monitored_conditions it does now (these are from the weatherstation closed to your location)
AND
it will load forecasted precipitation data based on your actual gps location.
it will add a new monitored_condition called ‘precipitation_forecast’
You can install the external lib manually, but if you do, please make sure you install the correct version (I might have pushed a newer version, that might not be compattible with the HA-buienradar code…)
so do (check the version in buienradar.py for the sensor component):
pip3 install buienradar=<version in buienradar source code>
and not
pip3 install buienradar
With regards to the issue you are experiencing with the buienradar weather component:
Please scroll up in this forum, there is a fix mentioned there for this (you need to modify the buienrader.py for the weather component (add a line with REQUIREMENTS) ; see above)
This issue will get fixed in the next release of the buienradar weather component…
@Seth_Daemen
That is good news; this message is to be expected, as it says, between 0000 and 0100 dutch times.
You should not see this normally outside those times ; if you do there is an issue with the buienradar service
If you look in your logs, you should see the message disappears during the day
For some reason, between those times all weather station data is missing from the buienradar api.
I am able to download the xml for the buienradar sensor, but it will contain no weatherstations and therefore no weather data. I have observed this to happen every night from 00:00 to about 00:45… I do not know why
So if within that mentioned time-frame it is OK/to be expected. if it is outside those times, there might be an issue with their service, or we might be dealing (in the future) with a changed xml format…
I am trying to get this to work as well. Am running HA 0.47.1 and getting the following (I presume buienradar.nl related) errors:
> 2017-06-28 14:34:28 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
> Traceback (most recent call last):
> File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
> result = next(coro)
> File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 368, in async_process_entity
> new_entity, self, update_before_add=update_before_add
> File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 202, in async_add_entity
> object_id = entity.name or DEVICE_DEFAULT_NAME
> File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/weather/buienradar.py", line 78, in name
> return self._stationname or 'BR {}'.format(self._data.stationname
> File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/sensor/buienradar.py", line 269, in stationname
> from buienradar.buienradar import STATIONNAME
> ImportError: No module named 'buienradar'
> 2017-06-28 14:34:59 ERROR (Thread-10) [plexapi] http://192.168.1.9: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
> 2017-06-28 14:35:28 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
> Traceback (most recent call last):
> File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
> result = next(coro)
> File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/sensor/buienradar.py", line 232, in async_update
> from buienradar.buienradar import (parse_data, CONTENT,
> ImportError: No module named 'buienradar'
I use this in my configuration.yaml:
weather:
platform: buienradar
I tried the fix of adding “yield from” as above but that did not change anything. Anyone that can help me get this working?
@jeroenterheerdt
Please scroll up in this page, This is an issue in the buienradar weather component, you have to manually add one line of code into the weather/buienradar.py
You can find the description of the change needed above this this thread…
This issue will be fixed in the next update…
for now there are 2 ways out:
manually edit the mentioned file
also configure the buienradar sensor,
that will trigger the external library to get installed
you might need to restart ha twice for this to work:
once to trigger the lib to get installed and activate the sensor
the second time if you observe that the weather component does not work (ie it was started before the external lib was installed)
Although I have not yet caught this in the logging, so cause is still unknown;
I have added more detailed logging in my scripts to see what this is caused by, but since then I have not observed it yet
I have observed some values to be 0 (in the new version i am testing), which should never have that value, such as pressure. I have added more logging to see the source data in the logfile, but it has not yet reoccurred since then
Thanks, what do you mean add a line? I read it as a line change. Also: What do you mean when saying configuring the sensor? Sorry for the newbie questions.
you are right; there are two things to change (I thought it was mentioned here already… but apparently only one has been mentioned before, here…
This issue mentioned before (see above):
The second issue (also in weather/buienradar.py, directly after the last import statement at the top of the file). there you need to add (before the line defining the logger):
.
Both of these issues require you to modify the python source code of the buienradar weather component. If you do not feel comfortable doing that, please do not attempt it; making a mistake here could cause homeassistant to break and no longer start…
it that case, please wait for the next update of this component…
The other solution is to add the buienradar sensor to your config.yaml, see here how to do that:
If you do this, you will get a sensor for weather conditions as well, but by adding the sensor, the missing external library will get installed into homeassistant
you still need to modify the other fix, though (i.e. add ‘yield from’…)
I am fine making the changes but I missed the REQUIREMENTS line that needed to be added. The error seems gone, here is hoping it works. For the record, I did not do the sensor addition to config.yaml - using weather only. Thanks for your help! Bedankt
I re-imaged my RPI, now with the all-in-one installer, but buienradar does not come up. It is enabled as weather in my config. I tried also including it as sensor but that did not change anything with regards to the error. Also I made the two code changes as mentioned. here is the error now (something with parse_data):
2017-06-29 10:09:14 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.4/asyncio/tasks.py”, line 237, in _step
result = next(coro)
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/sensor/buienradar.py”, line 232, in async_update
from buienradar.buienradar import (parse_data, CONTENT,
ImportError: cannot import name ‘parse_data’
@riemers:
I do not see these errors…
I used to run on 0.47.1 and just upgraded to 0.49.0; in both cases I do not see these…
I personally specify a different location in the sensor configuration (to force a different weatherstation to be used; the nearest weatherstation is too close to the sea for me), but even without specifying gps locations inside the sensor config, it should select the closest weatherstation regardless… (just tested to re-confirm on 0.49.0)
Do you see this all the time, or just sometimes?
If you see this regularly, maybe you can catch it in the log, try this logging setting to catch it: