Hallo,
Ich habe mir dazu folgende Lösung mit Homegear-System-Variablen gebastelt:
rc $hg->addEvent(array("TYPE" => 0, "ID" => "schalter_oben_ein", "PEERID" => 5, "PEERCHANNEL" => 1, "VARIABLE" => "PRESS_SHORT", "TRIGGER" => 8, "TRIGGERVALUE" => TRUE, "EVENTMETHOD" => "setSystemVariable", "EVENTMETHODPARAMS" => array("Schalter_O", TRUE) ))
rc $hg->addEvent(array("TYPE" => 0, "ID" => "schalter_unten_aus", "PEERID" => 5, "PEERCHANNEL" => 1, "VARIABLE" => "PRESS_SHORT", "TRIGGER" => 8, "TRIGGERVALUE" => TRUE, "EVENTMETHOD" => "setSystemVariable", "EVENTMETHODPARAMS" => array("Schalter_U", FAlSE) ))
rc $hg->addEvent(array("TYPE" => 0, "ID" => "schalter_unten_ein", "PEERID" => 5, "PEERCHANNEL" => 2, "VARIABLE" => "PRESS_SHORT", "TRIGGER" => 8, "TRIGGERVALUE" => TRUE, "EVENTMETHOD" => "setSystemVariable", "EVENTMETHODPARAMS" => array("Schalter_U", TRUE) ))
rc $hg->addEvent(array("TYPE" => 0, "ID" => "schalter_oben_aus", "PEERID" => 5, "PEERCHANNEL" => 2, "VARIABLE" => "PRESS_SHORT", "TRIGGER" => 8, "TRIGGERVALUE" => TRUE, "EVENTMETHOD" => "setSystemVariable", "EVENTMETHODPARAMS" => array("Schalter_O", FALSE) ))
Dann kann man den letzten Zustand einfach aus den Systemvariablen entnehmen.
Gruß, Alexander