IKEA Trådfri Gateway

Thanks. I already found out how to do this and made PR.

2 Likes

Just discovered a little ‘snag’ when trying to set both the brightness and color temperature from within a rule.
A delay between the two commands makes it work.

sendCommand(TradfriP2Bright, 90)        			
Thread::sleep(600)
sendCommand(TradfriP2Temp, 50)        			

Without the delay, the first command is interrupted by the second, and the second one ‘wins’ leaving the brightness in its old state.

2 Likes

I just installed this version of the binding, but no groups are shown in my inbox:

openhab> bundle:list | grep -i trad
186 | Active   |  80 | 0.9.0.201707251303     | Tradfri Binding
openhab> 

What am I missing?

Hi Ole,

You placed the binding in the addons, probably with the Scandium and Californium Osgi jars as well, then did a bundle:start?

I am unsure if automatic discovery works when you install manually but it should work from that moment on. You can check this by doing a log set debug on this binding.

Anyway I did the following in my configuration:

Things

Bridge tradfri:gateway:gwa0cc2b6d6e7b [ host=“yourip", code=“yoursecuritycode" ] {
    0220 tradfri_light_attic [ id=65539 ]
    0220 tradfri_light_bedroom [ id=65537 ]
    group tradfri_group_livingroom [ id=140890 ]
    group tradfri_group_bedroom [ id=132922 ]
    group tradfri_group_attic [ id=147073 ]
}

Items:

Dimmer Tradfri_Attic (Lights) { channel=“tradfri:0220:gwa0cc2b6d6e7b:tradfri_light_attic:brightness” }
Dimmer Tradfri_Bedroom (Lights) { channel=“tradfri:0220:gwa0cc2b6d6e7b:tradfri_light_bedroom:brightness” }
Switch Tradfri_Remote_Livingroom { channel=“tradfri:group:gwa0cc2b6d6e7b:tradfri_group_livingroom:group_state” }
Switch Tradfri_Remote_Bedroom { channel=“tradfri:group:gwa0cc2b6d6e7b:tradfri_group_bedroom:group_state” }
Switch Tradfri_Remote_Attic { channel="tradfri:group:gwa0cc2b6d6e7b:tradfri_group_attic:group_state” }

Of course the ID’s are different in your case (check the log) but it should work after that.

Good luck!

Mario

No, I deleted the original manually installed binding and installed the SNAPSHOT one from PaperUi.

Ok. The current snapshot does not contain my changes yet. Needs to be
pulled in by the maintainer.

I thought you did a manual build from my repository. :wink:

I can send you the built files or put them on the market place if you’re
interested.

Sure, but it has been a while since your PR, @Kai are you still maintainer?
When do you think @sourceror 's PR will be part of the SNAPSHOT?

Once it is in a reviewed and mergeable state, simply check Changes to the Tradfri Binding to discover and use Groups by S0urceror · Pull Request #3799 · eclipse-archived/smarthome · GitHub.

Thanks. Will watch that tread. :slight_smile:

Found this on another forum. Might help people with gateway connectivity problems.
I manage 3 OH2 sites and will try this on a problem site this upcoming weekend.
My gateway is no longer visible in the router client list, so a bad cable could very well be the reason.

The network cable that came with the gateway was delivered as a big knot, so I suspected that it would cause problems. As soon as I swapped it with a better cable, all problems vanished. The app now connects to the gateway instantly, and I’ve had no random drops.

Source

1 Like

Follow up:

This works fine, so the problem must be in the LED driver receiver it seems:

          logInfo("Motion", "hallLights ON")
   	      sendCommand(TradfriP1Bright, 90)        			
   	      sendCommand(TradfriP2Bright, 90)        			
          Thread::sleep(600)
   	      sendCommand(TradfriP1Temp, 50)        			
   	      sendCommand(TradfriP2Temp, 50)

Just seen the Tradfri binding, great job.

Is there a posibility to use the Tradfri motion sensor with the binding? Couldn’t find anything yet.

It might be possible when @sourceror 's PR comes through.
In the mean time it is possible to use the bulb/panel-state as an input to a rule:

rule "HallightsChange" 
when
    Item TradfriP1Bright changed or
    Item TradfriP2Bright changed
then 
    logInfo("TradfriP1Bright.state", "Update: TradfriP1Bright.state=" + TradfriP1Bright.state);    
    logInfo("TradfriP2Bright.state", "Update: TradfriP2Bright.state=" + TradfriP2Bright.state);    
end

I love openHAB integration of Tradfri - it works like a charm with bulbs! Thanks for the binding!

I consider buying the motion sensor.
I read that it can be paired to e.g. a bulb so that motion can turn on the bulb.
Will there events be visible in openHAB when motion is detected, so that I can use it to control something else than Tradfri bulbs? E.g Z-Wave items or alarm groups in openHAB?

It might be possible when @sourceror 's PR comes through.
In the mean time it is possible to use the bulb/panel-state as an input to a rule:

I have gone the other path, using the Z-Wave Aeotec Multisensor 6 sensor. That gives me temperature and humidity readings also.

If I have understood the motion switch correctly, it can only be set between 1 and 10 minutes. Would not this mean that it will send an off signal to the bulb after the given period?

Probably.
Just make the rule turn it on again.
Or use another bulb just as a state keeper. :slight_smile:

I guess that would work :stuck_out_tongue:

Are these smart bulbs multivoltage (multi-region compatible), i.e. can they be used with both 110V and 220V?

Marking on bulb says 220-240V 50/60Hz.
But then again, when I accidentally tries one on a dimmer, it lighted up fairly quickly, but made a noise, so I did not leave it on long enough to test the Radio part.
Ikea have a good return policy, so you could just try it out.