ffleurey / ThingML-Tradfri

Interfaces with the IKEA Tradfri smart lighting gateway
Apache License 2.0
37 stars 9 forks source link

Can't connect #3

Open NeCkEr opened 4 years ago

NeCkEr commented 4 years ago
Screenshot 2019-11-16 at 15 56 45

Any help? :/

danielsmidt commented 4 years ago

Same issue...

SchweizerP commented 4 years ago

Did anyone find the solution for this issue? I have exactly the same problem.

AndiGloor commented 4 years ago

Check if your API User still exists on the gateway. Maybe you haveto create a new one.

For myself, I'v had to much problems with the original ikea gateway. Got locked out by the API-User Firmware-Change, Gateway lost my API-User a few times and last month it lost the whole configuration including any device-pairing. So i changed to zigbee2mqtt. To be clear: this replaces your ikea gateway, COAP interface replaced by MQTT and you loose App-Connectivity by IKEA. But it opens you a different world and allows you going much futher in homeautomation.

SchweizerP commented 4 years ago

Problem sloved! For understanding the issue, see at this comment: [https://github.com/ggravlingen/pytradfri/issues/90]

Steps to resolve the issue:

  1. Create a new PRE_SHARED_KEY with a new IDENTITY sting. (see the issue#90)
  2. Use the received PRE_SHARED_KEY as security_key (main class) or jTextFieldKey (MainFrame class)
  3. Into function initCoap(), add the used IDENTITY string from step 1 into the line: builder.setPskStore(new StaticPskStore(IDENTITY, security_key.getBytes()));