mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
72_TA_CMI_JSON: added internal NODEID_HEX
git-svn-id: https://svn.fhem.de/fhem/trunk@24054 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f9089a7421
commit
d0e975b4c1
@ -1,5 +1,6 @@
|
||||
# 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.
|
||||
- feature: 72_TA_CMI_JSON: added internal NODEID_HEX
|
||||
- change: 48_BlinkCamera: Support for SMS Pins in verifyPin
|
||||
- feature: 72_TA_CMI_JSON: added set fixwertImpuls and setList
|
||||
- feature: 72_TA_CMI_JSON: added set fixwertAnalog fixwertDigital
|
||||
|
@ -167,6 +167,10 @@ sub Define($$) {
|
||||
$hash->{NODEID} = $nodeId;
|
||||
$hash->{QUERYPARAM} = $queryParams;
|
||||
|
||||
my $hexNodeId = sprintf('%1x',$nodeId);
|
||||
$hexNodeId = "0$hexNodeId" unless length($hexNodeId) == 2;
|
||||
$hash->{NODEID_HEX} = $hexNodeId;
|
||||
|
||||
Log3 $name, 3, "TA_CMI_JSON ($name) - Define ... module=$module, CMI-URL=$cmiUrl, nodeId=$nodeId";
|
||||
readingsSingleUpdate($hash, 'state', 'defined', 1);
|
||||
|
||||
@ -443,9 +447,7 @@ sub FixwertChangeRequest($$$$) {
|
||||
my $name = $hash->{NAME};
|
||||
my $nodeId = $hash->{NODEID};
|
||||
my $cmiIp = $hash->{CMIURL};
|
||||
|
||||
my $hexNodeId = sprintf('%1x',$nodeId);
|
||||
$hexNodeId = "0$hexNodeId" unless length($hexNodeId) == 2;
|
||||
my $hexNodeId = $hash->{NODEID_HEX};
|
||||
|
||||
$index--; #1 on the Web UI is index 0. 2 is 1, etc.
|
||||
my $hexIndex = sprintf('%1x',$index);
|
||||
@ -507,8 +509,7 @@ sub RequestOutputStates($) {
|
||||
my ($hash) = @_;
|
||||
my $name = $hash->{NAME};
|
||||
my $nodeId = $hash->{NODEID};
|
||||
my $hexNodeId = sprintf('%1x',$nodeId);
|
||||
$hexNodeId = "0$hexNodeId" unless length($hexNodeId) == 2;
|
||||
my $hexNodeId = $hash->{NODEID_HEX};
|
||||
|
||||
my $url = "http://$hash->{CMIURL}/INCLUDE/agx2.cgi?nodex2=$hexNodeId"."&_=".gettimeofday();
|
||||
my $username = AttrVal($name, 'username', 'admin');
|
||||
|
Loading…
Reference in New Issue
Block a user