2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-26 10:34:52 +00:00

FULLY: Support for Fully version 1.33

git-svn-id: https://svn.fhem.de/fhem/trunk@19965 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
zap 2019-08-08 20:02:06 +00:00
parent 3589413b7f
commit 9f0c6b24a8
2 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,6 @@
# 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.
- bugfix: 89_FULLY: Support for Fully version 1.33
- feature: 22_HOMEMODE: v1.4.10 add support for PET - feature: 22_HOMEMODE: v1.4.10 add support for PET
- change: 98_DOIFtools: remove unessesary code due to changes in console.js - change: 98_DOIFtools: remove unessesary code due to changes in console.js
- bugfix: 70_ZoneMinder: fixed JSON-parsing bug - bugfix: 70_ZoneMinder: fixed JSON-parsing bug

View File

@ -1,6 +1,6 @@
############################################################################## ##############################################################################
# #
# 89_FULLY.pm 1.2 # 89_FULLY.pm 1.3
# #
# $Id$ # $Id$
# #
@ -410,7 +410,7 @@ sub FULLY_Get ($@)
Log3 $name, 2, "FULLY: [$name] Command failed"; Log3 $name, 2, "FULLY: [$name] Command failed";
return "FULLY: Command failed"; return "FULLY: Command failed";
} }
elsif ($response =~ /Wrong password/) { elsif ($result =~ /Wrong password/) {
Log3 $name, 2, "FULLY: [$name] Wrong password"; Log3 $name, 2, "FULLY: [$name] Wrong password";
return "FULLY: Wrong password"; return "FULLY: Wrong password";
} }
@ -539,6 +539,7 @@ sub FULLY_ExecuteCB ($$$)
if ($param->{cmdno} == $param->{cmdcnt}) { if ($param->{cmdno} == $param->{cmdcnt}) {
# Last request, update readings # Last request, update readings
Log3 $name, 4, "FULLY: [$name] Last command executed. Processing results"; Log3 $name, 4, "FULLY: [$name] Last command executed. Processing results";
Log3 $name, 5, "FULLY: [$name] $data";
my $result = FULLY_ProcessDeviceInfo ($name, $data); my $result = FULLY_ProcessDeviceInfo ($name, $data);
if (!FULLY_UpdateReadings ($hash, $result)) { if (!FULLY_UpdateReadings ($hash, $result)) {
Log3 $name, 2, "FULLY: [$name] Command failed"; Log3 $name, 2, "FULLY: [$name] Command failed";
@ -656,8 +657,11 @@ sub FULLY_ProcessDeviceInfo ($$)
return "$name|0|state=failed" if (!defined ($result) || $result eq ''); return "$name|0|state=failed" if (!defined ($result) || $result eq '');
return "$name|0|state=wrong password" if ($result =~ /Wrong password/); return "$name|0|state=wrong password" if ($result =~ /Wrong password/);
# HTML code format
# <td class='table-cell'>Kiosk mode</td><td class='table-cell'>off</td>
my $parameters = "$name|1"; my $parameters = "$name|1";
while ($result =~ /table-cell\">([^<]+)<\/td><td class="table-cell">([^<]+)</g) { while ($result =~ /table-cell.>([^<]+)<\/td><td class=.table-cell.>([^<]+)</g) {
my $rn = lc($1); my $rn = lc($1);
my $rv = $2; my $rv = $2;
$rv =~ s/\s+$//; $rv =~ s/\s+$//;