Erledigt........DOIF --> Reading --> setstate

Begonnen von Torben80, 22 März 2017, 13:29:30

Vorheriges Thema - Nächstes Thema

Damian

Wie Vermutet :

Das definierte Ereignis:

Sensoren:"Stecker_1: On"

kommt nicht vor, also passiert auch nichts.

Was kommt ist so etwas:

2017.03.24 11:35:48 4 : Sensoren: ExtractReading for reading13-1 sets Stecker_1 to On


[Sensoren:"Stecker_1 to On"] sollte triggern, wenn "Sensoren" das Device ist.

Wenn du sagst, dass das Reading geändert wird, dann könntest du statt auf das Ereignis zu triggern das Reading abfragen:

([Sensoren:Stecker_1] eq "On")

Dabei muss im Device "Sensoren" das Reading "Stecker_1" auf "On" zu finden sein.

Programmierte FHEM-Module: DOIF-FHEM, DOIF-Perl, DOIF-uiTable, THRESHOLD, FHEM-Befehl: IF

Torben80

#16
Ich fass es nicht! Es geht einfach nicht!
Das kann doch nicht sein... Hier ein List von meinem DOIF:
Internals:
   CFGFN
   DEF        ([Sensoren:Stecker_1] eq "On") (setstate Sensoren Stecker_ist_an)
   NAME       Linien
   NR         4032
   NTFY_ORDER 50-Linien
   STATE      initialize
   TYPE       DOIF
   Readings:
     2017-03-24 13:49:46   cmd             0
     2017-03-24 13:49:53   state           initialize
   Condition:
     0          ReadingValDoIf($hash,'Sensoren','Stecker_1') eq "On"
   Devices:
     0           Sensoren
     all         Sensoren
   Do:
     0:
       0          setstate Sensoren Stecker_ist_an
     1:
   Helper:
     globalinit 1
     last_timer 0
     sleeptimer -1
   Itimer:
   Readings:
     0           Sensoren:Stecker_1
     all         Sensoren:Stecker_1
   Regexp:
     All:
   State:
Attributes:
   do         always
   room       Alarmanlage



und ein List von meinem Sensoren:


Internals:
   BUSY       0
   CFGFN
   CHANGED
   DEF        http://Benutzer:PASSWD@192.168.11.65/action/sensorListGet 10
   Interval   10
   LASTSEND   1490361293.49446
   MainURL    http://Benutzer:PASSWD@192.168.11.65/action/sensorListGet
   ModuleVersion 3.3.5 - 29.9.2016
   NAME       Sensoren
   NR         4203
   STATE      ???
   TRIGGERTIME 1490361303.49362
   TRIGGERTIME_FMT 2017-03-24 14:15:03
   TYPE       HTTPMOD
   addr       http://192.168.11.65:80
   auth       Benutzer:PASSWD
   buf        HTTP/1.0 200 OK

Server: GoAhead-Webs

Pragma: no-cache

Cache-control: no-cache

Expires: 0

Content-Type: application/json; charset=ISO-8859-1



/*-secure-
{ senrows : [
{no : "1", type : "Remote Controller", area : "1", zone : "1", name : "Benutzer", attr : "Personal Att", cond : "", battery : "", tamp : "", bypass : "No"},
{no : "2", type : "Remote Keypad", area : "1", zone : "2", name : "Flur_unten", attr : "", cond : "", battery : "", tamp : "", bypass : "No"},
{no : "3", type : "Door Contact", area : "1", zone : "3", name : "Haustuer", attr : "Entry", cond : "", battery : "", tamp : "", bypass : "No"},
{no : "4", type : "BX15", area : "1", zone : "4", name : "Blinklicht", attr : "", cond : "", battery : "", tamp : "", bypass : "No"},
{no : "5", type : "Door Contact", area : "1", zone : "5", name : "Kellertuer", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"},
{no : "6", type : "Door Contact", area : "1", zone : "6", name : "Esszimmer", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"},
{no : "7", type : "Door Contact", area : "1", zone : "7", name : "Wohnzimmer_DF_Rechts", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"},
{no : "8", type : "Door Contact", area : "1", zone : "8", name : "Wohnzimmer_DF_Links", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"},
{no : "9", type : "Door Contact", area : "1", zone : "9", name : "Terassentuer", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"},
{no : "10", type : "Door Contact", area : "1", zone : "10", name : "Fenster_Flur_EG", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"},
{no : "11", type : "Door Contact", area : "1", zone : "11", name : "Kueche", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"},
{no : "12", type : "Door Contact", area : "1", zone : "12", name : "Bad_EG", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"},
{no : "13", type : "PSS", area : "1", zone : "71", name : "Stecker_1", attr : "",cond : "Off", battery : "", tamp : "", bypass : "No"}]
}
*/
   code       200
   conn
   data
   displayurl http://Benutzer:PASSWD@192.168.11.65/action/sensorListGet
   header
   host       192.168.11.65
   httpheader HTTP/1.0 200 OK

Server: GoAhead-Webs

Pragma: no-cache

Cache-control: no-cache

Expires: 0

Content-Type: application/json; charset=ISO-8859-1
   httpversion 1.0
   hu_blocking 0
   hu_filecount 25
   hu_portSfx
   ignoreredirects 0
   loglevel   4
   path       /action/sensorListGet
   protocol   http
   redirects  0
   timeout    2
   url        http://Benutzer:PASSWD@192.168.11.65/action/sensorListGet
   value      0
   QUEUE:
   Readings:
     2017-03-24 14:14:53   Stecker_1       Off
   Request:
     data
     header
     ignoreredirects 0
     retryCount 0
     type       update
     url        http://Benutzer:PASSWD@192.168.11.65/action/sensorListGet
     value      0
   Defptr:
     Readingbase:
       Stecker_1  reading
     Readingnum:
       Stecker_1  13
     Readingoutdated:
     Requestreadings:
       Update:
         Stecker_1  reading 13
   Sslargs:
Attributes:
   event-on-change-reading RemoteController RemoteKeypad Haustuer Blinklicht Kellertuer Esszimmer Wohnzimmer_DF_Rechts Wohnzimmer_DF_Links Terassentuer Fenster_Flur_EG Kueche Bad_Eg Stecker_1
   reading13Name Stecker_1
   reading13Regex no : "13".*?cond : "([a-zA-Z]*)"
   room       Alarmanlage
   userattr   reading13Name reading13Regex



Das hätte doch schon 10x laufen müssen. Da kann man doch nichts falsch machen,...
@Damian, danke noch einmal für die Klarstellung der define - Abfrage, die hatte ich schon so geschrieben. Aber auch wieder verworfen, da es nicht ging...
Deshalb sagte ich ja, dass ich echt ratlos bin...

Habe jetzt extra Sensoren und Linien neu angelegt...

Danach ein paar mal die Steckdose an und ausgeschaltet, und er hat jedesmal das Reading in Sensoren auf On / Off gesetzt...

Gruß Torben

Damian

Tja, dann weiß ich auch nicht weiter. Z. Zt. Steht das Reading Stecker_1 allerdings auf Off und nicht auf On.
Ich kann nur sagen, dass die Events beim DOIF nicht ankommen, sonst würde man das Reading "Stecker_1" beginnend mit e_ sehen.
Programmierte FHEM-Module: DOIF-FHEM, DOIF-Perl, DOIF-uiTable, THRESHOLD, FHEM-Befehl: IF

Torben80

Jetzt bin ich echt platt.
Ja, ich weiß dass es auf Off steht, muss ja jetzt nicht an sein die Steckdose ;-)

Aber wenn selbst du nicht weiter weißt, was dann?


Gesendet von iPhone mit Tapatalk

Damian

Simuliere das Szenario erst mal mit einem dummy statt Stecker_1.
Programmierte FHEM-Module: DOIF-FHEM, DOIF-Perl, DOIF-uiTable, THRESHOLD, FHEM-Befehl: IF

Ellert

Zitat von: Torben80 am 24 März 2017, 11:38:54
Verbose 4:

2017.03.24 11:35:38 4 : Zustand: GetUpdate called (update)
2017.03.24 11:35:38 4 : Zustand: update timer modified: will call GetUpdate in 10.0 seconds at 2017-03-24 11:35:48
2017.03.24 11:35:38 4 : Zustand: AddToQueue adds update, initial queue len: 0
2017.03.24 11:35:38 4 : Zustand: HandleSendQueue sends request type update to URL http://BENUTZERNAME:Passwort@192.168.11.65/action/panelCondGet, No Data, No Header, timeout 2
2017.03.24 11:35:38 4 : HttpUtils url=http://BENUTZERNAME:Passwort@192.168.11.65/action/panelCondGet
2017.03.24 11:35:38 4 : Sensoren: GetUpdate called (update)
2017.03.24 11:35:38 4 : Sensoren: update timer modified: will call GetUpdate in 10.0 seconds at 2017-03-24 11:35:48
2017.03.24 11:35:38 4 : Sensoren: AddToQueue adds update, initial queue len: 0
2017.03.24 11:35:38 4 : Sensoren: HandleSendQueue sends request type update to URL http://BENUTZERNAME:Passwort@192.168.11.65/action/sensorListGet, No Data, No Header, timeout 2
2017.03.24 11:35:38 4 : HttpUtils url=http://BENUTZERNAME:Passwort@192.168.11.65/action/sensorListGet
2017.03.24 11:35:38 4 : http://BENUTZERNAME:Passwort@192.168.11.65/action/panelCondGet: HTTP response code 200
2017.03.24 11:35:38 4 : HttpUtils http://BENUTZERNAME:Passwort@192.168.11.65/action/panelCondGet: Got data, length: 324
2017.03.24 11:35:38 4 : Zustand: Read callback: request type was update retry 0, Header: HTTP/1.0 200 OK Server: GoAhead-Webs Pragma: no-cache Cache-control: no-cache Expires: 0 Content-Type: application/json; charset=ISO-8859-1, Body: /*-secure- { updates : { mode_a1 : "Disarm", mode_a2 : "Disarm", battery : "Normal", tamper : "Close", interference : "Normal", ac_activation : "Normal", rssi : "17", sig_gsm : "N/A" }, forms : { pcondform1 : { mode : "4", f_arm : "0" }, pcondform2 : { mode : "4", f_arm : "0" } } } */no error
2017.03.24 11:35:38 4 : Zustand: CheckAuth decided no authentication required
2017.03.24 11:35:38 4 : Zustand: ExtractReading for reading01-1 sets scharfunscharf to Disarm
2017.03.24 11:35:38 4 : Zustand: ExtractReading for reading02-1 sets Mode to 4
2017.03.24 11:35:38 4 : Zustand: Read response to update matched Reading(s) scharfunscharf Mode
2017.03.24 11:35:38 4 : http://BENUTZERNAME:Passwort@192.168.11.65/action/sensorListGet: HTTP response code 200
2017.03.24 11:35:38 4 : HttpUtils http://BENUTZERNAME:Passwort@192.168.11.65/action/sensorListGet: Got data, length: 1959
2017.03.24 11:35:38 4 : Sensoren: Read callback: request type was update retry 0, Header: HTTP/1.0 200 OK Server: GoAhead-Webs Pragma: no-cache Cache-control: no-cache Expires: 0 Content-Type: application/json; charset=ISO-8859-1, Body: /*-secure- { senrows : [ {no : "1", type : "Remote Controller", area : "1", zone : "1", name : "Benutzer", attr : "Personal Att", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "2", type : "Remote Keypad", area : "1", zone : "2", name : "Flur_unten", attr : "", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "3", type : "Door Contact", area : "1", zone : "3", name : "Haustuer", attr : "Entry", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "4", type : "BX15", area : "1", zone : "4", name : "Blinklicht", attr : "", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "5", type : "Door Contact", area : "1", zone : "5", name : "Kellertuer", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "6", type : "Door Contact", area : "1", zone : "6", name : "Esszimmer", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "7", type : "Door Contact", area : "1", zone : "7", name : "Wohnzimmer_DF_Rechts", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "8", type : "Door Contact", area : "1", zone : "8", name : "Wohnzimmer_DF_Links", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "9", type : "Door Contact", area : "1", zone : "9", name : "Terassentuer", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "10", type : "Door Contact", area : "1", zone : "10", name : "Fenster_Flur_EG", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "11", type : "Door Contact", area : "1", zone : "11", name : "Kueche", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "12", type : "Door Contact", area : "1", zone : "12", name : "Bad_EG", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "13", type : "PSS", area : "1", zone : "71", name : "Stecker_1", attr : "",cond : "Off", battery : "", tamp : "", bypass : "No"}] } */no error
2017.03.24 11:35:38 4 : Sensoren: CheckAuth decided no authentication required
2017.03.24 11:35:38 4 : Sensoren: ExtractReading for reading01-1 sets RemoteController to
2017.03.24 11:35:38 4 : Sensoren: ExtractReading for reading02-1 sets RemoteKeypad to
2017.03.24 11:35:38 4 : Sensoren: ExtractReading for reading03-1 sets Haustuer to
2017.03.24 11:35:38 4 : Sensoren: ExtractReading for reading04-1 sets Blinklicht to
2017.03.24 11:35:38 4 : Sensoren: ExtractReading for reading05-1 sets Kellertuer to
2017.03.24 11:35:38 4 : Sensoren: ExtractReading for reading06-1 sets Esszimmer to
2017.03.24 11:35:38 4 : Sensoren: ExtractReading for reading07-1 sets Wohnzimmer_DF_Rechts to
2017.03.24 11:35:38 4 : Sensoren: ExtractReading for reading08-1 sets Wohnzimmer_DF_Links to
2017.03.24 11:35:38 4 : Sensoren: ExtractReading for reading09-1 sets Terassentuer to
2017.03.24 11:35:38 4 : Sensoren: ExtractReading for reading10-1 sets Fenster_Flur_EG to
2017.03.24 11:35:38 4 : Sensoren: ExtractReading for reading11-1 sets Kueche to
2017.03.24 11:35:38 4 : Sensoren: ExtractReading for reading12-1 sets Bad_Eg to
2017.03.24 11:35:38 4 : Sensoren: ExtractReading for reading13-1 sets Stecker_1 to Off
2017.03.24 11:35:38 4 : Sensoren: Read response to update matched Reading(s) RemoteController RemoteKeypad Haustuer Blinklicht Kellertuer Esszimmer Wohnzimmer_DF_Rechts Wohnzimmer_DF_Links Terassentuer Fenster_Flur_EG Kueche Bad_Eg Stecker_1
2017.03.24 11:35:47 4 : Connection closed for WEB_192.168.11.202_51740: EOF
2017.03.24 11:35:47 4 : Connection accepted from WEB_192.168.11.202_51743
2017.03.24 11:35:47 4 : WEB_192.168.11.202_51743 GET /fhem?detail=Sensoren; BUFLEN:0
2017.03.24 11:35:47 4 : WEB: /fhem?detail=Sensoren / RL:5833 / text/html; charset=UTF-8 / Content-Encoding: gzip /
2017.03.24 11:35:48 4 : WEB_192.168.11.202_51743 GET /fhem?cmd=%7BAttrVal(%22Sensoren%22%2C%22room%22%2C%22%22)%7D&XHR=1&fwcsrf=csrf_607679997992482; BUFLEN:0
2017.03.24 11:35:48 4 : WEB: /fhem?cmd=%7BAttrVal(%22Sensoren%22%2C%22room%22%2C%22%22)%7D&XHR=1&fwcsrf=csrf_607679997992482 / RL:32 / text/plain; charset=UTF-8 / Content-Encoding: gzip /
2017.03.24 11:35:48 4 : WEB_192.168.11.202_51743 GET /fhem?XHR=1&inform=type=status;filter=Sensoren;since=1490351746;fmt=JSON&fw_id=4118&timestamp=1490351748055; BUFLEN:0
2017.03.24 11:35:48 4 : Zustand: GetUpdate called (update)
2017.03.24 11:35:48 4 : Zustand: update timer modified: will call GetUpdate in 10.0 seconds at 2017-03-24 11:35:58
2017.03.24 11:35:48 4 : Zustand: AddToQueue adds update, initial queue len: 0
2017.03.24 11:35:48 4 : Zustand: HandleSendQueue sends request type update to URL http://BENUTZERNAME:Passwort@192.168.11.65/action/panelCondGet, No Data, No Header, timeout 2
2017.03.24 11:35:48 4 : HttpUtils url=http://BENUTZERNAME:Passwort@192.168.11.65/action/panelCondGet
2017.03.24 11:35:48 4 : Sensoren: GetUpdate called (update)
2017.03.24 11:35:48 4 : Sensoren: update timer modified: will call GetUpdate in 10.0 seconds at 2017-03-24 11:35:58
2017.03.24 11:35:48 4 : Sensoren: AddToQueue adds update, initial queue len: 0
2017.03.24 11:35:48 4 : Sensoren: HandleSendQueue sends request type update to URL http://BENUTZERNAME:Passwort@192.168.11.65/action/sensorListGet, No Data, No Header, timeout 2
2017.03.24 11:35:48 4 : HttpUtils url=http://BENUTZERNAME:Passwort@192.168.11.65/action/sensorListGet
2017.03.24 11:35:48 4 : http://BENUTZERNAME:Passwort@192.168.11.65/action/panelCondGet: HTTP response code 200
2017.03.24 11:35:48 4 : HttpUtils http://BENUTZERNAME:Passwort@192.168.11.65/action/panelCondGet: Got data, length: 324
2017.03.24 11:35:48 4 : Zustand: Read callback: request type was update retry 0, Header: HTTP/1.0 200 OK Server: GoAhead-Webs Pragma: no-cache Cache-control: no-cache Expires: 0 Content-Type: application/json; charset=ISO-8859-1, Body: /*-secure- { updates : { mode_a1 : "Disarm", mode_a2 : "Disarm", battery : "Normal", tamper : "Close", interference : "Normal", ac_activation : "Normal", rssi : "17", sig_gsm : "N/A" }, forms : { pcondform1 : { mode : "4", f_arm : "0" }, pcondform2 : { mode : "4", f_arm : "0" } } } */no error
2017.03.24 11:35:48 4 : Zustand: CheckAuth decided no authentication required
2017.03.24 11:35:48 4 : Zustand: ExtractReading for reading01-1 sets scharfunscharf to Disarm
2017.03.24 11:35:48 4 : Zustand: ExtractReading for reading02-1 sets Mode to 4
2017.03.24 11:35:48 4 : Zustand: Read response to update matched Reading(s) scharfunscharf Mode
2017.03.24 11:35:48 4 : http://BENUTZERNAME:Passwort@192.168.11.65/action/sensorListGet: HTTP response code 200
2017.03.24 11:35:48 4 : HttpUtils http://BENUTZERNAME:Passwort@192.168.11.65/action/sensorListGet: Got data, length: 1958
2017.03.24 11:35:48 4 : Sensoren: Read callback: request type was update retry 0, Header: HTTP/1.0 200 OK Server: GoAhead-Webs Pragma: no-cache Cache-control: no-cache Expires: 0 Content-Type: application/json; charset=ISO-8859-1, Body: /*-secure- { senrows : [ {no : "1", type : "Remote Controller", area : "1", zone : "1", name : "Benutzer", attr : "Personal Att", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "2", type : "Remote Keypad", area : "1", zone : "2", name : "Flur_unten", attr : "", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "3", type : "Door Contact", area : "1", zone : "3", name : "Haustuer", attr : "Entry", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "4", type : "BX15", area : "1", zone : "4", name : "Blinklicht", attr : "", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "5", type : "Door Contact", area : "1", zone : "5", name : "Kellertuer", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "6", type : "Door Contact", area : "1", zone : "6", name : "Esszimmer", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "7", type : "Door Contact", area : "1", zone : "7", name : "Wohnzimmer_DF_Rechts", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "8", type : "Door Contact", area : "1", zone : "8", name : "Wohnzimmer_DF_Links", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "9", type : "Door Contact", area : "1", zone : "9", name : "Terassentuer", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "10", type : "Door Contact", area : "1", zone : "10", name : "Fenster_Flur_EG", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "11", type : "Door Contact", area : "1", zone : "11", name : "Kueche", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "12", type : "Door Contact", area : "1", zone : "12", name : "Bad_EG", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "13", type : "PSS", area : "1", zone : "71", name : "Stecker_1", attr : "",cond : "On", battery : "", tamp : "", bypass : "No"}] } */no error
2017.03.24 11:35:48 4 : Sensoren: CheckAuth decided no authentication required
2017.03.24 11:35:48 4 : Sensoren: ExtractReading for reading01-1 sets RemoteController to
2017.03.24 11:35:48 4 : Sensoren: ExtractReading for reading02-1 sets RemoteKeypad to
2017.03.24 11:35:48 4 : Sensoren: ExtractReading for reading03-1 sets Haustuer to
2017.03.24 11:35:48 4 : Sensoren: ExtractReading for reading04-1 sets Blinklicht to
2017.03.24 11:35:48 4 : Sensoren: ExtractReading for reading05-1 sets Kellertuer to
2017.03.24 11:35:48 4 : Sensoren: ExtractReading for reading06-1 sets Esszimmer to
2017.03.24 11:35:48 4 : Sensoren: ExtractReading for reading07-1 sets Wohnzimmer_DF_Rechts to
2017.03.24 11:35:48 4 : Sensoren: ExtractReading for reading08-1 sets Wohnzimmer_DF_Links to
2017.03.24 11:35:48 4 : Sensoren: ExtractReading for reading09-1 sets Terassentuer to
2017.03.24 11:35:48 4 : Sensoren: ExtractReading for reading10-1 sets Fenster_Flur_EG to
2017.03.24 11:35:48 4 : Sensoren: ExtractReading for reading11-1 sets Kueche to
2017.03.24 11:35:48 4 : Sensoren: ExtractReading for reading12-1 sets Bad_Eg to
2017.03.24 11:35:48 4 : Sensoren: ExtractReading for reading13-1 sets Stecker_1 to On
2017.03.24 11:35:48 4 : Sensoren: Read response to update matched Reading(s) RemoteController RemoteKeypad Haustuer Blinklicht Kellertuer Esszimmer Wohnzimmer_DF_Rechts Wohnzimmer_DF_Links Terassentuer Fenster_Flur_EG Kueche Bad_Eg Stecker_1
2017.03.24 11:35:48 4 : Connection closed for WEB_192.168.11.202_51743: EOF
2017.03.24 11:35:48 4 : Connection accepted from WEB_192.168.11.202_51744
2017.03.24 11:35:48 4 : WEB_192.168.11.202_51744 GET /fhem?detail=Sensoren; BUFLEN:0
2017.03.24 11:35:49 4 : WEB: /fhem?detail=Sensoren / RL:5832 / text/html; charset=UTF-8 / Content-Encoding: gzip /
2017.03.24 11:35:49 4 : WEB_192.168.11.202_51744 GET /fhem?cmd=%7BAttrVal(%22Sensoren%22%2C%22room%22%2C%22%22)%7D&XHR=1&fwcsrf=csrf_607679997992482; BUFLEN:0
2017.03.24 11:35:49 4 : WEB: /fhem?cmd=%7BAttrVal(%22Sensoren%22%2C%22room%22%2C%22%22)%7D&XHR=1&fwcsrf=csrf_607679997992482 / RL:32 / text/plain; charset=UTF-8 / Content-Encoding: gzip /
2017.03.24 11:35:49 4 : WEB_192.168.11.202_51744 GET /fhem?XHR=1&inform=type=status;filter=Sensoren;since=1490351747;fmt=JSON&fw_id=4119&timestamp=1490351749298; BUFLEN:0
2017.03.24 11:35:58 4 : Zustand: GetUpdate called (update)
2017.03.24 11:35:58 4 : Zustand: update timer modified: will call GetUpdate in 10.0 seconds at 2017-03-24 11:36:08
2017.03.24 11:35:58 4 : Zustand: AddToQueue adds update, initial queue len: 0
2017.03.24 11:35:58 4 : Zustand: HandleSendQueue sends request type update to URL http://BENUTZERNAME:Passwort@192.168.11.65/action/panelCondGet, No Data, No Header, timeout 2
2017.03.24 11:35:58 4 : HttpUtils url=http://BENUTZERNAME:Passwort@192.168.11.65/action/panelCondGet
2017.03.24 11:35:58 4 : Sensoren: GetUpdate called (update)
2017.03.24 11:35:58 4 : Sensoren: update timer modified: will call GetUpdate in 10.0 seconds at 2017-03-24 11:36:08
2017.03.24 11:35:58 4 : Sensoren: AddToQueue adds update, initial queue len: 0
2017.03.24 11:35:58 4 : Sensoren: HandleSendQueue sends request type update to URL http://BENUTZERNAME:Passwort@192.168.11.65/action/sensorListGet, No Data, No Header, timeout 2
2017.03.24 11:35:58 4 : HttpUtils url=http://BENUTZERNAME:Passwort@192.168.11.65/action/sensorListGet
2017.03.24 11:35:58 4 : http://BENUTZERNAME:Passwort@192.168.11.65/action/panelCondGet: HTTP response code 200
2017.03.24 11:35:58 4 : HttpUtils http://BENUTZERNAME:Passwort@192.168.11.65/action/panelCondGet: Got data, length: 324
2017.03.24 11:35:58 4 : Zustand: Read callback: request type was update retry 0, Header: HTTP/1.0 200 OK Server: GoAhead-Webs Pragma: no-cache Cache-control: no-cache Expires: 0 Content-Type: application/json; charset=ISO-8859-1, Body: /*-secure- { updates : { mode_a1 : "Disarm", mode_a2 : "Disarm", battery : "Normal", tamper : "Close", interference : "Normal", ac_activation : "Normal", rssi : "17", sig_gsm : "N/A" }, forms : { pcondform1 : { mode : "4", f_arm : "0" }, pcondform2 : { mode : "4", f_arm : "0" } } } */no error
2017.03.24 11:35:58 4 : Zustand: CheckAuth decided no authentication required
2017.03.24 11:35:58 4 : Zustand: ExtractReading for reading01-1 sets scharfunscharf to Disarm
2017.03.24 11:35:58 4 : Zustand: ExtractReading for reading02-1 sets Mode to 4
2017.03.24 11:35:58 4 : Zustand: Read response to update matched Reading(s) scharfunscharf Mode
2017.03.24 11:35:58 4 : http://BENUTZERNAME:Passwort@192.168.11.65/action/sensorListGet: HTTP response code 200
2017.03.24 11:35:58 4 : HttpUtils http://BENUTZERNAME:Passwort@192.168.11.65/action/sensorListGet: Got data, length: 1959
2017.03.24 11:35:58 4 : Sensoren: Read callback: request type was update retry 0, Header: HTTP/1.0 200 OK Server: GoAhead-Webs Pragma: no-cache Cache-control: no-cache Expires: 0 Content-Type: application/json; charset=ISO-8859-1, Body: /*-secure- { senrows : [ {no : "1", type : "Remote Controller", area : "1", zone : "1", name : "Benutzer", attr : "Personal Att", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "2", type : "Remote Keypad", area : "1", zone : "2", name : "Flur_unten", attr : "", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "3", type : "Door Contact", area : "1", zone : "3", name : "Haustuer", attr : "Entry", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "4", type : "BX15", area : "1", zone : "4", name : "Blinklicht", attr : "", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "5", type : "Door Contact", area : "1", zone : "5", name : "Kellertuer", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "6", type : "Door Contact", area : "1", zone : "6", name : "Esszimmer", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "7", type : "Door Contact", area : "1", zone : "7", name : "Wohnzimmer_DF_Rechts", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "8", type : "Door Contact", area : "1", zone : "8", name : "Wohnzimmer_DF_Links", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "9", type : "Door Contact", area : "1", zone : "9", name : "Terassentuer", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "10", type : "Door Contact", area : "1", zone : "10", name : "Fenster_Flur_EG", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "11", type : "Door Contact", area : "1", zone : "11", name : "Kueche", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "12", type : "Door Contact", area : "1", zone : "12", name : "Bad_EG", attr : "Burglar", cond : "", battery : "", tamp : "", bypass : "No"}, {no : "13", type : "PSS", area : "1", zone : "71", name : "Stecker_1", attr : "",cond : "Off", battery : "", tamp : "", bypass : "No"}] } */no error
2017.03.24 11:35:58 4 : Sensoren: CheckAuth decided no authentication required
2017.03.24 11:35:58 4 : Sensoren: ExtractReading for reading01-1 sets RemoteController to
2017.03.24 11:35:58 4 : Sensoren: ExtractReading for reading02-1 sets RemoteKeypad to
2017.03.24 11:35:58 4 : Sensoren: ExtractReading for reading03-1 sets Haustuer to
2017.03.24 11:35:58 4 : Sensoren: ExtractReading for reading04-1 sets Blinklicht to
2017.03.24 11:35:58 4 : Sensoren: ExtractReading for reading05-1 sets Kellertuer to
2017.03.24 11:35:58 4 : Sensoren: ExtractReading for reading06-1 sets Esszimmer to
2017.03.24 11:35:58 4 : Sensoren: ExtractReading for reading07-1 sets Wohnzimmer_DF_Rechts to
2017.03.24 11:35:58 4 : Sensoren: ExtractReading for reading08-1 sets Wohnzimmer_DF_Links to
2017.03.24 11:35:58 4 : Sensoren: ExtractReading for reading09-1 sets Terassentuer to
2017.03.24 11:35:58 4 : Sensoren: ExtractReading for reading10-1 sets Fenster_Flur_EG to
2017.03.24 11:35:58 4 : Sensoren: ExtractReading for reading11-1 sets Kueche to
2017.03.24 11:35:58 4 : Sensoren: ExtractReading for reading12-1 sets Bad_Eg to
2017.03.24 11:35:58 4 : Sensoren: ExtractReading for reading13-1 sets Stecker_1 to Off
2017.03.24 11:35:58 4 : Sensoren: Read response to update matched Reading(s) RemoteController RemoteKeypad Haustuer Blinklicht Kellertuer Esszimmer Wohnzimmer_DF_Rechts Wohnzimmer_DF_Links Terassentuer Fenster_Flur_EG Kueche Bad_Eg Stecker_1
2017.03.24 11:36:00 4 : Connection closed for WEB_192.168.11.202_51744: EOF
2017.03.24 11:36:00 4 : Connection accepted from WEB_192.168.11.202_51746
2017.03.24 11:36:00 4 : WEB_192.168.11.202_51746 GET /fhem?detail=Sensoren; BUFLEN:0
2017.03.24 11:36:00 4 : WEB: /fhem?detail=Sensoren / RL:5835 / text/html; charset=UTF-8 / Content-Encoding: gzip /
2017.03.24 11:36:01 4 : WEB_192.168.11.202_51746 GET /fhem?cmd=%7BAttrVal(%22Sensoren%22%2C%22room%22%2C%22%22)%7D&XHR=1&fwcsrf=csrf_607679997992482; BUFLEN:0
2017.03.24 11:36:01 4 : WEB: /fhem?cmd=%7BAttrVal(%22Sensoren%22%2C%22room%22%2C%22%22)%7D&XHR=1&fwcsrf=csrf_607679997992482 / RL:32 / text/plain; charset=UTF-8 / Content-Encoding: gzip /
2017.03.24 11:36:01 4 : WEB_192.168.11.202_51746 GET /fhem?XHR=1&inform=type=status;filter=Sensoren;since=1490351759;fmt=JSON&fw_id=4120&timestamp=1490351761322; BUFLEN:0


Das ist ein Auszug eines Logfiles, nichts im Logfile muss einem Event entsprechen.

Du solltest mal die Steckdose schalten und dabei den Eventmonitor geöffnet haben. Danach den Inhalt des Eventmonitors posten.

https://wiki.fhem.de/wiki/Event
https://wiki.fhem.de/wiki/Event_monitor

Torben80

Hab ich schon. 2-3 Posts weiter oben. Verbose 4.


Gesendet von iPhone mit Tapatalk

Ellert

Zitat von: Torben80 am 24 März 2017, 17:14:19
Hab ich schon. 2-3 Posts weiter oben. Verbose 4.


Gesendet von iPhone mit Tapatalk
Hast Du gelesen was ich schrieb?

Torben80

Moin Ellert,
ich habe jetzt bei Global Verbose auf 5, den EventMonitor auf, NICHT den Haken bei Log gesetzt und sehe beim Schalten der Steckdose nichts, setze ich den Haken, dann kommt das, was ich oben schon postete.

ACHTUNG:!! Die Steckdose wird über das WebInterface der Alarmanlage An und Ausgeschaltet, nicht über FHEM! (Hätte ich das schon früher erwähnen sollen?)

Deshalb kann und will ich ja das Reading Sensoren:Stecker_1 auch unbedingt in der IF-Abfrage haben.

Noch einmal, ich möchte mit einer IF-Abfrage nur wissen ob der Stecker_1 "On" ist und wenn ja, dann soll er "setstate Sensoren Stecker_ist_an" schreiben.

Das kann doch nicht so schwer sein? Stelle ich mich denn so doof an, in einer DOIF ein Reading auszulesen?

mfg Torben

Torben80

Update:

Ich habe nun einen Dummy erstellt namens "Stecker". Bei dem mache ich die ganze Zeit "setstate Stecker On" und "setstate Stecker Off".

Dann habe ich mein DOIF Linien, indem ich folgendes stehen habe:
([Stecker:"on"]) (setstate Sensoren Stecker_ist_an) DOELSE (setstate Sensoren Stecker_ist_aus)

Wenn ich nun manuel per "set Linien cmd_1" oder "set Linien cmd_2" schalte, dann ändert er auch den State von Sensoren.
Aber wenn ich  "setstate Stecker On" und "setstate Stecker Off" schreibe, dann springt der DOIF nicht an...

Im EvenMonitor passiert auch nichts dergleichen...

Damian

Zitat von: Torben80 am 24 März 2017, 22:23:19
Update:

Ich habe nun einen Dummy erstellt namens "Stecker". Bei dem mache ich die ganze Zeit "setstate Stecker On" und "setstate Stecker Off".

Dann habe ich mein DOIF Linien, indem ich folgendes stehen habe:
([Stecker:"on"]) (setstate Sensoren Stecker_ist_an) DOELSE (setstate Sensoren Stecker_ist_aus)

Wenn ich nun manuel per "set Linien cmd_1" oder "set Linien cmd_2" schalte, dann ändert er auch den State von Sensoren.
Aber wenn ich  "setstate Stecker On" und "setstate Stecker Off" schreibe, dann springt der DOIF nicht an...

Im EvenMonitor passiert auch nichts dergleichen...

1) setstate erzeugt keine Events, du solltest set nehmen
2) On ist nicht gleich on
Programmierte FHEM-Module: DOIF-FHEM, DOIF-Perl, DOIF-uiTable, THRESHOLD, FHEM-Befehl: IF

Torben80

@Damian,
sorry du hast natürlich recht.
Das war ein Flüchtigkeitsfehler, mit dem "on" und "On".

AAAAABER: Du hattest recht (natürlich).

Wenn ich schreibe "set Stecker On", dann reagiert auch mein Linien DOIF und und macht "setstate Sensoren Stecker_ist_an".
Jetzt die Frage Warum macht der XXXXX das nicht, wenn ich im DOIF direkt das eine READING von Sensoren auslese?

Ellert

Zitat von: Torben80 am 24 März 2017, 22:23:19
Update:

Ich habe nun einen Dummy erstellt namens "Stecker". Bei dem mache ich die ganze Zeit "setstate Stecker On" und "setstate Stecker Off".

Dann habe ich mein DOIF Linien, indem ich folgendes stehen habe:
([Stecker:"on"]) (setstate Sensoren Stecker_ist_an) DOELSE (setstate Sensoren Stecker_ist_aus)

Wenn ich nun manuel per "set Linien cmd_1" oder "set Linien cmd_2" schalte, dann ändert er auch den State von Sensoren.
Aber wenn ich  "setstate Stecker On" und "setstate Stecker Off" schreibe, dann springt der DOIF nicht an...

Im EvenMonitor passiert auch nichts dergleichen...

Wenn das Gerät, von dem Du ein Reading prüfen möchtest im Eventmonitor nicht erscheint, dann wird DOIF auch das Reading nicht prüfen können, da das DOIF ein Event als Anlass zur Prüfung nimmt.

Mit notify ist es allerdings möglich auf Logeinträge des globalen Logfiles zu reagieren, s. https://fhem.de/commandref_DE.html#readLog

Torben80

Guten Morgen erst meinmal.

Ok, ich habe doch aber alles so gemacht wie es in den Anleitungen steht.
Wie bekomme ich ein ReadingWert aus "Sensoren" in die Readings meines DOIFs?
Damit wäre doch alles bestens?



Gesendet von iPhone mit Tapatalk

Ellert

Zitat von: Torben80 am 25 März 2017, 07:23:14
Guten Morgen erst meinmal.

Ok, ich habe doch aber alles so gemacht wie es in den Anleitungen steht.
Wie bekomme ich ein ReadingWert aus "Sensoren" in die Readings meines DOIFs?
Damit wäre doch alles bestens?



Gesendet von iPhone mit Tapatalk

Du müsstest dafür sorgen, dass das Reading Sensor_1 in deinem HTTPMOD-Gerät ein Event erzeugt, dann wird auch DOIF funktionieren.

Testweise würde ich mal das Attribut event-on-change-reading löschen.