Hallo,
bis zum 08.08. hatte mein bisheriger regex in dem Device "gegriffen", jetzt hab ichs mal versuchsweise mit einem anderen versucht welcher laut regex1ü1 klappen sollte, das Device hängt aber immer noch und ich sehe den Fehler einfach nicht.
defmod hmod_sq_luckin HTTPMOD https://www.finanzen.net/aktien/luckin_coffee-aktie 600
attr hmod_sq_luckin alias Luckin ; ;
attr hmod_sq_luckin event-on-change-reading quote,win
attr hmod_sq_luckin reading01Name quote
attr hmod_sq_luckin reading01OExpr $val =~ s/\,/./g;; return $val;;
attr hmod_sq_luckin reading01Regex 10420439-v"[\w\W\n]*?(\d+\,\d+)
attr hmod_sq_luckin room Boerse
attr hmod_sq_luckin set01Local 1
attr hmod_sq_luckin set01Name number
attr hmod_sq_luckin set02Local 1
attr hmod_sq_luckin set02Name purchase
attr hmod_sq_luckin stateFormat <div style="text-align:left">Anzahl: number<br>Kaufpreis: purchase<br>Kurs: quote (percent %)<br>Gewinn: win</div>
attr hmod_sq_luckin userReadings win:quote:.* {usrquote($name,ReadingsNum($name,'number','0'),ReadingsNum($name,'purchase','0'))},\
percent:quote.* {usrpercent($name,ReadingsNum($name,'number','0'),ReadingsNum($name,'purchase','0'))}
attr hmod_sq_luckin webCmd reread
setstate hmod_sq_luckin <div style="text-align:left">Anzahl: 1<br>Kaufpreis: 0.01<br>Kurs: 14.18 (65.98 %)<br>Gewinn: 281.85</div>
setstate hmod_sq_luckin 2022-09-20 21:53:18 number 1
setstate hmod_sq_luckin 2022-08-08 10:14:34 percent 65.98
setstate hmod_sq_luckin 2022-09-20 21:55:19 purchase 0.01
setstate hmod_sq_luckin 2022-08-08 13:54:34 quote 14.18
setstate hmod_sq_luckin 2022-08-08 10:14:34 win 281.85
Sieht hier irgendwer was bei dem Device schief läuft ?
Gruß
Thomas
defmod hmod_sq_luckin HTTPMOD https://www.finanzen.net/aktien/luckin_coffee-aktie 600
attr hmod_sq_luckin reading01Regex snapshot__value-current realtime-push"><span>(\d+,\d+)
ergibt
setstate hmod_sq_luckin 2022-09-21 00:46:23 reading01 18,20
Danke.