Zigbee binding

You didn’t answer my question about using static thing types (and also @puzzle-star had a similar question).

Are you using static thing definitions?

Sounds correct…

Which is exactly what I did.
I just wonder how it would be possible to add twice, since this is physical the same device.

I did, aftwards. Re-edited my reply :grinning:

Well, for OH these have different IDs, so it can not tell these are the same…

I think this issue used to be solved by checking if the thing existed during discovery, however the ability to do this was removed in ESH a few months ago :frowning:

There is another feature (representation property) which can be used to try and avoid this - I thought it was being used, but maybe not. We can set this to the EUI of the device and it should (??) avoid duplicates.

Yes, but I thought that the device ID (this part: 001788011032a21b ) was suppose to be unique, and what tells the binding that this is the actual device. The whole ID, I agree it´s for OH.

Right now, I use channels from “both” devices/things. And they work. It´s looks kinda odd…:grinning:

No - the whole UID needs to be unique - the U in UID means Unique :wink:

That explains it then.
Still I have two different Things for the same device :grinning: This isn´t a major issue as it will probably not happen unless anyone does the same I did.

Btw…
The “new” buttons channels in the “new” Dimmer Switch doesnt have a type defintion. Shouldn´t there be one?
I assume the “Button I” and “Button O” are switches. But what are the “Button Dimm Up” and “Button Dimm Down”… Dimmer types??

Are you able to read the value of S4F? It should be 1E00 (7.6 seconds) but it might be worth checking that it hasn’t been increased…

Hi@Chris,
I looked into this, but the representation property only works for devices with the same Type UID

Pedro

Interesting. I wonder if that is the best approach…

In any case then, it makes it hard to eliminate these duplicates with the current framework - it’s not possible for the binding to read the list of existing devices as that was removed, and the system won’t check the representation property if the binding uses different thing types…

:frowning:

I’ve just deployed a new 1.1.11-SNAPSHOT of the library. This fixes a few minor issues and pending any major issues I hope can be merged into master.

@TheNetStriker can you also give this version a spin please?

Just tested the type defintions for the buttons of the Philips Hue Dimmer Switch.
Button Dimm Up and Button Dimm Down doesn´t seem to work at all, neither as a Switch type or Dimmer type?
Button I and Button O works fine.

For me it looks like, that all four buttons are trigger channels (https://www.openhab.org/docs/configuration/rules-dsl.html#channel-based-triggers). You should see something in the logs, when they are pressed.

Ok, should I keep using the binding without polling or should I update this library too?

Yes, I’d suggest to keep using that for now - otherwise I think your system will have congestion issues again until polling is improved.

I dont get it…
Nothing at all happens when I trigger (push) the Dimm Up, Dimm Down.
The Buttons I/O works, but they seem somehow connected.
When I press the ButtonI my switch goes ON allright. And when I press the ButtonO, my switch goes off. But this is due to a rule.
Nothing happens if I push the ButtonO… I get no log from it.
Wether or not they´re beeing trigger channels, I suspect they all should work as switches?

These are mig linked items:

Switch 	HueSwitch1			"Hue switch button 1 [%s]" 					        <switch>				{ channel="zigbee:philips_rwl021:4beca465:001788011032a21b:buttonI" }
Switch 	HueSwitch2			"Hue switchbuton 2 [%s]" 					        <switch>				{ channel="zigbee:philips_rwl021:4beca465:001788011032a21b:buttonO" }
Switch  HueSwitchDimUp                  "Hue switch Dimm Up [%s]" 										        { channel="zigbee:philips_rwl021:4beca465:001788011032a21b:dimUp" }
Switch  HueSwitchDimDwn                 "Hue switch Dimm Down [%s] " 									        	{ channel="zigbee:philips_rwl021:4beca465:001788011032a21b:dimDown" }
Number 	HueSwitch1_batteryPercent	"Hue switch1 Battery percent [%.0f %%]"					<Battery> 	(BatteriLevel) 		{ channel="zigbee:philips_rwl021:4beca465:001788011032a21b:batteryLevel" }
Number:ElectricPotential 	HueSwitch1_batteryVoltage		"Hue switch1 Battery voltage  [%s]" 	<Energy> 				{ channel="zigbee:philips_rwl021:4beca465:001788011032a21b:batteryVoltage" }

And this my rule to trigger the Hueswitch1.
(actually this only turn my Osram plugh ON/OFF).

rule "test Pilips hue switch ON"
when
	Item HueSwitch1 changed to ON
then 
	OsramPlug_OnOff.sendCommand(ON)
end

rule "test Pilips hue switch OFF"
when
	Item HueSwitch1 changed to OFF 
then 
	OsramPlug_OnOff.sendCommand(OFF)
end

The rule work fine, using the Buttons I/O…

2019-03-03 18:09:15.613 [vent.ItemStateChangedEvent] - HueSwitch1 changed from ON to OFF
2019-03-03 18:11:06.609 [vent.ItemStateChangedEvent] - HueSwitch1 changed from OFF to ON
2019-03-03 18:11:10.188 [vent.ItemStateChangedEvent] - HueSwitch1 changed from ON to OFF
2019-03-03 18:11:21.163 [vent.ItemStateChangedEvent] - HueSwitch1 changed from OFF to ON
2019-03-03 18:11:22.836 [vent.ItemStateChangedEvent] - HueSwitch1 changed from ON to OFF
2019-03-03 18:11:25.563 [vent.ItemStateChangedEvent] - HueSwitch1 changed from OFF to ON
2019-03-03 18:11:27.132 [vent.ItemStateChangedEvent] - HueSwitch1 changed from ON to OFF

But as said… It seems like the buttonsI/O is connected and therefore not useable as individuals.
Nothing at all happens, when I push the DimmUp/down.

in events.log you should get something like (note: I don’t own a hue switch, log is from a bitron video)

2019-03-03 18:22:00.803 [vent.ChannelTriggeredEvent] - zigbee:bitron-video-902010-23:706002137:00124b000955b140:key1 triggered SHORT_PRESSED

What do you see for ButtonI, ButtonO, and the DimButtons?

I don’t think so. But I could be wrong.

For ButtionI and ButtonO, I just posted the log…

2019-03-03 18:46:24.094 [vent.ChannelTriggeredEvent] - zigbee:philips_rwl021:4beca465:001788011032a21b:buttonI triggered SHORT_PRESSED
2019-03-03 18:46:27.260 [vent.ChannelTriggeredEvent] - zigbee:philips_rwl021:4beca465:001788011032a21b:buttonO triggered SHORT_PRESSED
2019-03-03 18:46:29.617 [vent.ChannelTriggeredEvent] - zigbee:philips_rwl021:4beca465:001788011032a21b:buttonI triggered SHORT_PRESSED
2019-03-03 18:46:30.298 [vent.ChannelTriggeredEvent] - zigbee:philips_rwl021:4beca465:001788011032a21b:buttonI triggered SHORT_PRESSED
2019-03-03 18:46:31.035 [vent.ChannelTriggeredEvent] - zigbee:philips_rwl021:4beca465:001788011032a21b:buttonI triggered SHORT_PRESSED
2019-03-03 18:46:31.476 [vent.ChannelTriggeredEvent] - zigbee:philips_rwl021:4beca465:001788011032a21b:buttonI triggered SHORT_PRESSED
2019-03-03 18:46:31.777 [vent.ChannelTriggeredEvent] - zigbee:philips_rwl021:4beca465:001788011032a21b:buttonI triggered SHORT_PRESSED
2019-03-03 18:46:32.425 [vent.ChannelTriggeredEvent] - zigbee:philips_rwl021:4beca465:001788011032a21b:buttonO triggered SHORT_PRESSED
2019-03-03 18:46:32.750 [vent.ChannelTriggeredEvent] - zigbee:philips_rwl021:4beca465:001788011032a21b:buttonO triggered SHORT_PRESSED
2019-03-03 18:46:33.011 [vent.ChannelTriggeredEvent] - zigbee:philips_rwl021:4beca465:001788011032a21b:buttonO triggered SHORT_PRESSED
2019-03-03 18:46:33.242 [vent.ChannelTriggeredEvent] - zigbee:philips_rwl021:4beca465:001788011032a21b:buttonO triggered SHORT_PRESSED

I get nothing for the DimmButtons.

So you basically only need one rule per channel (no need for switch items):

rule "Philips Hue ButtonI"
when
    Channel 'zigbee:philips_rwl021:4beca465:001788011032a21b:buttonI' triggered SHORT_PRESSED
then
    if(OsramPlug_OnOff.state == OFF){
        OsramPlug_OnOff.sendCommand(ON)
    } else {
        OsramPlug_OnOff.sendCommand(OFF)
    }
end

Are you on the latest zigbee library? Support for the dim buttons was merged on 16th January, see https://github.com/openhab/org.openhab.binding.zigbee/pull/352
Edit: I missed that you are on the latest snapshot… Sorry.