Tradfri binding loses connection after Power failure / gateway reboot

@cweitkamp if I have build 1340 of openHAB installwd and install the tradfri 2.4 snapshot binding will that get the new code?

Testing in my develop environment.

@Thedannymullen Yes, if you are using the snapshot you always get the latest changes.

1 Like

@cweitkamp I power cycled my gateway and oh will not recover a connection without intervention. I restarted. I am on build 1341 and the 2.4 version of the binding.

If you provide something else to look for I can make another try. As for now, looks like the loss of connection still exists if the gateway power cycles.

Any updates on this. After numerous occurrences (playing around and restarting a lot) this starts to get annoying :slight_smile:
Any tests I can carry out to help?

1 Like

I can confirm having the exact same issue. Unfortunately I’m quite new to OpenHAB and although my background is web application development, I’m still pretty green on this platform.

If there’s anything I can contribute - log files etc. - please let me know. But this is definitely an issue I’m seeing as well.

#metoo, 50/50 chance of Gateway re-connecting.
Must either power-cycle Gateway or restart Trådfri binding. (sometimes several times)
My router assign a fixed IP based on MAC.
It is always PINGable, even from OH host.

1 Like

This is fixed in the 2.4 binding release. You can update manually or us the milestone build.

Update manually requires downloading the jar file. That is the extent of my knowledge on that topic though. I switched to the milestone build it was easier.

I would ask why are you losing power in the gateway this frequent? My gateway never loses power? May be a good idea to fix this issue anyway.

I’m not losing power, only connection to Ikea Gatewat after a OH2 restart or OH2 host reboot.

@OMR that is not normal behavior. I reboot all the time on my system and never have an issue.

In theory the new binding will fix this issue. But if you only restart openhab the gateway should still function with no problem.

I know, that’s why I’m whining about it. :slight_smile:

I’m on 2.4 SNAPSHOT #1401 from a day back.
Coming to think about it last restart on #1401 went OK, but several on #1400 did not.

It’s been like this on SNAPSHOT for a long time now (9mnds at least) on two sites I manage.

Will check some more on #1401.

It happened again after a OH2 reboot: (Snapshot #1401)

2018-11-02 17:48:33.485 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2018-11-02 17:48:33.834 [WARN ] [iscovery.TradfriDiscoveryParticipant] - Discovered Tradfri gateway doesn't have an IP address: [ServiceInfoImpl@1206808897 name: 'gw-b072bf25aee1._coap._udp.local.' address: '(null):0' status: 'DNS: JmDNS-/ [/] state: probing 1 task: null', has NO data
        gw-b072bf25aee1._coap._udp.local.: ]
2018-11-02 17:48:33.981 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'fan.rules'

This fixed it:

openhab> bundle:list | grep -i fri
217  Active     80     Eclipse SmartHome TRÅDFRI Binding
openhab> bundle:restart 217

When issueing the restart, this was logged:

2018-11-02 18:26:03.070 [WARN ] [iscovery.TradfriDiscoveryParticipant] - Discovered Tradfri gateway doesn't have an IP address: [ServiceInfoImpl@465260145 name: 'gw-b072bf25aee1._coap._udp.local.' address: '(null):5684' status: 'NO DNS state: probing 1 task: null', has NO data, empty]

I’m experiencing exactly the same, running 2.4.0-M5. The connection is immediately back after Ole’s instructions.

My understanding is that statement is a non issue. Its also only a warning. I get that one pop up also but everything works.

Sorry, I wasn’t clear enough. It’s not about the statement in the log, it is about OH 2.4.0-M5 not connecting to the gateway leaving the Tradfri equipment uncontrollable by openHAB with control via the Tradfri app being just fine. Restarting the Tradfri bundle in Karaf re-establishes the connection immediately.

Interesting I reboot all the time and have no issue. I am going to reboot my setup today just to see.

Can you stop openhab. Clear your log and reboot, then post the full log. Curious to see if it says tradfri connected.

Also, have either of you posted an issue on git? This is the proper place to file issues for fixing.

No, I’m on SNAPSHOT and sort of learned to live with it, but it has been like this for a while.
(actually at my mothers, I have a Fibaro WallPlug on the Ikea GW to kickstart it when needed. The binding restart does not always work even after 5-10 attempts)

Does the Trådfri binding have any DEBUG level logging I can enable?

I’m running on a x86 system, so my boot process is quicker that on a pi platform. Could that be related perhaps?

It’s the first time I noticed this behaviour shortly after the upgrade to 2.4.0-M5, I reboot all the time as well, this was a first. I’m running OH on a strethed Pi3. Stretched meaning it appears to be running out of memory, a reboot takes over 30 minutes, a lot of items, a lot of rules…maybe it is part of the problem. I Googled the said Trafdri problem and this thread showed up, I understand it is a bit of an ongoing anomaly. Willing to help but need some guidance on how to produce the requested logs.

Thanks! Yes I had some issues today with tradfri that I did not have on 2.3. I migrated to the m5 build when my sd card died. So I concur there seems to be some issues with m5 that are unexplainable.

Those with issues, can you have a look at this issue. There is a test binding in there towards the bottom.

The issue I was having went away when I made changes to my network. Nothing which should have fixed it though, but im unable to test at the moment until I get the issue again and we need to see if this fixes the issue.

Hi all,

as i am faced with a similar or even equal issue, i was wondering if someone of you could solve this issue?
I went through all the discussion going on either here or github.

It is stated that a new snapshot-release could help, see here:
Snapshot release

Has someone tested this?