¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Sending http commands to a device


ab_mc_uk
 

Hi

I am using Aviosys 9258 IP Power Controllers on various sites and would now like to be able to control them from within a Crestron program.

I have figured out/found the right http command to send eg



will turn all four power outlets on and



will turn all four power outlets off.

So my question is how do I send these, or similar, commands to the Aviosys from a Crestron processor?

I have done a search and notice that others are also using these units for remote power resetting so I'm hoping somone has already got this figured out.

I have managed to get a connection to the unit (currently on port 80 ahtoguh this can be changed) from a program usign a TCP/IP Client symbol but get no response from the unit when I send commands out to it !

The commands work perfectly from all the browsers I've tried.

Thanks

Andy


Chip Moody
 

Andy, you've got URLs there that a web browser will take and break down into more verbose HTTP packets - these are usually hidden from you when you're using a web browser.

You need to figure out what elements go into that HTTP packet and emulate that. You're off to a good start, opening up a TCP/IP Client symbol to the IP address on port 80. Once you get confirmation back that you've connected, (status goes to 2) you can send your HTTP request. That will consist at the VERY least of a GET command containing "/Set.cmd?CMD=SetPower+P60=1+P61=1+P62=1+P63=1", and a Base-64 encoded version of the username and password.

There is a module in the file section here that will do the Base-64 encoding for you. For the rest, dig through the message archive a bit more - it's all there...somewhere - as this has been gone over a bunch of times.

This might also be of some help: <>

- Chip

--- In Crestron@..., "ab_mc_uk" <andy.ontheroad@...> wrote:

Hi

I am using Aviosys 9258 IP Power Controllers on various sites and would now like to be able to control them from within a Crestron program.

I have figured out/found the right http command to send eg



will turn all four power outlets on and



will turn all four power outlets off.

So my question is how do I send these, or similar, commands to the Aviosys from a Crestron processor?

I have done a search and notice that others are also using these units for remote power resetting so I'm hoping somone has already got this figured out.

I have managed to get a connection to the unit (currently on port 80 ahtoguh this can be changed) from a program usign a TCP/IP Client symbol but get no response from the unit when I send commands out to it !

The commands work perfectly from all the browsers I've tried.

Thanks

Andy


ab_mc_uk
 

Chip

Many thanks for the guidance - I'll take that info and run with it ...

Andy

--- In Crestron@..., "Chip Moody" <cfm@...> wrote:


Andy, you've got URLs there that a web browser will take and break down into more verbose HTTP packets - these are usually hidden from you when you're using a web browser.

You need to figure out what elements go into that HTTP packet and emulate that. You're off to a good start, opening up a TCP/IP Client symbol to the IP address on port 80. Once you get confirmation back that you've connected, (status goes to 2) you can send your HTTP request. That will consist at the VERY least of a GET command containing "/Set.cmd?CMD=SetPower+P60=1+P61=1+P62=1+P63=1", and a Base-64 encoded version of the username and password.

There is a module in the file section here that will do the Base-64 encoding for you. For the rest, dig through the message archive a bit more - it's all there...somewhere - as this has been gone over a bunch of times.

This might also be of some help: <>

- Chip


--- In Crestron@..., "ab_mc_uk" <andy.ontheroad@> wrote:

Hi

I am using Aviosys 9258 IP Power Controllers on various sites and would now like to be able to control them from within a Crestron program.

I have figured out/found the right http command to send eg



will turn all four power outlets on and



will turn all four power outlets off.

So my question is how do I send these, or similar, commands to the Aviosys from a Crestron processor?

I have done a search and notice that others are also using these units for remote power resetting so I'm hoping somone has already got this figured out.

I have managed to get a connection to the unit (currently on port 80 ahtoguh this can be changed) from a program usign a TCP/IP Client symbol but get no response from the unit when I send commands out to it !

The commands work perfectly from all the browsers I've tried.

Thanks

Andy


Chip Moody
 

No problem.

The other thing I forgot to mention is that if you're using - or can use - FireFox to talk to the power controllers, there's a plugin called "Live HTTP Headers" that will show you the raw HTTP elements being sent when you type in a URL. Typically there are a couple lines of "fluff" that you don't need to duplicate, but if you want the be-all end-all reference to what your browser is sending out, this will tell you.

- Chip

--- In Crestron@..., "ab_mc_uk" <andy.ontheroad@...> wrote:

Chip

Many thanks for the guidance - I'll take that info and run with it ...

Andy


--- In Crestron@..., "Chip Moody" <cfm@> wrote:


Andy, you've got URLs there that a web browser will take and break down into more verbose HTTP packets - these are usually hidden from you when you're using a web browser.

You need to figure out what elements go into that HTTP packet and emulate that. You're off to a good start, opening up a TCP/IP Client symbol to the IP address on port 80. Once you get confirmation back that you've connected, (status goes to 2) you can send your HTTP request. That will consist at the VERY least of a GET command containing "/Set.cmd?CMD=SetPower+P60=1+P61=1+P62=1+P63=1", and a Base-64 encoded version of the username and password.

There is a module in the file section here that will do the Base-64 encoding for you. For the rest, dig through the message archive a bit more - it's all there...somewhere - as this has been gone over a bunch of times.

This might also be of some help: <>

- Chip


 

Hi Andy,
Does it work for you? as I am working on the same and kind of stuck.


 

I know this is an old thread but since I did some homework...
?
I was able to find information about IP Power 9258 from
?
?
and so far I was able to get this working hopefully this helps.
?
Using Packet Sender?
(192.168.1.156:80, HTTP Get)
ON: /Set.cmd?user=admin+pass=12345678+cmd=SetPower+P60=1+P61=1+P62=1+P63=1
OFF: /Set.cmd?user=admin+pass=12345678+cmd=SetPower+P60=0+P61=0+P62=0+P63=0

(Response from IP9258)
ON: <html>P60=1,P61=1,P62=1,P63=1</html>
OFF: <html>P60=0,P61=0,P62=0,P63=0</html>
(TCP)
ON: GET /Set.cmd?user=admin+pass=12345678+cmd=SetPower+P60=1+P61=1+P62=1+P63=1 HTTP/1.1\r\n\r\n
OFF: GET /Set.cmd?user=admin+pass=12345678+cmd=SetPower+P60=0+P61=0+P62=0+P63=0 HTTP/1.1\r\n\r\n
(Response from IP9528)
ON: "<html>P60=1,P61=1,P62=1,P63=1</html>"
OFF: "<html>P60=0,P61=0,P62=0,P63=0</html>"
Using Chrome
All ON: http://192.168.1.156:80/Set.cmd?user=admin+pass=12345678+cmd=SetPower+P60=1+P61=1+P62=1+P63=1
ALL OFF: http://192.168.1.156:80/Set.cmd?user=admin+pass=12345678+cmd=SetPower+P60=0+P61=0+P62=0+P63=0
(Response from IP9528)
ON: "<html>P60=1,P61=1,P62=1,P63=1</html>"
OFF: "<html>P60=0,P61=0,P62=0,P63=0</html>"
OUT1 ON: http://192.168.1.156:80/Set.cmd?user=admin+pass=12345678+cmd=SetPower+P61=1
OUT1 OFF: http://192.168.1.156:80/Set.cmd?user=admin+pass=12345678+cmd=SetPower+P61=0
STATUS: http://192.168.1.156:80/Set.cmd?user=admin+pass=12345678+cmd=GetPower
"<html>P60=1,P61=1,P62=1,P63=1,P64=0,P65=0,P66=0,P67=0</html>"