StyraHem / ShellyForHASS

Shelly smart home platform for Home Assistant
MIT License
615 stars 110 forks source link

[BUG] Integration was broken since HA 2022.3.0b3 #655

Closed bussio closed 2 years ago

bussio commented 2 years ago

Environment

Describe the bug

Setup failed for shelly: Requirements for shelly not found: ['paho-mqtt==1.5.1'].

Steps to Reproduce

Expected behavior

Screenshots

Traceback/Error logs

Logger: homeassistant.setup Source: setup.py:155 First occurred: 13:19:41 (1 occurrences) Last logged: 13:19:41

Setup failed for shelly: Requirements for shelly not found: ['paho-mqtt==1.5.1'].

Additional context

Logger: homeassistant.util.package Source: util/package.py:99 First occurred: 13:19:37 (3 occurrences) Last logged: 13:19:41

Unable to install package paho-mqtt==1.5.1: ERROR: Cannot install paho-mqtt==1.5.1 because these package versions have conflicting dependencies. ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

kdutton1964 commented 2 years ago

Same issue on same betas with same errors except problem installing JQ-300

Logger: homeassistant.util.package Source: util/package.py:99 First occurred: 6:50:59 PM (3 occurrences) Last logged: 6:51:14 PM

Unable to install package paho-mqtt==1.5.1: ERROR: Cannot install paho-mqtt==1.5.1 because these package versions have conflicting dependencies. ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

Logger: homeassistant.setup Source: setup.py:155 First occurred: 6:51:14 PM (1 occurrences) Last logged: 6:51:14 PM

Setup failed for jq300: Requirements for jq300 not found: ['paho-mqtt==1.5.1'].

thundergreen commented 2 years ago

same here .

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 219, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 137, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 134, in post
    return await super().post(request)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 62, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 72, in post
    result = await self._flow_mgr.async_init(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 203, in async_init
    flow, result = await task
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 221, in _async_init
    flow = await self.async_create_flow(handler, context=context, data=data)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 740, in async_create_flow
    await async_process_deps_reqs(self.hass, self._hass_config, integration)
  File "/usr/src/homeassistant/homeassistant/setup.py", line 352, in async_process_deps_reqs
    await requirements.async_get_integration_with_requirements(
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 83, in async_get_integration_with_requirements
    await _async_process_integration(hass, integration, done)
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 99, in _async_process_integration
    await async_process_requirements(
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 162, in async_process_requirements
    await _async_process_requirements(
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 180, in _async_process_requirements
    raise RequirementsNotFound(name, [req])
homeassistant.requirements.RequirementsNotFound: Requirements for shelly not found: ['paho-mqtt==1.5.1'].
thundergreen commented 2 years ago

semmes like same: https://github.com/StyraHem/ShellyForHASS/issues/652

hakana commented 2 years ago

Anyone have a working solution, please create a PR. I will look at it asap, but any help is appreciated !

srk23 commented 2 years ago

Same problem here on the release version.

supergroover commented 2 years ago

And may be the solution is #658

Extreme79 commented 2 years ago

As mentioned, manually fix ['paho-mqtt==1.5.1'] (change 1.5.1 in 1.6.1) in manifest and restart, this let the integration to start, but something is unworking, anyway (with Shelly em instant power stay unavailable)

poldim commented 2 years ago

As mentioned, manually fix ['paho-mqtt==1.5.1'] (change 1.5.1 in 1.6.1) in manifest and restart, this let the integration to start, but something is unworking, anyway (with Shelly em instant power stay unavailable)

I tried this, can confirm the integration did start but reports a bunch of entity ID errors.

2022-03-02 19:29:43 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 526, in async_update_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 638, in _async_write_ha_state
attr.update(self.hass.data[DATA_CUSTOMIZE].get(self.entity_id))
File "/usr/src/homeassistant/homeassistant/helpers/entity_values.py", line 40, in get
domain, _ = split_entity_id(entity_id)
File "/usr/src/homeassistant/homeassistant/core.py", line 148, in split_entity_id
raise ValueError(f"Invalid entity ID {entity_id}")
ValueError: Invalid entity ID .shelly_shdm_2_40f5200164b2

The entity ID appears to be missing the domain in front of it on the last line. @hakana - Could this point to something?

supergroover commented 2 years ago

As mentioned, manually fix ['paho-mqtt==1.5.1'] (change 1.5.1 in 1.6.1) in manifest and restart, this let the integration to start, but something is unworking, anyway (with Shelly em instant power stay unavailable)

I tried this, can confirm the integration did start but reports a bunch of entity ID errors.

2022-03-02 19:29:43 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 526, in async_update_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 638, in _async_write_ha_state
attr.update(self.hass.data[DATA_CUSTOMIZE].get(self.entity_id))
File "/usr/src/homeassistant/homeassistant/helpers/entity_values.py", line 40, in get
domain, _ = split_entity_id(entity_id)
File "/usr/src/homeassistant/homeassistant/core.py", line 148, in split_entity_id
raise ValueError(f"Invalid entity ID {entity_id}")
ValueError: Invalid entity ID .shelly_shdm_2_40f5200164b2

The entity ID appears to be missing the domain in front of it on the last line. @hakana - Could this point to something?

Same problem here after editing manifest Error adding entities for domain binary_sensor with platform shelly

Traceback (most recent call last):
 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 445, in _async_add_entity
    suggested_object_id = split_entity_id(entity.entity_id)[1]
  File "/usr/src/homeassistant/homeassistant/core.py", line 148, in split_entity_id
    raise ValueError(f"Invalid entity ID {entity_id}")
ValueError: Invalid entity ID .shelly_shsw_44_cc95e0_1_switch
SyncHot commented 2 years ago

Yep - my heating went down because of this :D

kastro123 commented 2 years ago

I have the same problem. Downgraded back to 2022.2.9 till working fix...

JurajNyiri commented 2 years ago

Both issues are now fixed in Release 0.3.4.

Spiffo commented 2 years ago

Thank you for the speedy fix!

BCsabaEngine commented 2 years ago

Thank you for fast response. When you have got time, please upgrade version in https://github.com/StyraHem/ShellyForHASS/blob/master/custom_components/shelly/manifest.json

kastro123 commented 2 years ago

Both issues are now fixed in Release 0.3.4.

Thank you!

SMSchiedt commented 2 years ago

Unfortunately, the error is still present. Error message identical as before. :(

paho-mqtt==1.5.1: ERROR: Cannot install paho-mqtt==1.5.1

kastro123 commented 2 years ago

Unfortunately, the error is still present. Error message identical as before. :(

paho-mqtt==1.5.1: ERROR: Cannot install paho-mqtt==1.5.1

You need to upgrade Shelly integration to 0.3.4, manually or through HACS.

srk23 commented 2 years ago

Working for me. Make sure you update the integration.

jsole commented 2 years ago

Unfortunately, the error is still present. Error message identical as before. :(

paho-mqtt==1.5.1: ERROR: Cannot install paho-mqtt==1.5.1

You need to comment the shelly configuration in config.yaml, otherwise it will not allow you to restart HA after upgrading via HACS. One rebooted uncomment the yaml shelly configuration and reboot again.

hakana commented 2 years ago

You can also reboot your host if it complains about errors in config.yaml, instead of restarting the HA core.

KoenWijnstok commented 2 years ago

Thanks! It is working now

SMSchiedt commented 2 years ago

Unfortunately, the error is still present. Error message identical as before. :( paho-mqtt==1.5.1: ERROR: Cannot install paho-mqtt==1.5.1

You need to comment the shelly configuration in config.yaml, otherwise it will not allow you to restart HA after upgrading via HACS. One rebooted uncomment the yaml shelly configuration and reboot again.

First I updated HASS (2022.3.0) and then HACS (shelly 0.3.5). The error remained. Integration error: shelly - Requirements for shelly not found: ['paho-mqtt==1.5.1'].

Commenting in, restarting and commenting out again did not change anything either.

I then made a backup and installed HACS first and then HASS, but unfortunately the problem remained.

jsole commented 2 years ago

Unfortunately, the error is still present. Error message identical as before. :( paho-mqtt==1.5.1: ERROR: Cannot install paho-mqtt==1.5.1

You need to comment the shelly configuration in config.yaml, otherwise it will not allow you to restart HA after upgrading via HACS. One rebooted uncomment the yaml shelly configuration and reboot again.

First I updated HASS (2022.3.0) and then HACS (shelly 0.3.5). The error remained. Integration error: shelly - Requirements for shelly not found: ['paho-mqtt==1.5.1'].

Commenting in, restarting and commenting out again did not change anything either.

I then made a backup and installed HACS first and then HASS, but unfortunately the problem remained.

Commenting worked for me at 1rst attempt, you can try to remove the integration, restart and install again at 0.3.5. You should not get this error at HASS 2022.3.0 without the integration, once you have verified it's working, add the ShellyForHass 0.3.5. You can also check if there's any older shellyForHass installation in your custom components folder.

scottrosendahl commented 2 years ago

My Home Assistant is version 2022.3.0, and Shelly stopped working since upgrading to 2022.3.0.

Working within directories custom_components/shelly/, I replaced manifest.json from https://github.com/StyraHem/ShellyForHASS/pull/658/files, and also replaced binary_sensor.py, cover.py, light.py, sensor.py and switch.py from https://github.com/StyraHem/ShellyForHASS/pull/660/files, then restarted Home Assistant.

It's working now!

Thanks!

SMSchiedt commented 2 years ago

You can also check if there's any older shellyForHass installation in your custom components folder.

That was exactly my problem. I still had an old version in the directory, for whatever reason. After deleting the old version, everything worked perfectly! Thank you for the many ideas for solutions and the quick help!

Finally, everything is working again! :)

archipita commented 2 years ago

I had exactly the same problem after updating to 2022.3.3. I could not update the shellyForHass extension directly, so I have removed it first. Then re-installed directly the 0.3.5 and it was working. But I still have an issue: I have 6 RGBW2 installed and now they are seen only as sensors, no more as lights. This was not the case before. I do not know if this is correlated or not. I cannot find a solution for this so far.