Hallo Zusammen,
scheint zu funktionieren, zumindest bei mir
Der Dateiname ist {EE4A81C6-5C90-4DB7-AD2F-F6BBD521412E} und sie gehört ins Unterverzeichnis data\devices
Gruss,
Udo
<?
require_once("abstracts\SwitchBasic.php");
$this->register(basename(__file__), "SwitchHomeMatic");
class SwitchHomeMatic extends SwitchBasic
{
public function setStatus($status)
{
return @HM_Device($this->instanceid, $status);
}
protected function getStatusID()
{
return $this->getID("STATE");
}
public function toggleStatus()
{
HM_WriteValueBoolean(($this->instanceid), "STATE" , !GetValue($this->getID("STATE")));
return @HM_Device($this->instanceid);
}
}
?>
Am Anfang kommt einmal diese Fehlermeldung „Error: JSON was not comment filtered“, danach ist Ruhe. Wenn jemand einen Hinweis zur Verbesserung etc. hat, ich würde mich freuen.
Homatic.rar (410 Bytes)