Announcement

Collapse
No announcement yet.

.vb scripts not working on linux (hs.launch and POST to website

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    .vb scripts not working on linux (hs.launch and POST to website

    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...

    #2
    Guessing here - try changing all the backslash path component separators to forward slash "/". Backslash isn't valid for the Linux filesystem.

    Comment


      #3
      Also linux is case sensitive. HomeSeer and homeseer are two different directories. I had to add alot of symbolic links to alleviate some of this.

      This is what I added symbolic links for.

      sudo ln -s /opt/homeseer /opt/HomeSeer
      sudo ln -s /opt/HomeSeer/Bin /opt/HomeSeer/bin
      sudo ln -s /opt/HomeSeer/config /opt/HomeSeer/Config
      sudo ln -s /opt/HomeSeer/configbackup /opt/HomeSeer/ConfigBackup
      sudo ln -s /opt/HomeSeer/data /opt/HomeSeer/Data
      sudo ln -s /opt/HomeSeer/docs /opt/HomeSeer/Docs
      sudo ln -s /opt/HomeSeer/grammer /opt/HomeSeer/Grammer
      sudo ln -s /opt/HomeSeer/Html /opt/HomeSeer/html
      sudo ln -s /opt/HomeSeer/logs /opt/HomeSeer/Logs
      sudo ln -s /opt/HomeSeer/media /opt/HomeSeer/Media
      sudo ln -s /opt/HomeSeer/Mochad /opt/HomeSeer/mochad
      sudo ln -s /opt/HomeSeer/Scripts /opt/HomeSeer/scripts
      sudo ln -s /opt/HomeSeer/Updates3 /opt/HomeSeer/updates3
      sudo ln -s /opt/HomeSeer/Wave_Files /opt/HomeSeer/wave_files
      sudo ln -s /opt/HomeSeer/html/opt /opt
      sudo ln -s /opt/HomeSeer/html/Images /opt/HomeSeer/html/images
      sudo ln -s /opt/HomeSeer/html/images/SqueezeBox/Status/next.png /opt/HomeSeer/html/images/HomeSeer/contemporary/next.png
      sudo ln -s /opt/HomeSeer/html/images/SqueezeBox/Status/pause.png /opt/HomeSeer/html/images/HomeSeer/contemporary/pause.png
      sudo ln -s /opt/HomeSeer/html/images/SqueezeBox/Status/play.png /opt/HomeSeer/html/images/HomeSeer/contemporary/play.png
      sudo ln -s /opt/HomeSeer/html/images/SqueezeBox/Status/previous.png /opt/HomeSeer/html/images/HomeSeer/contemporary/previous.png
      sudo ln -s /opt/HomeSeer/html/images/SqueezeBox/Status/stop.png /opt/HomeSeer/html/images/HomeSeer/contemporary/stop.png
      sudo ln -s /opt/HomeSeer/html/images/SqueezeBox/Status/volumedown.png /opt/HomeSeer/html/images/HomeSeer/contemporary/volumedown.png
      sudo ln -s /opt/HomeSeer/html/images/SqueezeBox/Status/volumeup.png /opt/HomeSeer/html/images/HomeSeer/contemporary/volumeup.png
      sudo ln -s /opt/HomeSeer/html/images/Alert /opt/HomeSeer/html/images/alert
      sudo ln -s /opt/HomeSeer/html/images/Black /opt/HomeSeer/html/images/black
      sudo ln -s /opt/HomeSeer/html/images/Checkbox /opt/HomeSeer/html/images/checkbox
      sudo ln -s /opt/HomeSeer/html/images/clipart /opt/HomeSeer/html/images/Clipart
      sudo ln -s /opt/HomeSeer/html/images/Default /opt/HomeSeer/html/images/default
      sudo ln -s /opt/HomeSeer/html/images/devices /opt/HomeSeer/html/images/Devices
      sudo ln -s /opt/HomeSeer/html/images/energy /opt/HomeSeer/html/images/Energy
      sudo ln -s /opt/HomeSeer/html/images/HomeSeer /opt/HomeSeer/html/images/homeseer
      sudo ln -s /opt/HomeSeer/html/images/netflix /opt/HomeSeer/html/images/Netflix
      sudo ln -s /opt/HomeSeer/html/images/Overlay /opt/HomeSeer/html/images/overlay
      sudo ln -s /opt/HomeSeer/html/images/Restart /opt/HomeSeer/html/images/restart
      sudo ln -s /opt/HomeSeer/html/images/squeezebox /opt/HomeSeer/html/images/SqueezeBox

      This does not include stuff I have found where alarm.png errors in the log because it is looking for Alarm.png. I create the links as I find the errors.

      Comment

      Working...
      X