mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-26 10:34:52 +00:00
HMCCU: version 4.2
git-svn-id: https://svn.fhem.de/fhem/trunk@16038 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
e53d5b5cc2
commit
9f523ba845
@ -1,5 +1,7 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- update: 88_HMCCU: Version 4.2
|
||||||
|
- new: 88_HMCCURPCPROC: Sub process based RPC server for HMCCU.
|
||||||
- feature: 73_PRESENCE: new collectord package (RSSI based room selection
|
- feature: 73_PRESENCE: new collectord package (RSSI based room selection
|
||||||
for BTLE devices (lepresenced), ping command for
|
for BTLE devices (lepresenced), ping command for
|
||||||
daemon monitoring, systemd service unit
|
daemon monitoring, systemd service unit
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -4,9 +4,9 @@
|
|||||||
#
|
#
|
||||||
# $Id$
|
# $Id$
|
||||||
#
|
#
|
||||||
# Version 4.1.003
|
# Version 4.2
|
||||||
#
|
#
|
||||||
# (c) 2017 zap (zap01 <at> t-online <dot> de)
|
# (c) 2018 zap (zap01 <at> t-online <dot> de)
|
||||||
#
|
#
|
||||||
######################################################################
|
######################################################################
|
||||||
#
|
#
|
||||||
@ -15,7 +15,7 @@
|
|||||||
#
|
#
|
||||||
# set <name> config [device] <parameter>=<value> [...]
|
# set <name> config [device] <parameter>=<value> [...]
|
||||||
# set <name> control <value>
|
# set <name> control <value>
|
||||||
# set <name> datapoint <datapoint> <value>
|
# set <name> datapoint <datapoint> <value> [...]
|
||||||
# set <name> defaults
|
# set <name> defaults
|
||||||
# set <name> devstate <value>
|
# set <name> devstate <value>
|
||||||
# set <name> <stateval_cmds>
|
# set <name> <stateval_cmds>
|
||||||
@ -33,9 +33,8 @@
|
|||||||
# get <name> devstate
|
# get <name> devstate
|
||||||
# get <name> update
|
# get <name> update
|
||||||
#
|
#
|
||||||
# attr <name> ccuackstate { 0 | 1 }
|
|
||||||
# attr <name> ccucalculate <value>:<reading>[:<dp-list>][...]
|
# attr <name> ccucalculate <value>:<reading>[:<dp-list>][...]
|
||||||
# attr <name> ccuflags { altread, nochn0, trace }
|
# attr <name> ccuflags { ackState, nochn0, trace }
|
||||||
# attr <name> ccuget { State | Value }
|
# attr <name> ccuget { State | Value }
|
||||||
# attr <name> ccureadings { 0 | 1 }
|
# attr <name> ccureadings { 0 | 1 }
|
||||||
# attr <name> ccureadingfilter <filter-rule>[;...]
|
# attr <name> ccureadingfilter <filter-rule>[;...]
|
||||||
@ -82,8 +81,8 @@ sub HMCCUCHN_Initialize ($)
|
|||||||
$hash->{AttrFn} = "HMCCUCHN_Attr";
|
$hash->{AttrFn} = "HMCCUCHN_Attr";
|
||||||
$hash->{parseParams} = 1;
|
$hash->{parseParams} = 1;
|
||||||
|
|
||||||
$hash->{AttrList} = "IODev ccuackstate:0,1 ccucalculate ".
|
$hash->{AttrList} = "IODev ccucalculate ".
|
||||||
"ccuflags:multiple-strict,altread,nochn0,trace ccureadingfilter ".
|
"ccuflags:multiple-strict,ackState,nochn0,trace ccureadingfilter ".
|
||||||
"ccureadingformat:name,namelc,address,addresslc,datapoint,datapointlc ".
|
"ccureadingformat:name,namelc,address,addresslc,datapoint,datapointlc ".
|
||||||
"ccureadingname:textField-long ".
|
"ccureadingname:textField-long ".
|
||||||
"ccureadings:0,1 ccuscaleval ccuverify:0,1,2 ccuget:State,Value controldatapoint ".
|
"ccureadings:0,1 ccuscaleval ccuverify:0,1,2 ccuget:State,Value controldatapoint ".
|
||||||
@ -219,11 +218,12 @@ sub HMCCUCHN_Set ($@)
|
|||||||
my $rc;
|
my $rc;
|
||||||
|
|
||||||
if ($opt eq 'datapoint') {
|
if ($opt eq 'datapoint') {
|
||||||
my $objname = shift @$a;
|
my $usage = "Usage: set $name datapoint {datapoint} {value} [...]";
|
||||||
|
my %dpval;
|
||||||
|
while (my $objname = shift @$a) {
|
||||||
my $objvalue = shift @$a;
|
my $objvalue = shift @$a;
|
||||||
|
|
||||||
return HMCCU_SetError ($hash, "Usage: set $name datapoint {datapoint} {value}")
|
return HMCCU_SetError ($hash, $usage) if (!defined ($objvalue));
|
||||||
if (!defined ($objname) || !defined ($objvalue));
|
|
||||||
return HMCCU_SetError ($hash, -8)
|
return HMCCU_SetError ($hash, -8)
|
||||||
if (!HMCCU_IsValidDatapoint ($hash, $ccutype, $ccuaddr, $objname, 2));
|
if (!HMCCU_IsValidDatapoint ($hash, $ccutype, $ccuaddr, $objname, 2));
|
||||||
|
|
||||||
@ -231,8 +231,15 @@ sub HMCCUCHN_Set ($@)
|
|||||||
$objvalue = HMCCU_Substitute ($objvalue, $statevals, 1, undef, '');
|
$objvalue = HMCCU_Substitute ($objvalue, $statevals, 1, undef, '');
|
||||||
|
|
||||||
$objname = $ccuif.'.'.$ccuaddr.'.'.$objname;
|
$objname = $ccuif.'.'.$ccuaddr.'.'.$objname;
|
||||||
$rc = HMCCU_SetDatapoint ($hash, $objname, $objvalue);
|
$dpval{$objname} = $objvalue;
|
||||||
|
}
|
||||||
|
|
||||||
|
return HMCCU_SetError ($hash, $usage) if (scalar (keys %dpval) < 1);
|
||||||
|
|
||||||
|
foreach my $dpt (keys %dpval) {
|
||||||
|
$rc = HMCCU_SetDatapoint ($hash, $dpt, $dpval{$dpt});
|
||||||
return HMCCU_SetError ($hash, $rc) if ($rc < 0);
|
return HMCCU_SetError ($hash, $rc) if ($rc < 0);
|
||||||
|
}
|
||||||
|
|
||||||
return HMCCU_SetState ($hash, "OK");
|
return HMCCU_SetState ($hash, "OK");
|
||||||
}
|
}
|
||||||
@ -623,12 +630,13 @@ sub HMCCUCHN_Get ($@)
|
|||||||
Valid parameters can be listed by using commands 'get configdesc' or 'get configlist'.
|
Valid parameters can be listed by using commands 'get configdesc' or 'get configlist'.
|
||||||
With option 'device' specified parameters are set in device instead of channel.
|
With option 'device' specified parameters are set in device instead of channel.
|
||||||
</li><br/>
|
</li><br/>
|
||||||
<li><b>set <name> datapoint <datapoint> <value></b><br/>
|
<li><b>set <name> datapoint <datapoint> <value> [...]</b><br/>
|
||||||
Set value of a datapoint of a CCU channel. If parameter <i>value</i> contains special
|
Set datapoint values of a CCU channel. If parameter <i>value</i> contains special
|
||||||
character \_ it's substituted by blank.
|
character \_ it's substituted by blank.
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
Examples:<br/>
|
Examples:<br/>
|
||||||
<code>set temp_control datapoint SET_TEMPERATURE 21</code>
|
<code>set temp_control datapoint SET_TEMPERATURE 21</code><br/>
|
||||||
|
<code>set temp_control datapoint AUTO_MODE 1 SET_TEMPERATURE 21</code>
|
||||||
</li><br/>
|
</li><br/>
|
||||||
<li><b>set <name> defaults</b><br/>
|
<li><b>set <name> defaults</b><br/>
|
||||||
Set default attributes for CCU device type. Default attributes are only available for
|
Set default attributes for CCU device type. Default attributes are only available for
|
||||||
@ -745,10 +753,6 @@ sub HMCCUCHN_Get ($@)
|
|||||||
To reduce the amount of events it's recommended to set attribute 'event-on-change-reading'
|
To reduce the amount of events it's recommended to set attribute 'event-on-change-reading'
|
||||||
to '.*'.
|
to '.*'.
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
<li><b>ccuackstate {<u>0</u> | 1}</b><br/>
|
|
||||||
If set to 1 state will be set to result of command (i.e. 'OK'). Otherwise state is only
|
|
||||||
updated if value of state datapoint has changed.
|
|
||||||
</li><br/>
|
|
||||||
<li><b>ccucalculate <value-type>:<reading>[:<dp-list>[;...]</b><br/>
|
<li><b>ccucalculate <value-type>:<reading>[:<dp-list>[;...]</b><br/>
|
||||||
Calculate special values like dewpoint based on datapoints specified in
|
Calculate special values like dewpoint based on datapoints specified in
|
||||||
<i>dp-list</i>. The result is stored in <i>reading</i>. The following <i>values</i>
|
<i>dp-list</i>. The result is stored in <i>reading</i>. The following <i>values</i>
|
||||||
@ -766,6 +770,7 @@ sub HMCCUCHN_Get ($@)
|
|||||||
</li><br/>
|
</li><br/>
|
||||||
<li><b>ccuflags {nochn0, trace}</b><br/>
|
<li><b>ccuflags {nochn0, trace}</b><br/>
|
||||||
Control behaviour of device:<br/>
|
Control behaviour of device:<br/>
|
||||||
|
ackState: Acknowledge command execution by setting STATE to error or success.<br/>
|
||||||
nochn0: Prevent update of status channel 0 datapoints / readings.<br/>
|
nochn0: Prevent update of status channel 0 datapoints / readings.<br/>
|
||||||
trace: Write log file information for operations related to this device.
|
trace: Write log file information for operations related to this device.
|
||||||
</li><br/>
|
</li><br/>
|
||||||
@ -915,16 +920,21 @@ sub HMCCUCHN_Get ($@)
|
|||||||
set my_switch on
|
set my_switch on
|
||||||
</code>
|
</code>
|
||||||
</li><br/>
|
</li><br/>
|
||||||
<li><b>stripnumber [<datapoint-expr>!]{<u>0</u>|1|2|-n}[;...]</b><br/>
|
<li><b>stripnumber [<datapoint-expr>!]{<u>0</u>|1|2|-n|%fmt}[;...]</b><br/>
|
||||||
Remove trailing digits or zeroes from floating point numbers and/or round floating
|
Remove trailing digits or zeroes from floating point numbers, round or format
|
||||||
point numbers. If attribute is negative (-0 is valid) floating point values are rounded
|
numbers. If attribute is negative (-0 is valid) floating point values are rounded
|
||||||
to the specified number of digits before they are stored in readings. The meaning of
|
to the specified number of digits before they are stored in readings. The meaning of
|
||||||
values 0-2 is:<br/>
|
values 0,1,2 is:<br/>
|
||||||
0 = Floating point numbers are stored as read from CCU (i.e. with trailing zeros)<br/>
|
0 = Floating point numbers are stored as read from CCU (i.e. with trailing zeros)<br/>
|
||||||
1 = Trailing zeros are stripped from floating point numbers except one digit.<br/>
|
1 = Trailing zeros are stripped from floating point numbers except one digit.<br/>
|
||||||
2 = All trailing zeros are stripped from floating point numbers.<br/>
|
2 = All trailing zeros are stripped from floating point numbers.<br/>
|
||||||
|
With %fmt one can specify any valid sprintf() format string.<br/>
|
||||||
If <i>datapoint-expr</i> is specified the formatting applies only to datapoints
|
If <i>datapoint-expr</i> is specified the formatting applies only to datapoints
|
||||||
matching the regular expression.
|
matching the regular expression.<br/>
|
||||||
|
Example:<br>
|
||||||
|
<code>
|
||||||
|
attr myDev stripnumber TEMPERATURE!%.2f degree
|
||||||
|
</code>
|
||||||
</li><br/>
|
</li><br/>
|
||||||
<li><b>substexcl <reading-expr></b><br/>
|
<li><b>substexcl <reading-expr></b><br/>
|
||||||
Exclude values of readings matching <i>reading-expr</i> from substitution. This is helpful
|
Exclude values of readings matching <i>reading-expr</i> from substitution. This is helpful
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
#
|
#
|
||||||
# $Id$
|
# $Id$
|
||||||
#
|
#
|
||||||
# Version 4.1.001
|
# Version 4.2
|
||||||
#
|
#
|
||||||
# (c) 2017 zap (zap01 <at> t-online <dot> de)
|
# (c) 2018 zap (zap01 <at> t-online <dot> de)
|
||||||
#
|
#
|
||||||
######################################################################
|
######################################################################
|
||||||
#
|
#
|
||||||
@ -16,7 +16,7 @@
|
|||||||
# set <name> clear [<regexp>]
|
# set <name> clear [<regexp>]
|
||||||
# set <name> config [<channel-number>] <parameter>=<value> [...]
|
# set <name> config [<channel-number>] <parameter>=<value> [...]
|
||||||
# set <name> control <value>
|
# set <name> control <value>
|
||||||
# set <name> datapoint [<channel-number>.]<datapoint> <value>
|
# set <name> datapoint [<channel-number>.]<datapoint> <value> [...]
|
||||||
# set <name> defaults
|
# set <name> defaults
|
||||||
# set <name> devstate <value>
|
# set <name> devstate <value>
|
||||||
# set <name> on-till <timestamp>
|
# set <name> on-till <timestamp>
|
||||||
@ -33,9 +33,8 @@
|
|||||||
# get <name> devstate
|
# get <name> devstate
|
||||||
# get <name> update
|
# get <name> update
|
||||||
#
|
#
|
||||||
# attr <name> ccuackstate { 0 | 1 }
|
|
||||||
# attr <name> ccucalculate <value>:<reading>[:<dp-list>][...]
|
# attr <name> ccucalculate <value>:<reading>[:<dp-list>][...]
|
||||||
# attr <name> ccuflags { altread, nochn0, trace }
|
# attr <name> ccuflags { ackState, nochn0, trace }
|
||||||
# attr <name> ccuget { State | Value }
|
# attr <name> ccuget { State | Value }
|
||||||
# attr <name> ccureadings { 0 | 1 }
|
# attr <name> ccureadings { 0 | 1 }
|
||||||
# attr <name> ccureadingformat { address[lc] | name[lc] | datapoint[lc] }
|
# attr <name> ccureadingformat { address[lc] | name[lc] | datapoint[lc] }
|
||||||
@ -85,8 +84,8 @@ sub HMCCUDEV_Initialize ($)
|
|||||||
$hash->{AttrFn} = "HMCCUDEV_Attr";
|
$hash->{AttrFn} = "HMCCUDEV_Attr";
|
||||||
$hash->{parseParams} = 1;
|
$hash->{parseParams} = 1;
|
||||||
|
|
||||||
$hash->{AttrList} = "IODev ccuackstate:0,1 ccucalculate:textField-long ".
|
$hash->{AttrList} = "IODev ccucalculate:textField-long ".
|
||||||
"ccuflags:multiple-strict,altread,nochn0,trace ccureadingfilter:textField-long ".
|
"ccuflags:multiple-strict,ackState,nochn0,trace ccureadingfilter:textField-long ".
|
||||||
"ccureadingformat:name,namelc,address,addresslc,datapoint,datapointlc ".
|
"ccureadingformat:name,namelc,address,addresslc,datapoint,datapointlc ".
|
||||||
"ccureadingname:textField-long ".
|
"ccureadingname:textField-long ".
|
||||||
"ccureadings:0,1 ccuget:State,Value ccuscaleval ccuverify:0,1,2 disable:0,1 ".
|
"ccureadings:0,1 ccuget:State,Value ccuscaleval ccuverify:0,1,2 disable:0,1 ".
|
||||||
@ -142,7 +141,7 @@ sub HMCCUDEV_Define ($@)
|
|||||||
$hmccu_hash = HMCCU_FindIODevice ($devspec) if (!defined ($hmccu_hash));
|
$hmccu_hash = HMCCU_FindIODevice ($devspec) if (!defined ($hmccu_hash));
|
||||||
return "Cannot detect IO device" if (!defined ($hmccu_hash));
|
return "Cannot detect IO device" if (!defined ($hmccu_hash));
|
||||||
|
|
||||||
return "Invalid or unknown CCU device name or address"
|
return "Invalid or unknown CCU device name or address: $devspec"
|
||||||
if (! HMCCU_IsValidDevice ($hmccu_hash, $devspec));
|
if (! HMCCU_IsValidDevice ($hmccu_hash, $devspec));
|
||||||
|
|
||||||
my ($di, $da, $dn, $dt, $dc) = HMCCU_GetCCUDeviceParam ($hmccu_hash, $devspec);
|
my ($di, $da, $dn, $dt, $dc) = HMCCU_GetCCUDeviceParam ($hmccu_hash, $devspec);
|
||||||
@ -180,14 +179,9 @@ sub HMCCUDEV_Define ($@)
|
|||||||
|
|
||||||
return "Invalid device or channel $gd" if (!HMCCU_IsValidDevice ($hmccu_hash, $gd));
|
return "Invalid device or channel $gd" if (!HMCCU_IsValidDevice ($hmccu_hash, $gd));
|
||||||
|
|
||||||
if (HMCCU_IsDevAddr ($gd, 0) || HMCCU_IsChnAddr ($gd, 1)) {
|
|
||||||
$gdo = $gd;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
($gda, $gdc) = HMCCU_GetAddress ($hmccu_hash, $gd, '', '');
|
($gda, $gdc) = HMCCU_GetAddress ($hmccu_hash, $gd, '', '');
|
||||||
$gdo = $gda;
|
$gdo = $gda;
|
||||||
$gdo .= ':'.$gdc if ($gdc ne '');
|
$gdo .= ':'.$gdc if ($gdc ne '');
|
||||||
}
|
|
||||||
|
|
||||||
if (exists ($hash->{ccugroup}) && $hash->{ccugroup} ne '') {
|
if (exists ($hash->{ccugroup}) && $hash->{ccugroup} ne '') {
|
||||||
$hash->{ccugroup} .= ",".$gdo;
|
$hash->{ccugroup} .= ",".$gdo;
|
||||||
@ -287,7 +281,9 @@ sub HMCCUDEV_Set ($@)
|
|||||||
my $rc;
|
my $rc;
|
||||||
|
|
||||||
if ($opt eq 'datapoint') {
|
if ($opt eq 'datapoint') {
|
||||||
my $objname = shift @$a;
|
my $usage = "Usage: set $name datapoint [{channel-number}.]{datapoint} {value} [...]";
|
||||||
|
my %dpval;
|
||||||
|
while (my $objname = shift @$a) {
|
||||||
my $objvalue = shift @$a;
|
my $objvalue = shift @$a;
|
||||||
|
|
||||||
if ($ccutype eq 'HM-Dis-EP-WM55' && !defined ($objvalue)) {
|
if ($ccutype eq 'HM-Dis-EP-WM55' && !defined ($objvalue)) {
|
||||||
@ -302,8 +298,7 @@ sub HMCCUDEV_Set ($@)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return HMCCU_SetError ($hash, "Usage: set $name datapoint [{channel-number}.]{datapoint} {value}")
|
return HMCCU_SetError ($hash, $usage) if (!defined ($objvalue) || $objvalue eq '');
|
||||||
if (!defined ($objvalue) || $objvalue eq '');
|
|
||||||
|
|
||||||
if ($objname =~ /^([0-9]+)\..+$/) {
|
if ($objname =~ /^([0-9]+)\..+$/) {
|
||||||
my $chn = $1;
|
my $chn = $1;
|
||||||
@ -320,9 +315,15 @@ sub HMCCUDEV_Set ($@)
|
|||||||
$objvalue =~ s/\\_/%20/g;
|
$objvalue =~ s/\\_/%20/g;
|
||||||
$objvalue = HMCCU_Substitute ($objvalue, $statevals, 1, undef, '');
|
$objvalue = HMCCU_Substitute ($objvalue, $statevals, 1, undef, '');
|
||||||
$objname = $ccuif.'.'.$ccuaddr.':'.$objname;
|
$objname = $ccuif.'.'.$ccuaddr.':'.$objname;
|
||||||
|
$dpval{$objname} = $objvalue;
|
||||||
|
}
|
||||||
|
|
||||||
$rc = HMCCU_SetDatapoint ($hash, $objname, $objvalue);
|
return HMCCU_SetError ($hash, $usage) if (scalar (keys %dpval) < 1);
|
||||||
|
|
||||||
|
foreach my $dpt (keys %dpval) {
|
||||||
|
$rc = HMCCU_SetDatapoint ($hash, $dpt, $dpval{$dpt});
|
||||||
return HMCCU_SetError ($hash, $rc) if ($rc < 0);
|
return HMCCU_SetError ($hash, $rc) if ($rc < 0);
|
||||||
|
}
|
||||||
|
|
||||||
return HMCCU_SetState ($hash, "OK");
|
return HMCCU_SetState ($hash, "OK");
|
||||||
}
|
}
|
||||||
@ -775,12 +776,13 @@ sub HMCCUDEV_Get ($@)
|
|||||||
using command 'get configdesc'.
|
using command 'get configdesc'.
|
||||||
</li><br/>
|
</li><br/>
|
||||||
<li><b>set <name> datapoint [<channel-number>.]<datapoint>
|
<li><b>set <name> datapoint [<channel-number>.]<datapoint>
|
||||||
<value></b><br/>
|
<value> [...]</b><br/>
|
||||||
Set value of a datapoint of a CCU device channel. If channel number is not specified
|
Set datapoint values of a CCU device channel. If channel number is not specified
|
||||||
state channel is used. String \_ is substituted by blank.
|
state channel is used. String \_ is substituted by blank.
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
Example:<br/>
|
Example:<br/>
|
||||||
<code>set temp_control datapoint 1.SET_TEMPERATURE 21</code>
|
<code>set temp_control datapoint 2.SET_TEMPERATURE 21</code><br/>
|
||||||
|
<code>set temp_control datapoint 2.AUTO_MODE 1 2.SET_TEMPERATURE 21</code>
|
||||||
</li><br/>
|
</li><br/>
|
||||||
<li><b>set <name> defaults</b><br/>
|
<li><b>set <name> defaults</b><br/>
|
||||||
Set default attributes for CCU device type. Default attributes are only available for
|
Set default attributes for CCU device type. Default attributes are only available for
|
||||||
@ -893,9 +895,6 @@ sub HMCCUDEV_Get ($@)
|
|||||||
<ul>
|
<ul>
|
||||||
To reduce the amount of events it's recommended to set attribute 'event-on-change-reading'
|
To reduce the amount of events it's recommended to set attribute 'event-on-change-reading'
|
||||||
to '.*'.<br/><br/>
|
to '.*'.<br/><br/>
|
||||||
<li><b>ccuackstate {<u>0</u> | 1}</b><br/>
|
|
||||||
<a href="#HMCCUCHNattr">see HMCCUCHN</a>
|
|
||||||
</li><br/>
|
|
||||||
<li><b>ccucalculate <value-type>:<reading>[:<dp-list>[;...]</b><br/>
|
<li><b>ccucalculate <value-type>:<reading>[:<dp-list>[;...]</b><br/>
|
||||||
<a href="#HMCCUCHNattr">see HMCCUCHN</a>
|
<a href="#HMCCUCHNattr">see HMCCUCHN</a>
|
||||||
</li><br/>
|
</li><br/>
|
||||||
|
File diff suppressed because it is too large
Load Diff
2619
fhem/FHEM/88_HMCCURPCPROC.pm
Executable file
2619
fhem/FHEM/88_HMCCURPCPROC.pm
Executable file
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# $Id$
|
# $Id$
|
||||||
#
|
#
|
||||||
# Version 4.1.002
|
# Version 4.2
|
||||||
#
|
#
|
||||||
# Configuration parameters for HomeMatic devices.
|
# Configuration parameters for HomeMatic devices.
|
||||||
#
|
#
|
||||||
@ -71,21 +71,30 @@ use vars qw(%HMCCU_SCRIPTS);
|
|||||||
substitute => "STATE!(0|false):off,(1|true):on;WORKING!(0|false):no,(1|true):yes",
|
substitute => "STATE!(0|false):off,(1|true):on;WORKING!(0|false):no,(1|true):yes",
|
||||||
webCmd => "press"
|
webCmd => "press"
|
||||||
},
|
},
|
||||||
"HM-LC-Sw1-Pl-2|HMIP-PS" => {
|
"HM-LC-Sw1-Pl-2|HM-LC-Sw1-Pl-DN-R1" => {
|
||||||
_description => "Steckdose",
|
_description => "Steckdose",
|
||||||
_channels => "1,3",
|
_channels => "1",
|
||||||
ccureadingfilter => "STATE",
|
ccureadingfilter => "STATE",
|
||||||
controldatapoint => "STATE",
|
|
||||||
statedatapoint => "STATE",
|
statedatapoint => "STATE",
|
||||||
statevals => "on:true,off:false",
|
statevals => "on:true,off:false",
|
||||||
substitute => "STATE!(1|true):on,(0|false):off",
|
substitute => "STATE!(1|true):on,(0|false):off",
|
||||||
webCmd => "control",
|
webCmd => "devstate",
|
||||||
widgetOverride => "control:uzsuToggle,off,on"
|
widgetOverride => "devstate:uzsuToggle,off,on"
|
||||||
|
},
|
||||||
|
"HMIP-PS" => {
|
||||||
|
_description => "Steckdose",
|
||||||
|
_channels => "3",
|
||||||
|
ccureadingfilter => "STATE",
|
||||||
|
statedatapoint => "STATE",
|
||||||
|
statevals => "on:true,off:false",
|
||||||
|
substitute => "STATE!(1|true):on,(0|false):off",
|
||||||
|
webCmd => "devstate",
|
||||||
|
widgetOverride => "devstate:uzsuToggle,off,on"
|
||||||
},
|
},
|
||||||
"HM-LC-Dim1L-Pl|HM-LC-Dim1L-Pl-2|HM-LC-Dim1L-CV|HM-LC-Dim2L-CV|HM-LC-Dim2L-SM|HM-LC-Dim1L-Pl-3|HM-LC-Dim1L-CV-2" => {
|
"HM-LC-Dim1L-Pl|HM-LC-Dim1L-Pl-2|HM-LC-Dim1L-CV|HM-LC-Dim2L-CV|HM-LC-Dim2L-SM|HM-LC-Dim1L-Pl-3|HM-LC-Dim1L-CV-2" => {
|
||||||
_description => "Funk-Anschnitt-Dimmaktor",
|
_description => "Funk-Anschnitt-Dimmaktor",
|
||||||
_channels => "1",
|
_channels => "1",
|
||||||
ccureadingfilter => "(^LEVEL$|DIRECTION)",
|
ccureadingfilter => "(^LEVEL\$|DIRECTION)",
|
||||||
ccuscaleval => "LEVEL:0:1:0:100",
|
ccuscaleval => "LEVEL:0:1:0:100",
|
||||||
cmdIcon => "on:general_an off:general_aus",
|
cmdIcon => "on:general_an off:general_aus",
|
||||||
controldatapoint => "LEVEL",
|
controldatapoint => "LEVEL",
|
||||||
@ -101,7 +110,7 @@ use vars qw(%HMCCU_SCRIPTS);
|
|||||||
"HM-LC-Dim1PWM-CV|HM-LC-Dim1PWM-CV-2" => {
|
"HM-LC-Dim1PWM-CV|HM-LC-Dim1PWM-CV-2" => {
|
||||||
_description => "Funk-PWM-Dimmaktor",
|
_description => "Funk-PWM-Dimmaktor",
|
||||||
_channels => "1",
|
_channels => "1",
|
||||||
ccureadingfilter => "(^LEVEL$|DIRECTION)",
|
ccureadingfilter => "(^LEVEL\$|DIRECTION)",
|
||||||
ccuscaleval => "LEVEL:0:1:0:100",
|
ccuscaleval => "LEVEL:0:1:0:100",
|
||||||
cmdIcon => "on:general_an off:general_aus",
|
cmdIcon => "on:general_an off:general_aus",
|
||||||
controldatapoint => "LEVEL",
|
controldatapoint => "LEVEL",
|
||||||
@ -173,6 +182,28 @@ use vars qw(%HMCCU_SCRIPTS);
|
|||||||
webCmd => "control",
|
webCmd => "control",
|
||||||
widgetOverride => "control:uzsuToggle,off,on"
|
widgetOverride => "control:uzsuToggle,off,on"
|
||||||
},
|
},
|
||||||
|
"HM-LC-Sw2PBU-FM" => {
|
||||||
|
_description => "Funk-Schaltaktor 2-fach",
|
||||||
|
_channels => "1,2",
|
||||||
|
ccureadingfilter => "STATE",
|
||||||
|
controldatapoint => "STATE",
|
||||||
|
statedatapoint => "STATE",
|
||||||
|
statevals => "on:true,off:false",
|
||||||
|
substitute => "STATE!(true|1):on,(false|0):off",
|
||||||
|
webCmd => "control",
|
||||||
|
widgetOverride => "control:uzsuToggle,off,on"
|
||||||
|
},
|
||||||
|
"HmIP-BSM" => {
|
||||||
|
_description => "Schalt-Mess-Aktor",
|
||||||
|
_channels => "4",
|
||||||
|
ccureadingfilter => "STATE",
|
||||||
|
statedatapoint => "STATE",
|
||||||
|
controldatapoint => "STATE",
|
||||||
|
statevals => "on:true,off:false",
|
||||||
|
substitute => "STATE!(true|1):on,(false|0):off",
|
||||||
|
webCmd => "control",
|
||||||
|
widgetOverride => "control:uzsuToggle,off,on"
|
||||||
|
},
|
||||||
"HM-SCI-3-FM" => {
|
"HM-SCI-3-FM" => {
|
||||||
_description => "3 Kanal Schliesserkontakt",
|
_description => "3 Kanal Schliesserkontakt",
|
||||||
_channels => "1,2,3",
|
_channels => "1,2,3",
|
||||||
@ -293,6 +324,14 @@ use vars qw(%HMCCU_SCRIPTS);
|
|||||||
statedatapoint => "STATE",
|
statedatapoint => "STATE",
|
||||||
substitute => "ERROR_ALARM_TEST!0:no,1:failed;ERROR_SMOKE_CHAMBER!0:no,1:degraded"
|
substitute => "ERROR_ALARM_TEST!0:no,1:failed;ERROR_SMOKE_CHAMBER!0:no,1:degraded"
|
||||||
},
|
},
|
||||||
|
"HmIP-SWSD" => {
|
||||||
|
_description => "Funk-Rauchmelder",
|
||||||
|
_channels => "1",
|
||||||
|
ccureadingfilter => "(ALARM_STATUS|TEST_RESULT|ERROR_CODE)",
|
||||||
|
eventMap => "/datapoint SMOKE_DETECTOR_COMMAND 0:reservedAlarmOff/datapoint SMOKE_DETECTOR_COMMAND 1:intrusionAlarmOff/datapoint SMOKE_DETECTOR_COMMAND 2:intrusionAlarmOn/datapoint SMOKE_DETECTOR_COMMAND 3:smokeTest/datapoint SMOKE_DETECTOR_COMMAND 4:comTest/datapoint SMOKE_DETECTOR_COMMAND 5:comTestRepeat/",
|
||||||
|
statedatapoint => "SMOKE_DETECTOR_ALARM_STATUS",
|
||||||
|
substitute => "SMOKE_DETECTOR_ALARM_STATUS!0:noAlarm,1:primaryAlarm,2:intrusionAlarm,3:secondaryAlarm;SMOKE_DETECTOR_TEST_RESULT!0:none,1:smokeTestOK,2:smokeTestFailed,3:comTestSent,4:comTestOK"
|
||||||
|
},
|
||||||
"HM-Sec-SFA-SM" => {
|
"HM-Sec-SFA-SM" => {
|
||||||
_description => "Alarmsirene",
|
_description => "Alarmsirene",
|
||||||
_channels => "1",
|
_channels => "1",
|
||||||
@ -340,9 +379,9 @@ use vars qw(%HMCCU_SCRIPTS);
|
|||||||
%HMCCU_DEV_DEFAULTS = (
|
%HMCCU_DEV_DEFAULTS = (
|
||||||
"CCU2" => {
|
"CCU2" => {
|
||||||
_description => "HomeMatic CCU2",
|
_description => "HomeMatic CCU2",
|
||||||
"ccudef-readingfilter" => '^(LOW_?BAT|UNREACH)$',
|
"ccudef-readingfilter" => '^(LOW_?BAT|UNREACH)\$',
|
||||||
"ccudef-readingformat" => 'datapoint',
|
"ccudef-readingformat" => 'datapoint',
|
||||||
"ccudef-readingname" => '^(.+\.)?AES_KEY$:sign;^(.+\.)?LOW_?BAT$:battery;^(.+\.)?BATTERY_STATE$:batteryLevel;^(.+\.)?UNREACH$:Activity;^(.+\.)?TEMPERATURE$:+temperature;^(.+\.)?SET_TEMPERATURE$:+desired-temp;^(.+\.)?HUMIDITY$:+humidity;^(.+\.)?LEVEL$:+pct;^(.+\.)?CONTROL_MODE$:+controlMode',
|
"ccudef-readingname" => '^(.+\.)?AES_KEY\$:sign;^(.+\.)?LOW_?BAT\$:battery;^(.+\.)?BATTERY_STATE\$:batteryLevel;^(.+\.)?UNREACH\$:Activity;^(.+\.)?TEMPERATURE\$:+temperature;^(.+\.)?SET_TEMPERATURE\$:+desired-temp;^(.+\.)?HUMIDITY\$:+humidity;^(.+\.)?LEVEL\$:+pct;^(.+\.)?CONTROL_MODE\$:+controlMode',
|
||||||
"ccudef-substitute" => 'AES_KEY!(0|false):off,(1|true):on;LOWBAT,LOW_BAT!(0|false):ok,(1|true):low;UNREACH!(0|false):alive,(1|true):dead;MOTION!(0|false):noMotion,(1|true):motion;DIRECTION!0:stop,1:up,2:down,3:undefined;WORKING!0:false,1:true;INHIBIT!(0|false):unlocked,(1|true):locked'
|
"ccudef-substitute" => 'AES_KEY!(0|false):off,(1|true):on;LOWBAT,LOW_BAT!(0|false):ok,(1|true):low;UNREACH!(0|false):alive,(1|true):dead;MOTION!(0|false):noMotion,(1|true):motion;DIRECTION!0:stop,1:up,2:down,3:undefined;WORKING!0:false,1:true;INHIBIT!(0|false):unlocked,(1|true):locked'
|
||||||
},
|
},
|
||||||
"HM-Sec-SCo|HM-Sec-SC|HM-Sec-SC-2|HMIP-SWDO" => {
|
"HM-Sec-SCo|HM-Sec-SC|HM-Sec-SC-2|HMIP-SWDO" => {
|
||||||
@ -388,25 +427,23 @@ use vars qw(%HMCCU_SCRIPTS);
|
|||||||
substitute => "STATE!(0|false):off,(1|true):on;WORKING!(0|false):no,(1|true):yes",
|
substitute => "STATE!(0|false):off,(1|true):on;WORKING!(0|false):no,(1|true):yes",
|
||||||
webCmd => "press"
|
webCmd => "press"
|
||||||
},
|
},
|
||||||
"HM-LC-Sw1-Pl-2" => {
|
"HM-LC-Sw1-Pl-2|HM-LC-Sw1-Pl-DN-R1" => {
|
||||||
_description => "Steckdose",
|
_description => "Steckdose",
|
||||||
ccureadingfilter => "STATE",
|
ccureadingfilter => "STATE",
|
||||||
controldatapoint => "1.STATE",
|
|
||||||
statedatapoint => "1.STATE",
|
statedatapoint => "1.STATE",
|
||||||
statevals => "on:true,off:false",
|
statevals => "on:true,off:false",
|
||||||
substitute => "STATE!(1|true):on,(0|false):off",
|
substitute => "STATE!(1|true):on,(0|false):off",
|
||||||
webCmd => "control",
|
webCmd => "devstate",
|
||||||
widgetOverride => "control:uzsuToggle,off,on"
|
widgetOverride => "devstate:uzsuToggle,off,on"
|
||||||
},
|
},
|
||||||
"HMIP-PS" => {
|
"HMIP-PS" => {
|
||||||
_description => "Steckdose IP",
|
_description => "Steckdose IP",
|
||||||
ccureadingfilter => "STATE",
|
ccureadingfilter => "STATE",
|
||||||
controldatapoint => "3.STATE",
|
|
||||||
statedatapoint => "3.STATE",
|
statedatapoint => "3.STATE",
|
||||||
statevals => "on:1,off:0",
|
statevals => "on:1,off:0",
|
||||||
substitute => "STATE!(1|true):on,(0|false):off",
|
substitute => "STATE!(1|true):on,(0|false):off",
|
||||||
webCmd => "control",
|
webCmd => "devstate",
|
||||||
widgetOverride => "control:uzsuToggle,off,on"
|
widgetOverride => "devstate:uzsuToggle,off,on"
|
||||||
},
|
},
|
||||||
"HM-ES-PMSw1-Pl|HM-ES-PMSw1-Pl-DN-R1|HM-ES-PMSw1-Pl-DN-R2|HM-ES-PMSw1-Pl-DN-R3|HM-ES-PMSw1-Pl-DN-R4|HM-ES-PMSw1-Pl-DN-R5" => {
|
"HM-ES-PMSw1-Pl|HM-ES-PMSw1-Pl-DN-R1|HM-ES-PMSw1-Pl-DN-R2|HM-ES-PMSw1-Pl-DN-R3|HM-ES-PMSw1-Pl-DN-R4|HM-ES-PMSw1-Pl-DN-R5" => {
|
||||||
_description => "Steckdose mit Energiemessung",
|
_description => "Steckdose mit Energiemessung",
|
||||||
@ -421,7 +458,7 @@ use vars qw(%HMCCU_SCRIPTS);
|
|||||||
},
|
},
|
||||||
"HMIP-PSM" => {
|
"HMIP-PSM" => {
|
||||||
_description => "Steckdose mit Energiemessung IP",
|
_description => "Steckdose mit Energiemessung IP",
|
||||||
ccureadingfilter => "(STATE|CURRENT|^ENERGY_COUNTER$|POWER)",
|
ccureadingfilter => "(STATE|CURRENT|^ENERGY_COUNTER\$|POWER)",
|
||||||
controldatapoint => "3.STATE",
|
controldatapoint => "3.STATE",
|
||||||
statedatapoint => "3.STATE",
|
statedatapoint => "3.STATE",
|
||||||
statevals => "on:true,off:false",
|
statevals => "on:true,off:false",
|
||||||
@ -431,7 +468,7 @@ use vars qw(%HMCCU_SCRIPTS);
|
|||||||
widgetOverride => "control:uzsuToggle,off,on"
|
widgetOverride => "control:uzsuToggle,off,on"
|
||||||
}, "HM-LC-Dim1L-Pl|HM-LC-Dim1L-Pl-2|HM-LC-Dim1L-CV|HM-LC-Dim2L-CV|HM-LC-Dim2L-SM|HM-LC-Dim1L-Pl-3|HM-LC-Dim1L-CV-2" => {
|
}, "HM-LC-Dim1L-Pl|HM-LC-Dim1L-Pl-2|HM-LC-Dim1L-CV|HM-LC-Dim2L-CV|HM-LC-Dim2L-SM|HM-LC-Dim1L-Pl-3|HM-LC-Dim1L-CV-2" => {
|
||||||
_description => "Funk-Anschnitt-Dimmaktor",
|
_description => "Funk-Anschnitt-Dimmaktor",
|
||||||
ccureadingfilter => "(^LEVEL$|DIRECTION)",
|
ccureadingfilter => "(^LEVEL\$|DIRECTION)",
|
||||||
ccuscaleval => "LEVEL:0:1:0:100",
|
ccuscaleval => "LEVEL:0:1:0:100",
|
||||||
cmdIcon => "on:general_an off:general_aus",
|
cmdIcon => "on:general_an off:general_aus",
|
||||||
controldatapoint => "1.LEVEL",
|
controldatapoint => "1.LEVEL",
|
||||||
@ -446,7 +483,7 @@ use vars qw(%HMCCU_SCRIPTS);
|
|||||||
},
|
},
|
||||||
"HM-LC-Dim1PWM-CV|HM-LC-Dim1PWM-CV-2" => {
|
"HM-LC-Dim1PWM-CV|HM-LC-Dim1PWM-CV-2" => {
|
||||||
_description => "Funk-PWM-Dimmaktor",
|
_description => "Funk-PWM-Dimmaktor",
|
||||||
ccureadingfilter => "(^LEVEL$|DIRECTION)",
|
ccureadingfilter => "(^LEVEL\$|DIRECTION)",
|
||||||
ccuscaleval => "LEVEL:0:1:0:100",
|
ccuscaleval => "LEVEL:0:1:0:100",
|
||||||
cmdIcon => "on:general_an off:general_aus",
|
cmdIcon => "on:general_an off:general_aus",
|
||||||
controldatapoint => "1.LEVEL",
|
controldatapoint => "1.LEVEL",
|
||||||
@ -506,6 +543,26 @@ use vars qw(%HMCCU_SCRIPTS);
|
|||||||
webCmd => "control",
|
webCmd => "control",
|
||||||
widgetOverride => "control:uzsuToggle,off,on"
|
widgetOverride => "control:uzsuToggle,off,on"
|
||||||
},
|
},
|
||||||
|
"HM-LC-Sw2PBU-FM" => {
|
||||||
|
_description => "Funk-Schaltaktor 2-fach",
|
||||||
|
ccureadingfilter => "STATE",
|
||||||
|
controldatapoint => "1.STATE",
|
||||||
|
statedatapoint => "1.STATE",
|
||||||
|
statevals => "on:true,off:false",
|
||||||
|
substitute => "STATE!(true|1):on,(false|0):off",
|
||||||
|
webCmd => "control",
|
||||||
|
widgetOverride => "control:uzsuToggle,off,on"
|
||||||
|
},
|
||||||
|
"HmIP-BSM" => {
|
||||||
|
_description => "Schalt-Mess-Aktor",
|
||||||
|
ccureadingfilter => "(STATE|PRESS)",
|
||||||
|
statedatapoint => "4.STATE",
|
||||||
|
controldatapoint => "4.STATE",
|
||||||
|
statevals => "on:true,off:false",
|
||||||
|
substitute => "STATE!(true|1):on,(false|0):off",
|
||||||
|
webCmd => "control",
|
||||||
|
widgetOverride => "control:uzsuToggle,off,on"
|
||||||
|
},
|
||||||
"HM-LC-SW4-BA-PCB|HM-SCI-3-FM" => {
|
"HM-LC-SW4-BA-PCB|HM-SCI-3-FM" => {
|
||||||
_description => "4 Kanal Funk Schaltaktor für Batteriebetrieb, 3 Kanal Schließerkontakt",
|
_description => "4 Kanal Funk Schaltaktor für Batteriebetrieb, 3 Kanal Schließerkontakt",
|
||||||
ccureadingfilter => "STATE",
|
ccureadingfilter => "STATE",
|
||||||
@ -679,6 +736,13 @@ use vars qw(%HMCCU_SCRIPTS);
|
|||||||
statedatapoint => "1.STATE",
|
statedatapoint => "1.STATE",
|
||||||
substitute => "STATE!(0|false):ok,(1|true):alarm"
|
substitute => "STATE!(0|false):ok,(1|true):alarm"
|
||||||
},
|
},
|
||||||
|
"HmIP-SWSD" => {
|
||||||
|
_description => "Funk-Rauchmelder",
|
||||||
|
ccureadingfilter => "(ALARM_STATUS|TEST_RESULT|ERROR_CODE)",
|
||||||
|
eventMap => "/datapoint 1.SMOKE_DETECTOR_COMMAND 0:reservedAlarmOff/datapoint 1.SMOKE_DETECTOR_COMMAND 1:intrusionAlarmOff/datapoint 1.SMOKE_DETECTOR_COMMAND 2:intrusionAlarmOn/datapoint 1.SMOKE_DETECTOR_COMMAND 3:smokeTest/datapoint 1.SMOKE_DETECTOR_COMMAND 4:comTest/datapoint 1.SMOKE_DETECTOR_COMMAND 5:comTestRepeat/",
|
||||||
|
statedatapoint => "SMOKE_DETECTOR_ALARM_STATUS",
|
||||||
|
substitute => "SMOKE_DETECTOR_ALARM_STATUS!0:noAlarm,1:primaryAlarm,2:intrusionAlarm,3:secondaryAlarm;SMOKE_DETECTOR_TEST_RESULT!0:none,1:smokeTestOK,2:smokeTestFailed,3:comTestSent,4:comTestOK"
|
||||||
|
},
|
||||||
"HM-Sec-SFA-SM" => {
|
"HM-Sec-SFA-SM" => {
|
||||||
_description => "Alarmsirene",
|
_description => "Alarmsirene",
|
||||||
ccureadingfilter => "STATE",
|
ccureadingfilter => "STATE",
|
||||||
@ -931,16 +995,42 @@ if (odev) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
WriteLine ("ERROR: Device not found");
|
WriteLine ("ERROR: Device not found");
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
"GetDevice" => {
|
||||||
|
description => "Query CCU device or channel",
|
||||||
|
syntax => "name",
|
||||||
|
parameters => 1,
|
||||||
|
code => qq(
|
||||||
|
object odev=dom.GetObject("\$name");
|
||||||
|
if (odev) {
|
||||||
|
if (odev.IsTypeOf (OT_CHANNEL)) {
|
||||||
|
string devid = odev.Device();
|
||||||
|
odev = dom.GetObject (devid);
|
||||||
|
}
|
||||||
|
|
||||||
|
string intid=odev.Interface();
|
||||||
|
string intna=dom.GetObject(intid).Name();
|
||||||
|
string chnid;
|
||||||
|
integer cc=0;
|
||||||
|
foreach (chnid, odev.Channels()) {
|
||||||
|
object ochn=dom.GetObject(chnid);
|
||||||
|
WriteLine("C;" # ochn.Address() # ";" # ochn.Name() # ";" # ochn.ChnDirection());
|
||||||
|
cc=cc+1;
|
||||||
|
}
|
||||||
|
WriteLine("D;" # intna # ";" # odev.Address() # ";" # odev.Name() # ";" # odev.HssType() # ";" # cc);
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
"GetDeviceList" => {
|
"GetDeviceList" => {
|
||||||
description => "Query CCU devices and channels",
|
description => "Query CCU devices, channels and interfaces",
|
||||||
syntax => "",
|
syntax => "",
|
||||||
parameters => 0,
|
parameters => 0,
|
||||||
code => qq(
|
code => qq(
|
||||||
string devid;
|
string devid;
|
||||||
string chnid;
|
string chnid;
|
||||||
|
string sifId;
|
||||||
foreach(devid, root.Devices().EnumUsedIDs()) {
|
foreach(devid, root.Devices().EnumUsedIDs()) {
|
||||||
object odev=dom.GetObject(devid);
|
object odev=dom.GetObject(devid);
|
||||||
string intid=odev.Interface();
|
string intid=odev.Interface();
|
||||||
@ -952,6 +1042,12 @@ foreach(devid, root.Devices().EnumUsedIDs()) {
|
|||||||
cc=cc+1;
|
cc=cc+1;
|
||||||
}
|
}
|
||||||
WriteLine("D;" # intna # ";" # odev.Address() # ";" # odev.Name() # ";" # odev.HssType() # ";" # cc);
|
WriteLine("D;" # intna # ";" # odev.Address() # ";" # odev.Name() # ";" # odev.HssType() # ";" # cc);
|
||||||
|
}
|
||||||
|
foreach(sifId, root.Interfaces().EnumIDs()) {
|
||||||
|
object oIf=dom.GetObject(sifId);
|
||||||
|
if (oIf) {
|
||||||
|
WriteLine("I;" # oIf.Name() # ';' # oIf.InterfaceInfo() # ';' # oIf.InterfaceUrl());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
@ -1025,6 +1121,8 @@ string sDevList = "\$list";
|
|||||||
foreach (sDevice, sDevList.Split(",")) {
|
foreach (sDevice, sDevList.Split(",")) {
|
||||||
object odev = dom.GetObject (sDevice);
|
object odev = dom.GetObject (sDevice);
|
||||||
if (odev) {
|
if (odev) {
|
||||||
|
string intid = odev.Interface();
|
||||||
|
string intna = dom.GetObject(intid).Name();
|
||||||
string sType = odev.HssType();
|
string sType = odev.HssType();
|
||||||
foreach (chnid, odev.Channels()) {
|
foreach (chnid, odev.Channels()) {
|
||||||
object ochn = dom.GetObject(chnid);
|
object ochn = dom.GetObject(chnid);
|
||||||
@ -1035,7 +1133,7 @@ foreach (sDevice, sDevList.Split(",")) {
|
|||||||
object oDP = dom.GetObject(sDPId);
|
object oDP = dom.GetObject(sDPId);
|
||||||
if (oDP) {
|
if (oDP) {
|
||||||
string sDPName = oDP.Name().StrValueByIndex(".",2);
|
string sDPName = oDP.Name().StrValueByIndex(".",2);
|
||||||
WriteLine (sAddr # ";" # sType # ";" # sChnNo # ";" # sDPName # ";" # oDP.ValueType() # ";" # oDP.Operations());
|
WriteLine (intna # ";" # sAddr # ";" # sType # ";" # sChnNo # ";" # sDPName # ";" # oDP.ValueType() # ";" # oDP.Operations());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1062,6 +1160,50 @@ foreach (sChannel, sChnList.Split(",")) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
"GetInterfaceList" => {
|
||||||
|
description => "Get CCU RPC interfaces",
|
||||||
|
syntax => "",
|
||||||
|
parameters => 0,
|
||||||
|
code => qq(
|
||||||
|
string sifId;
|
||||||
|
foreach(sifId, root.Interfaces().EnumIDs()) {
|
||||||
|
object oIf = dom.GetObject(sifId);
|
||||||
|
if (oIf) {
|
||||||
|
WriteLine (oIf.Name() # ';' # oIf.InterfaceInfo() # ';' # oIf.InterfaceUrl());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
"ClearUnreachable" => {
|
||||||
|
description => "Clear device unreachable alarms in CCU",
|
||||||
|
syntax => "",
|
||||||
|
parameters => 0,
|
||||||
|
code => qq(
|
||||||
|
string itemID;
|
||||||
|
string address;
|
||||||
|
object aldp_obj;
|
||||||
|
foreach(itemID, dom.GetObject(ID_DEVICES).EnumUsedIDs()) {
|
||||||
|
address = dom.GetObject(itemID).Address();
|
||||||
|
aldp_obj = dom.GetObject("AL-" # address # ":0.STICKY_UNREACH");
|
||||||
|
if (aldp_obj) {
|
||||||
|
if (aldp_obj.Value()) {
|
||||||
|
aldp_obj.AlReceipt();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
"GetNameByAddress" => {
|
||||||
|
description => "Get device or channel name by address",
|
||||||
|
syntax => "iface, address",
|
||||||
|
parameters => 2,
|
||||||
|
code => qq(
|
||||||
|
object lObjDevice = xmlrpc.GetObjectByHSSAddress(interfaces.Get("\$iface"),"\$address");
|
||||||
|
if (lObjDevice) {
|
||||||
|
WriteLine (lObjDevice.Name());
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user