Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
You will need to install COAP client... I forgot from where I did instal it, sorry :( (it's long time ago)
1. Create identity:
coap-client -m post -u "Client_identity" -k "YOUR_SECURITY_CODE" -e '{"9090":"IDENTITY"}' "coaps://YOUR_GW_IP:5684/15011/9063"
2. You will get pre-sared key in response
3. Ask the gateway for info (/15011/15012 command)
coap-client -m get -u "IDENTITY" -k "YOUR_PRESHARED_KEY" "coaps://YOUR_GW_IP:5684/15011/15012"
4. You will get long response... look for number in format XXX-XX-XXX - this is your HomeKit Code!
YOUR_SECURITY_CODE - it's printet on the bottom of the gateway
IDENTITY - seems like it is an name/id of the identity... I just used the word "IDENTITY" and it worked.
YOUT_GW_IP - well, IP address :D
YOUR_PRESHARED_KEY - random characters "password" for your identity... Just keep it safe :)

This comment has been minimized.

Copy link

@hvanderlaan hvanderlaan commented Nov 1, 2017

building coap-client

git clone --depth 1 --recursive -b dtls
cd libcoap
./configure --disable-documentation --disable-shared --without-debug CFLAGS="-D COAP_DEBUG_FD=stderr"
sudo make install


This comment has been minimized.

Copy link

@jfrobs jfrobs commented Nov 1, 2017

capture d ecran 2017-11-01 a 10 36 48

Problem with your script on my Mac :/ Idea ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment