I have written a small command line tool to control the Orvibo S20 Smart Socket from windows.
Extract everything in 1 folder.
You can schedule this via the Windows TaskScheduler.
Suggestion:
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 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" |
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 |