IKEA Trådfri Gateway

It is still not merged with master but you can play with the jars that you
can find here: https://github.com/S0urceror/tradfri-jars

It happened to me again. Seems like this happens after a few days. No events reported to Rules.
This is a less drastic way to get ut working again: (from Karaf console: ssh openhab@localhost -p 8101)

openhab> bundle:list | grep -i trad                                                                                                        13:29:11
180 │ Active   │  80 │ 0.9.0.201709011622     │ Tradfri Binding
openhab> bundle:restart 180                                                                                                                13:30:15
bundle:restart "Tradfri Binding" 

should work as well, That doesn’t fix anything, but it saves you some typing. You could even set a cron job to run something like this every night until it is resolved

sshpass -p habopen ssh -p 8101 openhab@localhost  "bundle:restart 'Tradfri Binding'"

Curious user here: what is the observed stability of this binding in collab with the Tradfri system? Is it stable enough to use as a serious alternative to for instance hue or Z-wave? In other words: how is the WAF?

I’ve implemented some basic support for the color bulbs, but the conversion of the color is not very good at the moment.

4 Likes

@Syn / @dandanx

FYI: Color support for IKEA Tradfri has just been merged.

Issue:

Pull request:

3 Likes

Am I right, that this is not yet integrated in openHAB 2.2.0 Build #1043, or do I miss something?

Correct, see https://github.com/eclipse/smarthome/wiki/ESH-used-in-openHAB.

Hi Syn,

here is a version of the Tradfri plugin with the new color support, built from the latest Eclipse Smarthome master branch:
https://cloud.h0lger.de/index.php/s/5rAHDzerbSSn0Rg
Also you can find the updated README there.

Hi Holger,
thanks a lot!
But unfortunately after putting the .jar in the addons folder and a restart, the binding couldn’t be installed (running openHAB 2.2.0 Build #1043):

		[ERROR] [rg.eclipse.smarthome.binding.tradfri] - FrameworkEvent ERROR - org.eclipse.smarthome.binding.tradfri
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.smarthome.binding.tradfri [213]
  Unresolved requirement: Import-Package: org.eclipse.californium.core

	at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1620) [?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1599) [?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1571) [?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1514) [?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) [?:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) [?:?]

Is there something more to do?

Please try to put the other jars in your addons folder as well.
You find them in the previous link.

  • californium-core-1.0.6.jar
  • element-connector-1.0.6.jar
  • scandium-1.0.6.jar

I’ll create a new ESH stable early next week, so stay tuned. We currently have some things that need to be fixed first…

3 Likes

New distro #1048 is available now!

Great, thanks a lot!
After a quick test it seems to run overall fine. But when I change the color in the IKEA Trådfri iOS App to the darkest blue, I get the following error:

==> /var/log/openhab2/openhab.log <==
2017-09-26 19:17:37.493 [ERROR] [alifornium.core.network.CoapEndpoint] - Exception in protocol stage thread: Value must be between 0 and 100
java.lang.IllegalArgumentException: Value must be between 0 and 100
	at org.eclipse.smarthome.core.library.types.PercentType.validateValue(PercentType.java:50) [98:org.eclipse.smarthome.core:0.9.0.201709260841]
	at org.eclipse.smarthome.core.library.types.PercentType.<init>(PercentType.java:35) [98:org.eclipse.smarthome.core:0.9.0.201709260841]
	at org.eclipse.smarthome.core.library.types.HSBType.fromRGB(HSBType.java:114) [98:org.eclipse.smarthome.core:0.9.0.201709260841]
	at org.eclipse.smarthome.binding.tradfri.internal.TradfriColor.constructHsbTypeFromRgbWithBrightnessPercent(TradfriColor.java:247) [186:org.eclipse.smarthome.binding.tradfri:0.9.0.201709260841]
	at org.eclipse.smarthome.binding.tradfri.internal.TradfriColor.fromCie(TradfriColor.java:133) [186:org.eclipse.smarthome.binding.tradfri:0.9.0.201709260841]
	at org.eclipse.smarthome.binding.tradfri.handler.TradfriLightHandler$LightData.getColor(TradfriLightHandler.java:423) [186:org.eclipse.smarthome.binding.tradfri:0.9.0.201709260841]
	at org.eclipse.smarthome.binding.tradfri.handler.TradfriLightHandler.onUpdate(TradfriLightHandler.java:140) [186:org.eclipse.smarthome.binding.tradfri:0.9.0.201709260841]
	at org.eclipse.smarthome.binding.tradfri.internal.TradfriCoapHandler.onLoad(TradfriCoapHandler.java:60) [186:org.eclipse.smarthome.binding.tradfri:0.9.0.201709260841]
	at org.eclipse.californium.core.CoapClient$ObserveMessageObserverImpl.deliver(CoapClient.java:1067) [175:californium-osgi:1.0.6]
	at org.eclipse.californium.core.CoapClient$MessageObserverImpl.succeeded(CoapClient.java:995) [175:californium-osgi:1.0.6]
	at org.eclipse.californium.core.CoapClient$MessageObserverImpl.onResponse(CoapClient.java:974) [175:californium-osgi:1.0.6]
	at org.eclipse.californium.core.coap.Request.setResponse(Request.java:509) [175:californium-osgi:1.0.6]
	at org.eclipse.californium.core.network.EndpointManager$ClientMessageDeliverer.deliverResponse(EndpointManager.java:267) [175:californium-osgi:1.0.6]
	at org.eclipse.californium.core.network.stack.CoapStack$StackTopAdapter.receiveResponse(CoapStack.java:193) [175:californium-osgi:1.0.6]
	at org.eclipse.californium.core.network.stack.AbstractLayer.receiveResponse(AbstractLayer.java:98) [175:californium-osgi:1.0.6]
	at org.eclipse.californium.core.network.stack.ObserveLayer.receiveResponse(ObserveLayer.java:137) [175:californium-osgi:1.0.6]
	at org.eclipse.californium.core.network.stack.AbstractLayer.receiveResponse(AbstractLayer.java:98) [175:californium-osgi:1.0.6]
	at org.eclipse.californium.core.network.stack.BlockwiseLayer.receiveResponse(BlockwiseLayer.java:321) [175:californium-osgi:1.0.6]
	at org.eclipse.californium.core.network.stack.AbstractLayer.receiveResponse(AbstractLayer.java:98) [175:californium-osgi:1.0.6]
	at org.eclipse.californium.core.network.stack.ReliabilityLayer.receiveResponse(ReliabilityLayer.java:269) [175:californium-osgi:1.0.6]
	at org.eclipse.californium.core.network.stack.AbstractLayer.receiveResponse(AbstractLayer.java:98) [175:californium-osgi:1.0.6]
	at org.eclipse.californium.core.network.stack.CoapStack.receiveResponse(CoapStack.java:135) [175:californium-osgi:1.0.6]
	at org.eclipse.californium.core.network.CoapEndpoint$InboxImpl.receiveMessage(CoapEndpoint.java:656) [175:californium-osgi:1.0.6]
	at org.eclipse.californium.core.network.CoapEndpoint$InboxImpl.access$700(CoapEndpoint.java:562) [175:californium-osgi:1.0.6]
	at org.eclipse.californium.core.network.CoapEndpoint$InboxImpl$1.run(CoapEndpoint.java:574) [175:californium-osgi:1.0.6]
	at org.eclipse.californium.core.network.CoapEndpoint$5.run(CoapEndpoint.java:721) [175:californium-osgi:1.0.6]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]

Thanks for your report!
I created an issue: https://github.com/eclipse/smarthome/issues/4349

Edit: Fixed with https://github.com/eclipse/smarthome/pull/4351

I’m trying to start up with this binding - however i don’t have a remote to the Gateway - will there be any other solution for pairing the bulbs with the gateway other than i need to buy a remote only for the pairing? The binding can’t do something like that?

Sorry byt you need one remote to get the lights into the system.

Check post 70 from this thread, @MortenVinding was able to do pairing only with gateway, without remote

I noticed @OMR mentioning a buzzing noise on the 30x90 FLOALT, and the 30x30 being dead silent. I experience the exact same thing here. And it was so noisy i exchanged it at the Ikea warehouse for a new one, but its the same noise on this one. Experiences? My house is quiet when the kids are outdoors :slight_smile:

Hi,

Thanks for the group for adding the trådfri binding! It’s a great to see how neatly it works.

One question about the groups, have they been introduced only in 2.2 or should they work also in 2.1?
I have the 2.1 release version of the binding running, if 2.2 is required, is the Jar somewhere available, or do I need to drag myself to my dev system and build one? :slight_smile: Additionally, how can I figure out the group id? Or would a newer version of the binding discover those automatically as well?