FHEM Forum

FHEM => Anfängerfragen => Thema gestartet von: Kellerkind86 am 14 Oktober 2021, 19:11:50

Titel: Was mache ich falsch ? Spritpreismonitor
Beitrag von: Kellerkind86 am 14 Oktober 2021, 19:11:50
Hallo,
Was mache ich falsch oder funktioniert das einfach nicht mehr ?
bekomme keine readings geliefert.

Internals:
   BUSY       0
   CFGFN     
   DEF        http://www.clever-tanken.de/tankstelle_details/23162 600
   FUUID      61685f92-f33f-153e-8607-c515bc6ad536906f
   Interval   600
   MainURL    http://www.clever-tanken.de/tankstelle_details/23162
   ModuleVersion 4.1.10 - 6.7.2021
   NAME       Tankstelle_STAR_Gillrath
   NOTIFYDEV  global
   NR         55465
   NTFY_ORDER 50-TankstelleOWM
   STATE      Diesel: 0.00 € - Super: 0.00 € - E10: 0.00 €
   TYPE       HTTPMOD
   value     
   CompiledRegexes:
   HTTPCookieHash:
     csrftoken;:
       Name       csrftoken
       Options    expires=Thu, 13-Oct-2022 16:49:25 GMT; Max-Age=31449600; Path=/
       Path       
       Value      JsQAcIH3SmbGeueaqZVRpiB1glnya1sLHxkds9NyKAhHlzy5dZkxaGyGycXcyLEF
   HttpUtils:
     NAME       
     addr       https://www.clever-tanken.de:443
     auth       0
     code       200
     compress   1
     conn       
     data       
     displayurl https://www.clever-tanken.de/tankstelle_details/23162
     header     
     host       www.clever-tanken.de
     httpheader HTTP/1.1 200 OK
Date: Thu, 14 Oct 2021 16:49:25 GMT
Server: Apache/2.4.18 (Ubuntu)
Vary: Cookie,Accept-Encoding
Content-Encoding: gzip
Content-Type: text/html; charset=utf-8
Set-Cookie: csrftoken=JsQAcIH3SmbGeueaqZVRpiB1glnya1sLHxkds9NyKAhHlzy5dZkxaGyGycXcyLEF; expires=Thu, 13-Oct-2022 16:49:25 GMT; Max-Age=31449600; Path=/
Connection: close
     httpversion 1.0
     hu_blocking 0
     hu_filecount 1
     hu_port    443
     hu_portSfx
     ignoreredirects 1
     loglevel   4
     path       /tankstelle_details/23162
     protocol   https
     redirects  0
     timeout    2
     url        https://www.clever-tanken.de/tankstelle_details/23162
     sslargs:
   QUEUE:
   READINGS:
   REQUEST:
     context    reading
     data       
     header     
     ignoreredirects 0
     num        unknown
     priority   1
     retryCount 0
     type       update
     url        https://www.clever-tanken.de/tankstelle_details/23162
Attributes:
   enableControlSet 1 set TankstelleOWM upgradeAttributes
   group      Benzinpreis
   icon       gasoline
   reading01Name SuperE5
   reading01Regex <span>Super E5</span>[^0-9]+([0-9.]+)
   reading02Name Diesel
   reading02Regex <span>Diesel</span>[^0-9]+([0-9.]+)
   reading03Name SuperE10 attr TankstelleOWM readingsRegex_SuperE10 <span>Super E10</span>[^0-9]+([0-9.]+)
   room       Spritpreise
   stateFormat {sprintf("Diesel: %.2f € - Super: %.2f € - E10: %.2f €",ReadingsVal("TankstelleOWM","Diesel",0),ReadingsVal("TankstelleOWM","SuperE5",0),ReadingsVal("TankstelleOWM","SuperE10",0))}
   timeout    5
   userattr   


danke für die Hilfe
Titel: Antw:Was mache ich falsch ? Spritpreismonitor
Beitrag von: LuckyDay am 14 Oktober 2021, 19:48:59
deine Tanke tut.

aber deine attr wie z.b -->enableControlSet 1 set TankstelleOWM upgradeAttributes ist doch wild zusammenkopiert?


mal kurz als Test angelegt
defmod AVIA1 HTTPMOD http://www.clever-tanken.de/tankstelle_details/23162 1800
attr AVIA1 userattr enableControlSet showMatched stateFormat
attr AVIA1 alignTime 00:03
attr AVIA1 enableControlSet 1
attr AVIA1 reading01Name SuperP
attr AVIA1 reading01Regex "current-price-4">(\d.\d{2})
attr AVIA1 reading02Name Super
attr AVIA1 reading02Regex "current-price-3">(\d.\d{2})
attr AVIA1 reading03Name Diesel
attr AVIA1 reading03Regex "current-price-1">(\d.\d{2})
attr AVIA1 room Inet
attr AVIA1 showMatched 1
attr AVIA1 stateFormat SUPERPLUS SuperP € <br>SUPER Super € <br>DIESEL Diesel €

Titel: Antw:Was mache ich falsch ? Spritpreismonitor
Beitrag von: Kellerkind86 am 14 Oktober 2021, 19:52:51
mhmm..hab nachträglich den namen der tanke geändert.
versuche es nochmal danke
Titel: Antw:Was mache ich falsch ? Spritpreismonitor
Beitrag von: LuckyDay am 14 Oktober 2021, 20:10:11
stateFormat {sprintf("Diesel: %.2f € - Super: %.2f € - E10: %.2f €",ReadingsVal("TankstelleOWM","Diesel",0),ReadingsVal("TankstelleOWM","SuperE5",0),ReadingsVal("TankstelleOWM","SuperE10",0))}


dein stateFormat ist bei Namen ändern jetzt auch schrott!

wenn du nur 2 Stellen hinter dem Komma brauchst, so wie Ich
reicht meine Def wie oben komplet von mir gepostet, mache ich ja nicht zum Spass
Titel: Antw:Was mache ich falsch ? Spritpreismonitor
Beitrag von: Kellerkind86 am 14 Oktober 2021, 20:28:39
stimmt, danke.. bin auf der arbeit und meine vpn hat grad probleme.. werde ich morgen so übernehmen. vielen dank dafür