StyraHem / ShellyForHASS

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

New discovered device: Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble #652

Closed fvant closed 2 years ago

fvant commented 2 years ago

New device (my only shelly) was auto discovered, clicking Configure gives this error:

Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble

HAOS 7.4 Core 2022.2.8

robr92 commented 2 years ago

same by me

JohanLander commented 2 years ago

yes i have this too ...

PhillipRt commented 2 years ago

Seems to be related to this error message for me:

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 
thundergreen commented 2 years ago

same as: https://github.com/StyraHem/ShellyForHASS/issues/655

Ascariota commented 2 years ago

SAme issue

PhillipRt commented 2 years ago

Fixed by #658 for me

hakana commented 2 years ago

Fixed in release 0.3.4

fvant commented 2 years ago

i updated to 0.3.5 this morning, rebooted but get the same error. I have not tried removing and install it fresh

On Thu, Mar 3, 2022 at 6:02 PM Håkan Åkerberg @.***> wrote:

Fixed in release 0.3.4

— Reply to this email directly, view it on GitHub https://github.com/StyraHem/ShellyForHASS/issues/652#issuecomment-1058264839, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABITWQ5QEQJDW36MR7USIG3U6DWB3ANCNFSM5OXWHU3A . 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&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

tsparber commented 2 years ago

I am new to ShellyForHASS and thus tried to install it the first time on Home Assistant 2022.3.5. My devices are auto discovered, but cannot be set up as an error 500 Internal Server Error Server got itself in trouble is shown in the configuration screen.

ShellyForHASS v0.3.5 via HACS.

Error Log:

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 222, 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/ban.py", line 79, in ban_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 157, in get
    return await super().get(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 97, in get
    result = await self._flow_mgr.async_configure(flow_id)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 252, in async_configure
    result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 360, in _async_handle_step
    result = await self.async_finish_flow(flow, result.copy())
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 708, in async_finish_flow
    entry = ConfigEntry(
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 220, in __init__
    self.data = MappingProxyType(data)
TypeError: mappingproxy() argument must be a mapping, not NoneType
hakana commented 2 years ago

Have you restarted HA after installation of ShellyForHass?

tsparber commented 2 years ago

Yes i did a restart of HA as suggested by HACS.

I did a another search regarding the stack trace and found the similar issues #496 and #562.

Manually adding a new instance of the integration works as suggested in https://github.com/StyraHem/ShellyForHASS/issues/496#issuecomment-745570525 Search for Shelly integration and create a new instance, after a restart the auto discovered instance is removed.