Tradfri 1.8.25 - offline - communication_error

Did wonder why it was json. I really shoukd use the api more!
Thanks for your help.

Got it working (after a fashion)
I can’t get the gw to work if I set it manually in a.things file, but the detected gw works and all my items are back online
Thanks again for your help

So for those that only live in .config files, how do we fix this?
Using 2.4.0 release build.

2 Likes

@digital I setup in paper ui just to get back working. A little confused on what I need to change in my things file?

I got it working.
You need to change the name of the gateway thing add the identity to the config file.

For me it was:
Bridge tradfri:gateway:gw1 [ host=“xxx.xxx.xxx.xxx”, code=“xxxxxxxxxx” ] {
and the new config is:
Bridge tradfri:gateway:gwb07xxxxxxxx [ host=“xxx.xxx.xxx.xxx”, identity=“849xxxxxxxxxxxxxxxxxxxxx”, preSharedKey=“P2hjxxxxxxxxx” ] {

I also had to change all items that use this gateway as the UID has changed (from “tradfri:gateway:gw1” to “tradfri:gateway:gwb07xxxxxxxx”).

2 Likes
  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