$read =~ m/errors/ bzw. $read =~ m/temperature/abfrage, dann erhalte ich die Nachrichten wie erwartet - und auch mit der jeweiligen richtigen Formatierung.defmod JK_BMS.notify notify JK_BMS:(errors|power_tube_temperature|temperature_sensor_1|temperature_sensor_2):.* {\
my $alias = AttrVal($NAME,'alias','');;\
my @evt = split(' ',$EVENT);;\
my $read = $evt[0];;\
my $val = $evt[1];;\
if ($read =~ m/errors/ && $val) {\
fhem "set Pushover.Nachricht msg '$alias Fehler' '$EVENT';;\
set NTFY message Title=\"$alias Fehler\" $EVENT"\
} \
elsif ($read =~ m/errors/ && !$val) {\
fhem "set Pushover.Nachricht msg '$alias Fehler' '$read erledigt';; \
set NTFY message Title=\"$alias Fehler\" $read erledigt"\
}\
elsif ($read =~ m/temperature/ && $val && $val >= 40) {\
$read =~ s/_/ /;;\
$read =~ s/_/ /;;\
fhem "set Pushover.Nachricht msg '$alias Temperatur' '$read $val°C';;\
set NTFY message Title=\"$alias Temperatur\" $read $val°C"}}Debug "reading=$read value=$val";Dann lass mal auslösen und schaue was im Log ankommt.defmod JK_BMS.notify notify JK_BMS:(errors|power_tube_temperature|temperature_sensor_1|temperature_sensor_2):.* {\
my $alias = AttrVal($NAME,'alias','');;\
my @evt = split(' ',$EVENT);;\
my $read = chop $evt[0];;\
my $val = $evt[1];;\
if ($read eq 'errors' && $val) {\
fhem "set Pushover.Nachricht msg '$alias Fehler' '$EVENT';; \
set NTFY message Title=\"$alias Fehler\" $EVENT"\
# true wenn Reading gleich errors und value vorhanden\
} \
elsif ($read eq 'errors' && !$val) {\
fhem "set Pushover.Nachricht msg '$alias Fehler' 'erledigt';; \
set NTFY message Title=\"$alias Fehler\" erledigt"\
# true wenn Reading gleich errors und value nicht vorhanden\
}\
elsif ($read =~ m/temperature/ && $val && $val >= 40) {\
$read =~ s/_/ /;;\
$read =~ s/_/ /;;\
fhem "set Pushover.Nachricht msg '$alias Temperatur' '$read $val°C';;\
set NTFY message Title=\"$alias Temperatur\" $read $val°C"}}
4AA0007063102182F01150701440157038FFFB32FB4CFA023A72F4F
54AA0007063102182F01150701440157038FFFB32FB4CFA023A72F4F
54AA0007063102182F011C0501450157038FEEDA4BDBCFA023A72F4F
54AA0007063102182F011C0501450157038FEEDA4BDBCFA023A72F4F
54AA0007063102182F012C060121015703900E018002CFA023A72F4F
54AA0007063102182F012C060121015703900E018002CFA023A72F4F
54AA00070631021931012D0901A00157039006282529CFA023A72F4F
54AA00070631021930011D07018001570390154F2850CFA023A72F4F
54AA0007063102192F013B090184015703901D767A77CFA023A72F4F
54AA0007063102192F013B090184015703901D767A77CFA023A72F4F
54AA0007063102172E012F0B01B001570390139DB69ECFA023A72F4F
ohne Sonne Nachts:
54AA0007063102004501541101410157010101B2E4B3CFA023A72F4F
54AA0007063102004501541101410157010101B2E4B3CFA023A72F4F
54AA00070631020145015410013E0157010101D908DACFA023A72F4F
54AA000706310201460106020148015701010100DE01CFA023A72F4F
54AA000706310200460112020112015701010127DA28CFA023A72F4Fattr NOTIFY-NAME userattr players
attr NOTIFY-NAME players PLAYER-NAME1[,PLAYER-NAME2,PLAYER-NAME3...]gesetzt werden.Bilresa:action:.* {
# Liste der Player aus Attribut
my @targets = split(",", AttrVal("di_Bilresa_SB","players",""));
return unless @targets;
my $act = ReadingsVal("Bilresa","action","");
my $lvl255 = ReadingsNum("Bilresa","action_level",0);
# 0–255 → 0–100
my $lvl = int(($lvl255/255)*100);
$lvl = 0 if $lvl < 0;
$lvl = 100 if $lvl > 100;
# Helper-Hash für intern genutzte Speicherwerte
my $hash = $defs{"di_Bilresa_SB"};
$hash->{helper}{lastUsed} //= $targets[0];
my $last = $hash->{helper}{lastUsed};
###################################
# Double → Favoriten wechseln
###################################
if($act eq "on_double") {
my $favstr = ReadingsVal($last,"ftuiFavoritesItems","");
return unless $favstr ne "";
my @fav = split(":", $favstr);
return unless @fav;
my $current = ReadingsVal($last,"favorites","");
my $idx = 0;
for(my $i=0; $i<@fav; $i++){
if($fav[$i] eq $current){
$idx = $i;
last;
}
}
$idx = ($idx+1) % scalar(@fav);
fhem("set $last favorites $fav[$idx]");
return;
}
###################################
# Scroll → Lautstärke 0–100
###################################
if($act eq "brightness_move_to_level") {
my $current = ReadingsNum($last,"volume",-1);
if($current != $lvl) {
fhem("set $last volume $lvl");
}
return;
}
###################################
# Single → Mute Toggle
###################################
if($act eq "on" || $act eq "off") {
my $muted = ReadingsVal($last,"mute","off");
if($muted eq "on") {
fhem("set $last mute"); # Alternativ: fhem("set $last toggleMute") falls unterstützt
} else {
fhem("set $last mute");
}
return;
}
}Ist noch sehr frisch, möglicherweise buggy und sicher optimierbar. Als NARP (Nicht Annähernd Richtiger Programmierer) habe ich es mit freundlicher Unterstützung durch ChatGPT gebaut...###################################
# Single → Play/Pause Toggle
###################################
if($act eq "on" || $act eq "off") {
my $state = ReadingsVal($last,"playStatus","");
if($state eq "playing") {
fhem("set $last pause");
} else {
fhem("set $last play");
}
return;
}
###########################################
# IKEA Bilresa E2490 Remote
# contributed by dadoc
###########################################
name:zigbee2mqtt_IKEA_Bilresa_E2490
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
desc:IKEA Bilresa E2490 remote with dial (Matter + Zigbee)
order:L12e
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $1 : undef }
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to control_home;{ AttrVal("DEVICE","icon","control_home") }
attr DEVICE icon ICON
attr DEVICE stateFormat Click: click Action: action
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT,'',$JSONMAP) }
# Mapped Actions
attr DEVICE jsonMap \
on:on \
off:off \
on_double:on_double \
brightness_move_to_level:brightness_move_to_level
# State of dial or action
attr DEVICE stateFormat { \
ReadingsVal($name,"action","-") eq "brightness_move_to_level" \
? "scroll ".ReadingsVal($name,"action_level","-") \
: ReadingsVal($name,"action","-") \
}
attr DEVICE model IKEA_Bilresa_E2490
setreading DEVICE attrTemplateVersion 20260218cd FHEMROOT/www/images/default
tar zxvf rc.tgz
chown fhem:dialout remotecontrol/*.pngDamit die Icons von fhem gesehen wird, mußte ich fhem neu starten.