Are there any news on integrating Hue Dimmer Switch?
I mean, Philips has opened it to HomeKit, so it seems the Hue bridge somehow allows capturing events from the dimmers.
I know that there is a solution by polling. But this seems not to be optimal.
These dimmers are quite cheap. And I believe have because of that a certain footprint in the market.
Would be very cool if they were supported by OpenHab.
Can the dimmer switch be used too trigger rules ect in openhab and not do anything to my lights ?
I already have a hue bridge and bulbs with motion sensors running and talking too OH
Iâm hoping to use the Hue Dimmer switch to enable modes like in bed and turn on fans ect
i donât need it too control my lights as they are already automated or motion activated
I did post about it but got no response so thought i would try here
Hi,
thanks for letting us know.
I already switched to the binding as far as i could, because there is still a lack of support for the âHue Tapâ .
So there is still use for the web api calls
@apfelflo89@sihui May I ask you to send me some data (logs, information from Hue API interface about that sensor, etc.) about your âHue Tapâ. This will help to include it into the binding as I am not having access to an own device. Thanks.
@sihui@cweitkamp
not sure about links, but it´s pretty easy, just like the Dimmer Switch. The Hue Tap just gives back different values from the Dimmer Switch
Uninstalled hue binding via PaperUI, dropped test jar into my addons folder, cleared tmp and cache, restarted openHAB (2.5 Snapshot #1467 manual install on Debian 9.5):
2018-12-28 12:22:14.900 [ERROR] [org.eclipse.smarthome.binding.hue ] - FrameworkEvent ERROR - org.eclipse.smarthome.binding.hue
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.smarthome.binding.hue [191]
Unresolved requirement: Import-Package: org.eclipse.jdt.annotation; resolution:="optional"
Unresolved requirement: Import-Package: org.eclipse.smarthome.config.discovery.upnp
at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1634) ~[?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1614) ~[?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1585) ~[?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1528) ~[?:?]
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) [?:?]
2018-12-28 12:22:59.862 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/opt/openhab2/addons/org.eclipse.smarthome.binding.hue-0.11.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.smarthome.binding.hue [191]
Unresolved requirement: Import-Package: org.eclipse.jdt.annotation; resolution:="optional"
Unresolved requirement: Import-Package: org.eclipse.smarthome.config.discovery.upnp
at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[?:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [10:org.apache.felix.fileinstall:3.6.4]
openhab> bundle:list | grep hue
191 x Installed x 80 x 0.11.0.201812281054 x Eclipse SmartHome hue Binding
openhab> bundle:start 191
Error executing command: Error executing command on bundles:
Error starting bundle 191: Could not resolve module: org.eclipse.smarthome.binding.hue [191]
Unresolved requirement: Import-Package: org.eclipse.jdt.annotation; resolution:="optional"
Unresolved requirement: Import-Package: org.eclipse.smarthome.config.discovery.upnp
The tap_switch_event channel reflects every button press on all of the four available buttons with the correct numbers.
The last_updated channel contains the correct DateTime events for the button presses.
The tap_switch channel does not get any state updates.
The battery_level and battery_low channels donât get anything because the Tap Remote does not have a battery It is powered by kinetic energy when pressing the buttons.
2018-12-29 08:45:05.196 [vent.ItemStateChangedEvent] - TabLiving_lastUpdated changed from 2018-12-29T07:41:25.000+0100 to 2018-12-29T08:45:04.000+0100
2018-12-29 08:45:05.218 [me.event.ThingUpdatedEvent] - Thing 'hue:0830:0017882e7a2d:5' has been updated.
2018-12-29 08:45:06.721 [vent.ChannelTriggeredEvent] - hue:0830:0017882e7a2d:5:dimmer_switch_event triggered 17.0
2018-12-29 08:45:06.742 [vent.ItemStateChangedEvent] - TabLiving_lastUpdated changed from 2018-12-29T08:45:04.000+0100 to 2018-12-29T08:45:05.000+0100
2018-12-29 08:45:06.763 [me.event.ThingUpdatedEvent] - Thing 'hue:0830:0017882e7a2d:5' has been updated.
2018-12-29 08:45:07.756 [vent.ChannelTriggeredEvent] - hue:0830:0017882e7a2d:5:dimmer_switch_event triggered 16.0
2018-12-29 08:45:07.776 [vent.ItemStateChangedEvent] - TabLiving_lastUpdated changed from 2018-12-29T08:45:05.000+0100 to 2018-12-29T08:45:07.000+0100
2018-12-29 08:45:07.799 [me.event.ThingUpdatedEvent] - Thing 'hue:0830:0017882e7a2d:5' has been updated.
2018-12-29 08:45:08.840 [vent.ChannelTriggeredEvent] - hue:0830:0017882e7a2d:5:dimmer_switch_event triggered 34.0
2018-12-29 08:45:08.862 [vent.ItemStateChangedEvent] - TabLiving_lastUpdated changed from 2018-12-29T08:45:07.000+0100 to 2018-12-29T08:45:08.000+0100
2018-12-29 08:45:08.883 [me.event.ThingUpdatedEvent] - Thing 'hue:0830:0017882e7a2d:5' has been updated.
What I did notice though: after a while the Things goes offline, but still the channels get state updates when pressing the buttons. As the device does not have a power source to provide any updates to the openHAB system while not in use for a longer period of time I guess this is normal behaviour.
Summary: It is working and a great enhancement for openHAB as you can now use the Tap remote as a gerneral purpose remote. Thanks a lot for that
Edit: hold on, made a small mistake using the wrong itemtype, update is in progress
2nd Edit: after using the correct itemtype Number instead of Switch for the tap_switch channel my above statement is still valid: tap_switch channel does not get any state updates.
If other users want to test, here is a simple rule to catch the events:
rule "Hue Tap Remote"
when
Channel "hue:0830:yxyxyxyxyxyxyx:5:dimmer_switch_event" triggered
then
logInfo("EXTRA", "HUE Tap Remote switch event {}", receivedEvent)
switch(receivedEvent.getEvent()) {
case "34.0": {
logInfo("EXTRA","HUE: Button 1 triggered")
//do other stuff
}
case "16.0": {
logInfo("EXTRA","HUE: Button 2 triggered")
//do other stuff
}
case "17.0": {
logInfo("EXTRA","HUE: Button 3 triggered")
//do other stuff
}
case "18.0": {
logInfo("EXTRA","HUE: Button 4 triggered")
//do other stuff
}
}
end
I tested the binding as well (still with the battery channels included). Discovery:
[el.core.internal.ModelRepositoryImpl] - Loading model 'hue.things'
[g.discovery.internal.PersistentInbox] - Added new thing 'hue:0830:xxxxxxxxxxxx:20' to inbox.
[g.discovery.internal.PersistentInbox] - Added new thing 'hue:0830:xxxxxxxxxxxx:32' to inbox.
[el.core.internal.ModelRepositoryImpl] - Refreshing model 'hue.things'
Pressing the buttons gives the following log entries (using the rules example from @sihui):
One thing you have to change after installing the new test version is the trigger of the event: hue:0830:yxyxyxyxyxyxyx:5:tap_switch_event. It will be named tap_switch_event instead of dimmer_switch_event in the future.