Tradfri 1.8.25 - offline - communication_error

Then the only salvation is The pin of re-pair…

That is what I keep doing but it is breaking the “peace of mind” of automation.
I liked to control my home when I am not at home.
In this current state… sighs

I got to delete the thing from PaperUI, refind the gateway re-use the key, then restart OH2 to force it to recognise that all lights can be connected to.

Ok, so you have re-paired all devices after hard-reset of the Gateway?

And you still see Gateway Offline situations that is not related to OH2 restarts?

If it is OH2 restart related this is a known issue that is still not resolved. More here.

If not, you might consider replacing the Ikea Gateway, or go the conbee/deconz route.

No. After losing connection. I delete the gateway and re-discover it, put the key. Then gateway is fine.
Restart to change all IKEA devices to online.

Are all devices done updating? There can be instability until all device updates are done.

1 Like

According to tradfri app all devices are up to date.

When connection is lost, Google home is still connected.

1 Like

Yesterday i have to unpower my Pi with Openhab. Tradfri don’t work afther boot and i try everyting in this Fred to resolve the problem. Nothing worked, as well not what i have sucessfully done last time. Long story short, i add all my Tradfri stuff over the Hue bridge now … I hope there will be a Fix in the future …

Thanks for all the Posts and efforts !

Something about the binding and the latest firmware are not meshing well together… :frowning:

2 Likes

Any solution to have Things outside of Bridge config in things file ?

@Orfait what are you looking to do?

Can you post you config files?

Not yet :frowning:

Here is what I actually have:

Bridge tradfri:gateway:TradfriGateway "Tradfri Gateway" [ host="xxx", identity="xxx", preSharedKey="xxx" ] {
    Things:
        0220 Tradfri_Lamp_01        "Tradfri Lamp 1"    [ id=65538 ]
        0220 Tradfri_Lamp_02        "Tradfri Lamp 2"    [ id=65537 ]
        0830 Tradfri_Remote         "Tradfri Remote"    [ id=65541 ]
        0010 Tradfri_outlet_01      "Tradfri Outlet 1"  [ id=65540 ]
        0010 Tradfri_outlet_02      "Tradfri Outlet 2"  [ id=65542 ]
}

And this is what I want (things declared outside of bridge):

Bridge tradfri:gateway:TradfriGateway "Tradfri Gateway" [ host="xxx", identity="xxx", preSharedKey="xxx" ]
Thing  0220 Tradfri_Lamp_01           "Tradfri Lamp 1"    [ id=65538 ]
Thing  0220 Tradfri_Lamp_02           "Tradfri Lamp 2"    [ id=65537 ]
Thing  0830 Tradfri_Remote            "Tradfri Remote"    [ id=65541 ]
Thing  0010 Tradfri_outlet_01         "Tradfri Outlet 1"  [ id=65540 ]
Thing  0010 Tradfri_outlet_02         "Tradfri Outlet 2"  [ id=65542 ]

By this way, it would be easier to have the bridge declared in paperui and things can stay in config files.
When the binding will be corrected, I will switch back to config file only.

Continuing the discussion from Tradfri 1.8.25 - offline - communication_error:

Okey I have fixed this issue and it is retained upon restarts. All via .config files

First comment out your config in things file.

restart (prob not needed but hey no biggie) sudo systemctl restart openhab2.service

once restarted add gateway via paper ui, this gives you access to the info required,
go to http://your openhab ip address:8080/rest/things/tradfri:gateway: gateway serial

it will output text in there will be preSharedKey and identity,

delete gateway from paper ui

add gateway in .config file using this format

Bridge tradfri:gateway:gateway serial [ host=“xxx.xxx.xxx.xxx”, identity=“add id from the step before”, preSharedKey=“add key from step before” ] {

0210 livingroomLamp       [ id=65562 ]
0220 livingroomMain       [ id=65550 ]
0220 livingroomMain2      [ id=65551 ]
0220 backDoor             [ id=65554 ]
0220 Landing              [ id=65553 ]
0220 sallyLamp            [ id=65545 ]
0220 peteLamp             [ id=65544 ]
0220 milesMain            [ id=65540 ]
0220 milesStarLamp        [ id=65565 ]
0220 manCaveLight01       [ id=65547 ]
0830 livingroomRemote     [ id=65549 ]
0830 milesRoomRemote      [ id=65539 ]
0830 petesLampRemote      [ id=65561 ]
0830 sallysLampRemote     [ id=65541 ]
0830 shedRemote           [ id=65546 ]

}

restart and all fixed. sudo systemctl restart openhab2.service

oh and all my devices in tradfri app are now all updated not sure if this is a part of this working or not?

2 Likes

Thanks @Pete_Stanley , so you basically moved to the config files, and all is working as it should?
I have had this issue for few months now, but life got in between of investigating it a bit more, so it is great if this is permanent solution (I prefear paper config anyway)

actually, I see now that documentation mentions only code property, and you used identity and preSharedKey, so I will fallow your solution as soon as I get some time for it

For me, it is the main issue : the configuration lost the “user friendly” side… The user have an easy access to code (printed on device), but not to identity and preSharedKey.

In addition, it concerns only config files. It seems to be a bug which should be fixed.

It is not a bug. The user-friendly way is to go the UI-way and it works by just entering the security code. The identity and PSK are then retrieved during the pairing and stored in the database. If you chose to configure manually, you have to add those parameters by hand. There is and should be no way for OH to modify your hand written config-files.

So, how do you explain it was working with only code before ?
I guarantee you that I never took care of identity and preSharedKey before this issue were opened. That’s why I consider this as a bug.

Agreed it is a pain, but the way I have always taken the config is like this, if done via GUI 2 things happen. 1 you never really learn how the system works so when things like this happen you are unable to fix, 2 I have my setup on my VMH host and i must have reinstalled it 50 times for one reason or another. set up openhab copy over my config files and boom my house works!! The backup and setup is easy as pie through .config files.

But as said before its not a bug, personally I think Ikeia have done a good thing and made it more secure. So we have to do some extra steps to make it work, granted the wiki needs updating to reflect these changes but other than that its all good. Try to remember that the sort of person that has openhab are in one way or another the type of person that likes to tinker and problem solve, and yes it can be frustrating but some how kinda fun don’t you think?

Well I disagree.

  1. It worked with just the code before the 1.8.25 upgrade for both paperui and config-file setups
  2. Today (at least with openhab 2.4.0) there are issues with both paperui and config-file setups. When Tradfri gateway reboots (e.g. due to power outage) the pre shared key and identity get invalid. At least the binding will not connect anymore. In paperui I then need to remove pre-shared key and identity and add the code again. This results in new identity and pre-shared key being “generated” and the binding goes online again.

So even the paperui way is not very convenient anymore.