albertogeniola / meross-homeassistant

Custom component that leverages the Meross IoT library to integrate with Homeassistant
MIT License
719 stars 82 forks source link

Meross plugs stopped working, cannot upgrade beyond v1.0.7 #372

Closed sicarumba closed 2 years ago

sicarumba commented 2 years ago

Describe the bug Older versions of the integration work as far as allowing Meross credentials to be entered, it sees the devices, but they can no longer be activated and their status cannot be seen. Newer versions of the integration don't allow Meross credentials to be entered.

I tried older versions, up to and including 1.0.7; I install them by copying the meross_cloud directory over to the custom_components directory and then rebooting the home assistant just to be sure. When I add a new integration and find the Meross Cloud option, it pops up the credentials screen and I can enter my stuff. It sees the plug sockets on my account and adds them as entities, but when I try to act on them it says "failed to call".

Any version 1.1.x or newer, I follow the same procedure but when I add new integration and select Meross Cloud, it just returns me to the selection screen without taking my credentials and it does not add the integration. I just wondered if there was something different I need to be doing to allow the newer version to be used? I am aware the simple option is to upgrade HA but I am trying to avoid doing that for now, as I still use old GPIO / pilight integrations and it was a pain in the arse to get working from scratch last time.

I'm quite happy to accept I need to upgrade and so technically this is not a bug, but would appreciate any info before I take the plunge.

Your environment HomeAssistant version: Home Assistant 2021.1.5 Hassio Version (if applicable): n/a on Raspbian GNU/Linux 10 (buster) Hardware environment: Raspberry Pi 3 Model B Plus Rev 1.3

Logs taken when the issue happened

no logs
xKronyx commented 2 years ago

Same here !

albertogeniola commented 2 years ago

Hi guys! please do as follows:

  1. remove the entire directory meross_cloud within custom_components
  2. reboot HA
  3. install the custom component again
  4. reboot HA

Does it solve it?

xKronyx commented 2 years ago

Yes it's working ! Thanks !

albertogeniola commented 2 years ago

Glad it did the trick! I'm closing the issue.

sicarumba commented 2 years ago

Hi, sorry but could you please reopen this? I'm glad it worked for xKronyx but it has not worked for me. I've tried a few times :

remove the entire directory meross_cloud within custom_components reboot HA install version 1.0.7 of the custom component again by copying the meross_cloud directory to custom_components reboot HA result : I am able to add the integration, enter my credentials and I see my plugs. I cannot action them, I get "failed to call switch"

remove the entire directory meross_cloud within custom_components reboot HA install version 1.2.2 of the custom component again by copying the meross_cloud directory to custom_components reboot HA result : cannot add the integration. entering meross on the add integration page takes me straight back to the add integration page

remove the entire directory meross_cloud within custom_components reboot HA install the custom component again with no copying, just add from the add integration page of HA reboot HA result : cannot add the integration. entering meross on the add integration page takes me straight back to the add integration page

sicarumba commented 2 years ago

In the log files I found this, does it mean anything to you?

Logger: homeassistant.config_entries Source: config_entries.py:540 First occurred: 19:31:19 (1 occurrences) Last logged: 19:31:19

Error occurred loading configuration flow for integration meross_cloud: cannot import name 'ConfigEntryAuthFailed' from 'homeassistant.exceptions' (/srv/homeassistant/lib/python3.7/site-packages/homeassistant/exceptions.py)

eskalera commented 1 year ago

Hi @sicarumba,

Same here with similar error:

Source: config_entries.py:711
First occurred: 17:38:49 (1 occurrences)
Last logged: 17:38:49

Error occurred loading configuration flow for integration meross_cloud: cannot import name 'SelectSelectorConfig' from 'homeassistant.helpers.selector' (/usr/src/homeassistant/homeassistant/helpers/selector.py)

Did you find any solution?

sicarumba commented 1 year ago

Hi @eskalera

No sorry, some other guy hijacked the question and @albertogeniola closed it when the solution worked for him. I ended up biting the bullet and building Home Assistant again from scratch.

albertogeniola commented 1 year ago

Hi! Is this still happening? In case, can you post the logs about the error?

Thanks

sicarumba commented 1 year ago

It's not happening for me, since the issue was closed so I had to go through to pain of rebuilding HA from scratch to get the new release working. It may be happening for @eskalera though.

eskalera commented 1 year ago

Yes, it is happening to me after I upgraded homeassistant to latest stable version (2022.11.2). I upgraded by deleting old container and installing from scrath, several times, always with the same result regarding meross integration.

The logs don't say much more than what I already said:

Logger: homeassistant.config_entries
Source: config_entries.py:711

Error occurred loading configuration flow for integration meross_cloud: cannot import name 'SelectSelectorConfig' from 'homeassistant.helpers.selector' (/usr/src/homeassistant/homeassistant/helpers/selector.py)
eskalera commented 1 year ago

I made it work by downgrading meross-cloud to v1.2.4 since I noticed this is the last release not using SelectSelectorConfig. It seems my Container installation does not have that class. I get a bit lost with differences between Core and Container versions of homeassistant.