dominicusmento / CSharpTradFriLibrary

This is a .NET Standard (2.0) library to communicate with the IKEA Home (Tradfri) ZigBee-based Gateway.
GNU General Public License v3.0
37 stars 20 forks source link

[BUG] - Unable to connect to gateway #46

Closed gardebring closed 4 years ago

gardebring commented 4 years ago

Describe the bug I have a newly installed IKEA gateway up and running on my local network. I have one smart blind with the repeater working and the IKEA app works as expected. When I try to run the example code, the connection to the gateway eventually times out and I end up on row 172 in TradfriController.cs

To Reproduce Steps to reproduce the behavior:

  1. Setup a fresh IKEA gateway with one IKEA smart blind connected
  2. Download a fresh repo of the CSharpTradFriLibrary
  3. Fix the missing Restsharp reference issue (I already sent a PR for this)
  4. Try and run the following code:
    
    var controller = new TradfriController("my-gw", "1.2.3.4"); // Replace with actual IP
    TradfriAuth appSecret = controller.GenerateAppSecret("GatewaySecret", "ApplicationName");

The code ends up with a timeout exception in the GenerateAppSecret method on row 172 in TradfriController.cs:

if (r.IsTimedOut) throw new Exception("Timeout Generating App Secret.");


**Expected behavior**
I would expected to get a generated app secret back

**Desktop (please complete the following information):**
 - OS: Windows 10 Pro
 - Browser: Chrome based Edge

**IKEA Tradfri Gateway (please complete the following information):**
 - Firmware Version: 1.10.36 (according to the IKEA app)
vbtiger commented 3 years ago

@gardebring Did you solve this? Why did you close it?