Tradfri Binding: cannot create working gateway (bridge)

Hi,

I have a raspberry pi 4 with openHABian 3.2.0. OpenHAB runs, bindigs, things and items work well.

For a few days, I try to create my IKEA Tradfri things. For that, I installed the TRADFRI Binding.
My Inbox is empty, so I manually added a thing with the Tradfri Binding.
Here, I choosed tradfri:gateway (Bridge), inserted the IP of the Gateway and the security code (is printed on the label. I have read, that the print can be wrong, so I chekced the code with a QR scanner - it is right).

Now it shows:
ERROR:COMM
Status: OFFLINE
COMMUNICATION_ERROR
Error connecting to gateway.

The firmware of the Gateway is: 1.17.19

Do you need more information?

Greetz,
Jepp

1 Like

Hi, my Tradfri stopped working and can‘t add newly with the same error message. Help appreciated.

It seems my tradfri binding has also stopped functioning. Very strange. I do not get any new errors (it says the gateway doesn’t have an IP at startup, but this was never an issue before)

Wonder if it is related to TRADFRI - lost functionality

Just some info:
I’m on openhab 3.2 (which fixes gateway disconnect issue according to this Tradfri gateway not reachable after update to 1.17.19)
I have reinstalled the tradfri binding, which did not solve my problem. Maybe I should reinstall openhab, or try the testing build? Anyone who is on a similar config?

This is the events log:

[INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Outlet1_Power' received command ON
[INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Outlet1_Power' predicted to become ON
[INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Outlet1_Power' changed from OFF to ON
[INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Outlet2_Power' received command ON
[INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Outlet2_Power' predicted to become ON
[INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Outlet2_Power' changed from OFF to ON
[INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Outlet1_Power' received command OFF
[INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Outlet1_Power' predicted to become OFF
[INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Outlet1_Power' changed from ON to OFF
[INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Outlet2_Power' received command OFF
[INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Outlet2_Power' predicted to become OFF
[INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Outlet2_Power' changed from ON to OFF

But the problem is the outlets don’t change from ON to OFF or from OFF to ON in the real world.

The weird thing is, it works fine with HASS (the nemesis :wink: ), and in the IKEA TRADFRI app. So we can safely assume that openhab is part of the problem

One thing I do notice, which I didn’t before: it seems the .ItemStatePredictedEvent log entry drops the first ‘o’. Might point to a missed typo in the code?

Try settiing in openhab-console:
log:set debug org.openhab.binding.tradfri
toggle the outlet and see what shows up in the log file

Same problem here with Tradfri blinds: On OH 3.3.0.M3 I do receive status changes but cannot send commands. Debug log shows:

12:46:32.084 [INFO ] [openhab.event.ItemCommandEvent ] - Item ‘Bf_RolloNord_Position’ received command DOWN
12:46:32.084 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item ‘Bf_RolloNord_Position’ predicted to become DOWN
12:46:32.085 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Bf_RolloNord_Position’ changed from 68 to 100
12:46:32.087 [DEBUG] [.internal.handler.TradfriThingHandler] - Sending payload: {“15015”:[{“5536”:100}],“3”:null}
12:46:32.089 [DEBUG] [ng.tradfri.internal.TradfriCoapClient] - CoAP PUT request
uri: coaps://192.168.17.16:5684/15001/65538
payload: {“15015”:[{“5536”:100}],“3”:null}
12:46:32.092 [DEBUG] [g.tradfri.internal.TradfriCoapHandler] - CoAP response
options: null
payload:

when items are being updated (which works), the log shows:

12:48:58.417 [DEBUG] [g.tradfri.internal.TradfriCoapHandler] - CoAP response
options: {“Observe”:773, “Content-Format”:“application/json”, “Max-Age”:604800}
payload: {“9002”:1609267828,“9001”:“Rollo Falk Nord”,“9003”:65538,“9020”:1652287224,“9054”:0,“9019”:1,“15015”:[{“5536”:66.0,“9003”:0}],“3”:{“0”:“IKEA of Sweden”,“1”:“KADRILJ roller blind”,“2”:“”,“3”:“2.3.088”,“6”:3,“7”:4487,“9”:98,“8”:0},“5750”:7}
12:48:58.418 [DEBUG] [.internal.handler.TradfriBlindHandler] - Updating thing for blindId 65538 to state {position: 66, firmwareVersion: 2.3.088, modelId: KADRILJ roller blind, vendor: IKEA of Sweden}
12:48:58.419 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Bf_RolloNord_Position’ changed from 100 to 66

Anything I can do about it?
Thanks

Edit: FW of Tradfri Gateway is 1.17.44

Update: issue persists with OH 3.3.0.M5.

Update: restarting the gateway solved the problem.