mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
AndroidDB: added FHEM reading attributes
git-svn-id: https://svn.fhem.de/fhem/trunk@25875 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
3a33ece08c
commit
cbe73ecfce
@ -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: 89_AndroidDB: Added FHEM reading attributes
|
||||
- bugfix: 70_SVDRP.pm: bugfix in NextTimer
|
||||
- bugfix: 38_netatmo: fixed average wind angle calculation for PUBLIC
|
||||
- feature: 10_KNX.pm: new dpt22.101, fixes: (UTF8) & dpt20 encode
|
||||
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
# 89_AndroidDB
|
||||
#
|
||||
# Version 0.6
|
||||
# Version 0.7
|
||||
#
|
||||
# FHEM Integration for Android Devices
|
||||
#
|
||||
@ -23,6 +23,7 @@ package main;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use SetExtensions;
|
||||
|
||||
sub AndroidDB_Initialize ($)
|
||||
{
|
||||
@ -36,7 +37,7 @@ sub AndroidDB_Initialize ($)
|
||||
$hash->{ShutdownFn} = "AndroidDB::Shutdown";
|
||||
|
||||
$hash->{parseParams} = 1;
|
||||
$hash->{AttrList} = 'connect:0,1 macros:textField-long preset presetFile';
|
||||
$hash->{AttrList} = 'connect:0,1 macros:textField-long preset presetFile '.$readingFnAttributes;
|
||||
|
||||
$data{RC_layout}{MagentaTVStick} = "AndroidDB::RCLayoutMagentaTVStick";
|
||||
$data{RC_layout}{MagentaOne} = "AndroidDB::RCLayoutMagentaOne";
|
||||
@ -234,8 +235,8 @@ sub Set ($@)
|
||||
my $preset = AttrVal ($name, 'preset', '');
|
||||
push @presetList, sort keys %{$hash->{adb}{preset}{$preset}} if ($preset ne '' && exists($hash->{adb}{preset}{$preset}));
|
||||
push @presetList, sort keys %{$hash->{adb}{preset}{_custom_}} if (exists($hash->{adb}{preset}{_custom_}));
|
||||
my %e;
|
||||
$options .= ' remoteControl:'.join(',', sort grep { !$e{$_}++ } @presetList) if (scalar(@presetList) > 0);
|
||||
my %e1;
|
||||
$options .= ' remoteControl:'.join(',', sort grep { !$e1{$_}++ } @presetList) if (scalar(@presetList) > 0);
|
||||
|
||||
# Add remote control layouts to command createRemote
|
||||
my @layouts = keys %{$data{RC_layout}};
|
||||
@ -245,8 +246,8 @@ sub Set ($@)
|
||||
my @macroList = ();
|
||||
push @macroList, sort keys %{$hash->{adb}{macro}{$preset}} if ($preset ne '' && exists($hash->{adb}{macro}{$preset}));
|
||||
push @macroList, sort keys %{$hash->{adb}{macro}{_custom_}} if (exists($hash->{adb}{macro}{_custom_}));
|
||||
my %e;
|
||||
$options .= ' '.join(' ', sort grep { !$e{$_}++ } @macroList) if (scalar(@macroList) > 0);
|
||||
my %e2;
|
||||
$options .= ' '.join(' ', sort grep { !$e2{$_}++ } @macroList) if (scalar(@macroList) > 0);
|
||||
|
||||
my $lcopt = lc($opt);
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
# 89_AndroidDBHost
|
||||
#
|
||||
# Version 0.6
|
||||
# Version 0.7
|
||||
#
|
||||
# FHEM Integration for Android Debug Bridge
|
||||
#
|
||||
@ -23,6 +23,7 @@ package main;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use SetExtensions;
|
||||
|
||||
sub AndroidDBHost_Initialize ($)
|
||||
{
|
||||
@ -42,11 +43,11 @@ package AndroidDBHost;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use SetExtensions;
|
||||
|
||||
# use Data::Dumper;
|
||||
use IPC::Open3;
|
||||
|
||||
use SetExtensions;
|
||||
# use POSIX;
|
||||
|
||||
use GPUtils qw(:all);
|
||||
|
Loading…
Reference in New Issue
Block a user