You lead me the path, with no definitive solution yet. Since my original post, I modified the html page in order to try to make dzvents understand it is JSON data.
Code: Select all
<html>
<head>
<meta http-equiv="content-type" content="application/json">
</head>
<body>
{"observations":[{"id_station":"Saint Pierre de Jards","realtime":{"date_releve_utc":"[actual_date0_puredate_utc]","heure_releve_utc":"[actual_date0_time_utc]","temperature":[actual_th1_temp_c]}}]}
</body>
</html>
However dzvents does not to read the meta tag, since it is still interpreted as non JSON.
Here is item output
Code: Select all
: ------ Start external script: meteo.lua: HTTPResponse: "meteohubResponse"
2020-05-02 08:02:00.634 Status: dzVents: Info: meteo script: {["headers"]={["Content-type"]="text/html
2020-05-02 08:02:00.634 "}, ["isVariable"]=false, ["statusCode"]=200, ["isJSON"]=false, ["protocol"]="HTTP/1.0", ["ok"]=true, ["isScene"]=false, ["isXML"]=false, ["isCustomEvent"]=false, ["trigger"]="meteohubResponse", ["isHardware"]=false, ["baseType"]="httpResponse", ["_contentType"]="text/html
2020-05-02 08:02:00.634 ", ["isSystem"]=false, ["statusText"]="OK", ["isSecurity"]=false, ["isDevice"]=false, ["data"]="<html>
2020-05-02 08:02:00.634 <head>
2020-05-02 08:02:00.634 <meta http-equiv="content-type" content="application/json">
2020-05-02 08:02:00.634 </head>
2020-05-02 08:02:00.634 <body>
2020-05-02 08:02:00.634 {"observations":[{"id_station":"Saint Pierre de Jards","realtime":{"date_releve_utc":"02.05.2020","heure_releve_utc":"06:02:00","temperature":11.1}}]}
2020-05-02 08:02:00.634 </body>
2020-05-02 08:02:00.634 </html>
2020-05-02 08:02:00.634 ", ["isTimer"]=false, ["callback"]="meteohubResponse", ["isHTTPResponse"]=true, ["isGroup"]=false}
Debian buster on NUC and three RPi with buster.