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

Error listing the pairings #227

Open
stefandima opened this issue Nov 30, 2024 · 1 comment
Open

Error listing the pairings #227

stefandima opened this issue Nov 30, 2024 · 1 comment

Comments

@stefandima
Copy link

After pairing with Aqara FP2 and adding a pairing, when list of pairing are requested the response is empty.

Step to reproduce:

await client.pairSetup(config.devicePIN, pairMethod);
const identifier = 'abcdefg';
const seed = Buffer.from(sodium.randombytes_buf(32));
const key = sodium.crypto_sign_seed_keypair(seed);
const isAdmin = false;
await client.addPairing(identifier, Buffer.from(key.publicKey), isAdmin);
const tlv = await client.listPairings();
console.log(JSON.stringify(tlv, null, 2));

The response is: {}

Logs:

  hap-controller:http-client 192.168.1.123:55970 Start Pair-Verify process ... +1ms
  hap-controller:tlv Add 1 bytes for tag 6: 01 +1ms
  hap-controller:tlv Add 32 bytes for tag 3: 5847575bcd5494befd36eaaf2e57d3b6c3e4d714780b6180a19b8a09ba3c7854 +0ms
  hap-controller:http-connection 192.168.1.123:55970 POST /pair-verify 06010103205847575bcd5494befd36eaaf2e57d3b6c3e4d714780b6180a19b8a09ba3c7854 (application/pairing+tlv8) +2ms
  hap-controller:http-connection 192.168.1.123:55970 Response 200 with 140 byte data +2s
  hap-controller:tlv Read 1 bytes for tag 6: 02 +2s
  hap-controller:tlv Read 32 bytes for tag 3: 7b6d30194e96cc15049392e3a9a50cd2a7b0a41c089939d1a275035da305364e +0ms
  hap-controller:tlv Read 101 bytes for tag 5: f5b3f73ed5a07890fc083e5f399a1feb7fbc104bba86b65abb27e66285f555aa1aab0ce6c51a0dda5338d48031adbf173c5b9e2baa77e642693f62df6022841e97800dcd7c1a95815f266a025f56eb50cc71a6ab946853dc8c48fd6a8bc2f87b695cb78abc +0ms
  hap-controller:tlv Read 17 bytes for tag 1: 41333a33423a30443a34373a46453a3330 +0ms
  hap-controller:tlv Read 64 bytes for tag 10: c17369033094d552ee10e7fb2aa2715c03967a64743e9c4ec8ab3d6e1d6eb876f60dddfe9f3aa4c949853e407e73ff82715e190dc41144b7b97d0605caacdd0a +0ms
  hap-controller:tlv Add 36 bytes for tag 1: 35313037663835392d326663332d343739302d396462322d613639313861363763313931 +1ms
  hap-controller:tlv Add 64 bytes for tag 10: 0650e26703d487d00651cbc4e83785690669f7733ae3c8ff84d0f8aaae335debf16e4ad0630329922999691fea23cb45ae26709b93e1188c114bc8e131510900 +0ms
  hap-controller:tlv Add 1 bytes for tag 6: 03 +0ms
  hap-controller:tlv Add 120 bytes for tag 5: 932e8ada5b25b45d5bc22c8f374f55935b870d5b038b0f648227ba9aa7c7d7bd9bbf8a836405780679c4dca23d02345fdfba318561857d802fe9f393910d1d84d7311fb233c3543d2ad86877f11554e3fb3411fc5475c819164b5631888eb5fd3096f2cb011ee4972687e041f30483779e1df0a81c23122f +0ms
  hap-controller:http-connection 192.168.1.123:55970 POST /pair-verify 0601030578932e8ada5b25b45d5bc22c8f374f55935b870d5b038b0f648227ba9aa7c7d7bd9bbf8a836405780679c4dca23d02345fdfba318561857d802fe9f393910d1d84d7311fb233c3543d2ad86877f11554e3fb3411fc5475c819164b5631888eb5fd3096f2cb011ee4972687e041f30483779e1df0a81c23122f (application/pairing+tlv8) +1ms
  hap-controller:http-connection 192.168.1.123:55970 Response 200 with 3 byte data +580ms
  hap-controller:tlv Read 1 bytes for tag 6: 04 +580ms
  hap-controller:http-client 192.168.1.123:55970 Finished Pair-Verify process ... +2s
  hap-controller:http-client 192.168.1.123:55970 New new connection client initialized +0ms
  hap-controller:tlv Add 1 bytes for tag 6: 01 +3ms
  hap-controller:tlv Add 1 bytes for tag 0: 03 +1ms
  hap-controller:tlv Add 7 bytes for tag 1: 61626364656667 +0ms
  hap-controller:tlv Add 32 bytes for tag 3: fbc18e30992d27a82cfa37f978d4e4ddc69a7c102cac9600d0675cb2195bfed9 +0ms
  hap-controller:tlv Add 1 bytes for tag 11: 00 +0ms
  hap-controller:http-connection 192.168.1.123:55970 POST /pairings 0601010001030107616263646566670320fbc18e30992d27a82cfa37f978d4e4ddc69a7c102cac9600d0675cb2195bfed90b0100 (application/pairing+tlv8) +5ms
  hap-controller:http-connection 192.168.1.123:55970 Response 200 with 3 byte data +274ms
  hap-controller:tlv Read 1 bytes for tag 6: 02 +275ms
  hap-controller:http-client 192.168.1.123:55970 Close client connection +279ms
pairing added
  hap-controller:http-client 192.168.1.123:55970 Start Pair-Verify process ... +0ms
  hap-controller:tlv Add 1 bytes for tag 6: 01 +1ms
  hap-controller:tlv Add 32 bytes for tag 3: c9fd396017e97e08048d60de1382f28dbe49ee22ce74984b4c86646ea4fdce27 +0ms
  hap-controller:http-connection 192.168.1.123:55970 POST /pair-verify 0601010320c9fd396017e97e08048d60de1382f28dbe49ee22ce74984b4c86646ea4fdce27 (application/pairing+tlv8) +2ms
  hap-controller:http-connection 192.168.1.123:55970 Response 200 with 140 byte data +1s
  hap-controller:tlv Read 1 bytes for tag 6: 02 +1s
  hap-controller:tlv Read 32 bytes for tag 3: 9648e557ddd4879e50a1c96c9a99bc866b9dd5196969044aae7c173c3a1fca28 +1ms
  hap-controller:tlv Read 101 bytes for tag 5: 82eaf089b62f09ba436a2d1bdc165bef9313dda6828f9d8eb63c5d192b4e55b875d438d3a6baf34b767ff3bc6d7081625840138c9f43d481149d85995a3b734a8ead4f8580fbc6c4ce0066303ca616a6109c590310c27a46072304ebeafeeb68edcd7c64c1 +0ms
  hap-controller:tlv Read 17 bytes for tag 1: 41333a33423a30443a34373a46453a3330 +1ms
  hap-controller:tlv Read 64 bytes for tag 10: d0a70f3f4c27784ef457467c7994080e00bc1cc41a07e310ec27ba0a591b455eb0820c9d3c7e9fce7b46c6e4069143c9e733fc52133210ab0c8c8c8981919b02 +0ms
  hap-controller:tlv Add 36 bytes for tag 1: 35313037663835392d326663332d343739302d396462322d613639313861363763313931 +0ms
  hap-controller:tlv Add 64 bytes for tag 10: 91ecfed11d2e3109897594a6a9ede523d66bf9026005f13afd961e9193c9b48cbdd54a31dcf69d7d5158e4ec7dd05215f173ab6646fe2b2609bb5d2c83241e09 +0ms
  hap-controller:tlv Add 1 bytes for tag 6: 03 +1ms
  hap-controller:tlv Add 120 bytes for tag 5: 98a7da546833206117fc796497cbc97deaeb52fc1a7026b7685ab6a8c438818967cec8d7182f1e459d5b322d394324cefcc410936be3ad63c405c8aa119932aa1ed8868741da1a20962b263519cb5cdfc466165d725acf9099b71128a051abe3bcb1b3676d3a9e1ecbd3ff292ea92d566bc583d2e4b55591 +0ms
  hap-controller:http-connection 192.168.1.123:55970 POST /pair-verify 060103057898a7da546833206117fc796497cbc97deaeb52fc1a7026b7685ab6a8c438818967cec8d7182f1e459d5b322d394324cefcc410936be3ad63c405c8aa119932aa1ed8868741da1a20962b263519cb5cdfc466165d725acf9099b71128a051abe3bcb1b3676d3a9e1ecbd3ff292ea92d566bc583d2e4b55591 (application/pairing+tlv8) +3ms
  hap-controller:http-connection 192.168.1.123:55970 Response 200 with 3 byte data +341ms
  hap-controller:tlv Read 1 bytes for tag 6: 04 +342ms
  hap-controller:http-client 192.168.1.123:55970 Finished Pair-Verify process ... +2s
  hap-controller:http-client 192.168.1.123:55970 New new connection client initialized +0ms
  hap-controller:tlv Add 1 bytes for tag 6: 01 +0ms
  hap-controller:tlv Add 1 bytes for tag 0: 05 +0ms
  hap-controller:http-connection 192.168.1.123:55970 POST /pairings 060101000105 (application/pairing+tlv8) +1ms
  hap-controller:http-connection 192.168.1.123:55970 Response 200 with 126 byte data +100ms
  hap-controller:tlv Read 1 bytes for tag 6: 02 +101ms
  hap-controller:tlv Read 36 bytes for tag 1: 35313037663835392d326663332d343739302d396462322d613639313861363763313931 +0ms
  hap-controller:tlv Read 32 bytes for tag 3: ac93b2620418bf6a32e497848863596cf61d3cf3b821df526998a5fc84bd3656 +0ms
  hap-controller:tlv Read 1 bytes for tag 11: 01 +0ms
  hap-controller:tlv Read 0 bytes for tag 255:  +0ms
  hap-controller:tlv Read 7 bytes for tag 1: 61626364656667 +1ms
  hap-controller:tlv Read 32 bytes for tag 3: fbc18e30992d27a82cfa37f978d4e4ddc69a7c102cac9600d0675cb2195bfed9 +0ms
  hap-controller:tlv Read 1 bytes for tag 11: 00 +0ms
  hap-controller:http-client 192.168.1.123:55970 Close client connection +103ms
{}

P.S.: I will try to investigate my self.

@Apollon77
Copy link
Owner

The result is a Map, stringify a Map is getting exactly this result. just try to "console.log(tlv)" and you should get more details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants