Inspired by WifiPlug-api. Thanks!
We got device and wanted to manage it from web server. There was problem with jruby compilation, so I made java wrapper. If someday I will have free time, than I will port this all thing to PHP (I doubt that :D)
Please read notes about nice documentation they have to know all problems EddM worked around.
With currently built .jar you can list all your devices and switch them on and off.
I build this with IntelliJ IDEA
Requires java 1.8+
java -jar out/artifacts/WifiPlug_jar/WifiPlug.jar h
to get helpjava -jar wifiplug <userName> <password> list
to connect and print your device list
Syntax!
java -jar wifiplug userName password deviceId|list onOff verbose serverName serverPort
Params:
userName - your user name (string)
password - your password (string)
deviceId - device to switch or keyword `list` (without `) for list (string)
onOff - switch on or off target device (string - case sensitive - lowercase only)
verbose - (optional) dump irrelevant info (integer)
serverName - (optional) server domain or ip address (string)
serverPort - (optional) server port (integer)