[gelöst] Falsches STATE wird übergeben

Begonnen von Thoffi1978, 16 Juli 2016, 13:09:42

Vorheriges Thema - Nächstes Thema

Thoffi1978

Hallo.

Ich möchte mir den Wert eines Readings schicken lassen.
Ich habe dazu folgenden DOIF (Auszug):
([Rahlstedt_1400:travel_note_2] ne "none")(set Torsten_WA send [Rahlstedt_1400:travel_note_text_2])
DOELSE
(set Torsten_WA send Bahn fährt wieder pünktlich)

Wenn jetzt travel note 2 nicht "none" ist bekomme ich auch eine WA gesendet. Diese hat aber den Text "none".
WhatsApp: sending /message send 49179123456 'none'
Wenn ich den Befehl manuel eingebe in der Befehlszeile
set Torsten_WA send [Rahlstedt_1400:travel_note_text_2]
Dann kommt der richtige Wert übermittelt:
WhatsApp: sending /message send 491791234567 'Aktuelle Informationen liegen vor'

Wieso bekomme ich über den DOIF nicht den richtigen Wert übermittelt?

Vielen Dank schon mal für die Hilfe.



Anbei die List des DOIF und von Rahlstedt_1400
DOIF
Internals:
   DEF        ([Oldesloe_0430:travel_note_2] ne "none")(set Torsten_WA send [Oldesloe_0430:travel_note_text_2])
DOELSEIF
([Oldesloe_0730:travel_note_2] ne "none")(set Torsten_WA send [Oldesloe_0730:travel_note_text_2])
DOELSEIF
([Oldesloe_1200:travel_note_2] ne "none")(set Torsten_WA send [Oldesloe_1200:travel_note_text_2])
DOELSEIF
([Rahlstedt_1400:travel_note_2] ne "none")(set Torsten_WA send [Rahlstedt_1400:travel_note_text_2])
DOELSEIF
([Rahlstedt_1830:travel_note_2] ne "none")(set Torsten_WA send [Rahlstedt_1830:travel_note_text_2])
DOELSEIF
([Rahlstedt_2155:travel_note_2] ne "none")(set Torsten_WA send [Rahlstedt_2155:travel_note_text_2])
DOELSE
(set Torsten_WA send Bahn fährt wieder pünktlich)

   NAME       DBPlan_Whatsapp
   NR         275
   NTFY_ORDER 50-DBPlan_Whatsapp
   STATE      cmd_4
   TYPE       DOIF
   Readings:
     2016-07-16 13:06:26   Device          Rahlstedt_1400
     2016-07-16 12:58:24   cmd             4
     2016-07-16 12:58:24   cmd_event       Rahlstedt_1400
     2016-07-16 12:58:24   cmd_nr          4
     2016-07-16 13:06:26   e_Rahlstedt_1400_travel_note_2 achtung
     2016-07-16 12:58:24   state           cmd_4
     2016-07-16 13:06:22   wait_timer      no timer
   Condition:
     0          ReadingValDoIf($hash,'Oldesloe_0430','travel_note_2','','',AttrVal($hash->{NAME},'notexist',undef)) ne "none"
     1          ReadingValDoIf($hash,'Oldesloe_0730','travel_note_2','','',AttrVal($hash->{NAME},'notexist',undef)) ne "none"
     2          ReadingValDoIf($hash,'Oldesloe_1200','travel_note_2','','',AttrVal($hash->{NAME},'notexist',undef)) ne "none"
     3          ReadingValDoIf($hash,'Rahlstedt_1400','travel_note_2','','',AttrVal($hash->{NAME},'notexist',undef)) ne "none"
     4          ReadingValDoIf($hash,'Rahlstedt_1830','travel_note_2','','',AttrVal($hash->{NAME},'notexist',undef)) ne "none"
     5          ReadingValDoIf($hash,'Rahlstedt_2155','travel_note_2','','',AttrVal($hash->{NAME},'notexist',undef)) ne "none"
   Devices:
     0           Oldesloe_0430
     1           Oldesloe_0730
     2           Oldesloe_1200
     3           Rahlstedt_1400
     4           Rahlstedt_1830
     5           Rahlstedt_2155
     all         Oldesloe_0430 Oldesloe_0730 Oldesloe_1200 Rahlstedt_1400 Rahlstedt_1830 Rahlstedt_2155
   Do:
     0:
       0          set Torsten_WA send [Oldesloe_0430:travel_note_text_2]
     1:
       0          set Torsten_WA send [Oldesloe_0730:travel_note_text_2]
     2:
       0          set Torsten_WA send [Oldesloe_1200:travel_note_text_2]
     3:
       0          set Torsten_WA send [Rahlstedt_1400:travel_note_text_2]
     4:
       0          set Torsten_WA send [Rahlstedt_1830:travel_note_text_2]
     5:
       0          set Torsten_WA send [Rahlstedt_2155:travel_note_text_2]
     6:
       0          set Torsten_WA send Bahn fährt wieder pünktlich
   Helper:
     event      travel_departure_1: Gl. 1
,travel_destination_1: Gl. 3

     globalinit 1
     last_timer 0
     sleepdevice Rahlstedt_1400
     sleepsubtimer 0
     sleeptimer -1
     timerdev   Rahlstedt_1400
     timerevent travel_departure_1: Gl. 1
,travel_destination_1: Gl. 3

     triggerDev Rahlstedt_1400
     timerevents:
       travel_departure_1: Gl. 1

       travel_destination_1: Gl. 3

     timereventsState:
       travel_departure_1: Gl. 1

       travel_destination_1: Gl. 3

     triggerEvents:
       travel_departure_1: Gl. 1

       travel_destination_1: Gl. 3

     triggerEventsState:
       travel_departure_1: Gl. 1

       travel_destination_1: Gl. 3

   Internals:
   Itimer:
   Readings:
     0           Oldesloe_0430:travel_note_2
     1           Oldesloe_0730:travel_note_2
     2           Oldesloe_1200:travel_note_2
     3           Rahlstedt_1400:travel_note_2
     4           Rahlstedt_1830:travel_note_2
     5           Rahlstedt_2155:travel_note_2
     all         Oldesloe_0430:travel_note_2 Oldesloe_0730:travel_note_2 Oldesloe_1200:travel_note_2 Rahlstedt_1400:travel_note_2 Rahlstedt_1830:travel_note_2 Rahlstedt_2155:travel_note_2
   Regexp:
     0:
     1:
     2:
     3:
     4:
     5:
     All:
   State:
   Trigger:
Attributes:
   room       yowsup,ÖPNV
   wait       2:2:2:2:2:2:5


Rahlstedt_1400
Internals:
   BASE_URL   http://reiseauskunft.bahn.de/bin/query.exe/dox?S=departure&Z=destination&start=1&rt=1
   DEF        120
   Interval   120
   NAME       Rahlstedt_1400
   NR         280
   STATE      active
   TRIGGERTIME 1468667181.92038
   TRIGGERTIME_FMT 2016-07-16 13:06:21
   TYPE       DBPlan
   addr       http://reiseauskunft.bahn.de:80
   buf        HTTP/1.1 200 OK

Date: Sat, 16 Jul 2016 11:04:25 GMT

Server: Apache

Connection: close

Content-Type: text/html; charset=ISO-8859-1



<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Deutsche Bahn - Verbindungen - Verbindungsdetails</title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="expires" content="-1" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" />
<meta name="viewport" content="width=device-width; initial-scale=1.0;" />
<meta name="format-detection" content="telephone=no" />
<meta name="HandheldFriendly" content="true" />
<link rel="shortcut icon" href="http://www.img-bahn.de/v/1606/img/favicon.ico" />
<link rel="apple-touch-icon" type="image/x-icon" href="http://www.img-bahn.de/v/1606/img/apple-touch-icon.png"/>
<link rel="stylesheet" type="text/css" href="http://www.img-bahn.de/v/1606/cms/mobile/css/bahn_mobile.css" />
<link rel="stylesheet" type="text/css" href="http://www.img-bahn.de/v/1606/css/hafas_mobile.css" />
<link rel="stylesheet" type="text/css" href="http://www.img-bahn.de/v/1606/cms/mobile/css/notouch.css" />
<link rel="stylesheet" type="text/css" href="http://www.img-bahn.de/v/1606/css/hafas_notouch.css" />
</head>
<body >
<div id="doc" >
<div id="header">
<div class="logo">
<img src="http://www.img-bahn.de/v/1606/img/ua_xhtml/l_bahnmobile.gif" alt="DB - Deutsche Bahn" height="15" width="60" />
</div>
<div id="branding">
<div class="bar"> </div>
</div>
</div>
<div id="content" class="">
<h1>
<img class="prio1Icon" src="http://www.img-bahn.de/v/1606/img/ua_xhtml/icon_verbindung_grau_22x22.gif" height="22" width="22" alt="" />Verbindungsdetails
</h1>
<div class="inputtbl">
<div class="clickarea rline route" id="dtlOpen">
<a id="dtlOpen_link" href="http://reiseauskunft.bahn.de/bin/query2.exe/dox?ld=15094&amp;n=4&amp;i=1t.01468194.1468667062&amp;rt=1&amp;use_realtime_filter=1&amp;HWAI=~CONNECTION$C0-0!details" class="flaparrowclose">
<span class="querysummary1">
Hamburg-Rahlstedt - Bad Oldesloe
</span>
<span class="querysummary2" id="dtlOpen_2">
Sa, 16.07.16, 13:55
<span class="okmsg">+0</span>
-
14:21
<span class="okmsg">+0</span>
</span>
</a>
</div>
<div class="rline haupt routeStart" style=" ">
<span class="bold">Hamburg-Rahlstedt</span><br />
ab 13:55 <span class="okmsg">+0</span> Gl. 1
<br />
</div>
<div class="rline haupt mot">
<div class="motSection">
<a href="http://reiseauskunft.bahn.de/bin/query2.exe/dox?ld=15094&amp;n=4&amp;i=1t.01468194.1468667062&amp;rt=1&amp;use_realtime_filter=1&amp;HWAI=CONNECTION$C0-0!section=0!" class="flaparrow">
<span class="bold">
RB 21320
</span>
</a>
</div>
</div>
<div class="rline haupt routeEnd routeEnd__IV">
an 14:21 <span class="okmsg">+0</span> Gl. 3
<br />
<span class="bold">Bad Oldesloe</span><br />
</div>
<div class="rlinebottom"></div>
<div class="bline bggrey">
<a class="arrowlink" href="http://reiseauskunft.bahn.de/bin/query2.exe/dox?ld=15094&amp;n=4&amp;i=1t.01468194.1468667062&amp;rt=1&amp;use_realtime_filter=1&amp;sotRequest=1&amp;sotContext=&amp;sotMasterId=C0-0&amp;REQ0SOTCtxtP=C0-0&amp;REQ0SOTCtxtO=FROM_RECONSTRUCTION_VIA_SPOOL&amp;vcra=1&amp;start=1&amp;displayOutward=1">Aktuelle Alternativen</a>
</div>
<div class="bline bggrey">
<a class="registerPush arrowlink" title="" href="https://reiseauskunft.bahn.de/bin/query2.exe/dox?ld=15094&amp;n=4&amp;i=1t.01468194.1468667062&amp;rt=1&amp;use_realtime_filter=1&amp;oCID=C0-0&amp;lang=de&amp;country=DEU&amp;prepareOrder=yes&amp;sTID=monitor&amp;">Verspätungs-Alarm</a>
</div>
<div class="rlinebottom"></div>
<div class="bline stdpadding bggrey">
<a href="http://reiseauskunft.bahn.de/bin/query2.exe/dox?ld=15094&amp;n=4&amp;i=1t.01468194.1468667062&amp;rt=1&amp;use_realtime_filter=1&amp;selectOutwardJourney=yes&amp;selectReturnMode=yes&amp;guiVCtrl_connection_detailsOut_add_selection=yes&amp;showReturnRequestPage=yes&amp;HWAI=~CONNECTION$C0-0!details!&amp;" class="nebenbtn " >Rückfahrt hinzufügen</a>
</div>
<div class="haupt bggrey paddingleft editBtnCon ">
<div style="position: absolute;">Reiseprofil:</div><div class="bold" style="padding-left: 90px;">2. Klasse |&ensp;1&nbsp;Erwachsener&nbsp;-&ensp;Keine Ermäßigung&ensp;</div><br/><a class="arrowlink" href="http://reiseauskunft.bahn.de/bin/query2.exe/dox?ld=15094&amp;n=4&amp;i=1t.01468194.1468667062&amp;rt=1&amp;use_realtime_filter=1&amp;chgBC=y&amp;getstop=1&amp;showRequestPage=1&amp;&amp;">Reiseprofil ändern</a></div><div class="rlinetop"></div><h3 style="padding-left: 6px !important;">Einfache Fahrt</h3><div class="formular" ><div class="tarifftable"><table class="tariff"><tr><td>Preisauskunft nicht möglich</td></tr><tr class="noBorderBottom"><td>Für die gewählte Verbindung kann online kein Preis ermittelt werden. Bitte informieren Sie sich vor Ort oder telefonisch bei der Servicenummer der Deutschen Bahn, welche Fahrkarte für Ihren Zug gültig ist. Die entsprechende Rufnummer finden Sie unter www.bahn.de/kontakt.</td></tr></table></div><div class="rlinebottom"></div><div class="bline bggrey"><input type="submit" class="hauptbtn" name="dummy" value="Ticket/Reservierung" disabled="disabled" /></div></div><div class="bline bggrey"><input type="submit" class="hauptbtn" name="dummy" value="Nur Reservierung" disabled="disabled" /></div><form action="http://reiseauskunft.bahn.de/bin/query2.exe/dox?ld=15094&amp;n=4&amp;i=1t.01468194.1468667062&amp;rt=1&amp;use_realtime_filter=1&amp;" method="post"><div class="bline bggrey"><input type="submit" class="nebenbtn" name="vcra" value="Zurück" /></div></form></div></div>
<div id="footer" style="">
<ul class="footer">
<li class="firstitem"><a class="footerlinks" href="http://www.bahn.de/m/view/de/index.shtml">Startseite</a></li>
<li class="">
<a class="footerlinks" href="http://www.bahn.de/m/view/de/home/kontakt/impressum.shtml">Impressum</a>
</li>
</ul>
</div>
<p class="webtrack">
<img src="http://t.bahn.de/b/ss//5/1669401017?AQB=1&amp;gn=MOBI_ASK_DEU_de_AuskunftVerbindungenDetail&amp;ch=MOBI_ASK_DEU_de&amp;ev=event48,event3&amp;c21=MOBI>ASK>Z1>1E0K>BC1>2KL>SV1>ALL>EF&amp;v21=MOBI>ASK>Z1>1E0K>BC1>2KL>SV1>ALL>EF&amp;c23=Hamburg-Rahlstedt>Bad%20Oldesloe&amp;v23=Hamburg-Rahlstedt>Bad%20Oldesloe&amp;pl=;;;;;evar25=BC0&amp;c25=BC0&amp;c48=mit_AR&amp;AQE=1" width="5" height="5" alt="" />
</p>
</div>
</body>
</html>

   code       200
   conn
   displayurl http://reiseauskunft.bahn.de/bin/query2.exe/dox?ld=15094&n=1&i=1t.01468194.1468667062&rt=1&use_realtime_filter=1&co=C0-0&vca&HWAI=CONNECTION$C0-0!details=opened!&
   host       reiseauskunft.bahn.de
   httpheader HTTP/1.1 200 OK

Date: Sat, 16 Jul 2016 11:04:25 GMT

Server: Apache

Connection: close

Content-Type: text/html; charset=ISO-8859-1
   hu_blocking 0
   hu_filecount 88
   loglevel   4
   noshutdown 0
   note_index 1
   path       /bin/query2.exe/dox?ld=15094&n=1&i=1t.01468194.1468667062&rt=1&use_realtime_filter=1&co=C0-0&vca&HWAI=CONNECTION$C0-0!details=opened!&
   protocol   http
   redirects  0
   timeout    5
   url        http://reiseauskunft.bahn.de/bin/query2.exe/dox?ld=15094&n=1&i=1t.01468194.1468667062&rt=1&use_realtime_filter=1&co=C0-0&vca&HWAI=CONNECTION$C0-0!details=opened!&
   Readings:
     2016-07-16 13:04:22   plan_arrival_1  14:21
     2016-07-16 13:04:22   plan_arrival_2  14:56
     2016-07-16 13:04:22   plan_arrival_3  15:21
     2016-07-16 13:04:22   plan_arrival_delay_1 +0
     2016-07-16 13:04:22   plan_arrival_delay_2 Hinweise
     2016-07-16 13:04:22   plan_arrival_delay_3 none
     2016-07-16 13:04:22   plan_connection_1 RB
     2016-07-16 13:04:22   plan_connection_2 RB, RE
     2016-07-16 13:04:22   plan_connection_3 RB
     2016-07-16 13:04:22   plan_departure_1 13:55
     2016-07-16 13:04:22   plan_departure_2 14:25
     2016-07-16 13:04:22   plan_departure_3 14:55
     2016-07-16 13:04:22   plan_departure_delay_1 +0
     2016-07-16 13:04:22   plan_departure_delay_2 Hinweise
     2016-07-16 13:04:22   plan_departure_delay_3 +0
     2016-07-16 13:04:22   plan_error      none
     2016-07-16 13:04:22   plan_travel_change_1 0
     2016-07-16 13:04:22   plan_travel_change_2 1
     2016-07-16 13:04:22   plan_travel_change_3 0
     2016-07-16 13:04:22   plan_travel_duration_1 0:26
     2016-07-16 13:04:22   plan_travel_duration_2 0:31
     2016-07-16 13:04:22   plan_travel_duration_3 0:26
     2016-07-16 13:04:22   travel_change_1 none
     2016-07-16 13:04:22   travel_change_2 none
     2016-07-16 13:04:22   travel_change_3 none
     2016-07-16 13:04:26   travel_departure_1 Gl. 1

     2016-07-16 13:04:25   travel_departure_2 Gl. 1

     2016-07-16 13:04:23   travel_departure_3 Gl. 1

     2016-07-16 13:04:26   travel_destination_1 Gl. 3

     2016-07-16 13:04:25   travel_destination_2 Gl. 7

     2016-07-16 13:04:23   travel_destination_3 Gl. 3

     2016-07-16 13:04:22   travel_duration_1 none
     2016-07-16 13:04:22   travel_duration_2 none
     2016-07-16 13:04:22   travel_duration_3 none
     2016-07-16 13:04:22   travel_note_1   none
     2016-07-16 13:04:22   travel_note_2   achtung
     2016-07-16 13:04:22   travel_note_3   none
     2016-07-16 13:04:22   travel_note_link_1 http://reiseauskunft.bahn.de/bin/query2.exe/dox?ld=15094&n=1&i=1t.01468194.1468667062&rt=1&use_realtime_filter=1&co=C0-0&vca&HWAI=CONNECTION$C0-0!details=opened!&
     2016-07-16 13:04:22   travel_note_link_2 http://reiseauskunft.bahn.de/bin/query2.exe/dox?ld=15094&n=1&i=1t.01468194.1468667062&rt=1&use_realtime_filter=1&co=C0-1&vca&HWAI=CONNECTION$C0-1!details=opened!&
     2016-07-16 13:04:22   travel_note_link_3 http://reiseauskunft.bahn.de/bin/query2.exe/dox?ld=15094&n=1&i=1t.01468194.1468667062&rt=1&use_realtime_filter=1&co=C0-2&vca&HWAI=CONNECTION$C0-2!details=opened!&
     2016-07-16 13:04:22   travel_note_text_1 none
     2016-07-16 13:04:25   travel_note_text_2 Aktuelle Informationen liegen vor
     2016-07-16 13:04:22   travel_note_text_3 none
     2016-07-16 13:04:22   travel_price_1  none
     2016-07-16 13:04:22   travel_price_2  none
     2016-07-16 13:04:22   travel_price_3  none
   Sslargs:
Attributes:
   dbplan-travel-time 13:55
   dbplan_departure Hamburg-Rahlstedt
   dbplan_destination Bad Oldesloe
   dbplan_journey_prod Alle
   room       ÖPNV
   verbose    1

Ellert

Zwischen
Zitat2016-07-16 13:04:22   travel_note_2   achtung
und
Zitat2016-07-16 13:04:25   travel_note_text_2 Aktuelle Informationen liegen vor
vergehen 3 Sekunden. Da würde ich dem DOIF eine längere Wartezeit spendieren.

Thoffi1978