2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

48_BlinkCamera: Active/Enabled handling to new format

git-svn-id: https://svn.fhem.de/fhem/trunk@22525 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
viegener 2020-08-02 19:47:11 +00:00
parent 4accf49203
commit 5d99e24e53
2 changed files with 12 additions and 7 deletions

View File

@ -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.
- bugfix: 48_BlinkCamera: Active/Enabled handling to new format
- bugfix: 52_I2C_HDC1008: "temperature" reading now works correctly with
event-min-interval
- bugfix: 48_BlinkCamera: Corrected handling of prefered network attribute

View File

@ -57,10 +57,11 @@
# FIX: FUUID in undef corrected
# New default 1 for homescreenv3 - old apis deactivated
# Disclaimer for API changes
# Corrected handling of prefered network attribute
#
# Adapt active handling to new format
# Add new reading Enabled per camera with doc - showing enabled value
#
#
#
@ -1458,13 +1459,14 @@ sub BlinkCamera_ParseHomescreen($$$)
foreach my $device ( @$camList ) {
if ( $device->{network_id} eq $network ) {
my $active = "disabled";
# $active = "armed" if ( $device->{enabled} eq "true" );
$active = "armed" if ( $device->{enabled} );
$active = "armed" if ( $device->{enabled} eq "true" );
# $active = "armed" if ( $device->{enabled} );
$readUpdates->{"networkCamera".$device->{id}} = $device->{name}.":".$active;
$readUpdates->{"networkCamera".$device->{id}."Name"} = $device->{name};
$readUpdates->{"networkCamera".$device->{id}."Type"} = "camera";
$readUpdates->{"networkCamera".$device->{id}."Active"} = $active;
$readUpdates->{"networkCamera".$device->{id}."Enabled"} = defined($device->{enabled})?$device->{enabled}:"undef";
$cameraGets .= $device->{name}.",".$device->{id}.",";
$cameras .= $device->{id}.":".$device->{name}."\n";
@ -1505,13 +1507,14 @@ sub BlinkCamera_ParseHomescreen($$$)
foreach my $device ( @$owlList ) {
if ( $device->{network_id} eq $network ) {
my $active = "disabled";
# $active = "armed" if ( $device->{enabled} eq "true" );
$active = "armed" if ( $device->{enabled} );
$active = "armed" if ( $device->{enabled} eq "true" );
# $active = "armed" if ( $device->{enabled} );
$readUpdates->{"networkCamera".$device->{id}} = $device->{name}.":".$active;
$readUpdates->{"networkCamera".$device->{id}."Name"} = $device->{name};
$readUpdates->{"networkCamera".$device->{id}."Type"} = "owl";
$readUpdates->{"networkCamera".$device->{id}."Active"} = $active;
$readUpdates->{"networkCamera".$device->{id}."Enabled"} = defined($device->{enabled})?$device->{enabled}:"undef";
$cameraGets .= $device->{name}.",".$device->{id}.",";
$cameras .= $device->{id}.":".$device->{name}."\n";
@ -2734,7 +2737,8 @@ sub BlinkCamera_AnalyzeAlertResults( $$$ ) {
<br>
<li><code>networkCamera... </code><br>Set of readings specific for each camera (identified by the cameraID in the reading name). Providing status and name of the camera / most recent thumbnail / url for the thumbnail to the proxy </li>
<li><code>networkCamera<cameraid>Enabled</code><br>Shows the enabled (active) status of the camera (known values: 0 / 1 / "undef" - last value will be given if this value is not contained in the camerainfo </li>
</ul>