Giter Site home page Giter Site logo

Comments (8)

glenndehaan avatar glenndehaan commented on August 18, 2024

I have not seen this issue before on my side. Now I do know that once in a while an IKEA update just bricks my gateway and destroys all connections. Even connections with home assistent and Google Home. Also the app won't work unless I reboot the gateway and that will reset the identities.

So i'm not sure on this one.

from ikea-tradfri-coap-docs.

sonic74 avatar sonic74 commented on August 18, 2024

I have to reboot it after DHCP server reboots so the symbolic hostname works again. I did this both by powercycling and by
coap-client -m post -u "$TF_USERNAME" -k "$TF_PRESHARED_KEY" "coaps://$TF_GATEWAYIP:5684/15011/9030"
But for me, the identities stay in place and are not reset.

from ikea-tradfri-coap-docs.

glenndehaan avatar glenndehaan commented on August 18, 2024

Huh oke well that could maybe then be a defect in my unit  🤣.
Then I would suggest using a uuid as the identity and then create a script that will renew the key after 4 to 6 weeks.
I am however curious how many keys it will keep in storage then.

from ikea-tradfri-coap-docs.

sonic74 avatar sonic74 commented on August 18, 2024

I just realized I can do
coap-client -m post -u "Client_identity" -k "$TF_GATEWAYCODE" -e "{\"9090\":\"$TF_USERNAME\"}" "coaps://$TF_GATEWAYIP:5684/15011/9063"
with the old username after it expired. So I could just do it every time and ignore the
4.00
it returns if it's still valid and only store the PSK if it's returned.

from ikea-tradfri-coap-docs.

glenndehaan avatar glenndehaan commented on August 18, 2024

mmm Oke thats new since I know from testing way back that didn't work. But maybe they changed that in an update.

from ikea-tradfri-coap-docs.

sonic74 avatar sonic74 commented on August 18, 2024

Something like

TF_USERNAME=sonic
TF_GATEWAYCODE=0Aa000AaaAaaaAAA
TF_GATEWAYIP=GW-A0A0A0A000A0.
TF_PRESHARED_KEY=$(coap-client -m post -u "Client_identity" -k "$TF_GATEWAYCODE" -e "{\"9090\":\"$TF_USERNAME\"}" "coaps://$TF_GATEWAYIP:5684/15011/9063" | sed -n 2p | jq -r '."9091"')
if [ -z "$TF_PRESHARED_KEY" ]
then
        TF_PRESHARED_KEY=$(cat /tmp/tradfri-PSK.txt)
else
        echo $TF_PRESHARED_KEY >/tmp/tradfri-PSK.txt
fi
echo TF_PRESHARED_KEY=$TF_PRESHARED_KEY

I'll see in 6 weeks whether it works :-)

from ikea-tradfri-coap-docs.

glenndehaan avatar glenndehaan commented on August 18, 2024

Cool yeah if it works please create a pull request so it can be documented

from ikea-tradfri-coap-docs.

sonic74 avatar sonic74 commented on August 18, 2024
Oct 13 02:44:31 ALRT 20 invalidate peer
Oct 13 02:44:31 WARN received alert, peer has been invalidated

Damn, still doesn't work with 1.11.0047 ...

from ikea-tradfri-coap-docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.