question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[homekit] Lightning Dimmer sends 2 commands

See original GitHub issue

Hello, i check the headlines for the “homekit” issues, but nothing matches my problem.

“Wrong behaviuor” homekit Dimmer with iOS 11 iPhone 7 and knx

ITEM Config: Dimmer Weiss "Weiss Dimmer [%s]" (Lights) [ "Lighting" ] { knx="1/4/1, 1/4/2, 1/4/3+<1/4/4" }

In Homekit the icon has 2 functions:

  • tap (ON or OFF)
  • long tap for slider (Percent)

first tap: ON

Openhab2 log

2017-10-14 03:45:21.227 [ItemCommandEvent ] - Item ‘Weiss’ received command ON 2017-10-14 03:45:21.242 [ItemCommandEvent ] - Item ‘Weiss’ received command 100 2017-10-14 03:45:21.454 [ItemStateChangedEvent ] - Weiss changed from 0 to 50

KNX Groupmonitor

Zeit	Dienst	Flags 	Prio	Quell-Adresse	Quell-Name	Ziel-Adresse	Ziel-Name	Rout	Typ	DPT	Info

46 14.10.2017 03:44:56,022 vom Bus Niedrig 0.0.4 - 1/4/1 Gruppe1 weiss an 5 GroupValueWrite 1.001 Schalten $01 | Ein 47 14.10.2017 03:44:56,049 vom Bus Niedrig 0.0.4 - 1/4/3 Gruppe1 weiss wert 5 GroupValueWrite 5.001 Prozent (0…100%) $FF | 100 % 48 14.10.2017 03:44:56,229 vom Bus Niedrig 1.1.1 KNX DALI-Gateway REG-K/1/16(64)/64 1/4/4 Gruppe1 weiss status 5 GroupValueWrite 5.001 Prozent (0…100%) $80 | 50 %

Result

Lights on with 50% (Config in KNX Dali modul for GA 1/4/1 ON) homekit icon change to ON (white, bulb yellow), the percent display short 100%, next millisecond 50% ==> homekit sends wrong command 100%

second tap: OFF

Openhab2 log

2017-10-14 03:51:24.423 [ItemCommandEvent ] - Item ‘Weiss’ received command OFF 2017-10-14 03:51:24.681 [ItemStateChangedEvent ] - Weiss changed from 50 to 0

KNX Groupmonitor

Zeit	Dienst	Flags 	Prio	Quell-Adresse	Quell-Name	Ziel-Adresse	Ziel-Name	Rout	Typ	DPT	Info

1 14.10.2017 03:50:59,216 vom Bus Niedrig 0.0.4 - 1/4/1 Gruppe1 weiss an 5 GroupValueWrite 1.001 Schalten $00 | Aus 2 14.10.2017 03:50:59,451 vom Bus Niedrig 1.1.1 KNX DALI-Gateway REG-K/1/16(64)/64 1/4/4 Gruppe1 weiss status 5 GroupValueWrite 5.001 Prozent (0…100%) $00 | 0 %

Result

Lights off homekit icon change to Off (grey) ==> Okay

long tap: slider (from OFF to 15%)

Openhab2 log

2017-10-14 03:53:59.102 [ItemCommandEvent ] - Item ‘Weiss’ received command ON 2017-10-14 03:53:59.109 [ItemCommandEvent ] - Item ‘Weiss’ received command 13 2017-10-14 03:53:59.231 [ItemStateChangedEvent ] - Weiss changed from 0 to 50 2017-10-14 03:53:59.360 [ItemCommandEvent ] - Item ‘Weiss’ received command ON 2017-10-14 03:53:59.370 [ItemCommandEvent ] - Item ‘Weiss’ received command 14 2017-10-14 03:53:59.717 [ItemCommandEvent ] - Item ‘Weiss’ received command ON 2017-10-14 03:53:59.724 [ItemCommandEvent ] - Item ‘Weiss’ received command 15

KNX Groupmonitor

Zeit	Dienst	Flags 	Prio	Quell-Adresse	Quell-Name	Ziel-Adresse	Ziel-Name	Rout	Typ	DPT	Info

3 14.10.2017 03:53:33,891 vom Bus Niedrig 0.0.4 - 1/4/1 Gruppe1 weiss an 5 GroupValueWrite 1.001 Schalten $01 | Ein 4 14.10.2017 03:53:33,918 vom Bus Niedrig 0.0.4 - 1/4/3 Gruppe1 weiss wert 5 GroupValueWrite 5.001 Prozent (0…100%) $21 | 13 % 5 14.10.2017 03:53:34,004 vom Bus Niedrig 1.1.1 KNX DALI-Gateway REG-K/1/16(64)/64 1/4/4 Gruppe1 weiss status 5 GroupValueWrite 5.001 Prozent (0…100%) $80 | 50 % 6 14.10.2017 03:53:34,144 vom Bus Niedrig 0.0.4 - 1/4/1 Gruppe1 weiss an 5 GroupValueWrite 1.001 Schalten $01 | Ein 7 14.10.2017 03:53:34,172 vom Bus Niedrig 0.0.4 - 1/4/3 Gruppe1 weiss wert 5 GroupValueWrite 5.001 Prozent (0…100%) $24 | 14 % 8 14.10.2017 03:53:34,506 vom Bus Niedrig 0.0.4 - 1/4/1 Gruppe1 weiss an 5 GroupValueWrite 1.001 Schalten $01 | Ein 9 14.10.2017 03:53:34,534 vom Bus Niedrig 0.0.4 - 1/4/3 Gruppe1 weiss wert 5 GroupValueWrite 5.001 Prozent (0…100%) $26 | 15 %

Result

Lights on with 50% (Config in KNX Dali modul for GA 1/4/1 ON) homekit slider shows 15% (wrong value) BasicUI shows 50% (right value) ==> homekit sends the wrong command ON

long tap: slider (from 15% to 72%)

Openhab2 log

2017-10-14 03:58:10.020 [ItemCommandEvent ] - Item ‘Weiss’ received command ON 2017-10-14 03:58:10.029 [ItemCommandEvent ] - Item ‘Weiss’ received command 58 2017-10-14 03:58:10.273 [ItemCommandEvent ] - Item ‘Weiss’ received command ON 2017-10-14 03:58:10.280 [ItemCommandEvent ] - Item ‘Weiss’ received command 72

KNX Groupmonitor

Zeit	Dienst	Flags 	Prio	Quell-Adresse	Quell-Name	Ziel-Adresse	Ziel-Name	Rout	Typ	DPT	Info

10 14.10.2017 03:57:44,805 vom Bus Niedrig 0.0.4 - 1/4/1 Gruppe1 weiss an 5 GroupValueWrite 1.001 Schalten $01 | Ein 11 14.10.2017 03:57:44,832 vom Bus Niedrig 0.0.4 - 1/4/3 Gruppe1 weiss wert 5 GroupValueWrite 5.001 Prozent (0…100%) $94 | 58 % 12 14.10.2017 03:57:45,055 vom Bus Niedrig 0.0.4 - 1/4/1 Gruppe1 weiss an 5 GroupValueWrite 1.001 Schalten $01 | Ein 13 14.10.2017 03:57:45,082 vom Bus Niedrig 0.0.4 - 1/4/3 Gruppe1 weiss wert 5 GroupValueWrite 5.001 Prozent (0…100%) $B8 | 72 %

Result

Lights on with 50% (Config in KNX Dali modul for GA 1/4/1 ON) homekit slider shows 15% (wrong value) BasicUI shows 50% (right value / no change, because no ItemStateChangedEvent was send) ==> homekit sends the wrong command ON## long tap: slider (from 72% to OFF)

Openhab2 log

2017-10-14 04:02:26.882 [ItemCommandEvent ] - Item ‘Weiss’ received command OFF 2017-10-14 04:02:26.891 [ItemCommandEvent ] - Item ‘Weiss’ received command 0 2017-10-14 04:02:27.034 [ItemStateChangedEvent ] - Weiss changed from 50 to 0

KNX Groupmonitor

Zeit	Dienst	Flags 	Prio	Quell-Adresse	Quell-Name	Ziel-Adresse	Ziel-Name	Rout	Typ	DPT	Info

14 14.10.2017 04:02:01,658 vom Bus Niedrig 0.0.4 - 1/4/1 Gruppe1 weiss an 5 GroupValueWrite 1.001 Schalten $00 | Aus 15 14.10.2017 04:02:01,685 vom Bus Niedrig 0.0.4 - 1/4/3 Gruppe1 weiss wert 5 GroupValueWrite 5.001 Prozent (0…100%) $00 | 0 % 16 14.10.2017 04:02:01,788 vom Bus Niedrig 1.1.1 KNX DALI-Gateway REG-K/1/16(64)/64 1/4/4 Gruppe1 weiss status 5 GroupValueWrite 5.001 Prozent (0…100%) $00 | 0 %

Result

Lights off homekit slider shows OFF ==> homekit sends the wrong command OFF

Feature Request

Send only one command for a Lighting / Dimmer item: on short tap: ON or OFF long tap (slider): Percent

System

Openhabian 2.1.0 / KNX1 Binding 1.1.0 / Homekit MISC 2.1.0 (2 entrys, because feature.xml contains 2 entrys) feature:list openhab-binding-knx1 | 1.10.0 | Started | addons-2.1.0 | KNX Binding openhab-misc-homekit | 2.1.0 | x | Started | addons-2.1.0 | HomeKit Integration openhab-misc-homekit | 2.1.0 | x | Started | addons-2.1.0 | HomeKit Integration

I hope, my explanation is okay. Please tell me, if this is the wrong place for this request.

THX Florian

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:29 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
weakflcommented, Apr 10, 2018

FWIW, you can work around the level issue with a dummy item for HomeKit and some rules. At least the level doesn’t jump around like crazy while being adjusted through HomeKit…

your.items example:

Dimmer KitchenCeilingLight                      "Deckenlampe" <light> (gKitchen, gLights) { channel="zigbee:device:XYZ_1_switch_level" }
Dimmer KitchenCeilingLightHomeKit               "Deckenlampe" <light> (gKitchen) [ "Lighting" ]

your.rules example:

// Kitchen Ceiling Light
rule "KitchenCeilingLightHomeKit"
when
    Item KitchenCeilingLightHomeKit received command
then
    if (receivedCommand != ON && receivedCommand != OFF) {
        KitchenCeilingLight.sendCommand(receivedCommand)
    } else if (receivedCommand == OFF) {
        KitchenCeilingLight.sendCommand(0)
    }
end

rule "KitchenCeilingLight"
when
    Item KitchenCeilingLight received update
then
    val level = KitchenCeilingLight.state as Number
    KitchenCeilingLightHomeKit.postUpdate(level)
end
1reaction
yfrecommented, Jun 1, 2020

@FabianZellmer @2xPower

please test once this PR https://github.com/openhab/openhab-addons/pull/7825 get merged. current logic:

  • ON and Brightness commands within 50ms - only ON is sent
Read more comments on GitHub >

github_iconTop Results From Across the Web

[homekit] Homekit sending ON and 100 Command - Beginners
I'm using openHAB 2.5.5 (latest) and having problems configuring my homekit the right way. I will controll a Dimmable KNX Switch with homekit....
Read more >
How to group lights in HomeKit - Trusted Reviews
To do this, long-press any light, then tap the Settings cog. Scroll down and select the Group with Other Accessories link. This will...
Read more >
Integrating Apple HomeKit with the Lutron App
This article will provide instructions on integrating Apple HomeKit with your Lutron Lighting control system via the Lutron App. It will provide step...
Read more >
9 Best Smart Switches and Dimmers for Apple HomeKit of 2022
The best smart switches and dimmers that work with Apple HomeKit and Siri are from Leviton, Wemo, Eve, Meross, Lutron.
Read more >
Lutron's Caseta lighting controls are now Apple HomeKit ...
New Caseta Smart Bridge lets you use Siri to control Lutron dimmers and Serena window shades.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found