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

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 371a5b1481
commit df6ba03fc6

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 );
}
#####################################
@ -290,19 +293,19 @@ sub FLAMINGO_UpdateState {
<br>
<li>&lt;code&gt; is the unic code of the autogenerated address of the FLAMINGO device. This changes, after pairing to the master</li>
<li>&lt;model&gt; is the model name</li><br>
- if autocreate, the defined model is <code>unknown</code>.<br>
- with manual <code>define</code> you can choose the model which is available as attribute.
<li>&lt;model&gt; is the model name</li><br>
- if autocreate, the defined model is <code>unknown</code>.<br>
- with manual <code>define</code> you can choose the model which is available as attribute.
</ul>
<br><br>
<a name="FLAMINGOset"></a>
<b>Set</b>
<ul>
<li>Counterreset<br>
- set alarmcounter to 0</li>
<li>Testalarm<br>
- trigger a test alarm (The testalarm does not increase the alarm ounter!)</li>
<li>Counterreset<br>
- set alarmcounter to 0</li>
<li>Testalarm<br>
- trigger a test alarm (The testalarm does not increase the alarm ounter!)</li>
</ul><br>
<a name="FLAMINGOget"></a>
@ -315,11 +318,11 @@ sub FLAMINGO_UpdateState {
<li><a href="#do_not_notify">do_not_notify</a></li>
<li><a href="#eventMap">eventMap</a></li>
<li><a href="#ignore">ignore</a></li>
<a name="model"></a>
<li>model<br>
FA20RF, FA21RF, FA22RF, KD-101LA, LM-101LD, unknown</li>
<a name="model"></a>
<li>model<br>
FA20RF, FA21RF, FA22RF, KD-101LA, LM-101LD, unknown</li>
<a name="showtime"></a>
<li><a href="#showtime">showtime</a></li>
<li><a href="#showtime">showtime</a></li>
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
</ul>
<br><br>
@ -332,9 +335,9 @@ sub FLAMINGO_UpdateState {
<b>Pairing (Master-Slave)</b>
<ul>
<li>Determine master<br>
LEARN button push until the green LED lights on</li>
LEARN button push until the green LED lights on</li>
<li>Determine slave<br>
LEARN button push until the red LED lights on</li>
LEARN button push until the red LED lights on</li>
<li>Master, hold down the TEST button until an alarm signal generated at all "Slaves"</li>
</ul><br>
<b>Standalone</b>
@ -388,10 +391,10 @@ sub FLAMINGO_UpdateState {
<li><a href="#do_not_notify">do_not_notify</a></li>
<li><a href="#eventMap">eventMap</a></li>
<li><a href="#ignore">ignore</a></li>
<a name="model"></a>
<li>model<br>
FA20RF, FA21RF, FA22RF, KD-101LA, LM-101LD, unknown</li>
<a name="showtime"></a>
<a name="model"></a>
<li>model<br>
FA20RF, FA21RF, FA22RF, KD-101LA, LM-101LD, unknown</li>
<a name="showtime"></a>
<li><a href="#showtime">showtime</a></li>
<li><a href="#readingFnAttributes">readingFnAttributes</a></li>
</ul>
@ -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