garbled1 / homeassistant_ecowitt

Ecowitt Weather Station integration for homeassistant
Apache License 2.0
143 stars 70 forks source link

Ecowitt not not loaded after 2021.8.0 - 2021.8.4 #73

Closed Rayeliint closed 2 years ago

Rayeliint commented 3 years ago

Since the 2021 update Ecowitt has stopped loading for me. Have updated to 2021.8.4 and still no go. Have also changed VOLT to ELECTRIC_POTENTIAL_VOLT Have also change version number to 0.5.0 Getting the following error. Looking forward to getting this gong again.

Logger: homeassistant.components.websocket_api.http.connection Source: custom_components/ecowitt/const.py:426 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 7:21:30 (2 occurrences) Last logged: 7:21:39

[547750759632] name 'VOLT' is not defined Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 185, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1491, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1526, in _execute_service await handler.job.target(service_call) File "/usr/src/homeassistant/homeassistant/components/hassio/init.py", line 522, in async_handle_core_service errors = await conf_util.async_check_ha_config_file(hass) File "/usr/src/homeassistant/homeassistant/config.py", line 923, in async_check_ha_config_file res = await check_config.async_check_ha_config_file(hass) File "/usr/src/homeassistant/homeassistant/helpers/check_config.py", line 133, in async_check_ha_config_file component = integration.get_component() File "/usr/src/homeassistant/homeassistant/loader.py", line 490, in get_component cache[self.domain] = importlib.import_module(self.pkg_path) File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/config/custom_components/ecowitt/init.py", line 27, in from .const import ( File "/config/custom_components/ecowitt/const.py", line 426, in TYPE_WH40BATT: ("WH40 Battery", VOLT, TYPE_SENSOR, NameError: name 'VOLT' is not defined

scooper1 commented 3 years ago

Not changed all the VOLT constants

Sent via BT Email App From: Dave Mason @.> Sent: 8 August 2021 22:31:26 BST To: garbled1/homeassistant_ecowitt @.> Cc: Subscribed @.***> Subject: [garbled1/homeassistant_ecowitt] Ecowitt not not loaded after 2021.8.0 - 2021.8.4 (#73)

Since the 2021 update Ecowitt has stopped loading for me. Have updated to 2021.8.4 and still no go. Have also changed VOLT to ELECTRIC_POTENTIAL_VOLT Have also change version number to 0.5.0 Getting the following error. Looking forward to getting this gong again. Logger: homeassistant.components.websocket_api.http.connection Source: custom_components/ecowitt/const.py:426 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 7:21:30 (2 occurrences) Last logged: 7:21:39 [547750759632] name 'VOLT' is not defined Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 185, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1491, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1526, in _execute_service await handler.job.target(service_call) File "/usr/src/homeassistant/homeassistant/components/hassio/init.py", line 522, in async_handle_core_service errors = await conf_util.async_check_ha_config_file(hass) File "/usr/src/homeassistant/homeassistant/config.py", line 923, in async_check_ha_config_file res = await check_config.async_check_ha_config_file(hass) File "/usr/src/homeassistant/homeassistant/helpers/check_config.py", line 133, in async_check_ha_config_file component = integration.get_component() File "/usr/src/homeassistant/homeassistant/loader.py", line 490, in get_component cache[self.domain] = importlib.import_module(self.pkg_path) File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/config/custom_components/ecowitt/init.py", line 27, in from .const import ( File "/config/custom_components/ecowitt/const.py", line 426, in TYPE_WH40BATT: ("WH40 Battery", VOLT, TYPE_SENSOR, NameError: name 'VOLT' is not defined — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/garbled1/homeassistant_ecowitt/issues/73 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ADRC4IMN43LOYNNSZLWW3UDT33ZS5ANCNFSM5BY4CN2A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

Rayeliint commented 3 years ago

Hi Scooper1, not sure what you mean sorry, fairly new to all this?

scooper1 commented 3 years ago

This is a known issue and how to resolve it is in other comments

scooper1 commented 3 years ago

It should be easy but the owner of the code does not have spare time to do a new release

xKronyx commented 3 years ago

It should be easy but the owner of the code does not have spare time to do a new release

I also don't understand what i need to do in your comment above

scooper1 commented 3 years ago

i am sorry you might have to wait till a release then as the edit involves editing source code

------ Original Message ------ From: "xKronyx" @.> To: "garbled1/homeassistant_ecowitt" @.> Cc: "Stephen Cooper" @.>; "Comment" @.> Sent: Monday, 9 Aug, 21 At 18:54 Subject: Re: [garbled1/homeassistant_ecowitt] Ecowitt not not loaded after 2021.8.0 - 2021.8.4 (#73)

It should be easy but the owner of the code does not have spare time to do a new release I also don't understand what i need to do in your comment above — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/garbled1/homeassistant_ecowitt/issues/73#issuecomment-895420722 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ADRC4IN3D2V5I7MK4F7EEGLT4AI5HANCNFSM5BY4CN2A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

Stephen Cooper

Rayeliint commented 3 years ago

OK, so I have sorted it. For anyone else, it was not that hard. I looked up what the battery was in the entities, in my case it was a WH65 battery. I commented out all the others in const.py at "Type" and left the WH65 (started at line 152) Then commented out all the "Type WHXXX" from line 422 except mine. Then changed all the "VOLT" at lines436 "TYPE_SOILBATTXX" to ELECTRIC_POTENTIAL_VOLT Saved and rebooted and all is working. Not sure if this is the correct way, but its working for me now!

gilperme commented 3 years ago

@Rayeliint suggestion worked for me...thanks for sharing

xKronyx commented 3 years ago

I think this integration is dead, the owner is active on some other git but not here , he should give it to someone that would like to maintain it

mr-sneezy commented 3 years ago

Is there a process to migrate to an active branch of a HACS repo, preferably without loosing sensor ID's (so not needing to edit all my automations) ?

I suggest getting onboard with this one. https://github.com/PoppyPop/homeassistant_ecowitt

xKronyx commented 3 years ago

Is there a process to migrate to an active branch of a HACS repo, preferably without loosing sensor ID's (so not needing to edit all my automations) ?

I suggest getting onboard with this one. https://github.com/PoppyPop/homeassistant_ecowitt

Thanks a lot !

mr-sneezy commented 3 years ago

Is there a process to migrate to an active branch of a HACS repo, preferably without loosing sensor ID's (so not needing to edit all my automations) ? I suggest getting onboard with this one. https://github.com/PoppyPop/homeassistant_ecowitt

Thanks a lot !

If you update from that repo can you let me know if the sensor names get changed or stay as they were.

xKronyx commented 3 years ago

Is there a process to migrate to an active branch of a HACS repo, preferably without loosing sensor ID's (so not needing to edit all my automations) ? I suggest getting onboard with this one. https://github.com/PoppyPop/homeassistant_ecowitt

Thanks a lot !

If you update from that repo can you let me know if the sensor names get changed or stay as they were.

I did not upgrade from that repo, i just copied the files over, some sensors have changed some not.

edegraaff commented 3 years ago

After holidays i needed to do some updates on my home assistant and, guess, ecowitt fails without any clear reason. Not loaded is the error similar to others. I am also opt in for another integration, not because i dislike this one, but because the weatherisation integration is good to have for some smart automations. What is the advice here? i can image the author has no time anymore, i respect that. go for the https://github.com/PoppyPop/homeassistant_ecowitt seems logic route or change the code as suggested above ?

regards Eelco

edegraaff commented 3 years ago

Is there a process to migrate to an active branch of a HACS repo, preferably without loosing sensor ID's (so not needing to edit all my automations) ?

I suggest getting onboard with this one. https://github.com/PoppyPop/homeassistant_ecowitt

I am also interested to do this, who has a proper description how to handle this ?

garbled1 commented 2 years ago

Both of these are fixed in 0.6, sorry for delay