I am running OH2 with Zwave lighting switch and HomeKit addon. Setup works fine except switch status update.
F.e I turn off lights using OH or HomeKit app and see light icon indicates that it is off. But if I manually turn the light off (pressing button on switch itself), OH (or HomeKit) doesn’t update item status. So I have to guess is it on or off.
You need a rule that updates your switch. I have a similar setup, and use the following rules to make that all work:
rule "Populate lr_ReadingLamp from zwave_device_7313d737_node3_switch_binary"
when
Item zwave_device_7313d737_node3_switch_binary received update or
System started
then
lr_ReadingLamp.postUpdate(zwave_device_7313d737_node3_switch_binary.state)
end
rule "lr_ReadingLamp switched"
when
Item lr_ReadingLamp received command
then
zwave_device_7313d737_node3_switch_binary.sendCommand(receivedCommand)
end
Sure. The item zwave_device_7313d737_node3_switch_binary was created by PaperUI when the Thing was added. The item lr_ReadingLamp is not linked to the Thing at all, and its defined as: Switch lr_ReadingLamp "Living Room Reading Lamp [%s]" (livingRoom) [ "Lighting" ]
Sorry for being annoying, but it doesn’t work for me. I tried all possible and impossible variations for these rules. So rule “lr_ReadingLamp switched” works fine, it updates OH item when I use HomeKit app. But first rule where it has to populate Lamp switch status from zwave doesn’t work. Here is what i have in my conf files.
Rule:
rule "Populate lr_ReadingLamp from zwave_device_15811533c44_node6_switch_dimmer"
when
Item zwave_device_15811533c44_node6_switch_dimmer received update or
System started
then
lr_ReadingLamp.postUpdate( zwave_device_15811533c44_node6_switch_dimmer.state)
end
rule "lr_ReadingLamp switched"
when
Item lr_ReadingLamp received command
then
zwave_device_15811533c44_node6_switch_dimmer.sendCommand(receivedCommand)
end
Any ideas what I am doing wrong ? I am using latest snapshot of OH2.
Just to clarify, if I physically turn off switch it updates OH status, but not HomeKit.
Sorry, I didn’t realize you were using a dimmer. I have an example for a dimmer too. With my dimmer, I encountered a weird issue with HomeKit, you should take a look at my post here to see if it’s relevant to you: HomeKit Dimmer sends ON before level