Hi All,
I'm running HS3Pro for years on a windows machine with many own scripts. I'm now migrating to Linux on a Raspberry Pi 4. Most is working, but I'm still struggling with a couple of scripts which I don't get working:
HS.Launch
I don't get hs.launch working. I try:
hs.launch("\home\pi\scripts\blb_test.sh","","\home\pi\script s",0)
It should launch blb_test.sh script, starting in directory \home\pi\scripts but it does nothing.
How can i get hs.launch working on linux?
Posting to website
I'm posting gas meter reading to mindergas.nl via:
DIM s, xmlhttp
xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.setOption (2, 13056)
xmlhttp.Open ("POST", "https://www.mindergas.nl/api/gas_meter_readings", False)
'xmlhttp.setRequestHeader ("Content-Type", "application/json")
xmlhttp.setRequestHeader ("AUTH-TOKEN", "yyyyyyyyyyyyyyyyyyyy")
s = xmlhttp.send (S1_upl)
xmlhttp = Nothing
Only the line xmlhttp = CreateObject("MSXML2.ServerXMLHTTP") give already errors.
How can I do a POST on linux with more than 1 header (with 1 is possible via hs.URLAction)?
a successful POTS via curl:
curl -v -H "Content-Type:application/json" -H "AUTH-TOKEN:<authentication_token>" -d "{ "date": "<jjjj-mm-dd>", "reading": <meter_reading> }" https://www.mindergas.nl/api/gas_meter_readings
I tried to do work-around via hs.launch with curl but as mentioned above I don't get hs.launch working as well...
I'm running HS3Pro for years on a windows machine with many own scripts. I'm now migrating to Linux on a Raspberry Pi 4. Most is working, but I'm still struggling with a couple of scripts which I don't get working:
HS.Launch
I don't get hs.launch working. I try:
hs.launch("\home\pi\scripts\blb_test.sh","","\home\pi\script s",0)
It should launch blb_test.sh script, starting in directory \home\pi\scripts but it does nothing.
How can i get hs.launch working on linux?
Posting to website
I'm posting gas meter reading to mindergas.nl via:
DIM s, xmlhttp
xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.setOption (2, 13056)
xmlhttp.Open ("POST", "https://www.mindergas.nl/api/gas_meter_readings", False)
'xmlhttp.setRequestHeader ("Content-Type", "application/json")
xmlhttp.setRequestHeader ("AUTH-TOKEN", "yyyyyyyyyyyyyyyyyyyy")
s = xmlhttp.send (S1_upl)
xmlhttp = Nothing
Only the line xmlhttp = CreateObject("MSXML2.ServerXMLHTTP") give already errors.
How can I do a POST on linux with more than 1 header (with 1 is possible via hs.URLAction)?
a successful POTS via curl:
curl -v -H "Content-Type:application/json" -H "AUTH-TOKEN:<authentication_token>" -d "{ "date": "<jjjj-mm-dd>", "reading": <meter_reading> }" https://www.mindergas.nl/api/gas_meter_readings
I tried to do work-around via hs.launch with curl but as mentioned above I don't get hs.launch working as well...
Comment