Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking a Tapo S505D device from a Google Nest Hub matter network #95868

Closed
vrouleau opened this issue Jul 4, 2023 · 20 comments
Closed

Linking a Tapo S505D device from a Google Nest Hub matter network #95868

vrouleau opened this issue Jul 4, 2023 · 20 comments

Comments

@vrouleau
Copy link

vrouleau commented Jul 4, 2023

The problem

I have a running Tapo S505D provisionned on my Google Nest Hub. When I try to add the S505D into Home assistant via a link in google nest hub, it create a device/entiry in home assistant but the entity is none functionnal. I get this in the Matter server logs:

2023-07-04 11:29:15 core-matter-server chip.DMG[127] ERROR Subscription Liveness timeout with SubscriptionID = 0x98e31b3c, Peer = 01:0000000000000002
2023-07-04 11:29:15 core-matter-server matter_server.server.device_controller.[node 2][127] INFO Previous subscription failed with Error: 50, re-subscribing in 0 ms...
2023-07-04 11:29:39 core-matter-server matter_server.server.helpers.paa_certificates[127] INFO Fetching the latest PAA root certificates from DCL.
2023-07-04 11:29:40 core-matter-server matter_server.server.helpers.paa_certificates[127] INFO Fetched 0 PAA root certificates from DCL.
2023-07-04 11:29:40 core-matter-server matter_server.server.helpers.paa_certificates[127] INFO Fetching the latest PAA root certificates from Git.
2023-07-04 11:29:40 core-matter-server matter_server.server.helpers.paa_certificates[127] INFO Fetched 0 PAA root certificates from Git.
2023-07-04 11:29:46 core-matter-server chip.DIS[127] ERROR Timeout waiting for mDNS resolution.
2023-07-04 11:29:50 core-matter-server chip.BLE[127] ERROR BLE scan error: src/platform/Linux/bluez/ChipDeviceScanner.cpp:154: CHIP Error 0x00000032: Timeout
2023-07-04 11:30:00 core-matter-server chip.DIS[127] ERROR OperationalSessionSetup[1:0000000000000002]: operational discovery failed: src/lib/address_resolve/AddressResolve_DefaultImpl.cpp:114: CHIP Error 0x00000032: Timeout
2023-07-04 11:30:00 core-matter-server chip.DMG[127] ERROR Failed to establish CASE for re-subscription with error 'src/lib/address_resolve/AddressResolve_DefaultImpl.cpp:114: CHIP Error 0x00000032: Timeout'
2023-07-04 11:30:00 core-matter-server matter_server.server.device_controller.[node 2][127] INFO Previous subscription failed with Error: 50, re-subscribing in 5385 ms...

I also have a Tapo P125M wall switch that works fine as a linked device in the google nest hub network

What version of Home Assistant Core has the issue?

core-2023.6.3

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

No response

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?

No response

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Jul 4, 2023

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!

Code owner commands

Code owners of matter can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign matter Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


matter documentation
matter source
(message by IssueLinks)

@marcelveldt
Copy link
Member

Are you running Home Assistant OS on dedicated hardware device or on some virtualized way ?
Also, is the home assistant host on the same (v)LAN as your devices ? No mDNS forwarder active on your network ?

This error just literally means that mDNS disovery is failing, meaning the Matter Server can not resolve your device on the network.

@vrouleau
Copy link
Author

vrouleau commented Jul 4, 2023

Haos on an intel nuc on same lan. My router dhcp gave it a name resolvable, like the working P125M

@vrouleau
Copy link
Author

vrouleau commented Jul 4, 2023

Ok, deleted my matter server and configuration in HA. Re-did the provisioning of both P125M and S505D. For the working P125M I got this in the matter server logs:

2023-07-04 12:27:08 core-matter-server matter_server.server.helpers.paa_certificates[126] INFO Fetching the latest PAA root certificates from DCL.
2023-07-04 12:27:08 core-matter-server matter_server.server.helpers.paa_certificates[126] INFO Fetched 0 PAA root certificates from DCL.
2023-07-04 12:27:08 core-matter-server matter_server.server.helpers.paa_certificates[126] INFO Fetching the latest PAA root certificates from Git.
2023-07-04 12:27:08 core-matter-server matter_server.server.helpers.paa_certificates[126] INFO Fetched 0 PAA root certificates from Git.
2023-07-04 12:27:08 core-matter-server chip.DL[126] ERROR Long dispatch time: 117 ms, for event type 2
2023-07-04 12:27:09 core-matter-server chip.BLE[126] ERROR BleConnectionDelegate::CancelConnection is not implemented.
2023-07-04 12:27:14 core-matter-server PersistentStorage[126] INFO SetSdkKey: f/1/s/0000000000000001 = b'\x150\x03\x10\xd9\t\xecrD\xf6\x89[\xb4\xd3\x87\x97\t\xb7|a0\x04 \xa8\xba#;\xa7\xd4\r\xd8\x12\xf8\x8d\xa8y\xea\xf0C\xa0_^\xc7\r9\xbe\xfd\xa1\xc3}oL\xdc\x85\xec0\x05\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18'
2023-07-04 12:27:14 core-matter-server PersistentStorage[126] INFO Committing...
2023-07-04 12:27:14 core-matter-server PersistentStorage[126] INFO SetSdkKey: g/s/2QnsckT2iVu004eXCbd8YQ== = b'\x15$\x01\x01$\x02\x01\x18'
2023-07-04 12:27:14 core-matter-server PersistentStorage[126] INFO Committing...
2023-07-04 12:27:14 core-matter-server PersistentStorage[126] INFO SetSdkKey: g/sri = b'\x16\x15$\x01\x01$\x02\x01\x18\x18'
2023-07-04 12:27:14 core-matter-server PersistentStorage[126] INFO Committing...
2023-07-04 12:27:17 core-matter-server matter_server.server.device_controller.[node 1][126] INFO Subscription succeeded
2023-07-04 12:27:18 core-matter-server chip.BLE[126] ERROR BLE scan error: src/platform/Linux/bluez/ChipDeviceScanner.cpp:154: CHIP Error 0x00000032: Timeout

For the Non-function devices/entiries S505D I got this:

2023-07-04 12:29:13 core-matter-server matter_server.server.helpers.paa_certificates[126] INFO Fetching the latest PAA root certificates from DCL.
2023-07-04 12:29:13 core-matter-server matter_server.server.helpers.paa_certificates[126] INFO Fetched 0 PAA root certificates from DCL.
2023-07-04 12:29:13 core-matter-server matter_server.server.helpers.paa_certificates[126] INFO Fetching the latest PAA root certificates from Git.
2023-07-04 12:29:13 core-matter-server matter_server.server.helpers.paa_certificates[126] INFO Fetched 0 PAA root certificates from Git.
2023-07-04 12:29:14 core-matter-server chip.BLE[126] ERROR BleConnectionDelegate::CancelConnection is not implemented.
2023-07-04 12:29:19 core-matter-server PersistentStorage[126] INFO SetSdkKey: f/1/s/0000000000000002 = b'\x150\x03\x10`\x89\x0f\xf8\n\x8e\xd0\x9f\x93@\x83O\xf2\xcb\x8d+0\x04 P\x0fk6\xef\xefS\x1c>6\x0b~\xfc\xd7\xdaF\xb3Ri\x1f\x18_\xb5\x7f\xbfQ\xac\xfb\xdc\xfe\x9a*0\x05\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18'
2023-07-04 12:29:19 core-matter-server PersistentStorage[126] INFO Committing...
2023-07-04 12:29:19 core-matter-server PersistentStorage[126] INFO SetSdkKey: g/s/YIkP+AqO0J+TQINP8suNKw== = b'\x15$\x01\x01$\x02\x02\x18'
2023-07-04 12:29:19 core-matter-server PersistentStorage[126] INFO Committing...
2023-07-04 12:29:19 core-matter-server PersistentStorage[126] INFO SetSdkKey: g/sri = b'\x16\x15$\x01\x01$\x02\x01\x18\x15$\x01\x01$\x02\x02\x18\x18'
2023-07-04 12:29:19 core-matter-server PersistentStorage[126] INFO Committing...
**_2023-07-04 12:29:20 core-matter-server chip.EM[126] ERROR OnMessageReceived failed, err = src/messaging/ExchangeMgr.cpp:304: CHIP Error 0x00000070: Unsolicited msg with originator bit clear_**
2023-07-04 12:29:22 core-matter-server matter_server.server.device_controller.[node 2][126] INFO Subscription succeeded
2023-07-04 12:29:23 core-matter-server chip.BLE[126] ERROR BLE scan error: src/platform/Linux/bluez/ChipDeviceScanner.cpp:154: CHIP Error 0x00000032: Timeout

Note the extra

**2023-07-04 12:29:20 core-matter-server chip.EM[126] ERROR OnMessageReceived failed, err = src/messaging/ExchangeMgr.cpp:304: CHIP Error 0x00000070: Unsolicited msg with originator bit clear**

@marcelveldt
Copy link
Member

Can you check again with the Home Assistant beta release 2023.7 (or wait for its stable release tomorrow) ?
Also have a good look at the logs in HA if there are any issues reported there

@vrouleau
Copy link
Author

vrouleau commented Jul 4, 2023

Never mind. Its a duplicate of #95171. Found it in the HA logs. I though that was merged 2023.6.3. I'll wait for 2023.7. Thanks

@marcelveldt
Copy link
Member

Please let me know if updating to 2023.7 fixed your issue. Thanks!

@vrouleau
Copy link
Author

vrouleau commented Jul 5, 2023

Installed 2023.7. I do not have the self._get_brightness() issue anymore in the homeassistant on linking provisioning. But now I have this in the matter server logs:

2023-07-05 15:33:26 core-matter-server matter_server.server.helpers.paa_certificates[126] INFO Fetched 0 PAA root certificates from DCL.
2023-07-05 15:33:26 core-matter-server matter_server.server.helpers.paa_certificates[126] INFO Fetching the latest PAA root certificates from Git.
2023-07-05 15:33:26 core-matter-server matter_server.server.helpers.paa_certificates[126] INFO Fetched 0 PAA root certificates from Git.
2023-07-05 15:33:26 core-matter-server chip.CTL[126] ERROR Found unconnected device, removing
2023-07-05 15:33:27 core-matter-server chip.BLE[126] ERROR BleConnectionDelegate::CancelConnection is not implemented.
2023-07-05 15:33:31 core-matter-server chip.SC[126] ERROR Received error (protocol code 2) during pairing process: src/protocols/secure_channel/CASESession.cpp:1918: CHIP Error 0x00000054: Invalid CASE parameter
2023-07-05 15:33:31 core-matter-server chip.CTL[126] ERROR Failed to perform commissioning step 20
2023-07-05 15:33:31 core-matter-server matter_server.server.client_handler[126] ERROR [140679840428176] Error handling message: CommandMessage(message_id='055efeb8a02e481ba98add72d5fb1671', command='commission_with_code', args={'code': '26532833361'})
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/matter_server/server/client_handler.py", line 188, in _run_handler
    result = await result
             ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/matter_server/server/device_controller.py", line 172, in commission_with_code
    raise NodeCommissionFailed(
matter_server.common.errors.NodeCommissionFailed: Commission with code failed for node 5
2023-07-05 15:33:36 core-matter-server chip.BLE[126] ERROR BLE scan error: src/platform/Linux/bluez/ChipDeviceScanner.cpp:154: CHIP Error 0x00000032: Timeout

Same behavior. It creates the device/entity but those dont react to switch on/off commands

@marcelveldt
Copy link
Member

I think this is a device specific issue we ned to look at, as it has been reported by others too.
Can you download a diagnostics dump from the Home Assistant device page and share it here ?

@vrouleau
Copy link
Author

vrouleau commented Jul 5, 2023

I am sorry, there is actually no device/entity created. I guess it was a left over from my last try on 2020.6.3. So after cleanup and re-try, I only have my P125M. Here is the diagnostic download for the matter integration itself. Let me know if you need something else
config_entry-matter-0e7890b48387d415ad77754314b236f8.json.txt

@marcelveldt
Copy link
Member

Well, if the device is not commissioned, the diagnostics dump is kind of useless.
If that log from above is recent, the commissioning failed at all this time, did you factory reset the device first before retrying ?

First re-commission the device again so it has a useable entity in HA. If that is done and trying to control the device still doesn't work, please get the diagnostics.

Also, would it be possible to also try in e.g. Google Home or Apple Home to see if it works there ?

@vrouleau
Copy link
Author

vrouleau commented Jul 5, 2023

Allow me to take a step back. What I have been doing so far is:

  1. Provisioning the S505D on my Google Nest Hub's matter network. That works
  2. Linking that S505D on HA's matter server. This does not.

This is have working properly with my Tapo P125M switch. a.k.a:

  1. Provisionined the P125M on my Google Nest Hub's matter network. That works
  2. Linking to P125M on HA's matter server. Also works.

So After have installed 2023.7, I did a factory reset of the S505D, re-provisionned it on Google Nest hub's matter network. Works. Then trying to link the device in HA's matter server fails with that latest log message.

So just now, I did another factory reset of the S505D. But then provisionned it on HA's matter network and that works.

So to sum up provisioning directly on HA works. But Linking on from a S505D provisionned on google nest hub's network does not. But this is the usecase I want to setup, as it works for the P125M.

@marcelveldt
Copy link
Member

Sounds like a device issue to me that it can't handle multiple fabrics.
Do you by any chance also have the possibility to try another platform such as Apple or Samsung ?

In next release we will wring the feature to share the device from HA to another fabric so that might also be an option

@vrouleau
Copy link
Author

vrouleau commented Jul 5, 2023

No, I only have a Google Nest hub as a matter broder controller . And spoke too soon. 5 minutes later, it because unavailable. I will provision it back on my google nest. Upload the diagnostic log of the now unavailable S505D provisionning in HA

s505d_unavailable
matter-0e7890b48387d415ad77754314b236f8-Smart Wi-Fi Dimmer Switch-90a036dddba7f02aad496668788a723c.json.txt

@vrouleau
Copy link
Author

vrouleau commented Jul 6, 2023

Related? project-chip/connectedhomeip#27027

@marcelveldt
Copy link
Member

No not related. Your device is commissioned but something is failing on the HA side, most probably you will see a big fat exception there.In fact, I believe someone already found out what is going on and it should be fixed shortly

@marcelveldt
Copy link
Member

#95949 fixes your issue, should be available in next patch release

@vrouleau
Copy link
Author

vrouleau commented Jul 7, 2023

FYI, the linked provisionning now works with 2023.7.1. Thanks

@MartinHjelmare
Copy link
Member

Should we close the issue?

@vrouleau
Copy link
Author

vrouleau commented Jul 7, 2023

Yes, you can close the issue. Thanks

@vrouleau vrouleau closed this as completed Jul 7, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Aug 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants