Notify funktioniert plötzlich nicht mehr

Begonnen von ChristianK., 28 Juni 2020, 18:19:44

Vorheriges Thema - Nächstes Thema

ChristianK.

Hallo zusammen,

ich habe ein Notify bzw. 2, was plötzlich nicht mehr funktioniert - hat sich hier etwas in einem Update geändert? Hier mal das Notify:

define EINSATZ1 notify MELDEEMPFAENGER { if (( Value("MELDEEMPFAENGER") eq "on") && (( Value("MAX_123456") eq "on °C"))) { fhem("sleep 2;;set ALARMLICHT on-for-timer 120;;set GARAGE_SW 1 LongPulse 13 0 1;;set telegram_bot message Einsatz mit Garage;;sleep 180;;set GARAGE_SW1 LongPulse 13 0 1;;set MELDEEMPFAENGER off") } }

define EINSATZ2 notify MELDEEMPFAENGER { if (( Value("MELDEEMPFAENGER") eq "on") && (( Value("MAX_123456") eq "off °C"))) { fhem("sleep 2;;set telegram_bot message Einsatz ohne Garage;;sleep 10;;set MELDEEMPFAENGER off") } }


mit dem MAX_123456 regele ich meine Anwesenheit - on - anwesend, off - nicht anwesend

Grüße

Christian
FHEM: 5.5 auf NUC unter Ubuntu
1x RFXTRX433, 1x CUL868_V3.4 (fw1.58)
CUL-MAX: MAX! Funk-Heizkörperthermostat, Fensterschalter
IT: 2 AB440 kompatible :-)

Wzut

Value("MAX_123456") eq "off °C")
ganz schlechte Idee , das Thema stateFormat hatten wir erst vor ein paar Tagen im MAX Forum -> https://forum.fhem.de/index.php/topic,112162.0.html
Tipp : nicht mit Value (state) arbeiten sondern ReadingsVal und das echte Reading verwenden.
Maintainer der Module: MAX, MPD, UbiquitiMP, UbiquitiOut, SIP, BEOK, readingsWatcher

amenomade

Kleine Korrektur:

ZitatTipp : nicht mit Value (state) arbeiten sondern ReadingsVal und das echte Reading verwenden.
Tipp : nicht mit Value (STATE) arbeiten sondern ReadingsVal und das echte Reading verwenden.
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

Wzut

#3
ja stimmt :)
BTW : um welchen MAX Device Typ geht es ? PushButton ?
wenn ja darfs auch ReadingsNum für das Reading onoff sein
if ((Value("MELDEEMPFAENGER") eq "on") && ReadingsNum('MAX_123456', 'onoff', 0)) {
und off mit
if ((Value("MELDEEMPFAENGER") eq "on") && !ReadingsNum('MAX_123456', 'onoff', 0)) {
Maintainer der Module: MAX, MPD, UbiquitiMP, UbiquitiOut, SIP, BEOK, readingsWatcher

ChristianK.

Es ist ein nicht genutztes Wandthermostat, was ich dazu missbrauche... aber
auch eine Änderung auf ReadingsVal bringt keinerlei veränderung...
FHEM: 5.5 auf NUC unter Ubuntu
1x RFXTRX433, 1x CUL868_V3.4 (fw1.58)
CUL-MAX: MAX! Funk-Heizkörperthermostat, Fensterschalter
IT: 2 AB440 kompatible :-)

Wzut

Maintainer der Module: MAX, MPD, UbiquitiMP, UbiquitiOut, SIP, BEOK, readingsWatcher

ChristianK.

Habe gestern abend dann auch festgestellt dass dieses Notify auch nicht mehr funktioniert

define Fernseher_Notify notify Fernseher { if (( Value("Fernseher") eq "off") && (($hour >= 20 || $hour < 5))) { fhem("sleep 5;;set ALARMLICHT on-for-timer 180") } }

kann das Alarmlicht allerdings "manuell" einwandfrei schalten... irgendwas scheint hier generell im argen zu sein...
FHEM: 5.5 auf NUC unter Ubuntu
1x RFXTRX433, 1x CUL868_V3.4 (fw1.58)
CUL-MAX: MAX! Funk-Heizkörperthermostat, Fensterschalter
IT: 2 AB440 kompatible :-)

Wzut

da fällt natürlich auf das auch dieses notify einen Trigger verwendet der nur aus dem Devie Namen besteht.
Ich habe mich auch bei deinen anderen zwei darüber gewundert das du den Trigger erst mit dem if weiter eingrenzt und BTW : das zweite ist eh unnötig da man mit einem else oder elsif alles in einem machen könnte.
Hat mit der (Nicht)Funktion jetzt nichts zu tun, aber aus Neugier : warum startet du jedesmal mit einem sleep ?
Vorschlag : fang an einer Ecke an und wenn das läuft bekommst auch den Rest wieder ins Rennen.
D.h poste bitte mal ein list von deinem MELDEEMPFAENGER , deinem  MAX_123456 und wie das das/die notify mit ReadingsVal angepasst hast.
Maintainer der Module: MAX, MPD, UbiquitiMP, UbiquitiOut, SIP, BEOK, readingsWatcher

ChristianK.

#8
Internals:
   DEF        ARC C24 light
   FUUID      5c69e86d-f33f-307a-1a02-9932811ac1585c28
   IODev      TRX_0
   NAME       MELDEEMPFAENGER
   NR         178
   STATE      off
   TRX_LIGHT_deviceid C24
   TRX_LIGHT_devicelog light
   TRX_LIGHT_type ARC
   TYPE       TRX_LIGHT
   READINGS:
     2020-06-28 18:06:04   light           on
     2020-06-29 21:57:10   state           off
Attributes:
   IODev      TRX_0
   event-on-change-reading state
   room       Schalter


Internals:
   DEF        WallMountedThermostat 123456
   FUUID      5c69e86e-f33f-307a-f200-c4f3942570eaebd4
   IODev      cm
   LASTInputDev cm
   MSGCNT     1
   NAME       MAX_123456
   NR         190
   NTFY_ORDER 50-MAX_123456
   STATE      off
   SVN        22176
   TYPE       MAX
   TimeSlot   2
   addr       123456
   cm_MSGCNT  1
   cm_TIME    2020-06-29 21:57:23
   devtype    3
   type       WallMountedThermostat
   READINGS:
     2020-06-29 21:57:23   RSSI            -67.5
     2018-07-20 16:04:37   TimeInformationHour 0
     2020-06-29 21:09:13   battery         ok
     2020-06-29 21:09:13   batteryState    ok
     2018-07-20 16:11:38   boostDuration   25
     2018-07-20 16:11:38   boostValveposition 80
     2018-07-21 08:02:28   comfortTemperature on
     2020-06-29 21:57:23   desiredTemperature off
     2020-06-29 21:57:23   deviation       19.4
     2020-06-29 21:09:13   displayActualTemperature 1
     2018-07-21 08:01:50   ecoTemperature  off
     2018-07-20 16:11:38   firmware        1.0
     2020-06-29 21:09:13   gateway         1
     2018-07-20 16:11:38   groupid         0
     2020-06-29 11:06:35   lastTimeSync    2020-06-29 11:06:35
     2020-06-28 16:18:13   lastcmd         desiredTemperature off
     2018-07-20 16:11:38   maximumTemperature on
     2018-07-20 16:11:38   measurementOffset 0.0
     2018-07-20 16:11:38   minimumTemperature off
     2020-06-29 21:09:13   mode            manual
     2020-06-29 11:06:35   msgcnt          90
     2020-06-29 21:09:13   panel           unlocked
     2020-06-29 21:57:23   peerIDs         000000
     2020-06-29 21:57:23   peerList        Broadcast
     2020-06-29 21:09:13   rferror         0
     2020-06-29 21:57:23   state           off
     2020-06-29 21:57:23   temperature     23.9
     2018-07-20 16:11:38   testresult      255
     2018-07-20 16:11:38   weekprofile-0-Sat-temp 17.0 °C  /  21.0 °C  /  17.0 °C
     2018-07-20 16:11:38   weekprofile-0-Sat-time 00:00-06:00  /  06:00-22:00  /  22:00-00:00
     2018-07-20 16:11:38   weekprofile-1-Sun-temp 17.0 °C  /  21.0 °C  /  17.0 °C
     2018-07-20 16:11:38   weekprofile-1-Sun-time 00:00-06:00  /  06:00-22:00  /  22:00-00:00
     2018-07-20 16:11:38   weekprofile-2-Mon-temp 17.0 °C  /  21.0 °C  /  17.0 °C  /  21.0 °C  /  17.0 °C
     2018-07-20 16:11:38   weekprofile-2-Mon-time 00:00-06:00  /  06:00-09:00  /  09:00-17:00  /  17:00-23:00  /  23:00-00:00
     2018-07-20 16:11:38   weekprofile-3-Tue-temp 17.0 °C  /  21.0 °C  /  17.0 °C  /  21.0 °C  /  17.0 °C
     2018-07-20 16:11:38   weekprofile-3-Tue-time 00:00-06:00  /  06:00-09:00  /  09:00-17:00  /  17:00-23:00  /  23:00-00:00
     2018-07-20 16:11:38   weekprofile-4-Wed-temp 17.0 °C  /  21.0 °C  /  17.0 °C  /  21.0 °C  /  17.0 °C
     2018-07-20 16:11:38   weekprofile-4-Wed-time 00:00-06:00  /  06:00-09:00  /  09:00-17:00  /  17:00-23:00  /  23:00-00:00
     2018-07-20 16:11:38   weekprofile-5-Thu-temp 17.0 °C  /  21.0 °C  /  17.0 °C  /  21.0 °C  /  17.0 °C
     2018-07-20 16:11:38   weekprofile-5-Thu-time 00:00-06:00  /  06:00-09:00  /  09:00-17:00  /  17:00-23:00  /  23:00-00:00
     2018-07-20 16:11:38   weekprofile-6-Fri-temp 17.0 °C  /  21.0 °C  /  17.0 °C  /  21.0 °C  /  17.0 °C
     2018-07-20 16:11:38   weekprofile-6-Fri-time 00:00-06:00  /  06:00-09:00  /  09:00-17:00  /  17:00-23:00  /  23:00-00:00
     2018-07-21 07:59:08   windowOpenDuration 15
     2018-07-20 16:11:38   windowOpenTemperature 12.0
   helper:
     io:
       CUL_0:
         raw        Z0CB40442016DFD0000000009EF
         rssi       -67.5
         time       1593460643.05531
Attributes:
   IODev      cm
   event-on-change-reading state
   model      WallMountedThermostat


define EINSATZ2 notify MELDEEMPFAENGER { if (ReadingsVal ("MELDEEMPFAENGER", "state", "") eq "on" && ReadingsVal ("MAX_123456", "desiredTemperature", "") eq "off") { fhem("sleep 2;;set cktech_bot message Einsatz Feuerwehr ohne Garage;;sleep 10;;set MELDEEMPFAENGER off") }}

gerade nochmal drüber gebügelt... das Notify funktioniert so...  ;-)
FHEM: 5.5 auf NUC unter Ubuntu
1x RFXTRX433, 1x CUL868_V3.4 (fw1.58)
CUL-MAX: MAX! Funk-Heizkörperthermostat, Fensterschalter
IT: 2 AB440 kompatible :-)

Wzut

ok, deine notifys EINSATZ1 und EINSATZ2 werden je vier mal getriggert, (jeweils on & off von light und state von MELDEEMPFAENGER )
Dich intressiert aber wohl nur wenn state auf on wechselt, also :
define EINSATZ notify MELDEEMPFAENGER:.on {
(bitte den Punkt vor on beachten ! )
dann wird jeweils eine Aktion ausgeführt je nach dem welchen Wert desiredTemperature von MAX_123456 hat :
ReadingsVal ("MAX_123456", "desiredTemperature", "") eq
ergo kann man alles zusammen fassen :
define EINSATZ notify MELDEEMPFAENGER:.on {
   if (ReadingsVal ('MAX_123456', 'desiredTemperature', '') eq 'on') {
   fhem("set ALARMLICHT on-for-timer 120;;set GARAGE_SW 1 LongPulse 13 0 1;;set telegram_bot message Einsatz mit Garage;;sleep 180;;set GARAGE_SW1 LongPulse 13 0 1;;set MELDEEMPFAENGER off");
   }

  if (ReadingsVal ('MAX_123456', 'desiredTemperature', '') eq 'off') {
fhem("set telegram_bot message Einsatz ohne Garage;;sleep 10;;set MELDEEMPFAENGER off"); }
}

die sleeps habe ich weggelassen da ich sie nicht verstehe und du meine Frage nicht beantwortet hast.

aber ganz losgelöst von deinem Problem :
es ist ein Wunder das es überhaupt geht und fällt in die Rubrik "bitte nicht nachmachen" :
DEF        WallMountedThermostat 123456
nie im Leben har EQ3 ein WT ausgeliefert das die interne Adresse 123456 hat !
Du hast die erfundene CUL_MAX (cm) Adresse auch für das WT verwendet.
Bis heute hätte ich ein Monatsgehalt gewettet das dies so niemals geht :)
aber anway, sollte man im richtigen Forum diskutieren -> https://forum.fhem.de/index.php/board,23.0.html
Maintainer der Module: MAX, MPD, UbiquitiMP, UbiquitiOut, SIP, BEOK, readingsWatcher

ChristianK.

Zitataber ganz losgelöst von deinem Problem :
es ist ein Wunder das es überhaupt geht und fällt in die Rubrik "bitte nicht nachmachen" :
Code: [Auswählen]

DEF        WallMountedThermostat 123456

nie im Leben har EQ3 ein WT ausgeliefert das die interne Adresse 123456 hat !
Du hast die erfundene CUL_MAX (cm) Adresse auch für das WT verwendet.
Bis heute hätte ich ein Monatsgehalt gewettet das dies so niemals geht

;D Jupp - die Adressen sind natürlich anders...  hab ich im Forum einfach so ersetzt...  ;D

Vielen Dank für Deine Hilfe und sorry dass ich Dich da so ins grübeln gebracht habe  ;)
FHEM: 5.5 auf NUC unter Ubuntu
1x RFXTRX433, 1x CUL868_V3.4 (fw1.58)
CUL-MAX: MAX! Funk-Heizkörperthermostat, Fensterschalter
IT: 2 AB440 kompatible :-)