Facility Control

 View Only
  • 1.  URL request from Dashboard

    Posted 05-03-2019 07:54

    Hello

     

    I have chip web relay controller. It triggered in this way:

    http://192.168.1.4/30000/00 : Relay-01 OFF
    http://192.168.1.4/30000/01 : Relay-01 ON
    http://192.168.1.4/30000/02 : Relay-02 OFF
    http://192.168.1.4/30000/03 : Relay-02 ON

    And so on. 

    I tried many combinations with HTTP POST, and HTTP Async Message.. But nothing happened. It shoul be an simple HTTP request i guess..

    If i insert dashboard <browser> component with that address, the relay is triggered.

    Is it possible to make that kind of calls in dashboard?

    In worst case - is it possible to execute powershell script from DB which will perform such a request? 

    That works for me from batch file:

    powershell.exe -noprofile -command "Invoke-WebRequest -uri http://192.168.1.4/30000/00"

     

    Thanks, 

     

    Alex



  • 2.  RE: URL request from Dashboard

    Posted 05-05-2019 21:58

    Ok, after a deep research on the forum, on page 12, i found the answer (and by the way a lot of another interestingtopics)

    Here is the right formula:
    var url = "http://192.168.1.4/30000/00"
    ogscript.asyncPost(url, null, null);

     

    Thank you!


    #DashBoard


  • 3.  RE: URL request from Dashboard

    Posted 05-06-2019 17:40

    Glad you were able to sort-out your issue. Yes, null in the 'data' field of the asyncPost will trigger a GET instead of a POST. This can be important if your web server specifically supports one method or the other.


    #DashBoard


  • 4.  RE: URL request from Dashboard

    Posted 05-06-2019 19:08

    Hello James,

    Ross DB team (and personally you) doing here on forum very good job! Thank you for that.

    I recognized a lot of same questions here, maybe it would help to all of us to categorize forum posts (say, last 4 years) by themes or tags (say, "parameters", "timers", "async executions" "http/url" "ftp" "buttons toggle and style etc.." "ui style" "ext control protocols amp osc midi etc.." and so on. )

    Best regards,

    Alex.


    #DashBoard