Exec binding / Homekit Switch

Hi there,

my my problem is, that i have got a 433MHz item as string. That works fine.

Right now, i want to use Homekit, but Homekit allows ony items as Switch, and Switch does not allow exec with input (wich i need) it allows only exec with run, but i need to send 2 params to my .sh-script.

I tried to do it with rules, but there are the same problems…

Any ideas for this problem?

BR,
xtoasty

yes, homekit does not support any input.
probably you need to have a switch in homekit for any parameter combination and mapped it with rules to your parameters

Hi @yfre .

thanks for quick reply.

This might be a good idea, but not for SIRI. I don’t know how to tell SIRI to turn off one light, with n-Switches in Homekit for one Light…?!

BR
xtoasty

not sure what the parameters means but you can name the switch accordantly, e.g.
“Home Light Blue”
“Home Light green”
and then tell Sire “Switch on Home Light Blue”.

in general, Homekit is very limited and not that open as alexa. for non-supported device you need to make workarounds

Hi @yfre

String poweroutletASwitch “Spot []” (grp_poweroutlets) { channel=“exec:command:poweroutletA-control:input”, autoupdate=“true” }

This is, what i have and it woks with 433MHz Bridge, but not with Homekit/SIRI.

To use it with SIRI i have to change it to:

Switch poweroutletASwitch “Spot []” (grp_poweroutlets) { channel=“exec:command:poweroutletA-control:input”, autoupdate=“true” }

But then the :input doesn’t work. Only Switch & :run is possible, but :run doesn’t accept params…

what kind of parameters you can provide to exec?
probably you need to work with virtual item and rules
someting like this

String poweroutletASwitch “Spot []” (grp_poweroutlets) { channel=“exec:command:poweroutletA-control:input”, autoupdate=“true” }
Switch powerOutletAHomekit "Spot" {homekit="Outlet"}

rule

rule "Mapping for homekitt"
when
    Item powerOutletAHomekit received update
then
     if (powerOutletAHomekit == ON) {
          poweroutletASwitch.sendCommand("your parameter for ON");
    } else {
         poweroutletASwitch.sendCommand("your parameter for OFF");
     }
end

if you have more than 2 parameters then you would need to work with multiple switches in homekit

That’s what i needed… THANKS @yfre !

1 Like