eriklupander / tradfri-go

Go client for talking to the Ikea trådfri gateway

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dtls timed out

raqbit opened this issue · comments

I'm able to use tradfri-go --authenticate to authenticate to the gateway and the config.json file has been created.
But, when trying to start the server I get this error after a couple of seconds:

Running in server mode on :8080
Connecting to peer at <ip:port>
Unable to connect to Gateway at <ip:port>: dtls: timed out waiting for handshake to complete

I'm getting the same error with https://github.com/barnybug/go-tradfri, so the error might be related to the shared dlts library.

Do you know what might cause this?

commented

Hi, sorry for not getting back earlier.

It's hard to say, seems a bit weird if you can authenticate and get a key back (written to the json file), but not complete the handshake when subsequently trying to connect with your new key.

Sorry I can't be of more help.

Hi,

I had the same issue today. Had the server running and authorized on one machine and then authorized with a different client id on another machine. The server on the second machine always responded with a 500 and dtls timed out.
After letting the second server run with the config file from server one, everything was fine.

Did not dig into this one yet, but maybe multiple keys cause this issue?

commented

Hi,

I've seen that one can only perform the key exchange once per client-id, but I don't think my gateway has an issue using an "old" client-id after performing an exchange for another client-id.

Wouldn't make sense since I think each device you want to use with your Tradfri things (different phones, tablets etc) probably uses a unique generated client-id.

I don't have access to my Tradfri stuff at the moment, but will try to reproduce your issue once I have.

Thanks for letting me know about your issue!

Hi,

bit off topic, but I would love to add grpc support for your project. I have been working on that yesterday and hope to finish it this week. Is that something you are interested in?
I am working on some webhooks for my smart home integration and would really like my own API being REST and all the integrations working via grpc.

Greetings,
Ann-Katrin

commented

Hi,

bit off topic, but I would love to add grpc support for your project. I have been working on that yesterday and hope to finish it this week. Is that something you are interested in?
I am working on some webhooks for my smart home integration and would really like my own API being REST and all the integrations working via grpc.

Greetings,
Ann-Katrin

Hi, grpc support sounds great. Feel free to submit a Pull Request once you're ready. Much appreciated!

// Erik

commented

Closing this issue since it's really old.