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

Update to 1.0.4 Issue #59

Closed
garry572 opened this issue Jan 5, 2024 · 16 comments · Fixed by #60
Closed

Update to 1.0.4 Issue #59

garry572 opened this issue Jan 5, 2024 · 16 comments · Fixed by #60

Comments

@garry572
Copy link

garry572 commented Jan 5, 2024

Hi

Just updated to 1.0.4 only to find that I was unable to set up my weather station. The integration was continually show initialising but would never complete. Deleting the integration, and re-installing gave a more meaningful error , something about UDP discovery not discovering the weather station, Reverting back to 1.0.3 fixed the issue. I am running the latest version of HA core and supervisor

@raymond-w
Copy link

raymond-w commented Jan 5, 2024

Yep, same issue, same solution.
1.0.3 works fine

/edit
after a reboot it fails again, 1.0.3 and 1.0.4 are not working anymore

@garry572
Copy link
Author

garry572 commented Jan 5, 2024

I did a full restore back to 1.0.3 , lost a days data, but at least its working

@daviddesmet
Copy link

daviddesmet commented Jan 6, 2024

For me, it is working with 1.0.4 with no issues with HA 2024.1.1.
I couldn't get the official one working due to the UDP problem that might be related to my network setup since I've multiple VLANs, hence why I use this cloud integration.

@SaveFerrisVote4Pedro
Copy link

SaveFerrisVote4Pedro commented Jan 6, 2024

I had to revert back to 1.0.2. On 1.0.3 and 1.0.4 the sensors were all unavailable - running HA 2024.1.1.

Super integration by the way!

@briis
Copy link
Owner

briis commented Jan 6, 2024

It is very hard to say anything intelligent about your issues without any log files. So if you want me to look in to this, please supply the error messages you get, so I have a chance to find any potential errors.
As @daviddesmet states, I have not found any errors running on the latest version of HA (2024.1.1)

I am puzzled about the comment from @garry572 about UDP. This integration does not use UDP in any way, so any UDP related errors does not come from here.
Also, there has not been any structural changes to the integration for the last few versions, so if 1.0.2 works, then 1.0.4 should work also.

@garry572
Copy link
Author

garry572 commented Jan 6, 2024

Unfortunately whatever log I had was lost once I did a system restore. I am also puzzled about the UDP message. I also have node red flow that grabs the UDP packets, which was still working. I did this in the off change that one day the cloud based integration stops working :)

@briis
Copy link
Owner

briis commented Jan 6, 2024

The core weatherflow integration uses UDP so if you have that installed it might be the reason.

@garry572
Copy link
Author

garry572 commented Jan 6, 2024

with 1.0.3 installed both the weatherflow integration and node red are working. Perhaps 1.0.4 uses UDP

@briis
Copy link
Owner

briis commented Jan 6, 2024

NO none of the releases of THIS integration uses UDP, it is all REST. Only change from 1.0.3 to 1.0.4 is a new sensor being added. The rest of the code is all the same, so if if 1.0.3 works then 1.0.4 works. But again, I have seen no log files, so impossible to help.

I fear there is some confusion around what integration people have installed as there are now a few different ones out there. The name for this integration is WeatherFlow Forecast and Sensor integration and can only be installed after adding it to HACS.

@mlava
Copy link

mlava commented Jan 6, 2024

@briis sorry, but I'm having the same issue as the others. I have WeatherFlow Forecast working beautifully on 1.0.3. I updated to 1.0.4 and all sensors stopped working. Tried to downgrade back to 1.0.3 and still didn't work. Uninstalled the extension via HACS, then reinstalled and now can't even get a station setup.

Am on:

Core 2024.1.1 Supervisor 2023.12.0 Operating System 11.3 Frontend 20240104.0

HACS 1.33.0

This is what shows in GUI when I try to configure a station:

image

I see this in logviewer:

File "/usr/local/lib/python3.11/site-packages/pyweatherflow_forecast/wffcst_lib.py", line 407, in _get_station device_id, ^^^^^^^^^ UnboundLocalError: cannot access local variable 'device_id' where it is not associated with a value

@briis
Copy link
Owner

briis commented Jan 6, 2024

Please look in the log files, and see what error is in there. Try and enable more logging like described here and then try and set it up again with 1.0.4. Post the outcome of the log here.

Also, did you use the STATION ID and not the Device ID when you set it up again?

Each WeatherFlow Station you setup, will get a unique Station ID, this id is needed during configuration. To get your Station ID, login with your account, select the station on the list, and then click Status. Here you will find your Station ID.

@mlava
Copy link

mlava commented Jan 6, 2024

Yep, definitely station ID. Logviewer shows a bunch of stuff and then:

File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 177, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
    result = await method(view, request, data, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 320, in async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 416, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/weatherflow_forecast/config_flow.py", line 57, in async_step_user
    station_data: WeatherFlowStationData = await weatherflow_api.async_get_station()
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyweatherflow_forecast/wffcst_lib.py", line 229, in async_get_station
    station_data = _get_station(json_data)
                   ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyweatherflow_forecast/wffcst_lib.py", line 407, in _get_station
    device_id,
    ^^^^^^^^^
UnboundLocalError: cannot access local variable 'device_id' where it is not associated with a value```

@briis
Copy link
Owner

briis commented Jan 6, 2024

I do think I have an idea of the change that causes this. I will be off for a few hours but will look in to this later today.

@briis briis linked a pull request Jan 6, 2024 that will close this issue
@briis briis closed this as completed in #60 Jan 6, 2024
@mlava
Copy link

mlava commented Jan 6, 2024

Working for me. Cheers @briis

@SaveFerrisVote4Pedro
Copy link

Thanks @briis its back working - thanks so much. It's a great component!

@garry572
Copy link
Author

garry572 commented Jan 7, 2024

Thanks all working fine now, thanks for your efforts

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

Successfully merging a pull request may close this issue.

6 participants