Skip to content
Permalink
Browse files

Create SXiGatewayRGB_commands.php

Добавлена поддержка голосовых команд из ПУ (пока вкл./выкл, вкл. на столько, выкл. через столько)
  • Loading branch information...
Alexandr-logrus committed Dec 17, 2018
1 parent d7f7567 commit ae08d17636867b374b2419feb87884e6537d1309
Showing with 17 additions and 0 deletions.
  1. +17 −0 modules/devices/addons/SXiGatewayRGB_commands.php
@@ -0,0 +1,17 @@
<?php
if ($device_type == 'rgbgt') {
if (preg_match('/' . LANG_DEVICES_PATTERN_TURNON . '/uis', $command)) {
sayReplySafe(LANG_TURNING_ON . ' ' . $device_title . $add_phrase, 2);
$run_code .= "callMethodSafe('$linked_object.turnOn');";
$opposite_code .= "callMethodSafe('$linked_object.turnOff');";
$processed = 1;
//$reply_confirm = 1;
} elseif (preg_match('/' . LANG_DEVICES_PATTERN_TURNOFF . '/uis', $command)) {
sayReplySafe(LANG_TURNING_OFF . ' ' . $device_title . $add_phrase, 2);
$run_code .= "callMethodSafe('$linked_object.turnOff');";
$opposite_code .= "callMethodSafe('$linked_object.turnOn');";
$processed = 1;
//$reply_confirm = 1;
}
}

0 comments on commit ae08d17

Please sign in to comment.
You can’t perform that action at this time.