A-D-E.net

I have written a small command line tool to control the Orvibo S20 Smart Socket from windows.

zipDownload here

Extract everything in 1 folder.

You can schedule this via the Windows TaskScheduler.

 

Suggestion:

  • there are 3 bat files included.  Change the UUID with the UUID of your device, and try to execute them.
  • Execute the exe with your parameters from a command line, your windows firewall will ask to open the needed ports.  Please allow this.

 

 

How to use from the command line:

(The MQTTBrokerHostName and MQTTTopic are optional) 

 

Power On  WiWo_S20 --command PowerOn  --UUID ACCF239348D4202020202020  
  WiWo_S20 --command PowerOn  --UUID ACCF239348D4202020202020  --MQTTBrokerHostName  test.mosquitto.org --MQTTTopic a-d-e.net/Veranda
  (see test_on.bat for an example)
   
Power Off WiWo_S20 --command PowerOff  --UUID ACCF239348D4202020202020  
  WiWo_S20 --command PowerOff  --UUID ACCF239348D4202020202020  --MQTTBrokerHostName  test.mosquitto.org --MQTTTopic a-d-e.net/S20/Veranda
  (see test_off.bat for an example)
   
Register New Devices in your network WiWo_S20 --command Initialise  --password  "here_comes_your_wifi_password"
note:

At the end of this routine, you will see the list of all discovered devices in your network.

 

Example:

 

Discovering all S20 sockets in this network:

IP:10.0.255.26 UUID: ACCF23937442202020202020 Status: True
IP:10.0.255.42 UUID: ACCF23932F2A202020202020 Status: True
IP:10.0.255.47 UUID: ACCF239348D4202020202020 Status: False

Press any key...

 

 

Discover all devices in your network WiWo_S20 --command Discover    (same output as the Initialise command)
   
Get status from 1 device WiWo_S20 --command Status --UUID ACCF23937442202020202020
  WiWo_S20 --command Status --UUID ACCF23937442202020202020  --MQTTBrokerHostName  automation --MQTTTopic luc/status/verlichting/veranda
 

This command exits with the errorlevel set to:

0 = Device OFF

1 = Device ON

-1= Device not found

 

When the MQTT options are used, the status is also published to the MQTT topic. (device not found is skipped)

(see test_status.bat for an example)

   
Example how to use this in OpenHAB

rule "Verlichting"
when
    Item Verlichting received command
then
    if(receivedCommand==ON){
          executeCommandLine("c:\\scripts\\wiwo\\WiWo_S20.exe@@--command@@PowerOn@@--UUID@@ACCF239348D4202020202020")
    }else{
          executeCommandLine("c:\\scripts\\wiwo\\WiWo_S20.exe@@--command@@PowerOff@@--UUID@@ACCF239348D4202020202020")
    }
end

 

The parameter UUID is the MAC address of the socket appended with 6x '20'

When calling the S20_OnOff script  from the Windows Scheduler you have to make sure the folder in Execute In is set to the folder with the script

When registering new devices in your network: make sure the led is blinking fast red.  If not: press the button 5 seconds to reset the device.

 

 

Timers in the S20 socket are not yet supported.  If you need it , please send me a note.

 

This tool is free to use for non-commercial use only.

 

History

Version Comment 
2016.1.17.11

Extra command  Status to query the status of 1 device

There was a problem closing the connection to the MQTT host too fast.

2016.1.13.10 Extra option to sent an MQTT message when PowerOn or PowerOff
 2016.1.13.2 First version