StyraHem / ShellyForHASS

Shelly smart home platform for Home Assistant
MIT License
616 stars 111 forks source link

ShellyPlus 2PM issue #686

Open ashmodai6 opened 2 years ago

ashmodai6 commented 2 years ago

Environment

ShellyForHASS release with the issue: 1.0.0 Last working ShellyForHASS release (if known): Home Assistant Core release with the issue: Home Assistant Core 2022.6.2 Operating environment (Home Assistant/Supervised/Docker/venv): Home Assistant Supervisor 2022.06.3

Describe the bug

ShellyPlus 2PM seems does not work properly. Screenshot 2022-06-07 at 13 08 41

Expected behavior

Capabilities listed properly...

ashmodai6 commented 2 years ago

Just for completeness the switch is not unavailable. It can be accessed properly by the webui where everything seems to be working fine. It is running the latest Firmware version: 0.10.2 Firmware build ID: 20220531-140502/0.10.2-g8a2ef01

And it is connected as well to my hass mosquito Mqtt server.

FutureRap commented 2 years ago

Have the same problem. I solved it like this: New HA without installing Shelly for Hass in the HACS. Just add the devices in the integration by hand. I hope this will be fixed in the next update

FutureRap commented 2 years ago

Have the same problem. I solved it like this: New HA without installing Shelly for Hass in the HACS. Just add the devices in the integration by hand. I hope this will be fixed in the next update

AND: Connect to Shelly 2PM per direkt wifi 192.168.33.1 and update before implement via Shelly app.

peterus commented 1 year ago

are you trying to use the cover function? or just the two switches?

FutureRap commented 1 year ago

Cover...

peterus commented 1 year ago

duplicate of #684

ashmodai6 commented 1 year ago

For me it was simply the two switches

ReimPosDac commented 1 year ago

The problem seems to persist... ShellyForHass doesn't recognize the device (Shelly Plus 2PM) as a cover, even if it is defined as such. With ShellyForHass removed, it works well. Any clue or solution?

mleiber commented 1 year ago

Just installed 2 Shelly Plus 2PM for two roller shutters - like above, they are not detected as covers but as 2 switches. I deleted all traces of them and let them be re-discovered by reloading the integration - problem persists.

I am running HA OS w/ core 2023.1.0 - problem was the same though for 2022.12.x.

I found this in the debug log when reloading the integration - maybe this is a clue of some sort.

2023-01-05 10:36:00.018 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry ShellyForHass for cover Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/cover/__init__.py", line 208, in async_setup_entry return await component.async_setup_entry(entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 166, in async_setup_entry raise ValueError("Config entry has already been setup!") ValueError: Config entry has already been setup!

Btw, there's a myriad of debug logs like this:

2023-01-05 10:36:00.027 ERROR (MainThread) [homeassistant.components.light] Platform shelly does not generate unique IDs. ID _SHSW-1_40F6205A6788_gartenbeleuchtung_ost is already used by light.gartenbeleuchtung_ost - ignoring light.gartenbeleuchtung_ost

FutureRap commented 1 year ago

Hi mleiber. Do you tried to go directy to the shelly device and turn the switch to shutter? Alle 2pm are shutter when you use for the firat time. so you have to go to the device first. there are 2 ways.

  1. when the shelly is the first time running you can connect via wlan to them directly and vist the device with the ip 192.168.33.1
    1. when your shelly is already in youre networt, visit the shelly whith that ip it has. when you dont know, you can go to your router or maybe you see the device in HA, so you visit the device from there.
mleiber commented 1 year ago

Hi @FutureRap, thanks for the hint but did all that.

The device_profile has been set to cover via the devices Web UI, as a first action. Then I added the 2 devices to the YAML configuration (using YAML, not UI based config for the Shellys), then restarted HA. They got picked up as 2 new devices but with the wrong setting. Played around by removing them completely, rebooting in between, then adding them again. Nothing seems to help.

I have dozens of gen 1 Shelly 2.5 PM devices - they all function well and got picked as us coverdevices right away.

Hmmm ?

cbakkerprive commented 1 year ago

Hmm... Same here. still no solution available?

FutureRap commented 1 year ago

Hmm... Tricky. 1.Did you updatet the device first, before adding to HA?

  1. Do you have installed Shelly for Hss via HACS? (sometime is the problem, that you have conflicts then) in that case i nstall HA NEW (deinstalling Shelly fot Hass is not enough) and then i add the devices by hand. Set in the config the commandoline for ahelly first and i am NOT installimg Shelly for Hass... let me know
mleiber commented 1 year ago

re 1. - updated and configured the shelly devices before adding it to HA/ShellyForHass. re 2. - Shelly For Hass has been installed via HACS. Not exactly sure what you mean by 'install HA NEW'. Can't simply do that, it's a sizeable installation of HA which I can't re-install easily w/o a lot of effort.

I'm not sure what you mean by saying 'I am NOT installing Shelly for Hass' - do you use the native Shelly integration ? My problem is with Shelly For Hass and not with the native implementation (which I now consider moving to ...).

thx

apedance commented 1 year ago

Having the same issue using Shelly Plus 2PM devices. Despite being configured as cover/roller/blind I see the devices as in the above mentioned screenshots. Would be nice to stay with this integration.

rinseringma commented 1 year ago

Any updates on this? I do have the same issue.

r77s commented 1 year ago

Any news about this issue?

hansblom-com commented 1 year ago

Any updates on this issue?

Ringo982 commented 1 year ago

Any update?? Why this issue is still opened? Is the integration mantenance still active?

ebs-itsoft commented 9 months ago

Any option for workaround with HA templates / configuration ?

GK-hassio commented 1 week ago

Still marked as open issue. I'm not able to use the workaround. Any solution planned for this issue?

.storage\shelly\xxxxxxx{cloud} showing different Device Type

  "e86beae5fbe8": {
    "id": "e86beae5fbe8",
    "type": "SNSW-102P16EU",
    "category": "roller",
    "position": 0,
    "gen": 2,
    "channel": 0,
    "channels_count": 1,
    "mode": "roller",
    "name": "Zonwering Keuken L",
    "room_id": 1,
    "image": "images/device_images/predefined_images/roller.png",
    "exclude_event_log": false,
    "jti": "",
    "backgroundColor": "",
    "cloud_online": true,
    "modified": 1719607513,
    "template": "SNSW-102P16EU-roller",
    "appliance_type": 14,
    "relay_usage": "roller",
    "ip": "XXX.XXX.XXX.XXX",
    "ssid": "XXXXXXXX",
    "disabled": false,
    "name_sync": true
  },

core.config_entries Below is working as Cover (Shelly 2.5)

  "10521c4593a0": {
    "id": "10521c4593a0",
    "type": "SHSW-25",
    "category": "roller",
    "position": 2,
    "gen": 1,
    "channel": 0,
    "channels_count": 1,
    "mode": "roller",
    "name": "Zonwering Werkkamer L",
    "room_id": 1,
    "image": "images/device_images/predefined_images/roller.png",
    "exclude_event_log": false,
    "bundle": false,
    "ip": "XXX.XXX.XXX.XXX",
    "modified": 1719607408,
    "cloud_online": true,
    "template": "SHSW-25-roller",
    "ssid": "XXXXXXXX",
    "consumption_type": 2,
    "disabled": false
  },