[tradfri] No reactions on Changes

Tags: #<Tag:0x00007f5c94657bb8> #<Tag:0x00007f5c94657aa0> #<Tag:0x00007f5c946579b0>

Hi,
I’m trying to connect my Tradfri Bulbs to my Openhab. I configured the binding like below:

Bridge tradfri:gateway:wohnzimmer [ host="192.168.188.40", identity="xxxxxx", preSharedKey="xxxxxxx" ] {
    0220    65544       "Wohnzimmer: Lampe 1"   [ id=65544 ]
    0220    65545       "Wohnzimmer: Lampe 2"   [ id=65545 ]
    0220    65546       "Wohnzimmer: Lampe 3"   [ id=65546 ]
    0220    65547       "Küche: Lampe 1"        [ id=65547 ]
    0220    65548       "Küche: Lampe 2"        [ id=65548 ]
}

The Bulbs and Gateway shows up as connected, I can also see the state changing when I turn them off with the remote.
But when I try to change any state in OH there’s no reaction.

Any idea how to fix this?

Items file? Sitemap file? Logs?

Hi, sorry for the missing info. There are no errors in the log, just lines like these:

2019-11-04 19:14:56.621 [nt.ItemStatePredictedEvent] - Wohnzimmer1 predicted to become ON

2019-11-04 19:14:56.634 [nt.ItemStatePredictedEvent] - Wohnzimmer2 predicted to become ON

2019-11-04 19:14:56.644 [vent.ItemStateChangedEvent] - Wohnzimmer1 changed from OFF to ON

2019-11-04 19:14:56.649 [vent.ItemStateChangedEvent] - Wohnzimmer2 changed from OFF to ON

2019-11-04 19:14:56.655 [nt.ItemStatePredictedEvent] - Wohnzimmer3 predicted to become ON

2019-11-04 19:14:56.674 [vent.ItemStateChangedEvent] - Wohnzimmer3 changed from OFF to ON

2019-11-04 19:14:57.143 [ome.event.ItemCommandEvent] - Item 'Wohnzimmer' received command OFF

2019-11-04 19:14:57.163 [ome.event.ItemCommandEvent] - Item 'Wohnzimmer1' received command OFF

2019-11-04 19:14:57.172 [ome.event.ItemCommandEvent] - Item 'Wohnzimmer2' received command OFF

2019-11-04 19:14:57.180 [ome.event.ItemCommandEvent] - Item 'Wohnzimmer3' received command OFF

2019-11-04 19:14:57.191 [nt.ItemStatePredictedEvent] - Wohnzimmer1 predicted to become OFF

2019-11-04 19:14:57.206 [nt.ItemStatePredictedEvent] - Wohnzimmer2 predicted to become OFF

2019-11-04 19:14:57.216 [nt.ItemStatePredictedEvent] - Wohnzimmer3 predicted to become OFF

2019-11-04 19:14:57.229 [vent.ItemStateChangedEvent] - Wohnzimmer1 changed from ON to OFF

2019-11-04 19:14:57.235 [GroupItemStateChangedEvent] - Wohnzimmer changed from OFF to ON through Wohnzimmer1

2019-11-04 19:14:57.239 [vent.ItemStateChangedEvent] - Wohnzimmer2 changed from ON to OFF

2019-11-04 19:14:57.243 [vent.ItemStateChangedEvent] - Wohnzimmer3 changed from ON to OFF

2019-11-04 19:14:57.247 [GroupItemStateChangedEvent] - Wohnzimmer changed from ON to OFF through Wohnzimmer3

2019-11-04 19:14:57.667 [ome.event.ItemCommandEvent] - Item 'Wohnzimmer' received command ON

2019-11-04 19:14:57.689 [ome.event.ItemCommandEvent] - Item 'Wohnzimmer1' received command ON

2019-11-04 19:14:57.698 [ome.event.ItemCommandEvent] - Item 'Wohnzimmer2' received command ON

2019-11-04 19:14:57.713 [ome.event.ItemCommandEvent] - Item 'Wohnzimmer3' received command ON

2019-11-04 19:14:57.726 [nt.ItemStatePredictedEvent] - Wohnzimmer1 predicted to become ON

2019-11-04 19:14:57.736 [nt.ItemStatePredictedEvent] - Wohnzimmer2 predicted to become ON

2019-11-04 19:14:57.749 [vent.ItemStateChangedEvent] - Wohnzimmer1 changed from OFF to ON

2019-11-04 19:14:57.758 [nt.ItemStatePredictedEvent] - Wohnzimmer3 predicted to become ON

2019-11-04 19:14:57.766 [vent.ItemStateChangedEvent] - Wohnzimmer2 changed from OFF to ON

2019-11-04 19:14:57.771 [vent.ItemStateChangedEvent] - Wohnzimmer3 changed from OFF to ON

My .items file looks like this:
Group:Switch:OR(ON,OFF) Wohnzimmer “Deckenlicht Wohnzimmer”
Switch Wohnzimmer1 (Wohnzimmer) { channel=“tradfri:0220:wohnzimmer:65544:brightness” }
Switch Wohnzimmer2 (Wohnzimmer) { channel=“tradfri:0220:wohnzimmer:65545:brightness” }
Switch Wohnzimmer3 (Wohnzimmer) { channel=“tradfri:0220:wohnzimmer:65546:brightness” }

Group:Switch:OR(ON,OFF) Kueche    "Deckenlicht Küche"        <lightbulb>
Switch Kueche1    <lightbulb>     (Kueche)      { channel="tradfri:0220:wohnzimmer:65547:brightness" }
Switch Kueche2    <lightbulb>     (Kueche)      { channel="tradfri:0220:wohnzimmer:65548:brightness" }

Switch Schreibtisch    <lightbulb>              { channel="tradfri:0220:wohnzimmer:65550:brightness" }

Are you trying to control this from PaperUI? If so you need to create a sitemap file, add your items, then install Basic UI via PaperUI.

I have a sitemap file with the Items. The state of the lights is always updated in Basic UI and in Paper UI, but I can’t turn the lights on/off with the switches. Theres just no reaction.

Shouldn’t that be more like

Bridge tradfri:gateway:wohnzimmer [ host="192.168.188.40", identity="xxxxxx", preSharedKey="xxxxxxx" ] {
Thing 0220 "Wohnzimmer: Lampe 1" [ id=65544 ] ...

I tried this notation, but that’s not working and is different from the notation described in the binding docs.
I did also removed my tradfri configuration, cleared cache and configured the Bridge over PaperUI with exact the same behaviour.
The switches are updating when I turn the lights out with the tradfri App, but I can’t control the lights from Paper/Basic UI.

When I try to turn the lights ON/OFF with open hab I get messages like these in the logs:

2019-11-05 21:15:08.387 [vent.ItemStateChangedEvent] - Kueche1 changed from OFF to ON

2019-11-05 21:16:11.897 [ome.event.ItemCommandEvent] - Item 'Kueche1' received command OFF

2019-11-05 21:16:11.914 [nt.ItemStatePredictedEvent] - Kueche1 predicted to become OFF

2019-11-05 21:16:11.934 [vent.ItemStateChangedEvent] - Kueche1 changed from ON to OFF

2019-11-05 21:16:12.380 [ome.event.ItemCommandEvent] - Item 'Kueche1' received command ON

2019-11-05 21:16:12.391 [nt.ItemStatePredictedEvent] - Kueche1 predicted to become ON

2019-11-05 21:16:12.403 [vent.ItemStateChangedEvent] - Kueche1 changed from OFF to ON

When I turn them ON/OFF with the Tradfri App I get messages like these, but the lights won’t change:
2019-11-05 21:17:20.269 [GroupItemStateChangedEvent] - Wohnzimmer changed from OFF to ON through Wohnzimmer2

2019-11-05 21:17:20.287 [vent.ItemStateChangedEvent] - Kueche1 changed from OFF to ON

2019-11-05 21:17:20.292 [GroupItemStateChangedEvent] - Kueche changed from OFF to ON through Kueche1

2019-11-05 21:17:20.328 [vent.ItemStateChangedEvent] - Wohnzimmer1 changed from OFF to ON

2019-11-05 21:17:20.335 [vent.ItemStateChangedEvent] - Wohnzimmer3 changed from OFF to ON

2019-11-05 21:17:20.348 [vent.ItemStateChangedEvent] - Kueche2 changed from OFF to ON

I don’t have my laptop handy till Thursday. Thinking a parameter wrong in the things file.

Is yours in this format?

Tradfri 1.8.25 - offline - communication_error

And

Hello everybody,

have the same problem. I bought a Raspi 4 and installed it with the latest Openhabian release.
Tradfri Binding installed -> online
Lamps are found.
Thing created and items linked.
So far everything is fine.
In the Controlpanel I can see the item status but I cannot change it.

I hope you have a solution. Everything worked fine on my old Raspi 3 (offline) with Openhab 2.4.

Cya Fariac

@Fariac, welcome to this forum: this is an English-spoken forum, people want to help, but excluding all those that do not speak German is not the spirit of this forum. There in a German-speaking forum if you feel more comfortable with this, just search this forum for it.
Would suggest you re-write your post in English

Welcome to the community!

Create a sitemap file with your items for control. PaperUI is for configuration.

Also try restarting OH of needed.

From command line use:
sudo systemctl restart openhab2

No differenz!

Habpanel ->2020-01-04 18:32:12.447 [vent.ItemStateChangedEvent] - EsszimmerLampe1_Helligkeit changed from 0 to 72 -> lamp still dark

Ikeas Remotecontrol -> 2020-01-04 18:32:20.557 [vent.ItemStateChangedEvent] - EsszimmerLampe1_Helligkeit changed from 72 to 100 -> lamp is up

firmware Ikea Gateway 1.9.27
Lamp 1.2.217

Solved: I did not transfer the ID correctly

Could you be more spesific? Mine did work but has now all of a sudden stop working

I had similar problem. Using only paperUI the gateway keep going offline. Restarting the gateway and re-adding it in paperUI got all plugin-switches working. But the bulbs (GU10, E27, E14, normal dimming and color temperature adjustable) didn’t work properly. I could control everything from the trådfri-app and the new dimming values were updated in OH but I couldn’t control the lamps from OH (neither paperUI or sitemap).

The solution that worked for me was renaming the lamps in the trådfri-app, removing them and re-adding them in paperUI. (I did not remove them from the trådfri-app).

Versions:
OH: 2.5.3
Trådfri Gateway: 1.10.29
Lamps (which were not working correctly):
GU10 bulb: 1.2.214 (newer version is available according to “update details” v-2.3.007, but the bulb won’t update)
E27 color temperature: 2.0.023
E14: 1.2.214 (newer version available see GU10 above)
Plug-in switch (which was working correctly): 2.0.022

So far everything works but I will have to wait and see if the gateway goes offline again…