2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-04 05:16:45 +00:00

httpmod.template: regex updates on clever-tanken

git-svn-id: https://svn.fhem.de/fhem/trunk@20212 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Beta-User 2019-09-20 22:07:29 +00:00
parent ca9d284c63
commit 2855609e2c

View File

@ -24,15 +24,15 @@ filter:TYPE=HTTPMOD
desc: Get prices for a single gas station.<br>Define a HTTPMOD device like <br>defmod DEVICE HTTPMOD http://www.clever-tanken.de/tankstelle_details/29092 1800 <br>Change station ID to your needs <br><a href="https://forum.fhem.de/index.php/topic,94640.msg873905.html#msg873905">Source: Forum</a> desc: Get prices for a single gas station.<br>Define a HTTPMOD device like <br>defmod DEVICE HTTPMOD http://www.clever-tanken.de/tankstelle_details/29092 1800 <br>Change station ID to your needs <br><a href="https://forum.fhem.de/index.php/topic,94640.msg873905.html#msg873905">Source: Forum</a>
order: 10000 order: 10000
par:WHICHROOM;Actual room of the device, defaults to HTTPMOD; {AttrVal("DEVICE","room","HTTPMOD" )} par:WHICHROOM;Actual room of the device, defaults to HTTPMOD; {AttrVal("DEVICE","room","HTTPMOD" )}
attr DEVICE userattr reading01Name reading01Regex reading02Name reading02Regex reading03Name reading03Regex readingOExpr attr DEVICE userattr reading01Name reading01Regex reading02Name reading02Regex reading03Name reading03Regex reading04Name reading04Regex readingOExpr
attr DEVICE enableControlSet 1 attr DEVICE enableControlSet 1
attr DEVICE reading01Name Diesel attr DEVICE reading01Name Diesel
attr DEVICE reading01Regex "current-price-1">(\d.\d{2}) attr DEVICE reading01Regex <div class=\"price-type-name\">Diesel</div>[\S\s\r\n]*?<span id=\"current-price-\d+\">(\d.\d{2}</span>[\S\s\r\n]*?<sup id=\"suffix-price-\d\">[\d]+)</sup>
attr DEVICE reading02Name SuperE10 attr DEVICE reading02Name SuperE10
attr DEVICE reading02Regex "current-price-2">(\d.\d{2}) attr DEVICE reading02Regex <div class=\"price-type-name\">Super E10</div>[\S\s\r\n]*?<span id=\"current-price-\d+\">(\d.\d{2}</span>[\S\s\r\n]*?<sup id=\"suffix-price-\d\">[\d]+)</sup>
attr DEVICE reading03Name SuperE5 attr DEVICE reading03Name SuperE5
attr DEVICE reading03Regex "current-price-3">(\d.\d{2}) attr DEVICE reading03Regex <div class=\"price-type-name\">Super E5</div>[\S\s\r\n]*?<span id="current-price-\d+">(\d.\d{2}</span>[\S\s\r\n]*?<sup id=\"suffix-price-\d\">[\d]+)</sup>
attr DEVICE readingOExpr $val =~ tr/,/./;;$val attr DEVICE readingOExpr $val =~ s/<[\d\D]+>//;;;;$val
attr DEVICE stateFormat E5: SuperE5 € / E10: SuperE10 € / D: Diesel € attr DEVICE stateFormat E5: SuperE5 € / E10: SuperE10 € / D: Diesel €
attr DEVICE timeout 10 attr DEVICE timeout 10
attr DEVICE verbose 2 attr DEVICE verbose 2
@ -40,7 +40,7 @@ attr DEVICE room WHICHROOM
attr DEVICE model clever_tanken_single_station attr DEVICE model clever_tanken_single_station
#Station overview, one product, Forum: https://forum.fhem.de/index.php/topic,94640.msg873841.html#msg873841 #Station overview, one product, Forum: https://forum.fhem.de/index.php/topic,94640.msg873841.html#msg873841
name:A_01a_clever_tanken_multi_station name:clever_tanken_multi_station
filter:TYPE=HTTPMOD filter:TYPE=HTTPMOD
desc: Get prices for one product as environment search.<br>Define a HTTPMOD device like <br>defmod DEVICE HTTPMOD https://www.clever-tanken.de/tankstelle_liste?spritsorte=3&r=10&ort=52152 1800 <br>Change PLZ, radius and product to your needs <br><a href="https://forum.fhem.de/index.php/topic,94640.msg873841.html#msg873841">Source: Forum</a> desc: Get prices for one product as environment search.<br>Define a HTTPMOD device like <br>defmod DEVICE HTTPMOD https://www.clever-tanken.de/tankstelle_liste?spritsorte=3&r=10&ort=52152 1800 <br>Change PLZ, radius and product to your needs <br><a href="https://forum.fhem.de/index.php/topic,94640.msg873841.html#msg873841">Source: Forum</a>
order: 100001 order: 100001
@ -49,7 +49,7 @@ attr DEVICE reading01Name Tankstellenname
attr DEVICE reading01Regex <span class=\"fuel-station-location-name\">([^<]+)<\/span> attr DEVICE reading01Regex <span class=\"fuel-station-location-name\">([^<]+)<\/span>
attr DEVICE reading01RegOpt g attr DEVICE reading01RegOpt g
attr DEVICE reading02Name Preis attr DEVICE reading02Name Preis
attr DEVICE reading02Regex <div class=\"price-text price text-color-ct-blue\">.*(\d.\d{2})<sup> attr DEVICE reading02Regex <div class=\"price-text price text-color-ct-blue\">(?>\s*)(\d.\d+).*
attr DEVICE reading02RegOpt g attr DEVICE reading02RegOpt g
attr DEVICE reading03Name Strasse attr DEVICE reading03Name Strasse
attr DEVICE reading03Regex <div class=\"fuel-station-location-street\">(.*)<\/div> attr DEVICE reading03Regex <div class=\"fuel-station-location-street\">(.*)<\/div>
@ -58,10 +58,12 @@ attr DEVICE reading04Name Ort
attr DEVICE reading04Regex <div class=\"fuel-station-location-city\"> (.*)<\/div> attr DEVICE reading04Regex <div class=\"fuel-station-location-city\"> (.*)<\/div>
attr DEVICE reading04RegOpt g attr DEVICE reading04RegOpt g
attr DEVICE reading05Name Entfernung attr DEVICE reading05Name Entfernung
attr DEVICE reading05Regex <div class=\"fuel-station-location-distance d-flex justify-content-end\">.*<span>([^<]+)<\/span> attr DEVICE reading05Regex <div class=\"fuel-station-location-distance d-flex justify-content-end\">(?>\s*)<span>(\d.\d) km<\/span>
attr DEVICE reading05RegOpt g attr DEVICE reading05RegOpt g
attr DEVICE readingMaxAge 10
attr DEVICE readingMaxAgeReplacementMode delete
attr DEVICE room WHICHROOM attr DEVICE room WHICHROOM
attr DEVICE model a_clever_tanken_multi_station attr DEVICE model clever_tanken_multi_station
#German weather warnings from DWD, Forum: https://forum.fhem.de/index.php/topic,45176.msg905879.html#msg905879 #German weather warnings from DWD, Forum: https://forum.fhem.de/index.php/topic,45176.msg905879.html#msg905879
name:DWD_weather_warnings name:DWD_weather_warnings
@ -127,7 +129,7 @@ attr DEVICE model A_02m_ORF_weather
#Geschwindigkeitsüberwachung, Forum: https://forum.fhem.de/index.php/topic,90014.msg824805.html#msg824805 #Geschwindigkeitsüberwachung, Forum: https://forum.fhem.de/index.php/topic,90014.msg824805.html#msg824805
name:A_03a_blitzer name:A_03a_blitzer
filter:TYPE=HTTPMOD filter:TYPE=HTTPMOD
desc: Get austrian weather.<br>Define a HTTPMOD device like <br>defmod DEVICE HTTPMOD https://cdn2.atudo.net/api/1.0/vl.php?type=0,1,2,3,4,5,6&box=52.xxxxxx,8.xxxxxx,53.xxxxxx,9.xxxxxx 0 <br>Change city to your needs <br><a href="https://forum.fhem.de/index.php/topic,90014.msg824805.html#msg824805">Source: Forum</a> desc: Get info about local velocity controls.<br>Define a HTTPMOD device like <br>defmod DEVICE HTTPMOD https://cdn2.atudo.net/api/1.0/vl.php?type=0,1,2,3,4,5,6&box=52.xxxxxx,8.xxxxxx,53.xxxxxx,9.xxxxxx 0 <br>Change city to your needs <br><a href="https://forum.fhem.de/index.php/topic,90014.msg824805.html#msg824805">Source: Forum</a>
par:WHICHROOM;Actual room of the device, defaults to HTTPMOD; {AttrVal("DEVICE","room","HTTPMOD" )} par:WHICHROOM;Actual room of the device, defaults to HTTPMOD; {AttrVal("DEVICE","room","HTTPMOD" )}
attr DEVICE userattr getData getHeader1 getHeader2 getURL reading01DeleteIfUnmatched reading01JSON reading01Name reading01Regex reading02Name reading02RegOpt reading02Regex reading03JSON reading03Name readingEncode requestHeader1 requestHeader2 setParseResponse:0,1 attr DEVICE userattr getData getHeader1 getHeader2 getURL reading01DeleteIfUnmatched reading01JSON reading01Name reading01Regex reading02Name reading02RegOpt reading02Regex reading03JSON reading03Name readingEncode requestHeader1 requestHeader2 setParseResponse:0,1
attr DEVICE enableControlSet 1 attr DEVICE enableControlSet 1