2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 03:06:37 +00:00

98_HTTPMOD: updated tests

git-svn-id: https://svn.fhem.de/fhem/trunk@23486 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
StefanStrobel 2021-01-07 13:07:42 +00:00
parent 84a1c425fb
commit 9aa9a8310c
2 changed files with 15 additions and 8 deletions

View File

@ -1,11 +1,18 @@
defmod GeoTest HTTPMOD none 0
attr GeoTest verbose 3
define GeoTest HTTPMOD none 0
attr GeoTest minSendDelay 0
attr GeoTest verbose 5
attr GeoTest enableControlSet 1
attr GeoTest get01Name Tag01
attr GeoTest get01Poll 1
attr GeoTest get01Regex (?s)Zeit auswählen<br>(?<Tag01_WochenTag>[A-Za-z]+).-.(?<Tag01_Datum>[0-9\.]{10}).*?<td>09:15<\/td><td>(?<Tag01_09Uhr>.*?)<\/td>.*?<td>12:15<\/td><td>(?<Tag01_12Uhr>.*?)<\/td>
attr GeoTest get01Replacement01Value {strftime("%d.%m.%Y", localtime( time))}
attr GeoTest getURL file://geocache-planer.de/CAL/anmeldung.php?date=%%date%%&CALID=XYZ
attr GeoTest replacement01Mode expression
attr GeoTest replacement01Regex %%date%%
attr GeoTest get01Name Tag01
attr GeoTest get01Poll 1
attr GeoTest get01Regex (?s)Zeit auswählen<br>(?<Tag01_WochenTag>[A-Za-z]+).-.(?<Tag01_Datum>[0-9\.]{10}).*?<td>09:15<\/td><td>(?<Tag01_09Uhr>.*?)<\/td>.*?<td>12:15<\/td><td>(?<Tag01_12Uhr>.*?)<\/td>
attr GeoTest getURL file://geocache-planer.de/CAL/anmeldung.php?date=%%date%%&CALID=XYZ
attr GeoTest get01Replacement01Value {strftime("%d.%m.%Y", localtime( time))}
attr GeoTest get02Name Test2
#attr GeoTest get02Replacement01Value {my $NAME = "GeoTest" ;;fhem("deletereading ".$NAME." message");;fhem("deletereading ".$NAME." auth.*");;my @chars=('a'..'z','A'..'Z','0'..'9'); my $r; foreach(1..16) {$r.=$chars[rand @chars];};; fhem("setreading ".$NAME." auth_randomString64 ".$r);; $r;;}
attr GeoTest get02Replacement01Value {my $NAME = "GeoTest" ;;fhem("deletereading ".$NAME." message");;fhem("deletereading ".$NAME." auth.*");;my @chars=('a'..'z','A'..'Z','0'..'9');; my $r;; foreach(1..16) {$r.=$chars[rand @chars];;};; fhem("setreading ".$NAME." auth_randomString64 ".$r);; $r;;}
attr GeoTest get02Poll 1

View File

@ -1,4 +1,4 @@
define H2 HTTPMOD file://t/FHEM/98_HTTPMOD/JSON 0
attr H2 verbose 3
attr H2 verbose 5
attr H2 get01Name TestGet
attr H2 get01Data Post Data for Test