This object is in archive! 

http commands for local third party devices

Max Cherenkov shared this question 8 years ago
Need Answer

Hi All! going to buy a Zipatille controller, and have simple automation device, which is controlled by simple http commands, for example:

it requests server when port is activated (push button) and waits for answer via url http://192.168.0.250/scriptname.php?pt=5


where pt=port nuber


command for device output controll, toggle the light on port 7 http://192.168.0.14/sec/?cmd=7:2

where 7 is port number and 2 means toggle output port


request of port state http://192.168.0.14/sec/?pt=1&cmd=get


The question is "can I integrete this device into zipato system, and how"?

Replies (3)

photo
1

You can send the commands (HTTP GET or POST), but you cannot handle the response. It is purely fire-and-forget.


You can do HTTP (or socket comm) with the HTTP request (or Socket request) puzzle.


You could get your "simple autmation device" scripts to call virtual sensors or meters for some sort of response handeling, though. But the sollution would not be very elegant :)

photo
1

Thanx! Does Virtual sensor suport local urls?

photo
1

I use the following for ping, wake on lan and auto shut down. Works great with Zipato! Maybe it can give you some ideas...

https://github.com/johnbrannstrom/small-scripts

Leave a Comment
 
Attach a file