Hallo,
seit einigen Tagen habe ich das Problem, dass beim Neustart von FHEM drei Funksteckdosen jedes Mal eingeschaltet werden auch wenn diese zum Zeitpunkt des Neustarts eigentlich ausgeschaltet waren. Wenn ich es richtig verstehe, speichert FHM den aktuellen Stand in der log/fhem.save und stellt diesen wieder hei beim Neustart?
Im Log beim Hochfahren erscheinen jede Menge Befehle, die die Steckdosen einschalten. Das war früher nicht so ... Beispiel:
2016.05.08 02:06:56 1: Including ./log/fhem.save
2016.05.08 02:06:58 3: Device wk.SD.trockner added to ActionDetector with 000:10 time
sending Elro440 format: systemCode[11110] unitCode[1] command[1]
2016.05.08 02:06:59 3: fl.SD.positionslicht_on.not return value: -1
sending Elro440 format: systemCode[11110] unitCode[2] command[1]
2016.05.08 02:07:00 3: wz.SD.positionslicht_vorne_on.not return value: -1
sending Elro440 format: systemCode[11110] unitCode[3] command[1]
2016.05.08 02:07:01 3: ga.SD.positionslicht_on.not return value: -1
sending Elro440 format: systemCode[11110] unitCode[1] command[1]
2016.05.08 02:07:02 3: fl.SD.positionslicht_on.not return value: -1
sending Elro440 format: systemCode[11110] unitCode[2] command[1]
2016.05.08 02:07:03 3: wz.SD.positionslicht_vorne_on.not return value: -1
sending Elro440 format: systemCode[11110] unitCode[3] command[1]
2016.05.08 02:07:04 3: ga.SD.positionslicht_on.not return value: -1
2016.05.08 02:07:04 3: Device wk.SD.waschmaschine added to ActionDetector with 000:10 time
sending Elro440 format: systemCode[11110] unitCode[1] command[1]
2016.05.08 02:07:06 3: fl.SD.positionslicht_on.not return value: -1
sending Elro440 format: systemCode[11110] unitCode[2] command[1]
2016.05.08 02:07:07 3: wz.SD.positionslicht_vorne_on.not return value: -1
sending Elro440 format: systemCode[11110] unitCode[3] command[1]
2016.05.08 02:07:08 3: ga.SD.positionslicht_on.not return value: -1
sending Elro440 format: systemCode[11110] unitCode[1] command[1]
2016.05.08 02:07:09 3: fl.SD.positionslicht_on.not return value: -1
sending Elro440 format: systemCode[11110] unitCode[2] command[1]
2016.05.08 02:07:10 3: wz.SD.positionslicht_vorne_on.not return value: -1
sending Elro440 format: systemCode[11110] unitCode[3] command[1]
2016.05.08 02:07:11 3: ga.SD.positionslicht_on.not return value: -1
2016.05.08 02:07:11 3: Device xx.MK.az_michael added to ActionDetector with 001:05 time
sending Elro440 format: systemCode[11110] unitCode[1] command[1]
2016.05.08 02:07:13 3: fl.SD.positionslicht_on.not return value: -1
sending Elro440 format: systemCode[11110] unitCode[2] command[1]
2016.05.08 02:07:14 3: wz.SD.positionslicht_vorne_on.not return value: -1
sending Elro440 format: systemCode[11110] unitCode[3] command[1]
2016.05.08 02:07:15 3: ga.SD.positionslicht_on.not return value: -1
2016.05.08 02:07:15 3: Device xx.MK.az_sabine added to ActionDetector with 001:05 time
sending Elro440 format: systemCode[11110] unitCode[1] command[1]
2016.05.08 02:07:16 3: fl.SD.positionslicht_on.not return value: -1
sending Elro440 format: systemCode[11110] unitCode[2] command[1]
2016.05.08 02:07:17 3: wz.SD.positionslicht_vorne_on.not return value: -1
sending Elro440 format: systemCode[11110] unitCode[3] command[1]
2016.05.08 02:07:18 3: ga.SD.positionslicht_on.not return value: -1
sending Elro440 format: systemCode[11110] unitCode[1] command[1]
2016.05.08 02:07:19 3: fl.SD.positionslicht_on.not return value: -1
sending Elro440 format: systemCode[11110] unitCode[2] command[1]
2016.05.08 02:07:20 3: wz.SD.positionslicht_vorne_on.not return value: -1
sending Elro440 format: systemCode[11110] unitCode[3] command[1]
2016.05.08 02:07:21 3: ga.SD.positionslicht_on.not return value: -1
2016.05.08 02:07:21 3: Device xx.MK.bad added to ActionDetector with 001:05 time
sending Elro440 format: systemCode[11110] unitCode[1] command[1]
Als Beispiel hier die Einstellungen zum Zeitpunkt des Neustarts von "fl.SD.positionslicht_on.not":
setstate fl.SD.positionslicht.dum off
setstate fl.SD.positionslicht.dum 2016-05-08 02:13:51 state off
setstate fl.SD.positionslicht_off.not 2016-05-08 02:13:51
setstate fl.SD.positionslicht_off.not 2016-05-08 02:06:50 state active
setstate fl.SD.positionslicht_on.not 2016-05-08 02:07:38
setstate fl.SD.positionslicht_on.not 2016-05-08 02:06:50 state active
Das List von fl.SD.positionslicht.dum:
Internals:
NAME fl.SD.positionslicht.dum
NR 364
STATE off
TYPE dummy
Readings:
2016-05-08 02:25:18 state off
Attributes:
alias Flur: Positionslicht
eventMap on:on off:off undefined:(on)
genericDeviceType switch
group Licht
icon light_light
room Flur,Beleuchtung,sys_Flur,sys_Licht
setList on off
userattr structexclude xx.ST.lichter_alle xx.ST.lichter_alle_map xx.ST.positionslichter xx.ST.positionslichter_map
webCmd on:off
xx.ST.lichter_alle xx.ST.lichter_alle
xx.ST.positionslichter xx.ST.positionslichter
Das List von "fl.SD.positionslicht_on.not":
Internals:
DEF fl.SD.positionslicht.dum:on {system("sudo /usr/bin/send 11110 1 1")}
NAME fl.SD.positionslicht_on.not
NOTIFYDEV fl.SD.positionslicht.dum
NR 365
NTFY_ORDER 50-fl.SD.positionslicht_on.not
REGEXP fl.SD.positionslicht.dum:on
STATE 2016-05-08 02:21:47
TYPE notify
Readings:
2016-05-08 02:21:04 state active
Attributes:
room sys_Flur,sys_Licht
Die letzten Befehle vor dem Shutdown:
sending Elro440 format: systemCode[11110] unitCode[1] command[0]
2016.05.08 02:13:52 3: fl.SD.positionslicht_off.not return value: -1
sending Elro440 format: systemCode[11110] unitCode[2] command[0]
2016.05.08 02:13:53 3: wz.SD.positionslicht_vorne_off.not return value: -1
sending Elro440 format: systemCode[11110] unitCode[3] command[0]
2016.05.08 02:13:54 3: ga.SD.positionslicht_off.not return value: -1
2016.05.08 02:13:54 1: Perfmon: possible freeze starting at 02:13:51, delay is 3.391
2016.05.08 02:16:29 0: Server shutdown
Vermutlich braucht ihr noch mehr Infos, daher bitte nachfragen.
Ich bin derzeit ratlos was hier passiert ist. Bis vor einigen Tagen lief das alles problemlos.
Vielen Dank schon mal im voraus!
Kann es sein, dass notifies/DOIFs bei Dir getriggert werden, die das Einschalten auslösen? setstate setzt nur STATE für das Frontend, es wird nichts ans Gerät geschickt.
Danke für den Hinweis, dass es nicht an fhem.save liegen kann.
Nachdem ich heute morgen auch festgestellt habe, dass das Problem nur abends / nachts auftritt, konnte ich auch das fehlerhafte Notify finden. Irgendwie ist mir durch den Regexp wizard ein falscher Trigger mit in ein Notify hineingekommen.
Normalerweise sollte das so aussehen:
define xx.wohnung.presence_home.not notify Wohnung:presence:.present { if (ReadingsVal("Twilight_Maintal","light","") < 6) { fhem("set xx.ST.positionslichter on") };; fhem("attr wz.TA.taster1 ignore 0;; attr sz.TA.taster1 ignore 0") }
und da stand aber:
define xx.wohnung.presence_home.not notify ActionDetector:.*|Wohnung:presence:.present { if (ReadingsVal("Twilight_Maintal","light","") < 6) { fhem("set xx.ST.positionslichter on")};; fhem("attr wz.TA.taster1 ignore 0");; fhem("attr sz.TA.taster1 ignore 0") }
was das Ganze natürlich erklärt.
Lessons learned:
1. Die Umgebung ist nun doch komplexer geworden als gedacht. Daher wurde die ganze Konfig nun unter Versionsverwaltung gestellt ...
2. Nachts um halb drei sollte man kein Debugging betreiben ;-)