core: Manual Shelly integration via IP failing

The problem

  • I installed a Shelly Plus 1PM module and updated it from version 0.10.0 to the newest available version 0.10.1.
  • It was not automatically discovered by HomeAssistant.
  • I tried to add the integration manually by typing in the IP address of the device on the network.
  • After clicking the submit button the dialog box cleared, showed no information or response. Closing it was the only option.
  • Device was not added.

I caputed network traffic using debug tools: Route: /api/config/config_entries/flow Response:

{
    "type": "form",
    "flow_id": "85209435db17d06a9af74786a1bce24d",
    "handler": "shelly",
    "step_id": "user",
    "data_schema": [
        {
            "type": "string",
            "name": "host",
            "required": true
        }
    ],
    "errors": {},
    "description_placeholders": null,
    "last_step": null
}

Route: /api/config/config_entries/flow/85209435db17d06a9af74786a1bce24d Response:

{
    "type": "abort",
    "flow_id": "85209435db17d06a9af74786a1bce24d",
    "handler": "shelly",
    "reason": "already_in_progress",
    "description_placeholders": null
}

I factory reset the Shelly Plus 1PM device and recreated described behaviour on clean install of HomeAssistant on a Raspberry Pi. So it could not have beeing processed already.

What version of Home Assistant Core has the issue?

core-2022.5.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Shelly

Link to integration documentation on our website

https://www.home-assistant.io/integrations/shelly/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2022-05-09 00:04:01 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 205, in async_init
    flow, result = await task
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 232, in _async_init
    result = await self._async_handle_step(flow, flow.init_step, data, init_done)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 335, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/shelly/config_flow.py", line 221, in async_step_zeroconf
    self.device_info = await validate_input(self.hass, self.host, self.info, {})
  File "/usr/src/homeassistant/homeassistant/components/shelly/config_flow.py", line 64, in validate_input
    "model": rpc_device.model,
  File "/usr/local/lib/python3.9/site-packages/aioshelly/rpc_device.py", line 224, in model
    return cast(str, self.shelly["model"])
KeyError: 'model'

Additional information

  • After failing to integrate the Shelly Plus 1PM module I installed a Shelly Plus 2PM module (parallel, not instead).
  • It was automatically discovered by Home Assistant.

Only difference is, that I did not update the 2PM Module from Version 0.10.0 to version 0.10.1.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 22 (10 by maintainers)

Most upvoted comments

Hello there. Next week we (Shelly) would release a firmware for Plus1PM that would resolve this issue.

I will post here once ready.

Sorry for the inconvenience.

“type”:“SHSW-1”, “mac”:“xxxxxxxxxxxx”, “auth”:true, “fw”:“20220209-092750/v1.11.8-g8c7bb8d”, “discoverable”:true, “longid”:1, “num_outputs”:1

Please crate a separate issue, Gen1 devices are not related

@thecode

IPs are handled via DHCP. There is no conflict.

Response:

{
  "name": null,
  "id": "shellyplus1pm-xxx",
  "mac": "xxx",
  "gen": 2,
  "fw_id": "20220330-151110/0.10.1-g8d603a2",
  "ver": "0.10.1",
  "app": "Plus1PM",
  "auth_en": false,
  "auth_domain": null
}

Thanks for your support. I will contact support once I have time for it later that day. If they tell me something interesting I will leave another comment here.