lkempf/casambi-bt-hass

Casambi discovers Samsung television

Closed this issue · 0 comments

tjorim commented

Describe the bug
Last week I noticed my HA instance discovered a new Casambi light.
I tried connecting to it after enabling debug (thinking it was #27 again) but it failed.
Looking into the logs it seems like it found my new Samsung Television.

To Reproduce
Steps to reproduce the behavior:

  1. Buy a Samsung Neo QLED QN85C 55" television.
  2. Wait until HA discovers it
  3. Try to connect to it
  4. See error

Expected behavior
Casambi does not think a television is a light.

Versions

  • HA version: 2023.12.0b2
  • Integration version: b9766d6

Logs

2023-12-04 20:11:04.219 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration casambi_bt which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-12-04 20:15:50.851 DEBUG (MainThread) [custom_components.casambi_bt.config_flow] Discovery: [C8:12:0B:09:81:7D] Television from e8:9f:6d:08:ad:74.Advertisement: AdvertisementData(local_name='Television', manufacturer_data={117: b'\x02\x18\x14\xa1AZ\x88b\xe0\xf9F\x19\xeb\xe9\x00ng\x83', 963: b'm*\xb2c\xd8\xb0\n', 224: b'\x00\x93\xcaX\x93\x08'}, service_data={'0000fe9f-0000-1000-8000-00805f9b34fb': b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'}, service_uuids=['0000fe4d-0000-1000-8000-00805f9b34fb', '0000fe9f-0000-1000-8000-00805f9b34fb', '00000601-0000-1000-8000-00805f9b34fb'], tx_power=-127, rssi=-70).
2023-12-04 20:15:50.852 DEBUG (MainThread) [custom_components.casambi_bt.config_flow] Discovery: [6D:2A:B2:63:D8:B0] CBU-PWM4 RGBW from e8:9f:6d:08:ad:74.Advertisement: AdvertisementData(local_name='CBU-PWM4 RGBW', manufacturer_data={963: b'm*\xb2c\xd8\xb0\n'}, service_uuids=['0000fe4d-0000-1000-8000-00805f9b34fb'], tx_power=-127, rssi=-80).
2023-12-04 20:18:06.084 INFO (MainThread) [CasambiBt._casambi] Trying to connect to casambi network C8:12:0B:09:81:7D...
2023-12-04 20:18:06.092 INFO (MainThread) [CasambiBt._network] Getting network id...
2023-12-04 20:18:10.889 INFO (MainThread) [CasambiBt._casambi] Trying to connect to casambi network 6D:2A:B2:63:D8:B0...
2023-12-04 20:18:10.891 INFO (MainThread) [CasambiBt._keystore] Loading keys...
2023-12-04 20:18:10.900 INFO (MainThread) [CasambiBt._keystore] Loaded 4 keys.
2023-12-04 20:18:10.901 INFO (MainThread) [CasambiBt._network] Loading session...
2023-12-04 20:18:10.902 INFO (MainThread) [CasambiBt._network] Loading unit type cache...
2023-12-04 20:18:10.904 INFO (MainThread) [CasambiBt._network] Getting network id...
2023-12-04 20:18:10.954 INFO (MainThread) [CasambiBt._network] Got network id gQLL7hvDEDwJsw55c6RI25eQXEXzYeSx.
2023-12-04 20:18:10.954 INFO (MainThread) [CasambiBt._network] Updating network...
2023-12-04 20:18:10.958 INFO (MainThread) [CasambiBt._network] Loaded cached network. Revision: 21
2023-12-04 20:18:10.986 DEBUG (MainThread) [CasambiBt._network] Network: {"status":"UPTODATE","revision":21.0,"role":3}
2023-12-04 20:18:10.986 INFO (MainThread) [CasambiBt._keystore] Key with id 3 already exists. Skipping...
2023-12-04 20:18:10.986 INFO (MainThread) [CasambiBt._keystore] Key with id 4 already exists. Skipping...
2023-12-04 20:18:10.987 INFO (MainThread) [CasambiBt._keystore] Key with id 5 already exists. Skipping...
2023-12-04 20:18:10.987 INFO (MainThread) [CasambiBt._keystore] Key with id 6 already exists. Skipping...
2023-12-04 20:18:10.987 INFO (MainThread) [CasambiBt._network] Fetching unit type for id 4027...
2023-12-04 20:18:10.987 INFO (MainThread) [CasambiBt._network] Using cached type.
2023-12-04 20:18:10.987 INFO (MainThread) [CasambiBt._network] Saving type cache...
2023-12-04 20:18:10.993 INFO (MainThread) [CasambiBt._network] Network updated.
2023-12-04 20:18:10.993 INFO (MainThread) [CasambiBt._client] Connection to 6D:2A:B2:63:D8:B0
2023-12-04 20:18:11.410 INFO (MainThread) [CasambiBt._client] Connected to 6D:2A:B2:63:D8:B0
2023-12-04 20:18:11.410 INFO (MainThread) [CasambiBt._client] Starting key exchange...
2023-12-04 20:18:11.494 DEBUG (MainThread) [CasambiBt._client] Got b'010a9e000200f25cfc5df29dfde32f8288e67e5019a0bf'
2023-12-04 20:18:11.494 DEBUG (MainThread) [CasambiBt._client] Parsed mtu 158, unit 2, flags 242, nonce b'5cfc5df29dfde32f8288e67e5019a0bf'
2023-12-04 20:18:11.494 DEBUG (MainThread) [CasambiBt._client] Starting notify
2023-12-04 20:18:11.728 DEBUG (MainThread) [CasambiBt._client] Callback on handle c9ffde48-ca5a-0001-ab83-8f519b482f77 (Handle: 9): Unknown: b'0215f539687e72b9d102de893ef673f7326ad9f9ae3ffb676f4a218c303c1b45051d3fbba543d040297e9fc562d4965fc64ea802767225f6af045a7b9fccc0a800'
2023-12-04 20:18:11.729 DEBUG (MainThread) [CasambiBt._client] Got public key 2383664660246839990658164409145232915015893628853366899732760143286939284757, 298160958805870748632873230751916260302610907074547419555643965189452939037
2023-12-04 20:18:12.044 DEBUG (MainThread) [CasambiBt._client] Callback on handle c9ffde48-ca5a-0001-ab83-8f519b482f77 (Handle: 9): Unknown: b'03'
2023-12-04 20:18:12.045 INFO (MainThread) [CasambiBt._client] Key exchange sucessful
2023-12-04 20:18:12.045 INFO (MainThread) [CasambiBt._client] Authenicating channel...
2023-12-04 20:18:12.045 DEBUG (MainThread) [CasambiBt._client] Auth digest: b'1f3712eada2b514ab892a74ce433c38607965c57433c4b1622b553b66fd32a25'
2023-12-04 20:18:12.045 INFO (MainThread) [CasambiBt._encryption] Encrypting packet: b'0100000004031f3712eada2b514ab892a74ce433c38607965c57433c4b1622b553b66fd32a25' of len 38 with nonce b'5cfc5df2010000008288e67e5019a0bf'
2023-12-04 20:18:12.048 DEBUG (MainThread) [CasambiBt._encryption] Encrypted packet: b'0100000075f6e192ed3eae47f0ed8ea776e3f8f46ca6cb9da6ca2eac09b85c71f9c74d55aaa8'
2023-12-04 20:18:12.048 DEBUG (MainThread) [CasambiBt._encryption] Authenticated packet: b'0100000075f6e192ed3eae47f0ed8ea776e3f8f46ca6cb9da6ca2eac09b85c71f9c74d55aaa8ba14d1bf109e920693c7ef7ecd50c259'
2023-12-04 20:18:12.415 DEBUG (MainThread) [CasambiBt._client] Callback on handle c9ffde48-ca5a-0001-ab83-8f519b482f77 (Handle: 9): Unknown: b'0100008000648ea60a3f7bf557a1a3365167c612e293a594acac278e91a1476d7237e660356f7fa38b6d8f6bf8cba780c29a8393b319'
2023-12-04 20:18:12.415 INFO (MainThread) [CasambiBt._client] Processing authentication response...
2023-12-04 20:18:12.415 INFO (MainThread) [CasambiBt._encryption] Decrypting packet: b'0100008000648ea60a3f7bf557a1a3365167c612e293a594acac278e91a1476d7237e660356f7fa38b6d8f6bf8cba780c29a8393b319' of len 54 with nonce b'010000809dfde32f8288e67e5019a0bf'
2023-12-04 20:18:12.418 DEBUG (MainThread) [CasambiBt._encryption] Decrypted package: b'05034816816deab7bfd67185372d5c2f7798147dadfbfcfa06e58b2477d148e5bcd1'
2023-12-04 20:18:12.419 DEBUG (MainThread) [CasambiBt._client] Callback on handle c9ffde48-ca5a-0001-ab83-8f519b482f77 (Handle: 9): Unknown: b'02000080869a9cb2a13357dbec8aff415d57c78cb3950eed24b2b3d0'
2023-12-04 20:18:12.419 INFO (MainThread) [CasambiBt._client] Processing authentication response...
2023-12-04 20:18:12.419 INFO (MainThread) [CasambiBt._encryption] Decrypting packet: b'02000080869a9cb2a13357dbec8aff415d57c78cb3950eed24b2b3d0' of len 28 with nonce b'020000809dfde32f8288e67e5019a0bf'
2023-12-04 20:18:12.420 DEBUG (MainThread) [CasambiBt._encryption] Decrypted package: b'0602033300ff0000'
2023-12-04 20:18:12.421 DEBUG (MainThread) [CasambiBt._client] Callback on handle c9ffde48-ca5a-0001-ab83-8f519b482f77 (Handle: 9): Unknown: b'030000804ce9f7430a8a7510e2ed2b974b396600de12c9e5430a33a5bc68d5'
2023-12-04 20:18:12.421 INFO (MainThread) [CasambiBt._client] Processing authentication response...
2023-12-04 20:18:12.421 INFO (MainThread) [CasambiBt._encryption] Decrypting packet: b'030000804ce9f7430a8a7510e2ed2b974b396600de12c9e5430a33a5bc68d5' of len 31 with nonce b'030000809dfde32f8288e67e5019a0bf'
2023-12-04 20:18:12.422 DEBUG (MainThread) [CasambiBt._encryption] Decrypted package: b'09050202830a04840a0400'
2023-12-04 20:18:12.423 INFO (MainThread) [CasambiBt._client] Authentication successful
2023-12-04 20:18:12.423 INFO (MainThread) [CasambiBt._client] Disconnecting...
2023-12-04 20:18:12.516 INFO (MainThread) [CasambiBt._client] Received disconnect callback from 6D:2A:B2:63:D8:B0
2023-12-04 20:18:12.517 INFO (MainThread) [CasambiBt._client] Disconnected.
2023-12-04 20:18:12.521 INFO (MainThread) [CasambiBt._casambi] Trying to connect to casambi network 6D:2A:B2:63:D8:B0...
2023-12-04 20:18:12.524 INFO (MainThread) [CasambiBt._keystore] Loading keys...
2023-12-04 20:18:12.525 INFO (MainThread) [CasambiBt._keystore] Loaded 4 keys.
2023-12-04 20:18:12.526 INFO (MainThread) [CasambiBt._network] Loading session...
2023-12-04 20:18:12.528 INFO (MainThread) [CasambiBt._network] Loading unit type cache...
2023-12-04 20:18:12.529 INFO (MainThread) [CasambiBt._network] Getting network id...
2023-12-04 20:18:12.573 INFO (MainThread) [CasambiBt._network] Got network id gQLL7hvDEDwJsw55c6RI25eQXEXzYeSx.
2023-12-04 20:18:12.573 INFO (MainThread) [CasambiBt._network] Updating network...
2023-12-04 20:18:12.575 INFO (MainThread) [CasambiBt._network] Loaded cached network. Revision: 21
2023-12-04 20:18:12.618 DEBUG (MainThread) [CasambiBt._network] Network: {"status":"UPTODATE","revision":21.0,"role":3}
2023-12-04 20:18:12.619 INFO (MainThread) [CasambiBt._keystore] Key with id 3 already exists. Skipping...
2023-12-04 20:18:12.619 INFO (MainThread) [CasambiBt._keystore] Key with id 4 already exists. Skipping...
2023-12-04 20:18:12.619 INFO (MainThread) [CasambiBt._keystore] Key with id 5 already exists. Skipping...
2023-12-04 20:18:12.619 INFO (MainThread) [CasambiBt._keystore] Key with id 6 already exists. Skipping...
2023-12-04 20:18:12.620 INFO (MainThread) [CasambiBt._network] Fetching unit type for id 4027...
2023-12-04 20:18:12.620 INFO (MainThread) [CasambiBt._network] Using cached type.
2023-12-04 20:18:12.620 INFO (MainThread) [CasambiBt._network] Saving type cache...
2023-12-04 20:18:12.624 INFO (MainThread) [CasambiBt._network] Network updated.
2023-12-04 20:18:12.625 INFO (MainThread) [CasambiBt._client] Connection to 6D:2A:B2:63:D8:B0
2023-12-04 20:18:12.825 INFO (MainThread) [CasambiBt._client] Connected to 6D:2A:B2:63:D8:B0
2023-12-04 20:18:12.825 INFO (MainThread) [CasambiBt._client] Starting key exchange...
2023-12-04 20:18:12.937 DEBUG (MainThread) [CasambiBt._client] Got b'010a9e000200f2938ee36fcefb4553964c208de51d80bf'
2023-12-04 20:18:12.937 DEBUG (MainThread) [CasambiBt._client] Parsed mtu 158, unit 2, flags 242, nonce b'938ee36fcefb4553964c208de51d80bf'
2023-12-04 20:18:12.937 DEBUG (MainThread) [CasambiBt._client] Starting notify
2023-12-04 20:18:13.234 DEBUG (MainThread) [CasambiBt._client] Callback on handle c9ffde48-ca5a-0001-ab83-8f519b482f77 (Handle: 9): Unknown: b'02e88be77bef01451514e68d8a574fba25ef4bee8972519680357942e22b8c20a17915c0bebff4062563f960d50f6f0b5c056a7e54375257251fc24f9a4cc65ae6'
2023-12-04 20:18:13.234 DEBUG (MainThread) [CasambiBt._client] Got public key 72879875155572977710692027240374265142041289051430942387021240509210730925032, 104192340020964838724056831772479677799773853177530141337950952625138963584377
2023-12-04 20:18:13.492 DEBUG (MainThread) [CasambiBt._client] Callback on handle c9ffde48-ca5a-0001-ab83-8f519b482f77 (Handle: 9): Unknown: b'03'
2023-12-04 20:18:13.493 INFO (MainThread) [CasambiBt._client] Key exchange sucessful
2023-12-04 20:18:13.494 INFO (MainThread) [CasambiBt._client] Authenicating channel...
2023-12-04 20:18:13.494 DEBUG (MainThread) [CasambiBt._client] Auth digest: b'4ef47faad345bc99b50dc9ef7c61d0047a94f93ebc6d57411abc40cf02938d7a'
2023-12-04 20:18:13.495 INFO (MainThread) [CasambiBt._encryption] Encrypting packet: b'0100000004034ef47faad345bc99b50dc9ef7c61d0047a94f93ebc6d57411abc40cf02938d7a' of len 38 with nonce b'938ee36f01000000964c208de51d80bf'
2023-12-04 20:18:13.501 DEBUG (MainThread) [CasambiBt._encryption] Encrypted packet: b'01000000c1511ffc1acf77667284fa6c67f8e440375aa70863c5558a62922a1bcca388f6a47d'
2023-12-04 20:18:13.502 DEBUG (MainThread) [CasambiBt._encryption] Authenticated packet: b'01000000c1511ffc1acf77667284fa6c67f8e440375aa70863c5558a62922a1bcca388f6a47d8f8760b6618e834acb74dfb088f8db1d'
2023-12-04 20:18:13.784 DEBUG (MainThread) [CasambiBt._client] Callback on handle c9ffde48-ca5a-0001-ab83-8f519b482f77 (Handle: 9): Unknown: b'010000805b9b69201e0e69f1c15ec4f019189c59e4ff4936bc8a51a57d7c6e965de438ccd7c1e7079af45fdcea87c7cd1c5141884e2d'
2023-12-04 20:18:13.785 INFO (MainThread) [CasambiBt._client] Processing authentication response...
2023-12-04 20:18:13.785 INFO (MainThread) [CasambiBt._encryption] Decrypting packet: b'010000805b9b69201e0e69f1c15ec4f019189c59e4ff4936bc8a51a57d7c6e965de438ccd7c1e7079af45fdcea87c7cd1c5141884e2d' of len 54 with nonce b'01000080cefb4553964c208de51d80bf'
2023-12-04 20:18:13.787 DEBUG (MainThread) [CasambiBt._encryption] Decrypted package: b'0503ea4c9d140b382e991436db395650a35a213cdc0168ab6d04759baa63b5124c68'
2023-12-04 20:18:13.788 INFO (MainThread) [CasambiBt._client] Authentication successful
2023-12-04 20:18:13.789 INFO (MainThread) [CasambiBt._casambi] Registerd unit changed handler <bound method CasambiApi._unit_changed_handler of <custom_components.casambi_bt.CasambiApi object at 0x7f1ede3610>>
2023-12-04 20:18:13.868 DEBUG (MainThread) [CasambiBt._client] Callback on handle c9ffde48-ca5a-0001-ab83-8f519b482f77 (Handle: 9): Unknown: b'02000080e640c5f88933df6e0aa85856474799f98e35e498dce6f74d'
2023-12-04 20:18:13.868 INFO (MainThread) [CasambiBt._encryption] Decrypting packet: b'02000080e640c5f88933df6e0aa85856474799f98e35e498dce6f74d' of len 28 with nonce b'02000080cefb4553964c208de51d80bf'
2023-12-04 20:18:13.868 DEBUG (MainThread) [CasambiBt._encryption] Decrypted package: b'0602033300ff0000'
2023-12-04 20:18:13.870 DEBUG (MainThread) [CasambiBt._client] Incoming data of type 6: b'0602033300ff0000'
2023-12-04 20:18:13.870 INFO (MainThread) [CasambiBt._client] Parsing incoming unit states...
2023-12-04 20:18:13.870 DEBUG (MainThread) [CasambiBt._client] Incoming unit state: b'02033300ff0000'
2023-12-04 20:18:13.870 DEBUG (MainThread) [CasambiBt._client] Parsed state: Id 2, prio 3, online True, on True, state b'00ff0000'1
2023-12-04 20:18:13.870 INFO (MainThread) [CasambiBt._casambi] Incomming data callback of type 6
2023-12-04 20:18:13.870 DEBUG (MainThread) [CasambiBt._casambi] Handling changed state b'00ff0000' for unit 2
2023-12-04 20:18:13.870 DEBUG (MainThread) [CasambiBt._unit] Parsed b'00ff0000' to UnitState(dimmer=0, vertical=None, rgb=(255, 0, 0), white=0, temperature=None)
2023-12-04 20:18:13.870 DEBUG (MainThread) [custom_components.casambi_bt.light] Handling state change for unit 2
2023-12-04 20:18:13.871 DEBUG (MainThread) [CasambiBt._client] Callback on handle c9ffde48-ca5a-0001-ab83-8f519b482f77 (Handle: 9): Unknown: b'03000080fb2aa90228dc0c572c045b433a357c22217e178c5de134fff8b1bf'
2023-12-04 20:18:13.871 INFO (MainThread) [CasambiBt._encryption] Decrypting packet: b'03000080fb2aa90228dc0c572c045b433a357c22217e178c5de134fff8b1bf' of len 31 with nonce b'03000080cefb4553964c208de51d80bf'
2023-12-04 20:18:13.873 DEBUG (MainThread) [CasambiBt._encryption] Decrypted package: b'09050202830a04840a0400'
2023-12-04 20:18:13.874 DEBUG (MainThread) [CasambiBt._client] Incoming data of type 9: b'09050202830a04840a0400'
2023-12-04 20:18:21.755 INFO (MainThread) [CasambiBt._casambi] Trying to connect to casambi network C8:12:0B:09:81:7D...
2023-12-04 20:18:21.758 INFO (MainThread) [CasambiBt._network] Getting network id...