Announcement

Collapse
No announcement yet.

Send http POST on commnd line in event?

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

    Send http POST on commnd line in event?

    Is there any way to POST this URL and the params in an event command line without having to create a script to do so?
    "http://192.168.1.99:5219/MCWS/v1/Playback/PlayPlaylist?Zone=-1&ZoneType=ID&Playlist=404046882"

    I have looked in the help and forums until my eyes are crossed. 😣 Any help would be appreciated.

    #2
    - At Action Choose Run a Script or Script Command
    - Check Immediate Command
    - Then SAVE. Otherwise you will not get the correct fields (Think this is a bug).
    - Edit.
    - At Command put: &hs.URLAction("http://192.168.1.99:5219/MCWS/v1/Playback/PlayPlaylist?Zone=-1&ZoneType=ID&Playlist=404046882", "GET", "", "")
    - Save.
    - Done
    Plugins I developed for HS4: Somfy Local, MiLight (LimitlessLED), Updates, Volvo (VoC), OpenTherm Gateway (OTGW)
    Running HS4 Pro on Windows 10 Pro on a Synology VM, with Node-RED running as a container.

    Comment


      #3
      Originally posted by Bernold View Post
      - At Action Choose Run a Script or Script Command
      - Check Immediate Command
      - Then SAVE. Otherwise you will not get the correct fields (Think this is a bug).
      - Edit.
      - At Command put: &hs.URLAction("http://192.168.1.99:5219/MCWS/v1/Playback/PlayPlaylist?Zone=-1&ZoneType=ID&Playlist=404046882", "GET", "", "")
      - Save.
      - Done
      Thanks, you da boss!

      Comment


        #4
        Thanks for this immediate script URL POST command. It works for me as well. Is there anyway I can pass a couple of HS3 device values to my POST either as an immediate script command or a script?

        Thanks

        Comment


          #5
          If you are using mcsMQTT plugin then you can use a file of all the endpoints that you want to post and send it via event action.

          Comment


            #6
            Thanks Michael. I need to learn how to use your plugin as it seems to be the solution to other items that I also wrestle with in this hobby...

            Comment

            Working...
            X