From 368d6a724a5f72021cc6769aaba385079a6f1ba1 Mon Sep 17 00:00:00 2001
From: rudolfkoenig <>
Date: Thu, 24 Aug 2023 12:46:07 +0000
Subject: [PATCH] fhem.pl: add the overrideNotifydev Attribute (Forum #134677)
git-svn-id: https://svn.fhem.de/fhem/trunk@27895 2b470e98-0d58-463d-a4d8-8e2adae1ed80
---
fhem/docs/commandref_frame.html | 9 +++++++++
fhem/docs/commandref_frame_DE.html | 10 ++++++++++
fhem/fhem.pl | 6 ++++--
3 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/fhem/docs/commandref_frame.html b/fhem/docs/commandref_frame.html
index 1dfb3371c..9f5e0f635 100644
--- a/fhem/docs/commandref_frame.html
+++ b/fhem/docs/commandref_frame.html
@@ -418,6 +418,15 @@ Device specific attributes are documented in the corresponding device section.
grouping attribute.
+
+
overrideNotifydev
+ if set (the argument is a devspec), the optimization for notifications
+ is using this value instead of the module-set NOTIFYDEV internal.
+ Use it only, if you know it better than the module maintainer.
+ In order to be available, the global or the device userattr must be set
+ first, to include it.
+
+
room
Filter/group devices in frontends. A device can appear in more than one
diff --git a/fhem/docs/commandref_frame_DE.html b/fhem/docs/commandref_frame_DE.html
index ccebd0996..7298740e1 100644
--- a/fhem/docs/commandref_frame_DE.html
+++ b/fhem/docs/commandref_frame_DE.html
@@ -416,6 +416,16 @@ Gerät dokumentiert.
gesetzte Gerätetyp verwendet.
+
+ overrideNotifydev
+ falls gesetzt (das Argument ist ein devspec), dann verwendet die
+ Optimierung der Benachrichtigungen diesen Wert, statt das vom Modul
+ gesetzte Internal NOTIFYDEV. Man sollte es nur dann setzen, falls
+ man es besser weiss, als der Modul Maintainer. Damit es setzbar ist,
+ muss vorher das global oder Geräte spezifische userattr
+ Attribut ergänzt werden.
+
+
room
Filtert/gruppiert Geräte.
diff --git a/fhem/fhem.pl b/fhem/fhem.pl
index 35ef17605..392360dcc 100755
--- a/fhem/fhem.pl
+++ b/fhem/fhem.pl
@@ -5630,7 +5630,8 @@ createNtfyHash()
my %d2a_cache;
%ntfyHash = ("*" => []);
foreach my $d (@ntfyList) {
- my $ndl = $defs{$d}{NOTIFYDEV};
+ my $ndl = $attr{$d}{overrideNotifydev};
+ $ndl = $defs{$d}{NOTIFYDEV} if(!$ndl);
next if(!$ndl);
my @ndlarr;
if($d2a_cache{$ndl}) {
@@ -5648,7 +5649,8 @@ createNtfyHash()
my @nhk = keys %ntfyHash;
foreach my $d (@ntfyList) {
- my $ndl = $defs{$d}{NOTIFYDEV};
+ my $ndl = $attr{$d}{overrideNotifydev};
+ $ndl = $defs{$d}{NOTIFYDEV} if(!$ndl);
my $arr = ($ndl ? $d2a_cache{$ndl} : \@nhk);
map { push @{$ntfyHash{$_}}, $d } @{$arr};
}