Closed fuomag9 closed 10 months ago
Hey there @home-assistant/matter, mind taking a look at this issue as it has been labeled with an integration (matter
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
matter documentation matter source (message by IssueLinks)
mDNS reflectors are known to play havoc with the IPv6 MDNS traffic used for Matter. It causes strange issues, just like you experience. Even if HA and the device(wifi) are on the same vLAN. We've seen wireshark traces where the traffic just got replicated in enormous amounts, some packets even malformed. mDNS reflectors are bad for IPv4, let alone for IPv6.
If you have an IoT (v)LAN just make sure all devices are on that LAN, including HA. Then there is no need to start forwarding multicast traffic anymore. Just keep that in its layer 2 as intended as use firewall rules if you want to limit devices.
As for pairing the Meross device. I have several of them here and they work great but sometimes require multiple attempts when commissioning. Just make sure to first factory reset before you pair to a controller. You can't use the QR code to pair to multiple controllers. Once paired to one controller you NEED to share the device from that controller to another, which basically opens the commissioning window for that device again (so sharing is not the exact right word).
If you keep experiencing issues, have a look at your switches. Check with IGMP snooping on or off. Check other settings on your network or WiFi that could potentially harm multicast traffic, such as the filters in Unifi WiFi networks.
Is it by chance one of these? I was having exactly the same issue. I'm not sure this is related but I was able to pair the plug (two of them, actually, more than once) after disabling the companion app security (pin/fingerprint). EDIT: Not related.
Sadly no power measurement over matter (yet).
Similar issue: https://github.com/home-assistant/core/issues/99857
Is it by chance one of these? I was having exactly the same issue. I'm not sure this is related but I was able to pair the plug (two of them, actually, more than once) after disabling the companion app security (pin/fingerprint).
Sadly no power measurement over matter (yet).
Yes, they are indeed the mss315 model! According to this matter 1.3 has power monitoring but there's no implementation yet? https://github.com/project-chip/connectedhomeip/issues/30193
And of course we're still relying on the manufacturer to update the firmware, which is something I'm not really hopeful about T.T
mDNS reflectors are known to play havoc with the IPv6 MDNS traffic used for Matter. It causes strange issues, just like you experience. Even if HA and the device(wifi) are on the same vLAN. We've seen wireshark traces where the traffic just got replicated in enormous amounts, some packets even malformed. mDNS reflectors are bad for IPv4, let alone for IPv6.
If you have an IoT (v)LAN just make sure all devices are on that LAN, including HA. Then there is no need to start forwarding multicast traffic anymore. Just keep that in its layer 2 as intended as use firewall rules if you want to limit devices.
As for pairing the Meross device. I have several of them here and they work great but sometimes require multiple attempts when commissioning. Just make sure to first factory reset before you pair to a controller. You can't use the QR code to pair to multiple controllers. Once paired to one controller you NEED to share the device from that controller to another, which basically opens the commissioning window for that device again (so sharing is not the exact right word).
If you keep experiencing issues, have a look at your switches. Check with IGMP snooping on or off. Check other settings on your network or WiFi that could potentially harm multicast traffic, such as the filters in Unifi WiFi networks.
I have tried with IGMP snooping on/off (was on), mDNS reflector on and off, unifi settings on and off, MLD snooping on and off, but it still does not work when using the home assistant app to pair, both on iPhone and android. If I use the google home app on android (on iOS this technique does NOT work) then I can pair the device and add it to HASS from this interface (and then remove it from google home, as I can still control it from home assistant).
Google home failing on iOS
Home assistant failing on iOS
I believe it is mostly a timeout issue, perhaps this specific model is slower than others to reply. I also noticed some messages similar to "device found but commissioning window is not open anymore" which seems to confirm a similar behavior.
My network is plain, without VLANs, mdns messages go through without problems (checked with wireshark), but Matter Server struggle to register these plugs. It's not a consistent KO anyways: after a few resets eventually I managed to pair the devices (I also reinstalled the add-on, just in case).
I believe it is mostly a timeout issue, perhaps this specific model is slower than others to reply. I also noticed some messages similar to "device found but commissioning window is not open anymore" which seems to confirm a similar behavior.
My network is plain, without VLANs, mdns messages go through without problems (checked with wireshark), but Matter Server struggle to register these plugs. It's not a consistent KO anyways: after a few resets eventually I managed to pair the devices (I also reinstalled the add-on, just in case).
When I try to pair by using the HA app, I see the device connecting to the wifi network, but then the device -> HA pairing fails as I've shown above. I'm writing this down to help devs confirm if this is the case
Ironically the google home "hack" works 100% of the time when adding the device to HA
It seems to be happening to this person as well @psychowood
https://community.home-assistant.io/t/matter-adding-meross-plug-fails/633692
I’ve expericed this issue as well with Meross MSS315. Tried to connect via Home assistant Hassio+Matter beta addon
I’ve expericed this issue as well with Meross MSS315. Tried to connect via Home assistant Hassio+Matter beta addon
Do you have a plain network configuration? (No VLANs, etc)
I run hassio on a mac as a virtual machine (bridged network).
I'm starting to think these devices are just a bit flaky and Google works around it by just retrying and retrying and retrying numerous times until it succeeds. There's not much we can do here. I'm not a fan of this keep-retrying just because we can approach. We already do a pretty large timeout and a couple of retries which is enough for all devices I've seen so far.
I'd suggest to just commission them to Google, share to HA and then remove from Google again (or not) if that works for you.
I actually should receive the Meross MS315 later this week. I'll try to reproduce this scenario once I have it on my desk.
So I have bought 2 of these and today tried to add them. Bear in mind I am fairly new to Home Assistant and wish I hadn't purchased matter devices and had stuck with zigbee.
Anyway, added the first and it worked like a dream. Popped up on my Android phone, asked me if I wanted to add it and selected to use Home Assistant to do so. Viola, added and all good.
Tried adding the second and got to the point of adding it to Home Assistant step and it failed, Asked to retry, still didn't work. Tried numerous times, reset, moved location, nothing. So tried adding via Google and it worked and added to Google Home without an issue.
I noticed @fuomag9 above suggesting
"sharing the credentials with home assistant" "The device works with home assistant"
I am a bit confused what this means. How does that work exactly? As I will try that next.
(edit: I just saw how to do that in the Google Home app and it worked, so now have them both in Home Assistant)
Anyway, now I am playing around with the plugs but cannot see anything to do with energy monitoring in either Google Home nor Home Assistant. These are MSS315 and double checked they should provide that, am I being stupid?
Thanks
So I have bought 2 of these and today tried to add them. Bear in mind I am fairly new to Home Assistant and wish I hadn't purchased matter devices and had stuck with zigbee.
Anyway, added the first and it worked like a dream. Popped up on my Android phone, asked me if I wanted to add it and selected to use Home Assistant to do so. Viola, added and all good.
Tried adding the second and got to the point of adding it to Home Assistant step and it failed, Asked to retry, still didn't work. Tried numerous times, reset, moved location, nothing. So tried adding via Google and it worked and added to Google Home without an issue.
I noticed @fuomag9 above suggesting
"sharing the credentials with home assistant"
"The device works with home assistant"
I am a bit confused what this means. How does that work exactly? As I will try that next.
Anyway, now I am playing around with the plugs but cannot see anything to do with energy monitoring in either Google Home nor Home Assistant. These are MSS315 and double checked they should provide that, am I being stupid?
Thanks
Energy monitoring is cloud only for now, there's a project for using them with local MQTT but I've not tried it yet due to lack of time. Matter 1.3 should solve this, but it's still in the works and the devices need to get a firmare update when it comes out
This interface is what I mean for "credentials sharing"
Thanks for the quick reply @fuomag9, I managed to get the second one working that way.
That's a real arse with the energy monitoring, I should have checked before buying given it was one of the main reasons for going with that model. Lesson learned!
I guess they are going to be pretty dumb smart plugs for the foreseeable future then. Annoying, as I bought these to replace two kasa hs100 plugs I had, which were great but don't work in home assistant due to tplink breaking them :-(
Suppose I will waste some more money on a few more plugs and pick ones more carefully...
Thanks again
Thanks for the quick reply @fuomag9, I managed to get the second one working that way.
That's a real arse with the energy monitoring, I should have checked before buying given it was one of the main reasons for going with that model. Lesson learned!
I guess they are going to be pretty dumb smart plugs for the foreseeable future then. Annoying, as I bought these to replace two kasa hs100 plugs I had, which were great but don't work in home assistant due to tplink breaking them :-(
Suppose I will waste some more money on a few more plugs and pick ones more carefully...
Thanks again
If you have HACS you can use the cloud Meross via this https://github.com/albertogeniola/meross-homeassistant
It has also a link to the lan only version, which I've not tried yet
Thanks for the quick reply @fuomag9, I managed to get the second one working that way. That's a real arse with the energy monitoring, I should have checked before buying given it was one of the main reasons for going with that model. Lesson learned! I guess they are going to be pretty dumb smart plugs for the foreseeable future then. Annoying, as I bought these to replace two kasa hs100 plugs I had, which were great but don't work in home assistant due to tplink breaking them :-( Suppose I will waste some more money on a few more plugs and pick ones more carefully... Thanks again
If you have HACS you can use the cloud Meross via this https://github.com/albertogeniola/meross-homeassistant
It has also a link to the lan only version, which I've not tried yet
I have taken the HACS integration route, and while I would rather keep it local this is working fine.
Thanks once more
I was also able to connect my Meross MSS315 via the HACS route but it would be nice to use the matter integration instead.
The problem
Meross Matter wifi smart plug fails to pair when added to home assistant directly
What works instead:
Note: I'm using a VLAN but both the plugs and HA are in the same VLAN, and I also have a mDNS reflector active. Pairing is done on the same vlan. Threads also works (I paired my other devices before the VLAN change in case it might be useful)
Devices works after this "strange" pairing, so I don't believe my network configuration is wrong (otherwise they won't work at all!)
Pairing with an iOS device fails completely (I don't have any hub and I don't know if that method of pairing is supported right now)
What version of Home Assistant Core has the issue?
core-2023.11.2
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Matter
Link to integration documentation on our website
https://www.home-assistant.io/integrations/matter/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
No response