1
0

directory script is now subdir of hooks and creating other directories in hooks dir

This commit is contained in:
daniel Tartavel 2022-01-01 06:30:04 +01:00
parent 4e9aa8aeb5
commit cac1c638b9
2 changed files with 0 additions and 34 deletions

View File

@ -1,2 +0,0 @@
<?php
$notificationMethods["freemobile"] = new notificationMethod("https://smsapi.free-mobile.fr/sendmsg?user=32886706&pass=JTGUY6l5OG73zX&msg=");

View File

@ -1,32 +0,0 @@
<?php
$scriptTopic = Z2M;
//callback function
$rdcPanneau = function($topic, $fn, $param, $value)
{
global $devices, $indexDevices;
$delay = 3;
$timeUnit = "min";
switch($param)
{
case "occupancy":
if ($value == 1)
{
$msg = array("state" => "ON");
$device = $devices[Z2M][$indexDevices["0x588e81fffe343e8f"]];
$device->payload = $msg;
$device->set(null);
setDelay($device, $delay, $timeUnit, "state", "OFF", true);
}
break;
}
echo _("notification received from MQTT") . EOL;
//echo $param . "=> " . $value . EOL;
};
//assignation of the function to the sensors devices
$indexDevices["0x00124b0022ebac5c"]->functions[] = $rdcPanneau;
$indexDevices["0x588e81fffe2cf695"]->functions[] = $rdcPanneau;
$indexDevices["0x04cf8cdf3c78aff0"]->functions[] = $rdcPanneau;
?>