How to send commands to disable / enable Orvibo S20 Smart WIFI Plug.
The tests use S20 Smart WIFI Plug in a while that Plug Power is capable of Control on / off as well, but the Control to use the IOS and Android can not be activated via Computer if maybe we. Conditions need to turn on / off can be operated from a computer is very good. I try to find a way to find Web Control S20 Andrius. Štikonas most talented Reference and Information Packet began to write their own programs to be prepared to go Home Automate
Begin
The function of the applications we are interested.
- Open / Close Plug
- Pull Plug the status of what is now a state.
Job Description
S20 will receive UDP Port number 48 899 and 10 000 orders for the program by 48 899 will be part of the Discovery of the S20 and Port 10000 will transfer Command.
From Socket said the orders are to be numbered Mac Address all queries, we need numbers Mac’s S20 but will allow customers to enter the Mac would not have to start by sending commands to the Port. Get a Mac before, to 48 899
To find the Mac address
He that sent Command " HF-A11ASSISTHREAD "ASCII to 255.255.255.255 Port 48899 all in the S20 system will respond. IP, MAC, HOSTNAME back, but we want just one. We will send the IP address of the S20 that we want to represent. It has come out as IP, MAC, HOSTNAME But by cutting out part of the MAC.
Example of order " HF-A11ASSISTHREAD "192.168.9.13:48899 to have a value of S20.
" 192.168.9.13, ACCF23360902, HF-LPB100 ".
From the above statement, we will have a Mac, S20 to send the next command.
To send a command to turn on / off
data from Socket mentioned above. Before we send commands to the S20 has required Subscribe before placing an order. ON / OFF
orders Subscribe
by order forms Subscribe to this (as Hex Number)
[Magic Number] 6864
[ Package Length] 001e
[Subscribe Command] 636C
[Mac address] Accf23360902
[SPACE PAD x 6] the 202,020,202,020th.
[ Mac Address Little Endian ( Mac dual switch from back to front) ] 02093623cfac
[SPACE PAD x 6] the 202,020,202,020th
this example is to send a
6864001e636c Accf23360902 20202020202002093623cfac202020202020.
For example, an order by the Packet Subscribe " 6864001e636c Accf23360902 20202020202002093623cfac202020202020 " to. 192.168.9.13:10000 On the back of the S20 is
" 68640018636c Accf23360902 2020202020200000000000 01 "
From the results, we can know the status Plug the Hex final has been set at 01, is open 00 off
**orders on / off **
by the format command off. / open like this (showing a Hex Number)
[Magic Number] 6864
[ Package Length] 0017
[Subscribe Command] 6463
[Mac address] Accf23360902
[SPACE PAD x 6] 202 020 202 020
[Zero X4] 00000000
[Power Command] 00 or 01.
An example of this would be the value to be sent off for a
"686400176463 Accf23360902 the 202,020,202,020th 00000000 00 "
to open a
"686 400 176 463 Accf23360902 202,020,202,020th 00000000 01 ".
For example, to send a statement with the ON Command " 686400176463 Accf23360902 the 202,020,202,020th 00000000 01 " to. 192.168.9.13:10000 On the back of S20 3 packet is
- " the 686,400,176,463th Accf23360902 2020202020200100000000 "unused
- " 686400177366 Accf23360902 20202020202000000000 01 "Packet desired
- " the 686,400,177,366th Accf23360902 20202020202000000000 01 " Packet over from two
of the results enable us to check. a statement that the state was at the behest or HEX final Packet that two or three are equal,