Tradfri 1.8.25 - offline - communication_error

I solved part of the problem: my gateway is online now, thanks to the modification of the things file with the identity property, but none of my lightbulb is no longer responding.
when i use the ikea application by changing the intensity i see the change in openhab but openhab does not have control over it, when i turn it off through OH nothing happens

I resolved it by turning on all lights manually, then reboot the gateway, then the app ask me to rescan the serial number…For helping

I am curious if this will be fixed in the plugin in the next upcoming release maybe?

As now none of my lights are working properly as they are all ikea based.

(there is also some other unrelated z-wave bug, but these two issues took down pretty much 95% of my automation and openhab system)

You can ask this question on the git repository. I believe an issue has been filed.

As for lights not working if you follow the steps and update your files it should all work.

Which version are you running? I’m running 2.5 Snapshot (S1602 think) and I don’t have these problems. There have been some fixes, maybe some of them fix your problems, too. I still recommend to define things in PaperUI, much less pain than with the config files.

Thanks, I am on binding-tradfri - 2.4.0 (latest stable, with 2.4 openhab)
I do have all things defined from paperUi, only items are configured from config files.
To be honest, I am not 100% sure this is my exact problem, as I had to do some “life” things since, but I do recall that if I update keys again in paperui, it would start working for a while, but unpredictably.
(sometimes it would start working on its own, but again unpredictably).
As mentioned, I hope new stable release will have this fixed as well, not sure why I am reluctant to go to other channels then stable (well I think it is because a lot of recent updates broke something, I remember mqtt and some other things… )

1 Like

Tested with 2.5.0 M1 : still have the issue

Same with snapshot.
From what I can see, the things get a default value for preSharedKey which is equal to code. Seems strange for me. identity stays empty.

Interesting. Config-File or PaperUI?

Config file.

Has anyone already received the Tradfri update to version 1.8.26?
Since then it has stopped working for me.
In the debug log I see the following messages:
08:42:15.588 [DEBUG] [g.tradfri.internal.TradfriCoapHandler] - CoAP error 4.04 08:42:17.210 [DEBUG] [g.tradfri.internal.TradfriCoapHandler] - CoAP response options: {} payload: Not Found

My gateway received the update and everything is working as before…

1.8.26 works for me, but have to reset the security code every day or so.

Same here with 1.8.25 and 1.8.26: I always need to re-enter the security key after restarting openHAB.

Have you checked if just restating the binding in karaf also helps?

This is something I never did so far. I’ll have to look it up in the documentation.

is it possible to automate restarting of the binding if that might temporarily solve the problem?
My openhab is pretty much useless for months since the latest trådfri update :frowning:

I could imagine a solution by running a rule when the Tradfri gateway state is not ONLINE, and by trying to reset the security code in a REST API JSON message.

Sadly I’m not used to work with the REST API so I can’t provide the proper message to send through the rule.

I’m not used to work with the REST API but I could imagine a solution by running a rule when the Tradfri gateway state is not ONLINE, and by trying to reset the security code in a REST API JSON document.

EDIT - there’s a simple solution.

First identify the number of the TRADFRI bundle:

$ /usr/share/openhab2/runtime/bin/client list | grep -i 'tr.*dfri'
228 │ Active │  80 │    │ openHAB Add-ons :: Bundles :: TRÅDFRI Binding

Take note of the first number (228 in my case).

Now add the following Item:

Switch Reset_Tradfri_Gateway "Restart TRADFRI binding"

Then create the following rule and replace NNNN with that number (228 in my case).

rule "reset"
    Item Reset_Tradfri_Gateway received command ON
    // Replace NNNN with the 1st number returned from running the following command at the Karaf console:
    // list | grep -i 'tr.*dfri'
    executeCommandLine("/usr/share/openhab2/runtime/bin/client bundle:restart NNNN", 6000)
    postUpdate(Reset_Tradfri_Gateway, OFF)

You could also try using the following `executeCommandLine() line:

    executeCommandLine("/usr/share/openhab2/runtime/bin/client bundle:restart 'openHAB Add-ons :: Bundles :: TRÅDFRI Binding'")

maybe even a cron could do it, for me everything works if I restart entire server, I do not need to enter anything to get all to work

That’s possible, see: Tutorial: Restart Binding from rule