14_FLAMINGO: revised code

git-svn-id: https://svn.fhem.de/fhem/trunk@27979 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
HomeAuto_User
2023-09-18 18:00:56 +00:00
parent 54a868de35
commit 5904a41d82

View File

@@ -6,7 +6,7 @@
# https://github.com/RFD-FHEM/RFFHEM
#
# 2018 - takeover from unknown maintainer
# 2018-2020 - HomeAuto_User, elektron-bbs
# 2018-2022 - HomeAuto_User, elektron-bbs
#################################################################
# FLAMINGO FA20RF
# get sduino_dummy raw MU;;P0=-1384;;P1=815;;P2=-2725;;P3=-20001;;P4=8159;;P5=-891;;D=01010121212121010101210101345101210101210101212101010101012121212101010121010134510121010121010121210101010101212121210101012101013451012101012101012121010101010121212121010101210101345101210101210101212101010101012121212101010121010134510121010121010121;;CP=1;;O;;
@@ -25,8 +25,12 @@ package main;
use strict;
use warnings;
use FHEM::Meta;
our $VERSION = '200817';
our $VERSION = '20221227';
our $readingFnAttributes;
our %modules;
our $init_done;
my %sets = (
'Testalarm:noArg',
@@ -48,20 +52,19 @@ sub FLAMINGO_Initialize {
my ($hash) = @_;
$hash->{Match} = '^P13\.?1?#[A-Fa-f0-9]+';
$hash->{SetFn} = 'FLAMINGO_Set';
$hash->{DefFn} = 'FLAMINGO_Define';
$hash->{UndefFn} = 'FLAMINGO_Undef';
$hash->{ParseFn} = 'FLAMINGO_Parse';
$hash->{SetFn} = \&FLAMINGO_Set;
$hash->{DefFn} = \&FLAMINGO_Define;
$hash->{UndefFn} = \&FLAMINGO_Undef;
$hash->{ParseFn} = \&FLAMINGO_Parse;
$hash->{AttrList} = 'IODev do_not_notify:0,1 showtime:0,1 ignore:0,1 '.
'model:'.join(q{,}, sort %models).q{ } .
'room:FLAMINGO '.
$readingFnAttributes;
$hash->{AutoCreate}=
{
'FLAMINGO.*' => { ATTR => 'event-on-change-reading:.* event-min-interval:.*:300', FILTER => '%NAME', GPLOT => q{} },
};
return
return FHEM::Meta::InitMod( __FILE__, $hash );
}
#####################################
@@ -418,4 +421,85 @@ sub FLAMINGO_UpdateState {
</ul>
=end html_DE
=for :application/json;q=META.json 14_FLAMINGO.pm
{
"abstract": "Supports flamingo fa20rf/fa21 smoke detectors",
"author": [
"Homeautouser <>",
"elektron-bbs <>"
],
"x_fhem_maintainer": [
"HomeAuto_User"
],
"x_fhem_maintainer_github": [
"homeautouser",
"Sidey79",
"elektron-bbs"
],
"description": "The FLAMINGO module interprets FLAMINGO FA20RF/FA21/FA22RF type of messages received by the SIGNALduino",
"dynamic_config": 1,
"keywords": [
"fhem-sonstige-systeme",
"fhem-hausautomations-systeme",
"fhem-mod",
"signalduino",
"flamingo",
"smoke",
"sensor"
],
"license": [
"GPL_2"
],
"meta-spec": {
"url": "https://metacpan.org/pod/CPAN::Meta::Spec",
"version": 2
},
"name": "FHEM::FLAMINGO",
"prereqs": {
"runtime": {
"requires": {
}
},
"develop": {
"requires": {
}
}
},
"release_status": "stable",
"resources": {
"bugtracker": {
"web": "https://github.com/RFD-FHEM/RFFHEM/issues/"
},
"x_testData": [
{
"url": "https://raw.githubusercontent.com/RFD-FHEM/RFFHEM/master/t/FHEM/14_FLAMINGO/testData.json",
"testname": "Testdata with FLAMINGO smoke sensors"
}
],
"repository": {
"x_master": {
"type": "git",
"url": "https://github.com/RFD-FHEM/RFFHEM.git",
"web": "https://github.com/RFD-FHEM/RFFHEM/tree/master"
},
"type": "svn",
"url": "https://svn.fhem.de/fhem",
"web": "https://svn.fhem.de/trac/browser/trunk/fhem/FHEM/14_FLAMINGO.pm",
"x_branch": "trunk",
"x_filepath": "fhem/FHEM/",
"x_raw": "https://svn.fhem.de/trac/export/latest/trunk/fhem/FHEM/14_FLAMINGO.pm"
},
"x_support_community": {
"board": "Sonstige Systeme",
"boardId": "29",
"cat": "FHEM - Hausautomations-Systeme",
"description": "Sonstige Hausautomations-Systeme",
"forum": "FHEM Forum",
"rss": "https://forum.fhem.de/index.php?action=.xml;type=rss;board=29",
"title": "FHEM Forum: Sonstige Systeme",
"web": "https://forum.fhem.de/index.php/board,29.0.html"
}
}
}
=end :application/json;q=META.json
=cut