Hi, today I did some reverse engineering.
WIFIIO-83 is a great and cheap hardware for switching power and check input:

  • Wifi AP or Client
  • LAN via RJ-45
  • 8 GPIO output channels (250V/10A)
  • 3 INPUT Sensors (pull down)
  • HTTP Web Interface on port 80
  • SOCKET interface on port 8899

undefined

Buy here: http://www.aliexpress.com/wholesale?SearchText=WIFIIO-83

Price is around 80 USD and hardware quality is as expected in EU.

BUT: The socket interface is awful, no easy scripting is possible

So I used ngrep to inspect the html interface traffic and found a API.
It is possible to send http get requests to remote control or query the device:

Here are my notes:


API URL:http://192.168.1.21/httpapi.json?&CMD=UART_WRITE&UWHEXVAL=NN
- use http auth

HTML get is returing a number, which is showing device state
NN    DESC               RESULT in DEC     RESULT IN DUAL
--------------------------------------------------------------------
1  -> toggle channel 1        1            ..........N   ----------
2  -> toggle channel 2        2            .........N.
3  -> toggle channel 3        4            ........N..
4  -> toggle channel 4        8            .......N...   1=on
5  -> toggle channel 5       16            ......N....   0=off
6  -> toggle channel 6       32            .....N.....
7  -> toggle channel 7       64            ....N......
8  -> toggle channel 8      128            ...N.......   ----------
0  -> INPUT CHANNEL  1      256            ..N........   0=closed
0  -> INPUT CHANNEL  2      512            .N.........   1=open (default)
0  -> INPUT CHANNEL  3     1024            N..........   
0  -> query 
13 -> all on
12 -> all off                                            ----------

SOME BASH NOTES:
--------------------------------------------------------------------------
D2B=({0..1}{0..1}{0..1}{0..1}{0..1}{0..1}{0..1}{0..1}{0..1}{0..1}{0..1})
root@unix:~# echo ${D2B[1536]}
11000000000  --> ALL OUTPUT TURNED OFF (0) / INPUT3 is closed

Now I have written a small bash script, that gan handle this tiny bastards :-)

http://www.bitbull.ch/dl/scripts/wifiio-83-client.sh