Tradfri 1.8.25 - offline - communication_error

  1. Remove the contents of your “tradfri.things” (or comment the lines in it, or move the file to somewhere else).
  2. Restart openhab
  3. After started, go into PaperUi to your inbox and accept the gateway.
  4. Go to Configuration->Things and edit the Gateway, set the security code from the back of your gateway device.
  5. Now OH talk to the gateway and recieve the identity.
  6. Go edit the Gateway under Configuration->Things again.
  7. Expand “Show more”, copy the value under Identity.
  8. Go to your Tradfri.things and change it to look as:
    Bridge tradfri:gateway:gw<your_gatewayMacAdr> [ host="", identity="<the identity value found in step 7>", preSharedKey="" ] {
  9. Save the tradfri.things file, and then update your items to follow the new Bridge naming standard from step 8.

That was what worked for me.

3 Likes

SOLVED ! Thanks a lot for the suggestion.
Alessandro

Hey Johan can you give me a example what you mean with

update your items to follow the new Bridge naming standard from step 8.

Thanks !!!

Resolved like Johan told, works, reboot, gatway keeps offline again…

Same issue here. After applying the workaround I’m back to getting CoAP onError again after a few minutes :cry: I imagine this could be due to the PSK needing renegotiation? I’m using file-based config.

Kind of wish I could roll back the upgrade - out of all the home automation systems I’m using, Trådfri has been by far the most stable and painless!

same problem here … work arround works for a couple of minutes or until next restart …

I give in.
Work around worked for a while, now it’s capable of reading the state of items, but not of changing them.

Dear ikea.
Please stop changing stuff.

I try it again, remove everything form config side, add it new and now its works. Thanks everyone

1 Like

Just in case anyone else is as detail oriented as I apparently am: the procedure in post #20 by @Johan_S works, but doing so throws a warning in the logs cannot add "BridgeImpl" with key "tradfri:gateway:gwa0c9a0xxxxxxxx". It exists already from provider "ManagedThingProvider"! Failed to add a second with the same UID from provider "GenericThingProvider"!
However, it all works nevertheless.
I was trying to make this warning go away, but did not succeed. The identity code changes every time the bridge is added to OH2 and hence, it seems impossible to add through text files only.
As a side node, if one tries to add it through the text files only with an invalid identity code, it seems to also knock out the TP-Link binding; all of my TP-LINK outlets became unreachable until I fixed the tradfri bridge.

This sounds like a design problem. It should probably be stored somewhere else than in the configuration.

Still not working for me.
Reports the current state, but won’t allow me to change it. I can see my lights are on, but I can’t turn them off!

Update
After a few minutes, it started working, but with a delay.
However, if I reboot again, I have to go through the whole process of removing the gw commenting out my things, re add the gw etc.
Let’s hope I don’t have to reboot again for a while!

@lipp_markus this may not be correct…

I added mine through paper ui then 48hrs moved to files based on the json things file.

My gateway info never changed… curious what identity changes?

@Thedannymullen curious…I have performed the following operation three or four times

  • delete bridge def from text file, restart OH2
  • discover and add bridge through PaperUI;
  • copy out Identity code and delete thing in PaperUI (mostly using the delete function in PaperUI, but once I simply deleted the whole jsonDB and its backups to see if that makes a difference)
  • add newly received identity code in text file for bridge definition
  • OH2 tries to add bridge Thing as now defined in text file, but status is stuck somewhere around “uninitialized”

In every single iteration of the above, I received a different value for the token identity…

I had similar issues before when the power went down, there is an extra thread for this. My workaround there was to change the gateway ip in habmin to something wrong, then back again to the correct value. This helped here, too.

As far as I understood, that is expected behavior and a coap security feature.
See the second link in my post: Restart Tradfri Gateway from rule or Binding

1 Like

@lipp_markus

Here what your new things file should look like, I struggles a little also and realized you have to remove the code parameter and change to identity.

Bridge tradfri:gateway:gwa234fd176b [ host="192.168.1.50", 
// not needed anymore --> code="2YKQdgHqyTPletUL", 
identity="3bccc7c7ced",
 preSharedKey="Rltuc7o" ]  
{
// things here
}

All parameters in this file are from the json things db.

1 Like

For those, like me, looking for the jsondb location:

It solved the issue for me… temporarily. The work around is good for restoring the connection, but awful for new users.

@Thedannymullen thanks much
This is looks exactly like what I have (except, my values for the preSharedKey and identity and are much longer) and I believe was posted earlier by @Johan_S in post#20 in step8 unless I am missing something. Still for me the effects as I described above remain.

@lipp_markus changed a few numbers out just for security sake. Sorry I thought I made correct length.

A git issue for this has been created: https://github.com/openhab/openhab2-addons/issues/5489.

No worries, just thought I’d mention in case there are different versions out there. I had added this observation already to the github issue.

1 Like