Closed mthompson2 closed 4 years ago
I got the same problem when I tried the library the other day but haven't got around to report yet. It was due to miss-spelled PSK (mixed up small cap L with large cap I).
Hi, Thanks for the reply.
I presume the gateway key printed on the botttom of the Tradfri hub? Ive checked it and rechecked the code and think i have it right... Still doesn't work though.
Was wondering if it was something to do with my Unifi network - But it doesnt seem to be. Have connected directly between PC and Trdfri via a generic, dumb switch (Third port to Unifi network) and still no joy. The Idea / Tradfri App works fine though from my android phone.
Tearing my hair out on this one.
The problem you described seems to be that your app (code) doesn't get the response from the gateway. Yet it can be the request itself that doesn't reach the gateway at all, or it can be that you don't get a response. Any way I think it is something in the networking, either specific PC network/firewall settings, or network internally or the gateway maybe has stuck in some mode. Most probable cause would be the PC as you already said that Android app works fine. Can you try on another PC with compiled app.
Apologies for the delay responding. Was needed to be away from home for several days. I will get this tested in the next couple of days and report back.
Closing due to inactivity..
Environment Visual Studio 2019 on Windows 10 Tradfri Gateway version 1.9.27 with DHCP IP 10.1.5.7
Code that fails tradfriController = new TradfriController("GW", "10.1.5.7"); TradfriAuth appSecret = tradfriController.GenerateAppSecret("XXXXXXXXX", "Tradfri");
Where XXXXXXXXX is the gateway secret from the back of the gateway.
On execution the code hangs for about 30 seconds. When it returns appSecret is null.
I can ping 10.1.5.7. The Idea Tradfri App works fine.
Any suggestions of what im doing wrong if this isnt a bug would be hugely appreciated.
Thanks.