Zitat von: olwaldi am 20 Januar 2026, 15:36:11Wenn Du die Zonen sowieso nicht nutzt, würde ich doch meine Änderung von toggle bevorzugen. Ansonsten muß man ja auch toggle zum Ausschalten verwenden, um auch alle Zonen wieder auszuschalten.
Die Doku habe ich bei mir schonmal wie vorgeschlagen angepaßt. Bzgl. toggle warte ich aber noch die Meinung der anderen ab...
Habe schon oft Fragen im Netz gesehen, wo "verzweifelte" Anwender sich wundern, daß ihr Denon eingeschaltet bleibt, obwohl sie ihn vermeintlich ausgeschaltet haben. Liegt eben daran, daß irgendwie mal versehentlich eine Zone eingeschaltet worden ist und eben eingeschaltet bleibt, wenn man nur die zoneMain ausschaltet. Ganz ohne fhem...
Zitat von: byterazor am 02 März 2024, 13:00:19Es gibt für NTFY_CLIENT jetzt eine update URL: https://rm.byterazor.de/upd-fhem-ntfy/controls_byterazor-fhem-ntfy.txtscheint nicht mehr zu funktionieren. Die Seite ist offline (siehe hier).
sub ntfy {
my ($message, $priority, $tags, $title, $cmd1, $button1, $cmd2, $button2, $cmd3, $button3) = @_;
# Set defaults
if (!defined $priority) {$priority = 3}
if (!defined $tags) {$tags = "house_with_garden"};
if (!defined $title or $title eq "") {$title = "FHEM"}
if ($tags !~ m/house_with_garden/) {
$tags = $tags.",house_with_garden";
}
# Prepare headers
my $param = {
url => "https://ntfy.example.org/fhem",
method => "POST",
timeout => 10,
callback => sub() {},
header => "Content-Type: application/json\r\nAuthorization: Bearer REDACTED\r\np: $priority\r\nta: $tags\r\nt: $title",
data => $message
};
# For actions:
my $actions = "";
my $url = "https://example.org/REDACTED";
my $type = "http";
my $jsonheader = "headers.Content-Type=application/json";
# Build action header
if (defined $cmd1) {
$actions = "$type, $button1, $url, $jsonheader, body={\"cmd\":\"$cmd1\"}";
}
if (defined $cmd2) {
$actions .= "; $type, $button2, $url, $jsonheader, body={\"cmd\":\"$cmd2\"}";
}
if (defined $cmd3) {
$actions .= "; $type, $button3, $url, $jsonheader, body={\"cmd\":\"$cmd3\"}";
}
# Add header
if ($actions ne "") {
$param->{header} .= "\r\nActions: $actions";
}
# Make request
HttpUtils_NonblockingGet($param);
}
sub ntfyBat {
my ($msg, $tags) = @_;
$tags = defined $tags && length $tags ? ",$tags" : "";
ntfy($msg,4,"battery".$tags)
}
sub ntfyError {
my ($msg, $tags) = @_;
$tags = defined $tags && length $tags ? ",$tags" : "";
ntfy($msg, 5, "x".$tags);
}
sub ntfyErrorSilent {
my ($msg, $tags) = @_;
$tags = defined $tags && length $tags ? ",$tags" : "";
ntfy($msg,2,"x".$tags)
}
sub ntfyOk {
my ($msg, $tags) = @_;
$tags = defined $tags && length $tags ? ",$tags" : "";
ntfy($msg,2,"white_check_mark".$tags)
}ntfy("Nicht Stören aktiviert.",4,"shushing_face,crescent_moon","","set sys_dnd off","Deaktivieren");Sieht dann aus wie im angehängten Screenshot.ntfy("Spülmaschine läuft!",2,"plate_with_cutlery,arrows_counterclockwise");und z.B. für eine Batteriebenachrichtigung:ntfyBat("Die Batterie von ".AttrVal($NAME,"alias","")." ist fast leer! (".$EVTPART1." %)");