]";
}
my $name = $a[0];
$type = uc($a[2]) if (int(@a) > 2);
$deviceid = $a[3] if (int(@a) > 3);
$devicelog = $a[4] if (int(@a) > 4);
$commandcodes = $a[5] if ($type eq "PT2262" && int(@a) > 5);
if ($type ne "X10" && $type ne "ARC" && $type ne "MS14A" && $type ne "AB400D" && $type ne "WAVEMAN" && $type ne "EMW200" && $type ne "IMPULS" && $type ne "RISINGSUN" && $type ne "PHILIPS_SBC" && $type ne "AC" && $type ne "HOMEEASY" && $type ne "ANSLUT" && $type ne "KOPPLA" && $type ne "LIGHTWAVERF" && $type ne "EMW100" && $type ne "BBSB" && $type ne "TRC02" && $type ne "PT2262" && $type ne "ENER010" && $type ne "ENER5" && $type ne "COCO_GDR2" && $type ne "MDREMOTE" && $type ne "RSL2" && $type ne "LIVOLO" && $type ne "BLYSS" && $type ne "BYRONSX" && $type ne "SIEMENS_SF01" && $type ne "HARRISON" && $type ne "ROLLER_TROL" && $type ne "HASTA_OLD" && $type ne "AOK_RF01" && $type ne "AOK_AC114" && $type ne "RAEX_YR1326" && $type ne "MEDIA_MOUNT" && $type ne "DC106" && $type ne "FOREST" && $type ne "RFY" && $type ne "RFY_ext") {
Log3 $name, 1,"TRX_LIGHT_Define() wrong type: $type";
return "TRX_LIGHT: wrong type: $type";
}
my $my_type;
if ($type eq "MS14A") {
$my_type = "X10"; # device will be received as X10
} else {
$my_type = $type;
}
my $device_name = "TRX".$DOT.$my_type;
if ($deviceid ne "") { $device_name .= $DOT.$deviceid };
$hash->{TRX_LIGHT_deviceid} = $deviceid;
$hash->{TRX_LIGHT_devicelog} = $devicelog;
$hash->{TRX_LIGHT_commandcodes} = $commandcodes if ($type eq "PT2262");
$hash->{TRX_LIGHT_type} = $type;
#$hash->{TRX_LIGHT_CODE} = $deviceid;
$modules{TRX_LIGHT}{defptr}{$device_name} = $hash;
if (int(@a) == 7) {
# there is a second deviceid:
#
my $deviceid2 = $a[5];
my $devicelog2 = $a[6];
my $device_name2 = "TRX".$DOT.$my_type.$DOT.$deviceid2;
$hash->{TRX_LIGHT_deviceid2} = $deviceid2;
$hash->{TRX_LIGHT_devicelog2} = $devicelog2;
#$hash->{TRX_LIGHT_CODE2} = $deviceid2;
$modules{TRX_LIGHT}{defptr2}{$device_name2} = $hash;
}
AssignIoPort($hash);
return undef;
}
#####################################
sub
TRX_LIGHT_Undef($$)
{
my ($hash, $name) = @_;
delete($modules{TRX_LIGHT}{defptr}{$name});
return undef;
}
############################################
# T R X _ L I G H T _ p a r s e _ X 1 0 ( )
#-------------------------------------------
sub TRX_LIGHT_parse_X10 ($$)
{
my ($hash, $bytes) = @_;
my $error = "";
#my $device;
my $type = $bytes->[0];
my $subtype = $bytes->[1];
my $dev_type;
my $dev_reading;
my $rest;
my $type_subtype = ($type << 8) + $subtype;
if (exists $light_device_codes{$type_subtype}) {
my $rec = $light_device_codes{$type_subtype};
($dev_type, $dev_reading) = @$rec;
} else {
$error = sprintf "TRX_LIGHT: error undefined type=%02x, subtype=%02x", $type, $subtype;
Log3 $hash, 1, "TRX_LIGHT_parse_X10() ".$error;
return $error;
}
if ($dev_type eq "BBSB") { return " "; } # ignore BBSB messages temporarily because of receiving problems
my $device;
my $data;
if ($type == 0x10 || $type == 0x18) {
my $dev_first = "?";
my %x10_housecode =
(
0x41 => "A",
0x42 => "B",
0x43 => "C",
0x44 => "D",
0x45 => "E",
0x46 => "F",
0x47 => "G",
0x48 => "H",
0x49 => "I",
0x4A => "J",
0x4B => "K",
0x4C => "L",
0x4D => "M",
0x4E => "N",
0x4F => "O",
0x50 => "P",
);
my $devnr = $bytes->[3]; # housecode
if (exists $x10_housecode{$devnr}) {
$dev_first = $x10_housecode{$devnr};
} else {
$error = sprintf "TRX_LIGHT: x10_housecode wrong housecode=%02x", $devnr;
Log3 $hash, 1, "TRX_LIGHT_parse_X10() ".$error;
return $error;
}
my $unit = $bytes->[4]; # unitcode
$device = sprintf '%s%0d', $dev_first, $unit;
$data = $bytes->[5];
} elsif ($type == 0x11) {
$device = sprintf '%02x%02x%02x%02x%02x', $bytes->[3], $bytes->[4], $bytes->[5], $bytes->[6], $bytes->[7];
$data = $bytes->[8];
} elsif ($type == 0x14) {
$device = sprintf '%02x%02x%02x%02x', $bytes->[3], $bytes->[4], $bytes->[5], $bytes->[6];
$data = $bytes->[7];
} elsif ($type == 0x15) {
$device = sprintf '%02x%02x%c%d', $bytes->[3], $bytes->[4], $bytes->[5], $bytes->[6];
$data = $bytes->[7];
} elsif ($type == 0x16) { #Chime
$device = sprintf '%02x', $bytes->[4];
$data = $bytes->[5];
} elsif ($type == 0x17) { # Fan
$device = sprintf '%02x%02x%02x', $bytes->[3], $bytes->[4], $bytes->[5];
$data = $bytes->[6];
} elsif ($type == 0x19) { # Blinds1
$device = sprintf '%02x%02x%02x%02x', $bytes->[3], $bytes->[4], $bytes->[5], $bytes->[6];
$data = $bytes->[7];
} elsif ($type == 0x1A) { # RFY
$device = printf '%02x%02x%02x%02x', $bytes->[3], $bytes->[4], $bytes->[5], $bytes->[6];
$data = $bytes->[7];
} else {
$error = sprintf "TRX_LIGHT: wrong type=%02x", $type;
Log3 $hash, 1, "TRX_LIGHT_parse_X10() ".$error;
return $error;
}
my $hexdata = sprintf '%02x', $data;
my $command = "";
if (exists $light_device_commands{$type_subtype}) {
my $code = $light_device_commands{$type_subtype};
if (exists $code->[$data]) {
$command = $code->[$data];
} else {
$error = sprintf "TRX_LIGHT: unknown cmd type_subtype=%02x cmd=%02x", $type_subtype, $data;
Log3 $hash, 1, "TRX_LIGHT_parse_X10() ".$error;
return $error;
}
} else {
$error = sprintf "TRX_LIGHT: unknown type_subtype %02x data=%02x", $type_subtype, $data;
Log3 $hash, 1, "TRX_LIGHT_parse_X10() ".$error;
return $error;
}
#my @res;
my $current = "";
#--------------
my $device_name = "TRX".$DOT.$dev_type.$DOT.$device;
Log3 $hash, 5, "TRX_LIGHT: device_name=$device_name data=$hexdata";
my $firstdevice = 1;
my $def = $modules{TRX_LIGHT}{defptr}{$device_name};
if(!$def) {
$firstdevice = 0;
$def = $modules{TRX_LIGHT}{defptr2}{$device_name};
if (!$def) {
Log3 $hash, 5, "TRX_LIGHT_parse_X10() UNDEFINED $device_name TRX_LIGHT $dev_type $device $dev_reading";
Log3 $hash, 3, "TRX_LIGHT_parse_X10() Unknown device $device_name, please define it";
return "UNDEFINED $device_name TRX_LIGHT $dev_type $device $dev_reading";
}
}
# Use $def->{NAME}, because the device may be renamed:
my $name = $def->{NAME};
return "" if(IsIgnored($name));
Log3 $name, 5, "TRX_LIGHT_parse_X10() $name devn=$device_name first=$firstdevice command=$command, cmd=$hexdata";
my $n = 0;
my $tm = TimeNow();
my $val = "";
my $device_type = $def->{TRX_LIGHT_type};
my $sensor = "";
if ($device_type eq "MS14A") {
# for ms14a behave like x10
$device_type = "X10";
}
if (lc($def->{TRX_LIGHT_devicelog}) eq "window" || lc($def->{TRX_LIGHT_devicelog}) eq "door") {
$command = ($command eq "on") ? "Open" : "Closed" ;
} elsif (lc($def->{TRX_LIGHT_devicelog}) eq "motion") {
$command = ($command eq "on") ? "alert" : "normal" ;
} elsif (lc($def->{TRX_LIGHT_devicelog}) eq "lightsensor" || lc($def->{TRX_LIGHT_devicelog}) eq "photosensor") {
$command = ($command eq "on") ? "dark" : "bright" ;
} elsif (lc($def->{TRX_LIGHT_devicelog}) eq "lock") {
$command = ($command eq "on") ? "Closed" : "Open" ;
} elsif (lc($def->{TRX_LIGHT_devicelog}) eq "ring") {
$command = ($command eq "on") ? "normal" : "alert" ;
}
readingsBeginUpdate($def);
if ($type == 0x10 || $type == 0x11 || $type == 0x14 || $type == 0x16) {
# try to use it for all types:
$current = $command;
if ($type == 0x11 && $command eq "level") {
# append level number
my $level = $bytes->[9];
$current .= sprintf " %d", $level;
} elsif ($type == 0x14 && $command eq "level") {
# append level number
my $level = $bytes->[8];
$current .= sprintf " %d", $level;
}
$sensor = $firstdevice == 1 ? $def->{TRX_LIGHT_devicelog} : $def->{TRX_LIGHT_devicelog2};
$val .= $current;
if ($sensor ne "none") { readingsBulkUpdate($def, $sensor, $current); }
} else {
$error = sprintf "TRX_LIGHT: error unknown sensor type=%x device_type=%s devn=%s first=%d command=%s", $type, $device_type, $device_name, $firstdevice, $command;
Log3 $name, 1, "TRX_LIGHT_parse_X10() ".$error;
return $error;
}
if (($firstdevice == 1) && $val) {
#$def->{STATE} = $val;
readingsBulkUpdate($def, "state", $val);
}
readingsEndUpdate($def, 1);
return $name;
}
########################################################
# T R X _ L I G H T _ p a r s e _ P T 2 2 6 2 ( )
#-------------------------------------------------------
sub TRX_LIGHT_parse_PT2262 ($$)
{
my ($hash, $bytes) = @_;
my $error = "";
#my $device;
my $type = $bytes->[0];
my $subtype = $bytes->[1];
my $dev_type;
my $dev_reading;
my $rest;
my $type_subtype = ($type << 8) + $subtype;
if (exists $light_device_codes{$type_subtype}) {
my $rec = $light_device_codes{$type_subtype};
($dev_type, $dev_reading) = @$rec;
} else {
$error = sprintf "TRX_LIGHT: PT2262 error undefined type=%02x, subtype=%02x", $type, $subtype;
Log3 $hash, 1, "TRX_LIGHT_parse_PT2262() ".$error;
return $error;
}
my $device;
$device = "";
my $command = "error";
my $current = "";
my $hexdata = sprintf '%02x%02x%02x', $bytes->[3], $bytes->[4], $bytes->[5];
my $hex_length = length($hexdata);
my $bin_length = $hex_length * 4;
my $bindata = unpack("B$bin_length", pack("H$hex_length", $hexdata));
#my @a = ($bindata =~ /[0-1]{2}/g);
my $base_4 = $bindata;
$base_4 =~ s/(.)(.)/$1*2+$2/eg;
my $codes = $base_4;
#$codes =~ tr/0123/UMED/; # Up,Middle,Error,Down
$codes =~ s/0/up /g; #
$codes =~ s/1/middle /g; #
$codes =~ s/2/err /g; #
$codes =~ s/3/down /g; #
my $device_name = "TRX".$DOT.$dev_type;
my $command_codes = "";
my $command_rest = "";
my $def;
# look for defined device with longest ID matching first:
for (my $i=11; $i>0;$i--){
if ($modules{TRX_LIGHT}{defptr}{$device_name.$DOT.substr($base_4,0,$i)}) {
$device = substr($base_4,0,$i);
$def = $modules{TRX_LIGHT}{defptr}{$device_name.$DOT.substr($base_4,0,$i)};
$command_codes = $def->{TRX_LIGHT_commandcodes};
$command_rest = substr($base_4,$i);
Log3 $hash, 5, "TRX_LIGHT_parse_PT2262() found device_name=$device_name i=$i code=$base_4 commandcodes='$command_codes' command_rest='$command_rest' ";
}
}
#--------------
if ($device ne "") {
# found a device
Log3 $hash, 5, "TRX_LIGHT: PT2262 found device_name=$device_name data=$hexdata";
$device_name .= $DOT.$device
} else {
# no specific device found. Using generic one:
Log3 $hash, 5, "TRX_LIGHT: PT2262 device_name=$device_name data=$hexdata";
$def = $modules{TRX_LIGHT}{defptr}{$device_name};
if(!$def) {
$dev_reading = "";
Log3 $hash, 5, "TRX_LIGHT_parse_PT2262() UNDEFINED $device_name TRX_LIGHT $dev_type $device $dev_reading";
Log3 $hash, 3, "TRX_LIGHT_parse_PT2262() Unknown device $device_name, please define it";
return "UNDEFINED $device_name TRX_LIGHT $dev_type $device $dev_reading";
}
}
# Use $def->{NAME}, because the device may be renamed:
my $name = $def->{NAME};
return "" if(IsIgnored($name));
Log3 $name, 5, "TRX_LIGHT_parse_PT2262() $name devn=$device_name command=$command, cmd=$hexdata";
my $n = 0;
my $val = "";
my $device_type = $def->{TRX_LIGHT_type};
my $sensor = $def->{TRX_LIGHT_devicelog};
readingsBeginUpdate($def);
$current = $command;
if ($device eq "") {
#readingsBulkUpdate($def, "hex", $hexdata);
#readingsBulkUpdate($def, "bin", $bindata);
#readingsBulkUpdate($def, "base_4", $base_4);
#readingsBulkUpdate($def, "codes", $codes);
$val = $base_4;
} else {
# look for command code:
$command_codes .= ",";
#if ($command_codes =~ /$command_rest:(.*),/o ) {
if ($command_codes =~ /$command_rest:([a-z|A-Z]*),/ ) {
Log3 $name, 5,"PT2262: found=$1";
$command = $1;
}
Log3 $name, 5,"TRX_LIGHT_parse_PT2262() readingsBulkUpdate($def, $sensor, $command)";
$val = $command;
if ($sensor ne "none") { readingsBulkUpdate($def, $sensor, $val); }
}
readingsBulkUpdate($def, "state", $val);
readingsEndUpdate($def, 1);
return $name;
}
####################################
# T R X _ L I G H T _ P a r s e ( )
#-----------------------------------
sub
TRX_LIGHT_Parse($$)
{
my ($iohash, $hexline) = @_;
my $time = time();
# convert to binary
my $msg = pack('H*', $hexline);
if ($time_old ==0) {
Log3 $iohash, 5, "TRX_LIGHT_Parse() decoding delay=0 hex=$hexline";
} else {
my $time_diff = $time - $time_old ;
Log3 $iohash, 5, "TRX_LIGHT_Parse() decoding delay=$time_diff hex=$hexline";
}
$time_old = $time;
# convert string to array of bytes. Skip length byte
my @rfxcom_data_array = ();
foreach (split(//, substr($msg,1))) {
push (@rfxcom_data_array, ord($_) );
}
my $num_bytes = ord($msg);
if ($num_bytes < 3) {
return "";
}
my $type = $rfxcom_data_array[0];
#Log3 $iohash, 5, "TRX_LIGHT: num_bytes=$num_bytes hex=$hexline type=$type";
my $res = "";
if ($type == 0x10 || $type == 0x11 || $type == 0x12 || $type == 0x14 || $type == 0x15 || $type == 0x16 || $type == 0x17 || $type == 0x18 || $type == 0x19) {
Log3 $iohash, 5, "TRX_LIGHT_Parse() X10 num_bytes=$num_bytes hex=$hexline";
$res = TRX_LIGHT_parse_X10($iohash, \@rfxcom_data_array);
Log3 $iohash, 1, "TRX_LIGHT_Parse() unsupported hex=$hexline" if ($res eq "");
return $res;
} elsif ($type == 0x13) {
Log3 $iohash, 5, "TRX_LIGHT_Parse()Lighting4/PT2262 num_bytes=$num_bytes hex=$hexline";
$res = TRX_LIGHT_parse_PT2262($iohash, \@rfxcom_data_array);
Log3 $iohash, 1, "TRX_LIGHT_Parse() unsupported hex=$hexline" if ($res eq "");
return $res;
} else {
Log3 $iohash, 1, "TRX_LIGHT_Parse() not implemented num_bytes=$num_bytes hex=$hexline";
}
return "";
}
1;
=pod
=begin html
TRX_LIGHT
The TRX_LIGHT module receives and sends X10, ARC, ELRO AB400D, Waveman, Chacon EMW200, IMPULS, RisingSun, AC, HomeEasy EU and ANSLUT lighting devices (switches and remote control). Allows to send Philips SBC (receive not possible). ARC is a protocol used by devices from HomeEasy, KlikAanKlikUit, ByeByeStandBy, Intertechno, ELRO, AB600, Duewi, DomiaLite and COCO with address code wheels. AC is the protocol used by different brands with units having a learning mode button:
KlikAanKlikUit, NEXA, CHACON, HomeEasy UK.
You need to define an RFXtrx433 transceiver receiver first.
See TRX.
Define
define <name> TRX_LIGHT <type> <deviceid> <devicelog> [<deviceid2> <devicelog2>]
define <name> TRX_LIGHT PT2262 <deviceid> <devicelog> <commandcodes>
<type>
specifies the type of the device:
Lighting devices:
-
MS14A
(X10 motion sensor. Reports [normal|alert] on the first deviceid (motion sensor) and [on|off] for the second deviceid (light sensor))
-
X10
(All other x10 devices. Report [off|on|dim|bright|all_off|all_on] on both deviceids.)
-
ARC
(ARC devices. ARC is a protocol used by devices from HomeEasy, KlikAanKlikUit, ByeByeStandBy, Intertechno, ELRO, AB600, Duewi, DomiaLite and COCO with address code wheels. Report [off|on|all_off|all_on|chime].)
-
AB400D
(ELRO AB400D devices. Report [off|on].)
-
WAVEMAN
(Waveman devices. Report [off|on].)
-
EMW200
(Chacon EMW200 devices. Report [off|on|all_off|all_on].)
-
IMPULS
(IMPULS devices. Report [off|on].)
-
RISINGSUN
(RisingSun devices. Report [off|on].)
-
PHILIPS_SBC
(Philips SBC devices. Send [off|on|all_off|all_on].)
-
ENER010
(Energenie ENER010 devices. deviceid: [A-P][1-4]. Send [off|on|all_off|all_on].)
-
ENER5
(Energenie 5-gang devices. deviceid: [A-P][1-10]. Send [off|on].)
-
COCO_GDR2
(ECOCO GDR2-2000R devices. deviceid: [A-D][1-4]. Send [off|on].)
-
AC
(AC devices. AC is the protocol used by different brands with units having a learning mode button: KlikAanKlikUit, NEXA, CHACON, HomeEasy UK. Report [off|on|level <NUM>|all_off|all_on|all_level <NUM>].)
-
HOMEEASY
(HomeEasy EU devices. Report [off|on|level|all_off|all_on|all_level].)
-
ANSLUT
(Anslut devices. Report [off|on|level|all_off|all_on|all_level].)
-
PT2262
(Devices using PT2262/PT2272 (coder/decoder) chip. To use this enable Lighting4 in RFXmngr. Please note that this disables ARC. For more information see FHEM-Wiki)
-
LIGHTWAVERF
(LightwaveRF devices. Commands ["off", "on", "all_off", "mood1", "mood2", "mood3", "mood4", "mood5", "reserved1", "reserved2", "unlock", "lock", "all_lock", "close", "stop", "open", "level"].)
-
EMW100
(EMW100 devices. Commands ["off", "on", "learn"].)
-
BBSB
(BBSB devices. Commands ["off", "on", "all_off", "all_on"].)
-
MDREMOTE
(MDREMOTE LED dimmer devices. Commands ["power", "light", "bright", "dim", "100", "50", "25", "mode+", "speed-", "speed+", "mode-"].)
-
RSL2
(Conrad RSL2 devices. Commands ["off", "on", "all_off", "all_on"].)
-
LIVOLO
(Livolo devices. Commands ["all_off", "on_off", "dim+", "dim-"].)
-
TRC02
(RGB TRC02 devices. Commands ["off", "on", "bright", "dim", "vivid", "pale", "color"].)
-
BLYSS
(Blyss devices. deviceid: [A-P][1-5]. Commands ["off", "on", "all_off", "all_on"].)
-
BYRONSX
(Byron SX chime devices. deviceid: 00-FF. Commands [ "tubular3_1", "solo1", "bigben1", "tubular2_1", "tubular2_2", "solo2", "tubular3_2"].)
-
SIEMENS_SF01
(Siemens SF01 devices. deviceid: 000000-007FFF. Commands [ "timer", "-", "learn", "+", "confirm", "light", "on", "off" ].)
-
HARRISON
(Harrison curtain devices. deviceid: 00-FF. Commands [ "open", "close", "stop", "program" ].)
-
ROLLER_TROL
(Roller Trol blind devices. deviceid: 00000100-00FFFF0F. Commands [ "open", "close", "stop", "confirm_pair", "set_limit" ].)
-
HASTA_OLD
(Hasta old blind devices. deviceid: 00000100-00FFFF0F. Commands [ "open", "close", "stop", "confirm_pair", "set_limit" ].)
-
AOK_RF01
(A-OK RF01 blind devices. deviceid: 00000100-FFFFFF0F. Commands [ "open", "close", "stop", "confirm_pair" ].)
-
AOK_AC114
(A-OK AC114 blind devices. deviceid: 00000100-FFFFFF0F. Commands [ "open", "close", "stop", "confirm_pair" ].)
-
RAEX_YR1326
(Raex YR1326 blind devices. deviceid: 00000100-FFFFFF0F. Commands [ "open", "close", "stop", "confirm_pair", "set_upper_limit", "set_lower_limit", "delete_limits", "change_dir", "left", "right"].)
-
MEDIA_MOUNT
(Media Mount blind devices. deviceid: 00000100-FFFFFF0F. Commands [ "down", "up", "stop" ].)
-
DC106
(DC/RMF/Yooda blind devices. deviceid: 00000100-FFFFFFF0. Commands [ "open", "close", "stop", "confirm" ].)
-
FOREST
(Forest blind devices. deviceid: 00000100-FFFFFFF0. Commands [ "open", "close", "stop", "confirm_pair" ].)
-
RFY
(Somfy RTS devices. deviceid: 000001-0FFFFF, unicode: 01-04 (00 = allunits). Commands [ "up", "down", "stop", "program" ].)
-
RFY_ext
(Somfy RTS devices. deviceid: 000001-0FFFFF, unicode: 00-0F. Commands [ "up", "down", "stop", "program" ].)
<deviceid>
specifies the first device id of the device.
A lighting device normally has a house code A..P followed by a unitcode 1..16 (example "B1").
For AC, HomeEasy EU and ANSLUT it is a 10 Character-Hex-String for the deviceid, consisting of
- unid-id: 8-Char-Hex: 00000001 to 03FFFFFF
- unit-code: 2-Char-Hex: 01 to 10
For LIGHTWAVERF, EMW100, BBSB, MDREMOTE, RSL2, LIVOLO and TRC02 it is a 8 Character-Hex-String for the deviceid, consisting of
- unid-id: 8-Char-Hex: 000001 to FFFFFF
- unit-code: 2-Char-Hex: 01 to 10
For RFY and RFY-ext it is a 8 Character-Hex-String for the deviceid, consisting of
- unid-id: 8-Char-Hex: 000001 to FFFFFF
- unit-code: 2-Char-Hex: 01 to 04 for RFY (00 for all units) and 00 to 0F for RFY_ext
<devicelog>
is the name of the Reading used to report. Suggested: "motion" for motion sensors. If you use "none" then no additional Reading is reported. Just the state is used to report the change.
<deviceid2>
is optional and specifies the second device id of the device if it exists. For example ms14a motion sensors report motion status on the first deviceid and the status of the light sensor on the second deviceid.
<devicelog2>
is optional for the name used for the Reading of <deviceid2>
.If you use "none" then no addional Reading is reported. Just the state is used to report the change.
<commandcodes>
is used for PT2262 and specifies the possible base4 digits for the command separated by : and a string that specifies a string that is the command. Example '0:off,1:on
'.
Example:
define motion_sensor2 TRX_LIGHT MS14A A1 motion A2 light
define Steckdose TRX_LIGHT ARC G2 light
define light TRX_LIGHT AC 0101010101 light
Set
set <name> <value> [<levelnum>]
where value
is one of:
off
on
dim # only for X10, KOPPLA
bright # only for X10, KOPPLA
all_off # only for X10, ARC, EMW200, AC, HOMEEASY, ANSLUT
all_on # only for X10, ARC, EMW200, AC, HOMEEASY, ANSLUT
chime # only for ARC
level <levelnum> # only AC, HOMEEASY, ANSLUT: set level to <levelnum> (range: 0=0% to 15=100%)
on-till # Special, see the note
on-for-timer # Special, see the note
Example:
set Steckdose on
Notes:
on-till
requires an absolute time in the "at" format
(HH:MM:SS, HH:MM) or { <perl code> }, where the perl code
returns a time specification).
If the current time is greater than the specified time, then the
command is ignored, else an "on" command is generated, and for the
given "till-time" an off command is scheduleld via the at command.
on-for-timer
requires a relative time in the "at" format
(HH:MM:SS, HH:MM) or { <perl code> }, where the perl code
returns a time specification).
Get
Attributes
=end html
=cut