Hauptmenü

DOIF und cmdState Problem

Begonnen von alex885, 05 April 2017, 21:04:52

Vorheriges Thema - Nächstes Thema

alex885

Hallo, ich habe folgendes DOIF



Internals:
   CFGFN
   DEF        ( [d_iPad] eq "off") ({ system ('ssh root@192.168.178.120 activator send libactivator.system.sleepbutton')  })

DOELSEIF

( [d_iPad] eq "on") ({ system ('ssh root@192.168.178.120 activator send libactivator.lockscreen.dismiss')  })






   NAME       doif_iPad_on
   NR         4285
   NTFY_ORDER 50-doif_iPad_on
   STATE      cmd_2
   TYPE       DOIF
   Readings:
     2017-04-05 20:39:19   Device          d_iPad
     2017-04-05 20:51:21   cmd             2
     2017-04-05 20:51:21   cmd_event       set_cmd_2
     2017-04-05 20:51:21   cmd_nr          2
     2017-04-05 20:39:19   e_d_iPad_STATE  off
     2017-04-05 20:51:21   state           cmd_2
   Condition:
     0           InternalDoIf($hash,'d_iPad','STATE') eq "off"
     1           InternalDoIf($hash,'d_iPad','STATE') eq "on"
   Devices:
     0           d_iPad
     1           d_iPad
     all         d_iPad
   Do:
     0:
       0          { system ('ssh root@192.168.178.120 activator send libactivator.system.sleepbutton')  }
     1:
       0          { system ('ssh root@192.168.178.120 activator send libactivator.lockscreen.dismiss')  }
     2:
   Helper:
     event      off
     globalinit 1
     last_timer 0
     sleeptimer -1
     timerdev   d_iPad
     timerevent off
     triggerDev d_iPad
     timerevents:
       off
     timereventsState:
       state: off
     triggerEvents:
       off
     triggerEventsState:
       state: off
   Internals:
     0           d_iPad:STATE
     1           d_iPad:STATE
     all         d_iPad:STATE
   Itimer:
   Powermap:
   Readings:
   Readingsdesc:
     Pm_consumption:
       rtype      w
     Pm_energy:
       rtype      whr
   Regexp:
     0:
     1:
     All:
   State:
   Trigger:
Attributes:
   devStateIcon on.*:it_tablet:off off.*:it_tablet@darkgrey:cmd_2
   group      xhelper
   room       Kueche
   setList    on off
   webCmd     cmd_1:cmd_2


funktioniert.

Wenn Ich jetzt cmdState on|off dazupacke um über set on off statt cmd_1/2 schalten zu können für Siri & Alexa bekomme ich folgende Fehlermeldung:

Use of uninitialized value $1 in addition (+) at ./FHEM/98_DOIF.pm line 2099

Warum?

*kopfkratz*
Merci, Alex

hier das listing das zur Fehlermeldung führt:

Internals:
   CFGFN
   DEF        ( [d_iPad] eq "off") ({ system ('ssh root@192.168.178.120 activator send libactivator.system.sleepbutton')  })

DOELSEIF

( [d_iPad] eq "on") ({ system ('ssh root@192.168.178.120 activator send libactivator.lockscreen.dismiss')  })






   NAME       doif_iPad_on
   NR         4285
   NTFY_ORDER 50-doif_iPad_on
   STATE      off
   TYPE       DOIF
   Readings:
     2017-04-05 20:39:19   Device          d_iPad
     2017-04-05 21:01:40   cmd             2
     2017-04-05 21:01:40   cmd_event       set_off_cmd_1
     2017-04-05 21:01:40   cmd_nr          2
     2017-04-05 20:39:19   e_d_iPad_STATE  off
     2017-04-05 21:01:40   state           off
   Condition:
     0           InternalDoIf($hash,'d_iPad','STATE') eq "off"
     1           InternalDoIf($hash,'d_iPad','STATE') eq "on"
   Devices:
     0           d_iPad
     1           d_iPad
     all         d_iPad
   Do:
     0:
       0          { system ('ssh root@192.168.178.120 activator send libactivator.system.sleepbutton')  }
     1:
       0          { system ('ssh root@192.168.178.120 activator send libactivator.lockscreen.dismiss')  }
     2:
   Helper:
     event      off
     globalinit 1
     last_timer 0
     sleeptimer -1
     timerdev   d_iPad
     timerevent off
     triggerDev d_iPad
     timerevents:
       off
     timereventsState:
       state: off
     triggerEvents:
       off
     triggerEventsState:
       state: off
   Internals:
     0           d_iPad:STATE
     1           d_iPad:STATE
     all         d_iPad:STATE
   Itimer:
   Powermap:
   Readings:
   Readingsdesc:
     Pm_consumption:
       rtype      w
     Pm_energy:
       rtype      whr
   Regexp:
     0:
     1:
     All:
   State:
   Trigger:
Attributes:
   cmdState   on|off
   devStateIcon on.*:it_tablet:off off.*:it_tablet@darkgrey:cmd_2
   group      xhelper
   room       Kueche
   setList    on off
   webCmd     cmd_1:cmd_2 

FHEM auf Hackintosh-NUC, 5 x Rpi mit Fhem2Fhem & Shairport-Sync , FB7390, CUL, HMLAN, ZWave, Zigbee, RfxTrx, Rollotron, mySensors, Xiaomi mi, div Zeuchs..

Damian

ZitatWarum?

Weil es ein Tippfehler im Sourcecode ist. In der Zeile muss statt $1 $i hin.

Bugfix kommt dann per Update.
Programmierte FHEM-Module: DOIF-FHEM, DOIF-Perl, DOIF-uiTable, THRESHOLD, FHEM-Befehl: IF