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

Retrying setup: 'NoneType' object has no attribute 'value' #18

Closed
WouterKr opened this issue Dec 15, 2021 · 13 comments
Closed

Retrying setup: 'NoneType' object has no attribute 'value' #18

WouterKr opened this issue Dec 15, 2021 · 13 comments

Comments

@WouterKr
Copy link

Hi,

Since the last couple of days the integration is showing Retrying setup: 'NoneType' object has no attribute 'value'
Have it removed and installed again but that did not help.

The error in de core-log shows:

2021-12-15 17:15:56 ERROR (MainThread) [custom_components.meteobridge] Unexpected error fetching meteobridge data: 'NoneType' object has no attribute 'value' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 147, in _async_update_data return await self.update_method() File "/config/custom_components/meteobridge/__init__.py", line 94, in async_update_data data: ObservationDescription = await meteobridgeapi.update_observations() File "/usr/local/lib/python3.9/site-packages/pymeteobridgedata/api.py", line 139, in update_observations beaufort=beaufort_data.value, AttributeError: 'NoneType' object has no attribute 'value'

Can not figure out what the problem is. Thought that it was related to the new HA version so I upgraded HA.
That did not help and tried to remove and install it again but that did not help either.

The meteobridge was up and running but to be certain I rebooted the meteobridge but seeing the same error in the log.

Running version of HA:
core-2021.12.1
supervisor-2021.12.2
Home Assistant OS 7.0

Running on the meteobridge : Meteobridge 5.2 (Dec 6 2021, build 4077), FW 1.4

Hope you can help to solve this.

Thanks.
Regards,

Wouter

briis added a commit to briis/pymeteobridge that referenced this issue Dec 15, 2021
@briis
Copy link
Owner

briis commented Dec 15, 2021

Released V3.2.2 which should fix the problem. Could you try that, and post your feedback. Thanks.

@WouterKr
Copy link
Author

WouterKr commented Dec 15, 2021

Hi,

Thank you for the quick reply.
Updated to 3.2.2 but seems that the error changed. Removed and installed again. The error now is:

Retrying setup: '>' not supported between instances of 'NoneType' and 'float'

Regards,

Wouter

@briis
Copy link
Owner

briis commented Dec 15, 2021

Ok. I will give it a new try tomorrow morning. In the meantime can you check your data. The origin of the error is missing wind data, and that could be a sign of error on your meteobridge or the attached weather station.

@WouterKr
Copy link
Author

Thanks.
Possible that the wind data has no value; there is no wind at the moment ;-)

@briis
Copy link
Owner

briis commented Dec 16, 2021

If there is no wind, it should still return a 0, and that is all I need.

Could you try and copy the below, and execute it in a browser. Before you do, change IP_ADDRESS to the IP Address of your meteobridge, and also change USERNAME and PASSWORD to what you use. Then post the result here. This will give me the raw data that is returned. (Don't worry it is a very long string)

http://USERNAME:PASSWORD@IP_ADDRESS/cgi-bin/template.cgi?template=[epoch];[th0temp-act:None];[thb0seapress-act:None];[thb0press-act:None];[th0hum-act.0:None];[rain0rate-act:None];[rain0total-daysum:None];[rain0total-monthsum:None];[rain0total-yearsum:None];[wind0avgwind-act:None];[wind0wind-max1:None];[wind0dir-avg5.0:None];[uv0index-act:None];[sol0rad-act:None];[lgt0total-lasttime=epoch:None];[lgt0total-act.0:None];[lgt0dist-act.0:None];[th0heatindex-act:None];[th0dew-act:None];[wind0chill-act:None];[th0temp-delta10:None];[thb0seapress-delta10:None];[air0pm-act:None];[air1pm-act:None];[air1pm-havg:None];[air2pm-act:None];[forecast-text:None];[thb0temp-act:None];[thb0hum-act.0:None];[th0temp-dmin:None];[th0temp-dmintime=utc:None];[th0temp-dmax:None];[th0temp-dmaxtime=utc:None];[th0temp-mmin:None];[th0temp-mmintime=utc:None];[th0temp-mmax:None];[th0temp-mmaxtime=utc:None];[th0temp-ymin:None];[th0temp-ymintime=utc:None];[th0temp-ymax:None];[th0temp-ymaxtime=utc:None];[soil0temp-act:None];[soil0hum-act.0:None];[soil1temp-act:None];[soil1hum-act.0:None];[soil2temp-act:None];[soil2hum-act.0:None];[soil3temp-act:None];[soil3hum-act.0:None];[leaf0temp-act:None];[leaf0hum-act.0:None];[leaf1temp-act:None];[leaf1hum-act.0:None];[leaf2temp-act:None];[leaf2hum-act.0:None];[leaf3temp-act:None];[leaf3hum-act.0:None]&contenttype=text/plain;charset=iso-8859-1

@WouterKr
Copy link
Author

Here are the results:

1639634025;7.8;1034.2;1034.0;92;0.0;0.0;17.0;474.4;None;None;None;0.0;0.0;None;None;None;7.8;6.6;None;0.0;0.3;None;None;None;None;Partly cloudy with little temperature change.;21.0;35;6.7;20211216033933;8.1;20211215230102;-2.3;20211211063733;11.5;20211215124912;-14.1;20210213071623;32.1;20210617133831;None;None;None;None;None;None;None;None;None;None;None;None;None;None;None;None

@briis
Copy link
Owner

briis commented Dec 16, 2021

As I thought. Your weather station is not reporting any wind data.
If you look at the beginning of the result: 1639634025;7.8;1034.2;1034.0;92;0.0;0.0;17.0;474.4;None;None;None the 3 times None here should have been Wind Speed and direction values, but your station reports nothing.

I have now made a fix, that prevents the Integration to crash, instead it will retry setting it up, until the expected values are reported.

Try and login to your Meteobridge and go to Live Data and then Raw Sensor Data are you seeing values in Wind like below?
Skærmbillede 2021-12-16 kl  07 05 56

@briis
Copy link
Owner

briis commented Dec 16, 2021

Also, I expect the wind sensor to be mapped to the logical wind0 sensor as you can see in the picture below. This is how it works in 99% of all installationes. If your wind sensor is mapped to another logical number you can remap it using the settings below. You will have to do this for all 4 wind physical sensors.

Skærmbillede 2021-12-16 kl  07 14 33

briis added a commit to briis/pymeteobridge that referenced this issue Dec 16, 2021
@WouterKr
Copy link
Author

Hi,

I did check this before (and before adding the issue ;-() and the reading was OK.
Checked again just now and it is showing an outage. Will check what is going on......
The mapping is standard like you mention above so that should be OK.

@briis
Copy link
Owner

briis commented Dec 16, 2021

OK. I will make a new release now, that should make the Integration run, but you might not see any wind sensors (or they will have the state Unknown). Once you have fixed the physical issue, just restart the Integration and the Wind Sensors should show again.

@WouterKr
Copy link
Author

Thank you for the adjustments in the integration which is great btw!
Have installed the latest and the integration has started again and is working; great!
Unknown status for the windsensors like you mentioned.
Have to do some office work but will check the windsensor sometime today to get it running again.

@WouterKr
Copy link
Author

Hi,

No idea what caused (is causing) the outage but placing the console somewhere else is for now the solution (after changing batteries and other standard things).

Nice thing; a restart of the integration was not necessary. All the sensors off the integration are showing a status or value.
Thanks again.

Wouter

@briis
Copy link
Owner

briis commented Dec 16, 2021

Must be some kind of interference between the console and the Station. Anyway, glad it is solved. I will close this.

@briis briis closed this as completed Dec 16, 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

2 participants