triggering ikea tradfri gateway on debian

Get the IP with arping. Then trigger the gateway to retuen you a passkey for a username you can define:

# coap-client -m post -u Client_identity -k "SECURITYCODE_PRINTED_ON_DEVICE" -e "{\"9090\":\"A_USERNAME_YOU_WANT\"}" -m post "coaps://THE_GW_IP:5684/15011/9063"

Get a list of paired devices from your gateway:

# coap-client -m get -u "THE_USERNAME_YOU_HAVE_CHOSEN" -k "THE_PASSKEY_FOR_THAT_USER_YOU_GOT_FROM_THE_GW" "coaps://THE_GW_IP:5684/15001"

Get props of a device:

# coap-client -m get -u "THE_USERNAME_YOU_HAVE_CHOSEN" -k "THE_PASSKEY_FOR_THAT_USER_YOU_GOT_FROM_THE_GW" "coaps://THE_GW_IP:5684/15001/THE_DEVICE_ID"

Set devices props:

# coap-client -m put -u "THE_USERNAME_YOU_HAVE_CHOSEN" -k "THE_PASSKEY_FOR_THAT_USER_YOU_GOT_FROM_THE_GW" -f A_FILE_CONTAINING_THE PROPS_IN_JSON_STYLE" coaps://THE_GW_IP:5684/15001/THE_DEVICE_I
Advertisement

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.