Autor Thema: Neue Version von HTTPMOD mit neuen Features zum Testen  (Gelesen 111931 mal)

Offline StefanStrobel

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1249
Antw:Neue Version von HTTPMOD mit neuen Features zum Testen
« Antwort #555 am: 28 Mai 2019, 22:33:11 »
Vielen Dank!
Jetzt bräuchte ich noch ein List von dem Device, damit ich die genaue Konfiguration sehen kann ...

Gruß / Thanx
    Stefan

Offline rubinho

  • Jr. Member
  • **
  • Beiträge: 74
Antw:Neue Version von HTTPMOD mit neuen Features zum Testen
« Antwort #556 am: 29 Mai 2019, 07:48:48 »
Moin Stefan,

hier wie gewünscht die Auflistung des Gerätes.
Mittleweile aber mit der Modifikation des Forenmitglieds aus dem anderen Thread. Damit lässt sich die Klimaanlage wieder steuern.
Aber vielleicht hilft es trotzdem dem ursprünglichen Problem auf die Schliche zu kommen.

Gruß
Rubinho

Internals:
   BUSY       0
   CFGFN      ./FHEM/httpmod.cfg
   DEF        http://172.22.3.15/aircon/get_control_info 60
   FUUID      5c5440d0-f33f-0949-4d29-f907bad0e9ab3a88
   Interval   60
   LASTSEND   1559108458.49134
   MainURL    http://172.22.3.15/aircon/get_control_info
   ModuleVersion 3.5.9 - 13.2.2019
   NAME       AC_c_Schlafzimmer
   NOTIFYDEV  global
   NR         648
   NTFY_ORDER 50-AC_c_Schlafzimmer
   ReplacementEnabled 1
   STATE      on
   TRIGGERTIME 1559108488.29119
   TRIGGERTIME_FMT 2019-05-29 07:41:28
   TYPE       HTTPMOD
   addr       http://172.22.3.15:80
   auth       0
   buf       
   code       200
   compress   1
   conn       
   data       
   displayurl http://172.22.3.15/aircon/get_control_info
   header     
   host       172.22.3.15
   httpheader HTTP/1.0 200 OK
Content-Length: 334
Content-Type: text/plain
   httpversion 1.0
   hu_blocking 0
   hu_filecount 12
   hu_port    80
   hu_portSfx
   ignoreredirects 0
   loglevel   4
   path       /aircon/get_control_info
   protocol   http
   redirects  0
   timeout    2
   url        http://172.22.3.15/aircon/get_control_info
   value      0
   QUEUE:
   READINGS:
     2019-05-29 07:40:58   adv             
     2019-05-29 07:40:58   alert           255
     2019-05-29 07:40:58   b_f_dir         vertical
     2019-05-29 07:40:58   b_f_rate        B
     2019-05-29 07:40:58   b_mode          3
     2019-05-29 07:40:58   b_shum          0
     2019-05-29 07:40:58   b_stemp         18.0
     2019-05-29 07:40:58   dfd1            0
     2019-05-29 07:40:58   dfd2            0
     2019-05-29 07:40:58   dfd3            1
     2019-05-29 07:40:58   dfd4            0
     2019-05-29 07:40:58   dfd5            0
     2019-05-29 07:40:58   dfd6            0
     2019-05-29 07:40:58   dfd7            0
     2019-05-29 07:40:58   dfdh            0
     2019-05-29 07:40:58   dfr1            5
     2019-05-29 07:40:58   dfr2            5
     2019-05-29 07:40:58   dfr3            B
     2019-05-29 07:40:58   dfr4            5
     2019-05-29 07:40:58   dfr5            5
     2019-05-29 07:40:58   dfr6            5
     2019-05-29 07:40:58   dfr7            5
     2019-05-29 07:40:58   dfrh            5
     2019-05-29 07:40:58   dh1             AUTO
     2019-05-29 07:40:58   dh2             50
     2019-05-29 07:40:58   dh3             0
     2019-05-29 07:40:58   dh4             0
     2019-05-29 07:40:58   dh5             0
     2019-05-29 07:40:58   dh7             AUTO
     2019-05-29 07:40:58   dhh             50
     2019-05-29 07:40:58   dt1             25.0
     2019-05-29 07:40:58   dt2             M
     2019-05-29 07:40:58   dt3             18.0
     2019-05-29 07:40:58   dt4             25.0
     2019-05-29 07:40:58   dt5             25.0
     2019-05-29 07:40:58   dt7             25.0
     2019-05-29 07:40:58   f_dir           1
     2019-05-29 07:40:58   f_rate          silent
     2019-05-29 07:40:58   mode            3
     2019-05-29 07:40:58   pow             1
     2019-05-29 07:40:58   ret             OK
     2019-05-29 07:40:58   shum            0
     2019-05-29 07:40:58   stemp           18.0
   REQUEST:
     data       
     header     
     ignoreredirects 0
     retryCount 0
     type       update
     url        http://172.22.3.15/aircon/get_control_info
     value      0
   defptr:
     readingBase:
       adv        reading
       alert      reading
       b_f_dir    reading
       b_f_rate   reading
       b_mode     reading
       b_shum     reading
       b_stemp    reading
       dfd1       reading
       dfd2       reading
       dfd3       reading
       dfd4       reading
       dfd5       reading
       dfd6       reading
       dfd7       reading
       dfdh       reading
       dfr1       reading
       dfr2       reading
       dfr3       reading
       dfr4       reading
       dfr5       reading
       dfr6       reading
       dfr7       reading
       dfrh       reading
       dh1        reading
       dh2        reading
       dh3        reading
       dh4        reading
       dh5        reading
       dh7        reading
       dhh        reading
       dt1        reading
       dt2        reading
       dt3        reading
       dt4        reading
       dt5        reading
       dt7        reading
       f_dir      reading
       f_rate     reading
       mode       reading
       pow        reading
       ret        reading
       shum       reading
       stemp      reading
     readingNum:
       adv        13
       alert      32
       b_f_dir    36
       b_f_rate   35
       b_mode     29
       b_shum     31
       b_stemp    30
       dfd1       45
       dfd2       46
       dfd3       47
       dfd4       48
       dfd5       49
       dfd6       50
       dfd7       51
       dfdh       52
       dfr1       37
       dfr2       38
       dfr3       39
       dfr4       40
       dfr5       41
       dfr6       42
       dfr7       43
       dfrh       44
       dh1        22
       dh2        23
       dh3        24
       dh4        25
       dh5        26
       dh7        27
       dhh        28
       dt1        16
       dt2        17
       dt3        18
       dt4        19
       dt5        20
       dt7        21
       f_dir      34
       f_rate     33
       mode       12
       pow        11
       ret        10
       shum       15
       stemp      14
     readingOutdated:
     requestReadings:
       update:
         adv        reading 13
         alert      reading 32
         b_f_dir    reading 36
         b_f_rate   reading 35
         b_mode     reading 29
         b_shum     reading 31
         b_stemp    reading 30
         dfd1       reading 45
         dfd2       reading 46
         dfd3       reading 47
         dfd4       reading 48
         dfd5       reading 49
         dfd6       reading 50
         dfd7       reading 51
         dfdh       reading 52
         dfr1       reading 37
         dfr2       reading 38
         dfr3       reading 39
         dfr4       reading 40
         dfr5       reading 41
         dfr6       reading 42
         dfr7       reading 43
         dfrh       reading 44
         dh1        reading 22
         dh2        reading 23
         dh3        reading 24
         dh4        reading 25
         dh5        reading 26
         dh7        reading 27
         dhh        reading 28
         dt1        reading 16
         dt2        reading 17
         dt3        reading 18
         dt4        reading 19
         dt5        reading 20
         dt7        reading 21
         f_dir      reading 34
         f_rate     reading 33
         mode       reading 12
         pow        reading 11
         ret        reading 10
         shum       reading 15
         stemp      reading 14
   sslargs:
Attributes:
   devStateIcon off.*:frost@grey:on on.*:frost@blue:off
   enableControlSet 1
   group      AC
   icon       frost
   reading10Name ret
   reading10Regex ret=([^,]*)
   reading11Name pow
   reading11Regex pow=([^,]*)
   reading12Name mode
   reading12Regex mode=([^,]*)
   reading13Name adv
   reading13Regex adv=([^,]*)
   reading14Name stemp
   reading14Regex stemp=([^,]*)
   reading15Name shum
   reading15Regex shum=([^,]*)
   reading16Name dt1
   reading16Regex dt1=([^,]*)
   reading17Name dt2
   reading17Regex dt2=([^,]*)
   reading18Name dt3
   reading18Regex dt3=([^,]*)
   reading19Name dt4
   reading19Regex dt4=([^,]*)
   reading20Name dt5
   reading20Regex dt5=([^,]*)
   reading21Name dt7
   reading21Regex dt7=([^,]*)
   reading22Name dh1
   reading22Regex dh1=([^,]*)
   reading23Name dh2
   reading23Regex dh2=([^,]*)
   reading24Name dh3
   reading24Regex dh3=([^,]*)
   reading25Name dh4
   reading25Regex dh4=([^,]*)
   reading26Name dh5
   reading26Regex dh5=([^,]*)
   reading27Name dh7
   reading27Regex dh7=([^,]*)
   reading28Name dhh
   reading28Regex dhh=([^,]*)
   reading29Name b_mode
   reading29Regex b_mode=([^,]*)
   reading30Name b_stemp
   reading30Regex b_stemp=([^,]*)
   reading31Name b_shum
   reading31Regex b_shum=([^,]*)
   reading32Name alert
   reading32Regex alert=([^,]*)
   reading33Name f_rate
   reading33OMap A:auto, B:silent, 3:very_low, 4:low, 5:medium, 6:high, 7:very_high
   reading33Regex f_rate=([^,]*)
   reading34Name f_dir
   reading34Regex f_dir=([^,]*)
   reading35Name b_f_rate
   reading35Regex b_f_rate=([^,]*)
   reading36Name b_f_dir
   reading36OMap 0:stopped, 1:vertical, 2:horizontal, 3:vertical&horizontal
   reading36Regex b_f_dir=([^,]*)
   reading37Name dfr1
   reading37Regex dfr1=([^,]*)
   reading38Name dfr2
   reading38Regex dfr2=([^,]*)
   reading39Name dfr3
   reading39Regex dfr3=([^,]*)
   reading40Name dfr4
   reading40Regex dfr4=([^,]*)
   reading41Name dfr5
   reading41Regex dfr5=([^,]*)
   reading42Name dfr6
   reading42Regex dfr6=([^,]*)
   reading43Name dfr7
   reading43Regex dfr7=([^,]*)
   reading44Name dfrh
   reading44Regex dfrh=([^,]*)
   reading45Name dfd1
   reading45Regex dfd1=([^,]*)
   reading46Name dfd2
   reading46Regex dfd2=([^,]*)
   reading47Name dfd3
   reading47Regex dfd3=([^,]*)
   reading48Name dfd4
   reading48Regex dfd4=([^,]*)
   reading49Name dfd5
   reading49Regex dfd5=([^,]*)
   reading50Name dfd6
   reading50Regex dfd6=([^,]*)
   reading51Name dfd7
   reading51Regex dfd7=([^,]*)
   reading52Name dfdh
   reading52Regex dfdh=([^,]*)
   replacement01Mode expression
   replacement01Regex #([^#]+)#
   replacement01Value ReadingsVal($name, $1, "")
   replacement02Regex #([^#]+)#
   replacement03Regex #([^#]+)#
   replacement04Regex #([^#]+)#
   room       Schlafzimmer
   set01Data  pow=$val&mode=3&stemp=#stemp#&shum=0&f_rate=B&f_dir=#f_dir#
   set01Hint  0,1
   set01Max   1
   set01Min   0
   set01Name  power
   set02Data  pow=#pow#&mode=$val&stemp=#stemp#&shum=0&f_rate=#b_f_rate#&f_dir=#f_dir#
   set02Hint  0,3,4,6
   set02Min   0
   set02Name  mode
   set03Data  pow=#pow#&mode=#mode#&stemp=$val&shum=0&f_rate=#b_f_rate#&f_dir=#f_dir#
   set03Max   41
   set03Min   10
   set03Name  stemp
   set04Data  pow=#pow#&mode=#mode#&stemp=#stemp#&shum=0&f_rate=$val&f_dir=#f_dir#
   set04Hint  A,B,3,4,5,6,7
   set04Name  Fan
   set04TextArg 1
   setURL     http://172.22.3.15/aircon/set_control_info?
   stateFormat {(ReadingsVal($name,"pow","") == 1) ? ("on") : ("off") }
   userattr   reading10Name reading10Regex reading11Name reading11OMap reading11Regex reading12Name reading12OMap reading12Regex reading13Name reading13Regex reading14Name reading14Regex reading15Name reading15Regex reading16Name reading16Regex reading17Name reading17Regex reading18Name reading18Regex reading19Name reading19Regex reading20Name reading20Regex reading21Name reading21Regex reading22Name reading22Regex reading23Name reading23Regex reading24Name reading24Regex reading25Name reading25Regex reading26Name reading26Regex reading27Name reading27Regex reading28Name reading28Regex reading29Name reading29OMap reading29Regex reading30Name reading30Regex reading31Name reading31Regex reading32Name reading32Regex reading33Name reading33OMap reading33Regex reading34Name reading34OMap reading34Regex reading35Name reading35OMap reading35Regex reading36Name reading36OMap reading36Regex reading37Name reading37Regex reading38Name reading38Regex reading39Name reading39Regex reading40Name reading40Regex reading41Name reading41Regex reading42Name reading42Regex reading43Name reading43Regex reading44Name reading44Regex reading45Name reading45Regex reading46Name reading46Regex reading47Name reading47Regex reading48Name reading48Regex reading49Name reading49Regex reading50Name reading50Regex reading51Name reading51Regex reading52Name reading52Regex replacement01Mode:reading,internal,text,expression,key replacement01Regex replacement01Value replacement02Regex replacement03Regex replacement04Regex set01Data set01Hint set01Max set01Min set01Name set02Data set02Hint set02Max set02Min set02Name set03Data set03Hint set03Max set03Min set03Name set03URL set04Data set04Hint set04Max set04Min set04Name set04TextArg:0,1 setURL
   verbose    0
   webCmd     stemp
   widgetOverride stemp:slider,10,1,41
Fhem 5.9@Zotac Zbox Ci327 | HMCCU | Z-Wave@ZMEEUZB1 | HUE Bridge Gen2 | knxd over IP

Offline StefanStrobel

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1249
Antw:Neue Version von HTTPMOD mit neuen Features zum Testen
« Antwort #557 am: 29 Mai 2019, 18:14:02 »
Hallo,

wenn ich den Post von roelb unter https://forum.fhem.de/index.php/topic,44710.15.html richtig interpretiere, dann kommt das Problem daher dass Ihr {{ als Marker für die Replacements verwendet und dass das seit einem Perl-Update nicht mehr funktioniert.

Allerdings vermisse ich in Deinem Log den Aufruf von HTTPMOD_Replace. Das ist seltsam.

Schau doch mal ob Du das Problem wie von roelb beschrieben lösen kannst.
Falls nicht würde ich Dich bitten in Deinem HTTPMOD ein paar Log-Zeilen zu aktivieren und dann nochmal ein Log zu posten.
(in Ziele 1046 in HTTPMOD_Replace das # vor dem Log3 entfernen. Ebenso in 1051, dann am besten ein Neustart von Fhem)

Gruss
   Stefan

Offline StefanStrobel

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1249
Antw:Neue Version von HTTPMOD mit neuen Features zum Testen
« Antwort #558 am: 11 Juni 2019, 09:20:43 »
Hallo ZDX,

Du könntest doch auch einfach textField als setXXHint Attribut setzen oder?

Gruss
   Stefan
Gefällt mir Gefällt mir x 1 Liste anzeigen

Offline andies

  • Hero Member
  • *****
  • Beiträge: 2350
Antw:Neue Version von HTTPMOD mit neuen Features zum Testen
« Antwort #559 am: 11 August 2019, 21:58:23 »
Ich verstehe etwas am Modul nicht. Ich habe mir für Pikrellcam ein httpDevice gebastelt, das so aussieht:
Internals:
   BUSY       0
   CHANGED   
   DEF        none 0
   FUUID      5cb99591-f33f-1115-e143-d1017d17853436dc
   Interval   0
   LASTSEND   1565552820.67529
   MainURL   
   ModuleVersion 3.5.9 - 13.2.2019
   NAME       Pikrellcam_Garage
   NOTIFYDEV  global
   NR         221
   NTFY_ORDER 50-Pikrellcam_Garage
   ReplacementEnabled 1
   STATE      <a href="http://raspgarage.fritz.box/">Link</a>
   TRIGGERTIME 0
   TRIGGERTIME_FMT
   TYPE       HTTPMOD
   addr       http://raspgarage.fritz.box:80
   auth       0
   data       
   displayurl http://raspgarage.fritz.box/fifo_command.php?cmd=still
   header     
   host       raspgarage.fritz.box
   httpversion 1.0
   ignoreredirects 0
   loglevel   4
   path       /fifo_command.php?cmd=still
   protocol   http
   redirects  0
   timeout    2
   url        http://raspgarage.fritz.box/fifo_command.php?cmd=still
   value      0
   QUEUE:
   READINGS:
   REQUEST:
     data       
     header     
     ignoreredirects 0
     retryCount 0
     type       set06
     url        http://raspgarage.fritz.box/fifo_command.php?cmd=still
     value      0
   sslargs:
Attributes:
   comment    Dieses HTTPMOD-Modul erlaubt die Steuerung von Pikrellcam über http-Befehle. Die enstprechende URL *muss* in jeden Set-Befehl eingetragen werden, im define muss "none" als URL stehen. Derzeit implementiert
1.) set <device> motion on/off
2.) set <device> archive_day YYYY-MM-DD (nur für einzeln einzugebende Tage)
3.) set <device> delete_day YYYY-MM-DD (nur für einzeln einzugebende Tage, die nicht archiviert wurden)
4.) set <device> archive_yesterday (Videos von gestern archiviert)
5.) set <device> delete_last_month (loesche archivierte Fotos)
   group      intern
   replacement01Mode expression
   replacement01Regex %%yesterday%%
   replacement01Value strftime("%Y-%m-%d", localtime(time-60*60*24))
   replacement02Mode expression
   replacement02Regex %%year%%
   replacement02Value ( localtime(time-31*60*60*24) )[5]+1900
   replacement03Regex %%last_month%%
   replacement03Value ( ( localtime() )[4] || 12 )
   room       Kameras
   set01Name  motion
   set01TextArg 1
   set01URL   http://raspgarage.fritz.box/fifo_command.php?cmd=motion_enable%20$val
   set02Name  archive_day
   set02TextArg 1
   set02URL   http://raspgarage.fritz.box/media-archive.php?mode=media&type=videos&dir=media&archive_date=$val
   set03Name  delete_day
   set03TextArg 1
   set03URL   http://raspgarage.fritz.box/media-archive.php?mode=media&type=videos&dir=media&delete_day=$val
   set04Name  archive_yesterday
   set04NoArg 1
   set04URL   http://raspgarage.fritz.box/media-archive.php?mode=media&type=videos&dir=media&archive_date=%%yesterday%%
   set05Name  delete_last_month
   set05NoArg 1
   set05URL   http://raspgarage.fritz.box/media-archive.php?mode=archive&type=videos&year=%%year%%&m0=%%last_month%%&d0=1&m1=%%last_month%%&d1=31&delete_all
   set06Name  still
   set06NoArg 1
   set06URL   http://raspgarage.fritz.box/fifo_command.php?cmd=still
   stateFormat <a href="http://raspgarage.fritz.box/">Link</a>
   userattr   replacement01Mode:reading,internal,text,expression,key replacement01Regex replacement01Value replacement02Mode:reading,internal,text,expression,key replacement02Regex replacement02Value replacement03Regex replacement03Value set01Name set01TextArg:0,1 set01URL set02Name set02TextArg:0,1 set02URL set03Name set03TextArg:0,1 set03URL set04Name set04NoArg:0,1

Es verweist auf die Adresse raspgarten.fritz.box, die früher mal der IP 192.1682.199 zugeordnet war, jetzt aber auf 193.168.2.40 verweist. Wenn ich nun oben im Modul den Befehl set...still auslöse, passiert folgendes:
2019.08.11 21:47:00 5: Pikrellcam_Garage: set called with still
2019.08.11 21:47:00 5: Pikrellcam_Garage: set found option still in attribute set06Name
2019.08.11 21:47:00 4: Pikrellcam_Garage: set will now set still
2019.08.11 21:47:00 4: Pikrellcam_Garage: AddToQueue adds set06, initial queue len: 0
2019.08.11 21:47:00 5: Pikrellcam_Garage: AddToQueue adds type set06 to URL http://raspgarage.fritz.box/fifo_command.php?cmd=still, no data, no headers, retry 0
2019.08.11 21:47:00 5: Pikrellcam_Garage: HandleSendQueue called, qlen = 1
2019.08.11 21:47:00 5: Pikrellcam_Garage: Replace called for type set06, regex %%yesterday%%, mode expression, value strftime("%Y-%m-%d", localtime(time-60*60*24)) input:
2019.08.11 21:47:00 5: Pikrellcam_Garage: Replace called for type set06, regex %%year%%, mode expression, value ( localtime(time-31*60*60*24) )[5]+1900 input:
2019.08.11 21:47:00 5: Pikrellcam_Garage: Replace called for type set06, regex %%last_month%%, mode text, value ( ( localtime() )[4] || 12 ) input:
2019.08.11 21:47:00 5: Pikrellcam_Garage: Replace called for type set06, regex %%yesterday%%, mode expression, value strftime("%Y-%m-%d", localtime(time-60*60*24)) input:
2019.08.11 21:47:00 5: Pikrellcam_Garage: Replace called for type set06, regex %%year%%, mode expression, value ( localtime(time-31*60*60*24) )[5]+1900 input:
2019.08.11 21:47:00 5: Pikrellcam_Garage: Replace called for type set06, regex %%last_month%%, mode text, value ( ( localtime() )[4] || 12 ) input:
2019.08.11 21:47:00 5: Pikrellcam_Garage: Replace called for type set06, regex %%yesterday%%, mode expression, value strftime("%Y-%m-%d", localtime(time-60*60*24)) input: http://raspgarage.fritz.box/fifo_command.php?cmd=still
2019.08.11 21:47:00 5: Pikrellcam_Garage: Replace called for type set06, regex %%year%%, mode expression, value ( localtime(time-31*60*60*24) )[5]+1900 input: http://raspgarage.fritz.box/fifo_command.php?cmd=still
2019.08.11 21:47:00 5: Pikrellcam_Garage: Replace called for type set06, regex %%last_month%%, mode text, value ( ( localtime() )[4] || 12 ) input: http://raspgarage.fritz.box/fifo_command.php?cmd=still
2019.08.11 21:47:00 4: Pikrellcam_Garage: HandleSendQueue sends request type set06 to URL http://raspgarage.fritz.box/fifo_command.php?cmd=still, No Data, No Header
timeout 2
2019.08.11 21:47:00 5: HttpUtils url=http://raspgarage.fritz.box/fifo_command.php?cmd=still
2019.08.11 21:47:00 4: IP: raspgarage.fritz.box -> 192.168.2.199
2019.08.11 21:47:02 3: Pikrellcam_Garage: Read callback: Error: connect to http://raspgarage.fritz.box:80 timed out
2019.08.11 21:47:02 4: Pikrellcam_Garage: Read callback: request type was set06 retry 0, body empty
2019.08.11 21:47:02 5: Pikrellcam_Garage: ExtractSid called, context set, num 06
2019.08.11 21:47:02 4: Pikrellcam_Garage: CheckAuth decided no authentication r
Wieso erscheint da die ursprüngliche IP und wie kann ich die löschen? Nicht mal in der fhem.cfg habe ich die Adresse 192.168.2.199 gefunden, wo hat er die denn her?!
FHEM 5.9 auf RaspPi3 (Raspbian:  4.14.34-v7+ ); Perl: v5.20.2
SIGNALduino (433 MHz) und HM-UART (868 MHz)
wenige Brennenstuhl-IT, Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann

Offline amenomade

  • Hero Member
  • *****
  • Beiträge: 4862
Antw:Neue Version von HTTPMOD mit neuen Features zum Testen
« Antwort #560 am: 12 August 2019, 00:08:32 »
Das hat er noch in irgendwelchem DNS gefunden.
Was hast Du im Device "global" für DNS Parameter?
FHEM 5.9 Pi 3, EchoDot, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, und HM Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

Offline andies

  • Hero Member
  • *****
  • Beiträge: 2350
Antw:Neue Version von HTTPMOD mit neuen Features zum Testen
« Antwort #561 am: 12 August 2019, 06:43:26 »
Was hast Du im Device "global" für DNS Parameter?
Ah, die Fritzbox:
Internals:
   ...
   READINGS:
Attributes
   dnsServer  192.168.2.1
Da war unter den nicht genutzten Geräten di alte IP hinterlegt. Ich denke, das war es; danke!
FHEM 5.9 auf RaspPi3 (Raspbian:  4.14.34-v7+ ); Perl: v5.20.2
SIGNALduino (433 MHz) und HM-UART (868 MHz)
wenige Brennenstuhl-IT, Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann

Offline dr4g0n

  • New Member
  • *
  • Beiträge: 31
Antw:Neue Version von HTTPMOD mit neuen Features zum Testen
« Antwort #562 am: 14 August 2019, 00:27:57 »
hallo zusammen,

ich habe ein kleines Problem mit meiner FHEM installation und vermute HTTPMod als Übeltäter (oder etwas darunter).
Es lief alles ohne Probleme und von eben auf jetzt, bekomme ich nurnoch timeouts und empty responses.

Die Tankstellen Devices sind HTTPMOD requests die eine URL triggern, die Huebridge ist über das HueAddon eingebunden (nutzt das Addon auch HTTPMOD?)
Auf dem Server selbst, kann ich mit "curl xxxx" die Daten abrufen und alles funktioniert, mir ist aufgefallen dass in dem einem TankstellenDevice die HTTP Response steht und dort sehe ich nur kryptische Zeichen (SSL Verschlüsselt?)
Wenn ich alle meine HTTPMOD + HUEBridge deaktiviere, dann kann ich FHEM wieder halbwegs bedienen.
Ich habe DBLog am laufen und auf dem selben Server läuft ein Grafana, die Auswertung (last 30Days ) mit Grafana bekomme ich noch in Sekunden.
Im HTOP auf dem Debian-FHEM-Host sieht alles gut aus, CPULast bei 3-5%

Hardware: Debian + FHEM + Grafana -> VM mit 2GB Ram (500MB inuse) und 4 Kernen (AMD Ryzen 1900), SSD Speicher
DBLog: Auf dem Host als MySQL (MariaDB) 32GB RAM, AMD Ryzen, SSD

Noch ein Merkwürdiger Logeintrag:
2019.08.14 00:42:21 1: Calendar Kalender: retrieval failed with error message <hidden>: Can't connect(2) to https://calendar.google.com:443:  SSL connect attempt failed
2019.08.14 00:42:21 1: Calendar Kalender: retrieved no or empty data

Hier das Log:

2019.08.14 00:20:44 2: HueBridge: http request failed: connect to http://Philips-hue:80 timed out
2019.08.14 00:20:44 2: HueBridge: http request failed: write to http://Philips-hue:80 timed out
2019.08.14 00:20:44 2: HueBridge: http request failed: read from http://Philips-hue:80 timed out
2019.08.14 00:20:44 2: HueBridge: http request failed: write to http://Philips-hue:80 timed out
2019.08.14 00:20:44 2: HueBridge: http request failed: read from http://Philips-hue:80 timed out
2019.08.14 00:20:44 2: HueBridge: http request failed: read from http://Philips-hue:80 timed out
2019.08.14 00:20:44 2: HueBridge: http request failed: read from http://Philips-hue:80 timed out
2019.08.14 00:21:00 2: HueBridge: http request failed: write to http://Philips-hue:80 timed out
2019.08.14 00:21:00 2: HueBridge: http request failed: read from http://Philips-hue:80 timed out
2019.08.14 00:21:00 3: Roborock: connection timeout
2019.08.14 00:21:00 2: HueBridge: http request failed: write to http://Philips-hue:80 timed out
2019.08.14 00:21:00 2: HueBridge: http request failed: read from http://Philips-hue:80 timed out
2019.08.14 00:21:10 2: HueBridge: http request failed: read from http://Philips-hue:80 timed out
2019.08.14 00:21:10 2: HueBridge: http request failed: read from http://Philips-hue:80 timed out
2019.08.14 00:21:10 2: HueBridge: http request failed: write to http://Philips-hue:80 timed out
2019.08.14 00:21:10 2: HueBridge: http request failed: http://Philips-hue/api/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/sensors/3: empty answer received
2019.08.14 00:21:16 2: HueBridge: http request failed: http://Philips-hue/api/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/sensors/8: empty answer received
2019.08.14 00:21:16 2: HueBridge: http request failed: http://Philips-hue/api/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/sensors/3: empty answer received
2019.08.14 00:21:16 2: HueBridge: http request failed: http://Philips-hue/api/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/sensors/10: empty answer received
2019.08.14 00:21:16 2: HueBridge: http request failed: http://Philips-hue/api/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/lights: empty answer received
2019.08.14 00:21:26 2: HueBridge: http request failed: read from http://Philips-hue:80 timed out
2019.08.14 00:21:26 2: HueBridge: http request failed: read from http://Philips-hue:80 timed out
2019.08.14 00:21:26 2: HueBridge: http request failed: read from http://Philips-hue:80 timed out
2019.08.14 00:21:26 2: HueBridge: http request failed: read from http://Philips-hue:80 timed out
2019.08.14 00:21:31 2: HueBridge: http request failed: http://Philips-hue/api/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/sensors/8: empty answer received
2019.08.14 00:21:31 2: HueBridge: http request failed: http://Philips-hue/api/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/lights: empty answer received
2019.08.14 00:21:47 2: HueBridge: http request failed: read from http://Philips-hue:80 timed out
2019.08.14 00:21:47 2: HueBridge: http request failed: read from http://Philips-hue:80 timed out
2019.08.14 00:21:47 2: HueBridge: http request failed: read from http://Philips-hue:80 timed out
2019.08.14 00:21:47 2: HueBridge: http request failed: read from http://Philips-hue:80 timed out
2019.08.14 00:21:47 2: HueBridge: http request failed: read from http://Philips-hue:80 timed out
2019.08.14 00:21:47 3: TankstelleHalchter: Read callback: Error: connect to https://www.clever-tanken.de:443 timed out
2019.08.14 00:21:47 3: TankstelleOil: Read callback: Error: connect to https://www.clever-tanken.de:443 timed out
2019.08.14 00:21:47 3: TankstelleHEMSZ: Read callback: Error: connect to https://www.clever-tanken.de:443 timed out
2019.08.14 00:21:47 3: TankstelleEdeka: Read callback: Error: connect to https://www.clever-tanken.de:443 timed out
2019.08.14 00:21:47 3: TankstelleARAL: Read callback: Error: connect to https://www.clever-tanken.de:443 timed out
2019.08.14 00:21:47 3: TankstelleREALBS: Read callback: Error: connect to https://www.clever-tanken.de:443 timed out
2019.08.14 00:21:47 3: TankstelleREALSZ: Read callback: Error: connect to https://www.clever-tanken.de:443 timed out
2019.08.14 00:21:47 3: TankstelleClean: Read callback: Error: connect to https://www.clever-tanken.de:443 timed out
2019.08.14 00:21:47 2: HueBridge: http request failed: http://Philips-hue/api/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/lights: empty answer received
2019.08.14 00:21:47 2: HueBridge: http request failed: http://Philips-hue/api/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/sensors/9: empty answer received
2019.08.14 00:21:47 2: HueBridge: http request failed: http://Philips-hue/api/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/sensors/10: empty answer received
2019.08.14 00:21:47 2: HueBridge: http request failed: http://Philips-hue/api/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/sensors/3: empty answer received

Und ein apptime max
name                                     function                               max    count      total  average   maxDly   avgDly TS Max call     param Max call
 MQTT2_FHEM_Server_10.0.0.126_49501       MQTT2_SERVER_Read                    20250        3   20252.29  6750.76     0.00     0.00 14.08. 00:29:28 HASH(MQTT2_FHEM_Server_10.0.0.126_49501)
 notify_PowerWattTotal                    notify_Exec                          10080       35   15293.34   436.95     0.00     0.00 14.08. 00:29:28 HASH(notify_PowerWattTotal); HASH(MQTT2_server)
 MQTT2_FHEM_Server_10.0.0.129_49565       MQTT2_SERVER_Read                     5399        4    5402.21  1350.55     0.00     0.00 14.08. 00:29:34 HASH(MQTT2_FHEM_Server_10.0.0.129_49565)
 MQTT2_FHEM_Server_10.0.0.155_49537       MQTT2_SERVER_Read                     5269        5    5275.07  1055.01     0.00     0.00 14.08. 00:29:08 HASH(MQTT2_FHEM_Server_10.0.0.155_49537)
 EnergyCurrent                            readingsGroup_Notify                  5048       47   20444.82   435.00     0.00     0.00 14.08. 00:29:13 HASH(EnergyCurrent); HASH(MQTT2_server)
 notify_PowerKWHTotal                     notify_Exec                           5016       35    5627.28   160.78     0.00     0.00 14.08. 00:29:18 HASH(notify_PowerKWHTotal); HASH(MQTT2_server)
 dblog                                    DbLog_Log                             5012       47   32711.56   695.99     0.00     0.00 14.08. 00:29:13 HASH(dblog); HASH(EnergyCurrent)
 MQTT2_FHEM_Server_10.0.0.189_49584       MQTT2_SERVER_Read                     1055        5    1057.97   211.59     0.00     0.00 14.08. 00:29:29 HASH(MQTT2_FHEM_Server_10.0.0.189_49584)
 MQTT2_FHEM_Server                        MQTT2_SERVER_Read                      427       10     745.78    74.58     0.00     0.00 14.08. 00:29:00 HASH(MQTT2_FHEM_Server)
 MQTT2_FHEM_Server_10.0.0.83_49519        MQTT2_SERVER_Read                      148        5     150.63    30.13     0.00     0.00 14.08. 00:29:35 HASH(MQTT2_FHEM_Server_10.0.0.83_49519)
 MQTT2_FHEM_Server_10.0.0.70_49582        MQTT2_SERVER_Read                       53        3      89.73    29.91     0.00     0.00 14.08. 00:28:56 HASH(MQTT2_FHEM_Server_10.0.0.70_49582)
 notify_emoncms_Sonoff_POWER              notify_Exec                             29       35     125.32     3.58     0.00     0.00 14.08. 00:29:08 HASH(notify_emoncms_Sonoff_POWER); HASH(MQTT2_tvschrank)
 notify_emoncms_sonoff_AM2301_Temperatur  notify_Exec                             22       35      58.59     1.67     0.00     0.00 14.08. 00:29:34 HASH(notify_emoncms_sonoff_AM2301_Temperatur); HASH(MQTT2_temp_keller)
 MQTT2_FHEM_Server_10.0.0.229_51795       MQTT2_SERVER_Read                       13        2      16.79     8.40     0.00     0.00 14.08. 00:29:28 HASH(MQTT2_FHEM_Server_10.0.0.229_51795)
 MQTT2_FHEM_Server_10.0.0.207_49500       MQTT2_SERVER_Read                        5        3       5.81     1.94     0.00     0.00 14.08. 00:28:55 HASH(MQTT2_FHEM_Server_10.0.0.207_49500)
 MQTT2_FHEM_Server_10.0.0.178_52648       MQTT2_SERVER_Read                        4        4       9.85     2.46     0.00     0.00 14.08. 00:28:55 HASH(MQTT2_FHEM_Server_10.0.0.178_52648)
 tmr-HUEBridge_GetUpdate                  HASH(0x5585bb3b8110)                     1        2       2.27     1.14  2128.75  1065.12 14.08. 00:28:55 HASH(HueBridge)
 tmr-HUEDevice_GetUpdate                  HASH(0x5585bb22b668)                     1        8      10.80     1.35  4357.65   591.88 14.08. 00:28:58 HASH(MotionTemp)
 WEB_127.0.0.1_47552                      FW_Notify                                1       47      18.04     0.38     0.00     0.00 14.08. 00:28:56 HASH(WEB_127.0.0.1_47552); HASH(MQTT2_lichterkette)
 MQTT2_FHEM_Server_10.0.0.146_49609       MQTT2_SERVER_Read                        1        4       4.07     1.02     0.00     0.00 14.08. 00:28:57 HASH(MQTT2_FHEM_Server_10.0.0.146_49609)
 MQTT2_FHEM_Server_10.0.0.199_49580       MQTT2_SERVER_Read                        1        5       2.45     0.49     0.00     0.00 14.08. 00:29:00 HASH(MQTT2_FHEM_Server_10.0.0.199_49580)
 WEB_10.0.0.160_54737                     FW_Read                                  1        1       1.30     1.30     0.00     0.00 14.08. 00:28:55 HASH(WEB_10.0.0.160_54737)
 MQTT2_FHEM_Server_10.0.0.33_49553        MQTT2_SERVER_Read                        1        3       2.58     0.86     0.00     0.00 14.08. 00:28:58 HASH(MQTT2_FHEM_Server_10.0.0.33_49553)
 tmr-HUEDevice_GetUpdate                  HASH(0x5585bb228510)                     1        8       6.51     0.81  4357.26   591.92 14.08. 00:29:01 HASH(MotionBright)
 tmr-HUEDevice_GetUpdate                  HASH(0x5585bd5c6a80)                     0        8       6.18     0.77  4357.01   591.98 14.08. 00:28:58 HASH(HueBueroSchalter)
 tmr-HUEDevice_GetUpdate                  HASH(0x5585bb178e98)                     0        8       5.80     0.73  4356.17   591.98 14.08. 00:29:00 HASH(Motion)
 nice-__ANON__                                                                     0       10       5.93     0.59     0.11     0.05 14.08. 00:28:58 (undef)
 tmr-__ANON__                             _                                        0        9       4.30     0.48     1.98     1.18 14.08. 00:28:58 (undef)
 tmr-ENIGMA2_GetStatus                    HASH(0x5585ba263e10)                     0        1       0.63     0.63  3078.73  3078.73 14.08. 00:29:08 HASH(Ultimo)
 notify_PowerKWHTotalTodayCost            notify_Exec                              0        7       1.94     0.28     0.00     0.00 14.08. 00:29:29 HASH(notify_PowerKWHTotalTodayCost); HASH(MQTT2_TotalPower)
 MQTT2_lichterkette                       MQTT2_DEVICE_Set                         0        2       0.50     0.25     0.00     0.00 14.08. 00:28:56 HASH(MQTT2_lichterkette); MQTT2_lichterkette; ?
 WEB                                      FW_Read                                  0        2       0.60     0.30     0.00     0.00 14.08. 00:28:55 HASH(WEB)
 tmr-HTTPMOD_GetUpdate                    update                                   0        3       0.53     0.18  1006.13   336.21 14.08. 00:28:57 update:emoncms
 tmr-MQTT2_SERVER_keepaliveChecker        HASH(0x5585bb22bea8)                     0        2       0.24     0.12  2127.63  1065.20 14.08. 00:28:55 HASH(MQTT2_FHEM_Server)
 MQTT2_schreibtisch                       MQTT2_DEVICE_Set                         0        1       0.15     0.15     0.00     0.00 14.08. 00:29:34 HASH(MQTT2_schreibtisch); MQTT2_schreibtisch; ?
 MQTT2_buerotv                            MQTT2_DEVICE_Set                         0        1       0.15     0.15     0.00     0.00 14.08. 00:29:29 HASH(MQTT2_buerotv); MQTT2_buerotv; ?
 MQTT2_server                             MQTT2_DEVICE_Set                         0        1       0.15     0.15     0.00     0.00 14.08. 00:29:28 HASH(MQTT2_server); MQTT2_server; ?
 MQTT2_tvschrank                          MQTT2_DEVICE_Set                         0        1       0.15     0.15     0.00     0.00 14.08. 00:29:08 HASH(MQTT2_tvschrank); MQTT2_tvschrank; ?
 MQTT2_buero_schrank                      MQTT2_DEVICE_Set                         0        1       0.11     0.11     0.00     0.00 14.08. 00:28:55 HASH(MQTT2_buero_schrank); MQTT2_buero_schrank; ?
 MQTT2_McLighting_Flur                    MQTT2_DEVICE_Set                         0        8       0.54     0.07     0.00     0.00 14.08. 00:28:57 HASH(MQTT2_McLighting_Flur); MQTT2_McLighting_Flur; ?
 FileLog_LCDBacklight                     FileLog_Log                              0       47       2.03     0.04     0.00     0.00 14.08. 00:28:55 HASH(FileLog_LCDBacklight); HASH(MQTT2_FHEM_Server)
« Letzte Änderung: 14 August 2019, 00:43:30 von dr4g0n »

Offline amenomade

  • Hero Member
  • *****
  • Beiträge: 4862
Antw:Neue Version von HTTPMOD mit neuen Features zum Testen
« Antwort #563 am: 14 August 2019, 01:20:30 »
Scheint ein allgemeines Netzwerkproblem zu sein. Kannst Du clever-tanken.de aus einer Konsole anpingen?
FHEM 5.9 Pi 3, EchoDot, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, und HM Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

Offline dr4g0n

  • New Member
  • *
  • Beiträge: 31
Antw:Neue Version von HTTPMOD mit neuen Features zum Testen
« Antwort #564 am: 14 August 2019, 08:14:06 »
in der Konsole funktioniert alles. Curl / Ping funktionieren bei allen Devices, auch die Philips-Hue URL liefert Daten zurück.

Offline dr4g0n

  • New Member
  • *
  • Beiträge: 31
Antw:Neue Version von HTTPMOD mit neuen Features zum Testen
« Antwort #565 am: 14 August 2019, 08:44:18 »
Ich habe gerade nochmal das Vodafone Modem neugestartet, jetzt schein wieder alles zu laufen. =)
Finde es aber dennoch komisch, dass auch lokale HTTP Aufrufe auf einen Timeout gelaufen sind.

Offline frank

  • Hero Member
  • *****
  • Beiträge: 7951
Antw:Neue Version von HTTPMOD mit neuen Features zum Testen
« Antwort #566 am: 14 August 2019, 09:26:49 »
Zitat
Finde es aber dennoch komisch, dass auch lokale HTTP Aufrufe auf einen Timeout gelaufen sind.
hast du attr global dnsServer gesetzt?
wenn nicht, solltest du es tun.

bei dir ist scheinbar auch viel los im netzwerk.
vielleicht auch mal ein wenig "entschlacken".

also: events minimieren, requests minimieren und zb mit attr alignTime bei httpmod die requests "entzerren".
FHEM: 5.8(SVN) => Pi3(jessie)
IO: CUL433_V3.3(1.00.01B53)|CUL868_V3.3(1.58)|HMLAN(0.965)|HMUSB2(0.967)|HMUART(1.4.1)
CUL_HM: CC-TC|CC-VD|SEC-SD|SEC-SC|SEC-RHS|Sw1PBU-FM|Sw1-FM|Dim1TPBU-FM|Dim1T-FM|ES-PMSw1-Pl
IT: ITZ500|ITT1500|ITR1500|GRR3500

Offline andies

  • Hero Member
  • *****
  • Beiträge: 2350
Antw:Neue Version von HTTPMOD mit neuen Features zum Testen
« Antwort #567 am: 28 August 2019, 21:49:35 »
Eine Frage zu HTTPMOD. Ich dachte immer, ich könnte in so einer Konstruktion
attr <device> replacement01Mode expression
attr <device> replacement01Regex %%yesterday%%
attr <device> replacement01Value strftime("%Y-%m-%d", localtime(time-60*60*24))
Perl-expressions nehmen. Das geht aber nicht.

Ich habe das nun so gelöst, dass ich als Modus "Text" wähle und mir mit MyUtils am Anfang des Tages die Werte ausrechnen lasse, auch ok:
attr <device> replacement01Mode text
attr <device> replacement01Regex %%yesterday%%
attr <device> replacement01Value 2019-08-27
Ich hatte aber zwischendurch vergessen, von Expression auf Text umzustellen und erhielt folgende Fehlermeldung:
Attr with invalid Expression (mode is expression) in attr <device> replacement01Value 2019-08-27: Illegal octal digit '8' at (eval 1889476) line 1, at end of line 
Bedeutet das irgendwas?
FHEM 5.9 auf RaspPi3 (Raspbian:  4.14.34-v7+ ); Perl: v5.20.2
SIGNALduino (433 MHz) und HM-UART (868 MHz)
wenige Brennenstuhl-IT, Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann

Offline andies

  • Hero Member
  • *****
  • Beiträge: 2350
Antw:Neue Version von HTTPMOD mit neuen Features zum Testen
« Antwort #568 am: 28 August 2019, 22:10:23 »
Ich erläutere nochmal, wieso das nicht geht. Hier meine Einträge im Logfile:
2019.08.28 21:03:29 5: Pikrellcam: ExtractSid called, context set, num 05
2019.08.28 21:03:29 4: Pikrellcam: CheckAuth decided no authentication required
2019.08.28 21:07:39 5: Pikrellcam: set called with delete_last_month
2019.08.28 21:07:39 5: Pikrellcam: set found option delete_last_month in attribute set05Name
2019.08.28 21:07:39 4: Pikrellcam: set will now set delete_last_month
2019.08.28 21:07:39 4: Pikrellcam: AddToQueue adds set05, initial queue len: 0
2019.08.28 21:07:39 5: Pikrellcam: AddToQueue adds type set05 to URL http://rasp.fritz.box/media-archive.php?mode=archive&type=videos&year=%%year%%&m0=%%last_month%%&d0=1&m1=%%last_month%%&d1=31&delete_all, no data, no headers, retry 0
2019.08.28 21:07:39 5: Pikrellcam: HandleSendQueue called, qlen = 1
2019.08.28 21:07:39 5: Pikrellcam: Replace called for type set05, regex %%yesterday%%, mode expression, value {strftime("%Y-%m-%d", localtime(time-60*60*24))} input:
2019.08.28 21:07:39 5: Pikrellcam: Replace called for type set05, regex %%year%%, mode expression, value {( localtime(time-31*60*60*24) )[5]+1900} input:
2019.08.28 21:07:39 5: Pikrellcam: Replace called for type set05, regex %%last_month%%, mode text, value {( ( localtime() )[4] || 12 )} input:
2019.08.28 21:07:39 5: Pikrellcam: Replace called for type set05, regex %%yesterday%%, mode expression, value {strftime("%Y-%m-%d", localtime(time-60*60*24))} input:
2019.08.28 21:07:39 5: Pikrellcam: Replace called for type set05, regex %%year%%, mode expression, value {( localtime(time-31*60*60*24) )[5]+1900} input:
2019.08.28 21:07:39 5: Pikrellcam: Replace called for type set05, regex %%last_month%%, mode text, value {( ( localtime() )[4] || 12 )} input:
2019.08.28 21:07:39 5: Pikrellcam: Replace called for type set05, regex %%yesterday%%, mode expression, value {strftime("%Y-%m-%d", localtime(time-60*60*24))} input: http://rasp.fritz.box/media-archive.php?mode=archive&type=videos&year=%%year%%&m0=%%last_month%%&d0=1&m1=%%last_month%%&d1=31&delete_all
2019.08.28 21:07:39 5: Pikrellcam: Replace called for type set05, regex %%year%%, mode expression, value {( localtime(time-31*60*60*24) )[5]+1900} input: http://rasp.fritz.box/media-archive.php?mode=archive&type=videos&year=%%year%%&m0=%%last_month%%&d0=1&m1=%%last_month%%&d1=31&delete_all
2019.08.28 21:07:39 4: Pikrellcam: Replace: match for type set05, regex %%year%%, mode expression, value {( localtime(time-31*60*60*24) )[5]+1900}, input: http://rasp.fritz.box/media-archive.php?mode=archive&type=videos&year=%%year%%&m0=%%last_month%%&d0=1&m1=%%last_month%%&d1=31&delete_all, result is http://rasp.fritz.box/media-archive.php?mode=archive&type=videos&year=2019&m0=%%last_month%%&d0=1&m1=%%last_month%%&d1=31&delete_all
2019.08.28 21:07:39 5: Pikrellcam: Replace called for type set05, regex %%last_month%%, mode text, value {( ( localtime() )[4] || 12 )} input: http://rasp.fritz.box/media-archive.php?mode=archive&type=videos&year=2019&m0=%%last_month%%&d0=1&m1=%%last_month%%&d1=31&delete_all
2019.08.28 21:07:39 4: Pikrellcam: Replace: match for type set05, regex %%last_month%%, mode text, value {( ( localtime() )[4] || 12 )}, input: http://rasp.fritz.box/media-archive.php?mode=archive&type=videos&year=%%year%%&m0=%%last_month%%&d0=1&m1=%%last_month%%&d1=31&delete_all, result is http://rasp.fritz.box/media-archive.php?mode=archive&type=videos&year=2019&m0={( ( localtime() )[4] || 12 )}&d0=1&m1={( ( localtime() )[4] || 12 )}&d1=31&delete_all
2019.08.28 21:07:39 4: Pikrellcam: HandleSendQueue sends request type set05 to URL http://rasp.fritz.box/media-archive.php?mode=archive&type=videos&year=2019&m0={( ( localtime() )[4] || 12 )}&d0=1&m1={( ( localtime() )[4] || 12 )}&d1=31&delete_all, No Data, No Header
timeout 2
2019.08.28 21:07:39 5: HttpUtils url=http://rasp.fritz.box/media-archive.php?mode=archive&type=videos&year=2019&m0={( ( localtime() )[4] || 12 )}&d0=1&m1={( ( localtime() )[4] || 12 )}&d1=31&delete_all
2019.08.28 21:07:39 4: IP: rasp.fritz.box -> 192.168.2.30
2019.08.28 21:07:39 5: HttpUtils request header:
GET /media-archive.php?mode=archive&type=videos&year=2019&m0={( ( localtime() )[4] || 12 )}&d0=1&m1={( ( localtime() )[4] || 12 )}&d1=31&delete_all HTTP/1.0
Host: rasp.fritz.box
User-Agent: fhem
Accept-Encoding: gzip,deflate
Man sieht, dass der Befehl nicht aufgelöst wird.
FHEM 5.9 auf RaspPi3 (Raspbian:  4.14.34-v7+ ); Perl: v5.20.2
SIGNALduino (433 MHz) und HM-UART (868 MHz)
wenige Brennenstuhl-IT, Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann

Offline amenomade

  • Hero Member
  • *****
  • Beiträge: 4862
Antw:Neue Version von HTTPMOD mit neuen Features zum Testen
« Antwort #569 am: 29 August 2019, 01:11:08 »
Das hat aber für %%year%% funktioniert, oder?

Kann man alle deine replacementXX Readings sehen?
FHEM 5.9 Pi 3, EchoDot, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, und HM Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus