krahabb / meross_lan

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

Discovered Devices Can't be Configured #130

Closed dellrichrichdell closed 1 year ago

dellrichrichdell commented 2 years ago

Version of the custom_component

Configuration


Add your logs here.

Describe the bug

A clear and concise description of what the bug is.

Debug log


Add your logs here.
dellrichrichdell commented 2 years ago

I have Meross Lan installed. I'm not technical, but it works well...except that two of my devices, two Meross bulbs, are not usable. The integration discovers them, after install, but when I press the configure button in each case, and then press the submit button on the already-populated popup which appears, an error message states that the devices are already configured....but they aren't, in the sense that they dont' show up anywhere that I can see in order to be able to use them.

I'd be grateful for assistance.

Thanks!

krahabb commented 2 years ago

Hello @dellrichrichdell , The first guess I could throw in is to check if there are some other, maybe hidden, unconfigured entries in your Integrations. Since the devices could be discovered both over mqtt and over dhcp it might be meross_lan wasn't able to correctly identify the same device and started duplicating the 'discoveries' I would need some more info in order to try solve this issue like:

giosud commented 2 years ago

I have a similar issue with a meross Smart Surge Protector, model MSS425e, Firmware 6.2.3, Hardware 6.0.0.

dellrichrichdell commented 2 years ago

Thanks. The devices are still paired to the meross app. I'm not sure where to see where the devices might be hidden. There are three Meross bulbs, all fine in the Meross app and in the HA Cloud IoT integration, but only one of which shows up in the LAN integration, and with the other two showing up as described above.

paolo-hub commented 2 years ago

I have the same issue. I have integrated 4 different smart plug, the integration had discovered them automatically. I have also ad other device, it is a same model of an other one that is alredy integrated. Home Assistant automatically discover this device and notify me the event, when I tray to configure it, The integration report an error that indicate that the device is already integrated.

catatonico2 commented 2 years ago

I have the same issue.

krahabb commented 2 years ago

I'll raise this issue to 'critical' even if I have to admit I've already (double) checked the code in search of bugs/issues and nothing came to mind Going for 'triple' checking ;) I might need some additional info/logs about your environments but I'll notify you in the next days when I'll be back on code

...eventually ping me up on this thread if I fall asleep

dellrichrichdell commented 2 years ago

Thanks!

On Sun, Jan 2, 2022 at 5:17 PM krahabb @.***> wrote:

I'll raise this issue to 'critical' even if I have to admit I've already (double) checked the code in search of bugs/issues and nothing came to mind Going for 'triple' checking ;) I might need some additional info/logs about your environments but I'll notify you in the next days when I'll be back on code

...eventually ping me up on this thread if I fall asleep

— Reply to this email directly, view it on GitHub https://github.com/krahabb/meross_lan/issues/130#issuecomment-1003776578, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUI2MTFFETVHQVEKFP4PPLLUUC6GXANCNFSM5JT5QFLQ . 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 were mentioned.Message ID: @.***>

JuliusdR commented 2 years ago

Same issue.

Solution from Juanfiba: https://community.home-assistant.io/t/missing-device-in-meross-lan-when-adding-it-complaints-of-device-is-already-configured/354799

"Finally solved.

I had to turn the log level on the custom.meross_lan integration to “debug”, find the IPs of the devices that gave problems in the log, and found there which unique_id they had.

They went to .storage, and deleted every entry in every file corresponding to those devices. After that, restarting homeassistant found the missing ones, and allowed to add them in the usual way.

Juan"

khs2424 commented 2 years ago

Same issue.

Solution from Juanfiba: https://community.home-assistant.io/t/missing-device-in-meross-lan-when-adding-it-complaints-of-device-is-already-configured/354799

"Finally solved.

I had to turn the log level on the custom.meross_lan integration to “debug”, find the IPs of the devices that gave problems in the log, and found there which unique_id they had.

They went to .storage, and deleted every entry in every file corresponding to those devices. After that, restarting homeassistant found the missing ones, and allowed to add them in the usual way.

Juan"

I see this as solved but I don't really understand the solution. My apologies, I'm still new when it comes to HASSIO.

How do I "turn the log level on the custom.meross_lan integration to “debug”"?

krahabb commented 2 years ago

Hello @khs2424, The issue lies in the fact that meross_lan checks for device 'uniqueness' by either macaddress and/or ipaddress i.e. if the device is already registered in HA/meross_lan by the same address it replies with the error. Of course this shouldnt happen if the device being discovered is not already registered with meross_lan but there's obviously some conflict somewhere so HA/meross_lan thinks the device is already configured (even if you can't access it on the UI)

Here's the link to enable debug logging in order to better understand what's going on under the hood and identify the 'offending' mac/ip

this forum thread has more info on how to manage this situation.

I'm sorry for the issue but I still haven't figured out how to reproduce it in order to finally solve it...I'll be back on this soon

P.S. double check in your HA there are no 'stale' meross devices and/or disabled or ignored meross_lan integrations