krahabb / meross_lan

Home Assistant integration for Meross devices
MIT License
443 stars 47 forks source link

The device of this entity is disabled. #386

Closed sharkpunch5 closed 5 months ago

sharkpunch5 commented 9 months ago

I have connected my Meross msg200 using the plugin (using 5.0 beta)

it adds all the entities and connects to the device however I cannot change the state, all of these devices are 'this device is disabled by config entry'

appears to be a bug, not sure how to fix

krahabb commented 9 months ago

Does it work with the latest official 'Cloudy' release?

sharkpunch5 commented 9 months ago

i could test it as i require the update that allows for 2FA when setting up (I can roll back to the most recent version that was enabled and test?)

krahabb commented 8 months ago

2FA was only recetly added and it has some issues only definitively fixed in latest beta. You could anyway leave your configuration as is (as configured with the beta) and downgrade to the latest stable 'Cloudy' The configuration will be retained and compatible so you don't need to re-enter credentials or so.

Anyway, I suspect the issue lies in a feature recently added in meross_lan to the multi-channel garage door (MSG200) following a request here which disables the garage channels when these are disabled in the app and vice-versa.

I'll test this but in the meantime you could rollback and see.

krahabb commented 8 months ago

I've experienced your same issue in my testing too but I'm not able to reproduce it anymore. I've anyway found an issue in the code the manages the entities enabling (which might have caused the issue but as I've said, it just happened once and even if retrying testing with the same 'buggy' code it didn't happen anymore)

in my tests, when it happened the config entry was disabled and the device too, I had to manually disable the config and re-enable from the HA UI in order to 'cleanup' this state.

I'll soon publish a beta updated to release the patched code

sharkpunch5 commented 8 months ago

i tried to rollback to latest official and i get a different error now however the entities are still disabled MerossDevice(Smart Garage Door (2105266257668690851548e1e971c44b)): AttributeError('NoneType' object has no attribute 'data') in handle GETACK Appliance.GarageDoor.MultipleConfig

krahabb commented 8 months ago

Yes, as in my testing, once the device appears disabled, the code is not able to recover and you have to manually disable/enable the configuration (config entry) from the meross_lan integration page.

The error you see is the only one I've discovered (and patched in beta.1) and was present since the beginning of the feature so I think it is not related (still annoying though - as said, now the beta.1 is published and fixes this)

I'm still trying to figure out where the issue lies but, since I've also seen that and then I wasn't able to reproduce it anymore, it will be hard to fix (at least at the moment :)

I'm inclined to think this issue might arise only in combination with other conditions (to me happened just when creating the device configuration - I guess it was the case for you too)

Anyway, doing the manual 'disable/enable' proved to be a solution (not a real one but...)