From 4863a71b498e7740621992ef5092f380766d47e9 Mon Sep 17 00:00:00 2001 From: erwin <> Date: Thu, 13 Jul 2023 19:40:09 +0000 Subject: [PATCH] 98_KNX_scan.pm: new Module - implements KNX_scan FHEM cmd git-svn-id: https://svn.fhem.de/fhem/trunk@27759 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 3 ++ fhem/FHEM/98_KNX_scan.pm | 63 ++++++++++++++++++++++++++++++++++++++++ fhem/MAINTAINER.txt | 1 + 3 files changed, 67 insertions(+) create mode 100644 fhem/FHEM/98_KNX_scan.pm diff --git a/fhem/CHANGED b/fhem/CHANGED index a12554cc3..03730291f 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,8 @@ # 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. + - new: 98_KNX_scan: implement FHEM-cmd: KNX_scan + - change: 00_KNXIO.pm: moved KNX_scan perl function to 10_KNX.pm + - change: 10_KNX.pm: moved KNX_scan perl function to 10_KNX.pm - bugfix: 93_DbRep: once more fix SQL syntax for Postgre Forum:#134170 - feature: 47_OBIS: Add unofficial "set data " - bugfix: 93_DbRep: SQL syntax for Postgre maxValue deleteOther Forum:#134170 diff --git a/fhem/FHEM/98_KNX_scan.pm b/fhem/FHEM/98_KNX_scan.pm new file mode 100644 index 000000000..c4c25fcdc --- /dev/null +++ b/fhem/FHEM/98_KNX_scan.pm @@ -0,0 +1,63 @@ +## no critic (Modules::RequireVersionVar) +# $Id$ +# CommandModule for KNX utilities +# executing functions and detailed cmd-ref are defined in KNX-module. +################################################################################ +### changelog: +# 2023/07/xx initial version + + +package main; +use strict; +use warnings; + +### perlcritic parameters +## no critic (ControlStructures::ProhibitPostfixControls) +## no critic (Documentation::RequirePodSections) + +sub KNX_scan_Initialize { + + $cmds{KNX_scan} = { Fn => 'CommandKNX_scan', + Hlp => '[] request values from KNX-Hardware. Use "help KNX_scan" for more help'}; + return; +} + +##################################### +sub CommandKNX_scan { + my $cl = shift; + my $devs = shift; + + $devs = 'TYPE=KNX' if (! defined($devs) || $devs eq q{}); # select all if nothing defined + if (exists($modules{KNX}->{LOADED})) { # check for KNX-module ready + main::KNX_scan($devs); + } + else { + Log3 undef, 2, "KNX_scan for $devs aborted - KNX-module not loaded!"; + } + return; +} + +1; + +=pod + +=encoding utf8 + +=item command +=item summary scans KNX-Bus devices to syncronize the status of KNX-devices with FHEM. +=item summary_DE gleicht den Status der KNX-Bus Geräte mit FHEM ab. +=begin html + + +

KNX_scan

+
    +
  • KNX_scan is a utility funtion to syncronize the status of KNX-hardware with FHEM.
    +Syntax:
    +   KNX_scan <KNX-device> or
    +   KNX_scan <KNX-devspec>
    +

    A detailed description and examples of the KNX_scan cmd is here.

    +
+ +=end html + +=cut diff --git a/fhem/MAINTAINER.txt b/fhem/MAINTAINER.txt index 68310179a..c31b4a1bd 100644 --- a/fhem/MAINTAINER.txt +++ b/fhem/MAINTAINER.txt @@ -531,6 +531,7 @@ FHEM/98_inotify.pm marvin78 Automatisierung FHEM/98_Installer.pm loredo Unterstützende Dienste FHEM/98_JsonList2.pm rudolfkoenig Automatisierung FHEM/98_JsonMod.pm herrmannj Automatisierung +FHEM/98_KNX_scan.pm erwin KNX/EIB (Forum #122582) https://forum.fhem.de/index.php/topic,122582.0.html FHEM/98_livetracking.pm markus-m Unterstützende Dienste FHEM/98_logProxy.pm justme1968 Frontends/SVG Plots logProxy FHEM/98_search.pm loredo Unterstützende Dienste