• Categories
    • Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. Joost
    J
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 4
    • Groups 0

    Joost

    @Joost

    3
    Reputation
    1
    Profile views
    4
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    Joost Unfollow Follow

    Best posts made by Joost

    • RE: How to open a webpage / place a http request?

      Found a possible and working solution:

      var myImports = new JavaImporter(java.lang, java.util);
      
      with(myImports) {
        // your command to execute
        var command = "wget -O/dev/null -q http://deepblack:9000/status.html?p0=pause";
        
        // execute your command
        mcApi.osCommandExecuter().executeLinuxCommand(command);
      }
      

      Thanks for MyController, it's really great!
      Joost

      posted in Scripts
      J
      Joost
    • How to open a webpage / place a http request?

      Hi everyone,

      thanks very much for MyController, this is such a great project!! I am diving into MySensors and started with HomeAssistant, but found everything quite hidden away. Now I am seeing the light (or at least it's dawning on me 🙂 ) after switching to MyController!

      I have a simple/beginner question: I built a MySensors node with two buttons, which I'd like to connect to Operations in MyController. My question is this:

      I plan on controlling a Logitech Squeezebox Server. This works by simply calling a (local) web URL like "http://deepblack:9000/status.html?p0=pause" or alternatively do a JSON call.
      The web page does not need to be downloaded or displayed; f. ex. it works if just running "curl http://deepblack:9000/status.html?p0=pause" in a shell and discarding the answer to /dev/null.

      What would be a way to just call this URL? I suppose this would best be accomplished with a JavaScript operation?

      Thanks very much & best regards,

      Joost

      posted in Scripts
      J
      Joost
    • RE: How to open a webpage / place a http request?

      Thanks very much for your reply with the streamlined version!

      To be honest, I now had to settle for calling the actions like this

      var command="echo 'b8:27:eb:b7:29:4a mixer volume -2' | nc -q0 192.168.1.2 9090"
      mcApi.osCommandExecuter().executeLinuxCommand(command);
      

      Meaning, the command get's "netcat'ed" to the server - is there just by chance a comparable API call as well?

      Thanks again very much for your work,

      Joost

      posted in Scripts
      J
      Joost

    Latest posts made by Joost

    • RE: How to open a webpage / place a http request?

      Thanks very much for your reply with the streamlined version!

      To be honest, I now had to settle for calling the actions like this

      var command="echo 'b8:27:eb:b7:29:4a mixer volume -2' | nc -q0 192.168.1.2 9090"
      mcApi.osCommandExecuter().executeLinuxCommand(command);
      

      Meaning, the command get's "netcat'ed" to the server - is there just by chance a comparable API call as well?

      Thanks again very much for your work,

      Joost

      posted in Scripts
      J
      Joost
    • RE: How to open a webpage / place a http request?

      Found a possible and working solution:

      var myImports = new JavaImporter(java.lang, java.util);
      
      with(myImports) {
        // your command to execute
        var command = "wget -O/dev/null -q http://deepblack:9000/status.html?p0=pause";
        
        // execute your command
        mcApi.osCommandExecuter().executeLinuxCommand(command);
      }
      

      Thanks for MyController, it's really great!
      Joost

      posted in Scripts
      J
      Joost
    • How to open a webpage / place a http request?

      Hi everyone,

      thanks very much for MyController, this is such a great project!! I am diving into MySensors and started with HomeAssistant, but found everything quite hidden away. Now I am seeing the light (or at least it's dawning on me 🙂 ) after switching to MyController!

      I have a simple/beginner question: I built a MySensors node with two buttons, which I'd like to connect to Operations in MyController. My question is this:

      I plan on controlling a Logitech Squeezebox Server. This works by simply calling a (local) web URL like "http://deepblack:9000/status.html?p0=pause" or alternatively do a JSON call.
      The web page does not need to be downloaded or displayed; f. ex. it works if just running "curl http://deepblack:9000/status.html?p0=pause" in a shell and discarding the answer to /dev/null.

      What would be a way to just call this URL? I suppose this would best be accomplished with a JavaScript operation?

      Thanks very much & best regards,

      Joost

      posted in Scripts
      J
      Joost