Ir blaster HOME AUTOMATION wiwo orvibo & S20

There is low price ir blaster. ORVIBO WIWO IR .

I want implementation in openhab.

Is it possibile?

review of product:

Revere enginnering on ORVIBO:
https://stikonas.eu/wordpress/2015/02/24/reverse-engineering-orvibo-s20-socket/

I found open source JAVASCRIPT driver FOR in NODE.js :

I found other this code GO LANGUAGE:

That socket looks very similar to one Aldi Australia are selling (under the brand name Bauhn, but it’s actually an Orvibo socket, just rebranded). If it is the same, then check out the sample node.js code I’ve posted over on GitHub

https://github.com/Grayda/ninja-allone/blob/master/lib/allone.js (javascript)

(This code actually controls an Orvibo AllOne, but also controls Orvibo S10 / S20 sockets too)

The short of it is:

  1. The socket communicates via UDP on port 10000
  2. You need to know the MAC address of your socket
  3. You send a discovery packet to which the socket replies
  4. You then ‘subscribe’ to the socket in order to control it
  5. When you send on / off packets to the socket, it replies in turn with it’s current state

data analisys:
http://pastebin.com/0w8N7AJD

I buy device… if we need sniffer i can

Interesting! Any idea whether this device also supports “receiving”? This would make it possible to have a cheap IR receiver connected to OH. (beside the IR sender)

With that you could use any IR remote and trigger something in OH.

I’ve started some work on a Java library (that should be able to be converted into a binding) for the S20 socket.

The problem I’m having at the moment is reliably communicating with the socket. My global discovery packet works fine but the subscription and commands are very intermittent (and often I get no response at all for long periods).

I’m not sure if this is a problem with my dev PC, or my home network or if the UDP packets I’m sending are invalid but the Android App seems to work OK.

this device support receving becouse have the possibility for store code IR. And it can recive any ir code device.

I have same problem , i sniffing command udp generate andoird app . After when i send command of pc -> ir blaster i dont have response

I’m using the python-orvibo project on github for the s20, and that seems very reliable at present. Is your java code available anywhere maybe you/I could compare the two?

I’m beginning to think it’s something to do with my (Windows) PC. I’ve got a python script that I can run on my Raspberry Pi and it works pretty reliably. I’ve tried the same script on my PC and it doesn’t work.

I then tried some basic Java code and it didn’t work on my PC. I zipped it up in a jar file and ran it on my Raspberry Pi and it works and controls my socket.

PS why does the forum keep telling me this reply is too similar to a previous one?

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

  1. " the 686,400,176,463th Accf23360902 2020202020200100000000 "unused
  2. " 686400177366 Accf23360902 20202020202000000000 01 "Packet desired
  3. " 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,

Switch OrviboSwitch “OrviboSwitch” (gMainRoom) { exec=">[ON:/usr/local/jre/bin/java -cp /share/homes/admin S20 192.168.1.13 on]
>[OFF:/usr/local/jre/bin/java -cp /share/homes/admin S20 192.168.1.13 off]
<[/usr/local/jre/bin/java -cp /share/homes/admin S20 192.168.1.13 status:10000:REGEX((.*))]" }

@grayda tell :

/lib/allone.js is a stand-alone file, the rest of the driver is just a wrapper for that, so it’s definitely possible to use it without a Ninja Block.

Is it possible use allone.js with exec comand in openhab?

Can you run it from command line without openhab?

Yes in my fork of the project on github i’ve added a “cmd.py” which you can run from the command line or an exec binding providing you have python 3.x installed

{exec="<[/usr/bin/python3 /home/rich/python-orvibo/cmd.py --server 10.1.0.14 --status:60000:REGEX((.*?))] >[ON:/usr/bin/python3 /home/rich/python-orvibo/cmd.py --server 10.1.0.14 --switch ON] >[OFF:/usr/bin/python3 /home/rich/python-orvibo/cmd.py --server 10.1.0.14 --switch OFF]"}

Is this just for the S20 or can it be used with the IR Blaster as well?

You may be interesting in my orvibo module for python3 . It allows control s20 and AllOne IR blasters.

I use master orvibo is work. I test ir grab and Ir send

python /usr/share/openhab/addons/orvibo.py -i 192.168.1.26 -t /usr/share/openhab/addons/ir/test.ir
python /usr/share/openhab/addons/orvibo.py -i 192.168.1.26 -e /usr/share/openhab/addons/ir/test.ir

but after 5 time i end command i have this error:

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Mar 8 19:46:46 2016 from 192.168.1.21
root@raspberrypi:~# python /usr/share/openhab/addons/orvibo.py -i 192.168.1.26 -t /usr/share/openhab/addons/ir/test.ir
Traceback (most recent call last):
File “/usr/share/openhab/addons/orvibo.py”, line 519, in
d = Orvibo.discover(ip)
File “/usr/share/openhab/addons/orvibo.py”, line 241, in discover
with orvibo_socket() as s:
File “/usr/lib/python2.7/contextlib.py”, line 17, in _enter
return self.gen.next()
File “/usr/share/openhab/addons/orvibo.py”, line 99, in _orvibo_socket
sock.bind((’’, PORT))
File “/usr/lib/python2.7/socket.py”, line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use

Seems you’ve tried to do it too frequently. Despite of orvibo connection has SO_REUSEADDR for the UDP socket to Orvibo devices, there is a system level stuff like TIME_WAIT, which doesn’t allow reuse address while TIME_WAIT timeout. You may read more about this timeout and a workaround here

I see that i have port 10000 in use

root@raspberrypi:~# netstat -an

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:20000 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5900 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5555 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN
tcp 0 0 192.168.1.9:35509 192.168.1.35:20000 TIME_WAIT
tcp 0 0 192.168.1.9:43985 176.58.106.188:443 ESTABLISHED
tcp 0 0 192.168.1.9:35510 192.168.1.35:20000 ESTABLISHED
tcp 0 0 192.168.1.9:34363 188.125.93.100:80 ESTABLISHED
tcp 0 0 192.168.1.9:41748 188.125.93.100:80 ESTABLISHED
tcp 1 0 192.168.1.9:49053 188.125.93.101:80 CLOSE_WAIT
tcp 0 0 192.168.1.9:35508 192.168.1.35:20000 TIME_WAIT
tcp 0 0 192.168.1.9:22 192.168.1.21:52942 ESTABLISHED
tcp 0 0 192.168.1.9:48862 188.125.93.100:80 ESTABLISHED
udp 0 0 192.168.1.255:137 0.0.0.0:*
udp 0 0 192.168.1.9:137 0.0.0.0:*
udp 0 0 0.0.0.0:137 0.0.0.0:*
udp 0 0 192.168.1.255:138 0.0.0.0:*
udp 0 0 192.168.1.9:138 0.0.0.0:*
udp 0 0 0.0.0.0:138 0.0.0.0:*
udp 0 0 0.0.0.0:42923 0.0.0.0:*
udp 0 0 0.0.0.0:5353 0.0.0.0:*
udp 0 0 0.0.0.0:5353 0.0.0.0:*
udp 0 0 192.168.1.9:56301 192.168.1.11:10000 ESTABLISHED
udp 0 0 0.0.0.0:55796 0.0.0.0:*
udp 0 0 0.0.0.0:38906 0.0.0.0:*
udp 0 0 0.0.0.0:10000 0.0.0.0:*
udp 0 0 0.0.0.0:631 0.0.0.0:*
udp 0 0 192.168.1.9:123 0.0.0.0:*
udp 0 0 127.0.0.1:123 0.0.0.0:*
udp 0 0 0.0.0.0:123 0.0.0.0:*
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 6656 /var/run/samba/unexpected
unix 2 [ ACC ] STREAM LISTENING 6774 /tmp/.X11-unix/X0
unix 2 [ ACC ] STREAM LISTENING 6829 /tmp/ssh-ac24gux3XS9K/agent.2438
unix 2 [ ACC ] STREAM LISTENING 7111 /tmp/.pcmanfm-socket–0-pi
unix 2 [ ACC ] STREAM LISTENING 6435 /var/run/avahi-daemon/socket
unix 2 [ ACC ] STREAM LISTENING 7308 /tmp/.menu-cached-:0-pi
unix 2 [ ACC ] SEQPACKET LISTENING 4155 /run/udev/control
unix 2 [ ACC ] STREAM LISTENING 6498 /var/run/sdp
unix 2 [ ACC ] STREAM LISTENING 6525 /var/run/cups/cups.sock
unix 2 [ ACC ] STREAM LISTENING 6982 @/tmp/dbus-A1qy6JBflN
unix 2 [ ] DGRAM 6327 /var/run/thd.socket
unix 9 [ ] DGRAM 6344 /dev/log
unix 2 [ ACC ] STREAM LISTENING 6385 /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 7105
unix 3 [ ] STREAM CONNECTED 6987 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 7286
unix 3 [ ] STREAM CONNECTED 7424 @/tmp/dbus-A1qy6JBflN
unix 2 [ ] DGRAM 7531
unix 3 [ ] STREAM CONNECTED 6390
unix 3 [ ] STREAM CONNECTED 7207 @/tmp/dbus-A1qy6JBflN
unix 3 [ ] STREAM CONNECTED 7369
unix 3 [ ] STREAM CONNECTED 7120 /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 6971
unix 3 [ ] STREAM CONNECTED 7315
unix 2 [ ] DGRAM 6477
unix 3 [ ] STREAM CONNECTED 7313 /tmp/.menu-cached-:0-pi
unix 3 [ ] STREAM CONNECTED 7106 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 6992
unix 3 [ ] STREAM CONNECTED 7340 @/tmp/dbus-A1qy6JBflN
unix 3 [ ] STREAM CONNECTED 7423
unix 3 [ ] STREAM CONNECTED 7287 @/tmp/dbus-A1qy6JBflN
unix 3 [ ] STREAM CONNECTED 6391
unix 3 [ ] STREAM CONNECTED 7206
unix 3 [ ] STREAM CONNECTED 7370 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 7126 @/tmp/dbus-A1qy6JBflN
unix 3 [ ] STREAM CONNECTED 6972 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 7447 /var/run/sdp
unix 3 [ ] STREAM CONNECTED 6831 /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 7446
unix 3 [ ] STREAM CONNECTED 6478
unix 3 [ ] STREAM CONNECTED 7339
unix 3 [ ] STREAM CONNECTED 7362
unix 3 [ ] STREAM CONNECTED 7102
unix 3 [ ] STREAM CONNECTED 6993 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 7260 @/tmp/dbus-A1qy6JBflN
unix 3 [ ] STREAM CONNECTED 7164
unix 3 [ ] STREAM CONNECTED 7422 /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 7405 @/tmp/dbus-A1qy6JBflN
unix 3 [ ] STREAM CONNECTED 7366
unix 3 [ ] STREAM CONNECTED 7125
unix 3 [ ] STREAM CONNECTED 6877
unix 3 [ ] STREAM CONNECTED 7203 /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 6437
unix 3 [ ] STREAM CONNECTED 7179
unix 3 [ ] STREAM CONNECTED 7434 @/tmp/dbus-A1qy6JBflN
unix 3 [ ] STREAM CONNECTED 7103 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 6479 /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 7337 @/tmp/dbus-A1qy6JBflN
unix 3 [ ] STREAM CONNECTED 7259
unix 2 [ ] STREAM CONNECTED 7454
unix 3 [ ] STREAM CONNECTED 7421
unix 3 [ ] STREAM CONNECTED 7165 @/tmp/dbus-A1qy6JBflN
unix 3 [ ] STREAM CONNECTED 7367 @/tmp/dbus-A1qy6JBflN
unix 3 [ ] STREAM CONNECTED 7119
unix 3 [ ] STREAM CONNECTED 6878 /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 7346 @/dbus-vfs-daemon/socket-fW4E6ogL
unix 3 [ ] STREAM CONNECTED 7202
unix 3 [ ] STREAM CONNECTED 6438 /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 7433
unix 3 [ ] STREAM CONNECTED 7180 /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 7162
unix 3 [ ] STREAM CONNECTED 7417 /var/run/dbus/system_bus_socket
unix 3 [ ] DGRAM 4163
unix 3 [ ] STREAM CONNECTED 7312
unix 2 [ ] DGRAM 6553
unix 3 [ ] STREAM CONNECTED 7336
unix 3 [ ] STREAM CONNECTED 7364
unix 3 [ ] STREAM CONNECTED 7174
unix 3 [ ] STREAM CONNECTED 7430 /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 6432
unix 3 [ ] STREAM CONNECTED 7201 @/tmp/dbus-A1qy6JBflN
unix 3 [ ] STREAM CONNECTED 7345
unix 3 [ ] STREAM CONNECTED 7096
unix 3 [ ] STREAM CONNECTED 7404
unix 3 [ ] STREAM CONNECTED 6844
unix 3 [ ] STREAM CONNECTED 7413 @/tmp/dbus-A1qy6JBflN
unix 3 [ ] STREAM CONNECTED 7163 @/tmp/dbus-A1qy6JBflN
unix 2 [ ] DGRAM 7295
unix 3 [ ] STREAM CONNECTED 7365 @/dbus-vfs-daemon/socket-xVBU7VN1
unix 2 [ ] DGRAM 7123
unix 3 [ ] STREAM CONNECTED 6983
unix 3 [ ] STREAM CONNECTED 6830
unix 3 [ ] STREAM CONNECTED 7321 @/tmp/dbus-A1qy6JBflN
unix 3 [ ] STREAM CONNECTED 7429
unix 3 [ ] STREAM CONNECTED 7175 @/tmp/dbus-A1qy6JBflN
unix 3 [ ] STREAM CONNECTED 7200
unix 3 [ ] STREAM CONNECTED 6845 /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 7347 @/dbus-vfs-daemon/socket-MLlKY1FI
unix 2 [ ] STREAM CONNECTED 7465
unix 3 [ ] STREAM CONNECTED 7136
unix 3 [ ] STREAM CONNECTED 7412
unix 3 [ ] STREAM CONNECTED 6528
unix 3 [ ] STREAM CONNECTED 7320
unix 3 [ ] STREAM CONNECTED 7108
unix 3 [ ] STREAM CONNECTED 6984
unix 3 [ ] STREAM CONNECTED 7249 @/tmp/dbus-A1qy6JBflN
unix 2 [ ] DGRAM 6429
unix 3 [ ] STREAM CONNECTED 7172
unix 3 [ ] STREAM CONNECTED 7344
unix 2 [ ] DGRAM 6834
unix 3 [ ] STREAM CONNECTED 7401
unix 3 [ ] STREAM CONNECTED 7183
unix 3 [ ] STREAM CONNECTED 6867
unix 3 [ ] STREAM CONNECTED 7197 /var/run/dbus/system_bus_socket
unix 3 [ ] DGRAM 4162
unix 3 [ ] STREAM CONNECTED 7416
unix 3 [ ] STREAM CONNECTED 7137 @/tmp/dbus-A1qy6JBflN
unix 3 [ ] STREAM CONNECTED 7363 @/dbus-vfs-daemon/socket-RKg84sDy
unix 3 [ ] STREAM CONNECTED 7109 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 6986
unix 3 [ ] STREAM CONNECTED 6529 /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 7316 @/tmp/dbus-A1qy6JBflN
unix 3 [ ] STREAM CONNECTED 7248
unix 3 [ ] STREAM CONNECTED 6431
unix 3 [ ] STREAM CONNECTED 7173 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 7402 @/tmp/dbus-A1qy6JBflN
unix 3 [ ] STREAM CONNECTED 7188 @/tmp/dbus-A1qy6JBflN
unix 3 [ ] STREAM CONNECTED 6868 /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 7097 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 7196
root@raspberrypi:~#