<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Orvibo on OiePoie!</title>
    <link>https://www.oiepoie.nl/tags/orvibo/</link>
    <description>Recent content in Orvibo on OiePoie!</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Sun, 04 Oct 2015 15:24:11 +0200</lastBuildDate><atom:link href="https://www.oiepoie.nl/tags/orvibo/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Cheap wifi switch Orvibo WiWo S20</title>
      <link>https://www.oiepoie.nl/2015/10/04/cheap-wifi-switch-orvibo-wiwo-s20/</link>
      <pubDate>Sun, 04 Oct 2015 15:24:11 +0200</pubDate>
      
      <guid>https://www.oiepoie.nl/2015/10/04/cheap-wifi-switch-orvibo-wiwo-s20/</guid>
      <description>&lt;h1&gt;Orvibo WiWo S20&lt;/h1&gt;
&lt;p&gt;I bought this WiWo-S20 wifi switch a little while ago at &lt;a class=&#34;extlink&#34; href=&#34;http://www.banggood.com/WiWo-S20-Wi-Fi-Smart-Remote-Control-Timing-Socket-USEU-Plug-p-953743.html?p=6E2214592974201405G7&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34;&gt;Banggood&lt;/a&gt; because it was cheap (payed around €17) and it’s always handy to have remote controlled switches in the house.&lt;/p&gt;
&lt;h2&gt;Usage&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;https://www.oiepoie.nl/wp-content/uploads/2015/10/WiWo-S20-schedule.png&#34;&gt;&lt;img alt=&#34;WiWo S20 schedule&#34; class=&#34;alignleft size-thumbnail wp-image-510&#34; height=&#34;150&#34; sizes=&#34;(max-width: 150px) 85vw, 150px&#34; src=&#34;https://www.oiepoie.nl/wp-content/uploads/2015/10/WiWo-S20-schedule-150x150.png&#34; srcset=&#34;https://www.oiepoie.nl/wp-content/uploads/2015/10/WiWo-S20-schedule-150x150.png 150w, https://www.oiepoie.nl/wp-content/uploads/2015/10/WiWo-S20-schedule-92x92.png 92w, https://www.oiepoie.nl/wp-content/uploads/2015/10/WiWo-S20-schedule-100x100.png 100w, https://www.oiepoie.nl/wp-content/uploads/2015/10/WiWo-S20-schedule-200x200.png 200w, https://www.oiepoie.nl/wp-content/uploads/2015/10/WiWo-S20-schedule-400x400.png 400w&#34; width=&#34;150&#34;/&gt;&lt;/a&gt;The switch comes with an &lt;a class=&#34;extlink&#34; href=&#34;https://itunes.apple.com/cn/app/wiwo2/id859140969?mt=8&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34;&gt;app&lt;/a&gt; to control it (and yes, there is also an &lt;a class=&#34;extlink&#34; href=&#34;http://www.orvibo.com/software/android/wiwo2.apk&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34;&gt;Android app&lt;/a&gt;). Besides toggling the power from the app, it’s also possible to configure a countdown timer, or specify a schedule. This alone is worth the purchase. In the past i used a number of time switches, but changing the settings was always a burden. Now with the app it’s intuitive and simple.&lt;/p&gt;
&lt;h2&gt;Control&lt;/h2&gt;
&lt;p&gt;The plan was always to control this switch from my domotica system (i use &lt;a class=&#34;extlink&#34; href=&#34;http://www.domoticz.com&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34;&gt;Domoticz&lt;/a&gt;) so that it can be tied to events (for instance me waking up and automagically switching on the coffee). Luckily the heavy lifting (i.e. reverse engineering) has already be done, and somebody even wrote a &lt;a class=&#34;extlink&#34; href=&#34;https://github.com/franc-carter/bauhn-wifi&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34;&gt;perl script&lt;/a&gt; which i will be using with domoticz.&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;
Normally these kind of devices are controlled via TCP/IP, so in a connection oriented way (establish the connection, give commands en quit). But this devices works connectionless through UDP. By using netcat we can still control the device from the commandline:&lt;br/&gt;
&lt;code&gt;&lt;br/&gt;
## Subscribe to the device:&lt;br/&gt;
echo &#39;6864001e636c&#39;&#34;accf532147e4&#34;&#39;202020202020&#39;&#34;e4472153cfac&#34;&#39;202020202020&#39; | xxd -r -p | nc -u -w2 -p10000 192.168.1.76 10000 | xxd -p&lt;br/&gt;
## Switching on:&lt;br/&gt;
echo &#39;686400176463&#39;&#34;accf532147e4&#34;&#39;2020202020200000000001&#39; | xxd -r -p | nc -u -w2 -p10000 192.168.1.76 10000 | xxd -p&lt;br/&gt;
## Switching off:&lt;br/&gt;
echo &#39;686400176463&#39;&#34;accf532147e4&#34;&#39;2020202020200000000000&#39; | xxd -r -p | nc -u -w2 -p10000 192.168.1.76 10000 | xxd -p&lt;br/&gt;
&lt;/code&gt;&lt;br/&gt;
The &lt;code&gt;accf532147e4&lt;/code&gt; in there is the MAC address of the device.You first need to subscribe to the device and then give the command to switch on or off.&lt;/p&gt;
&lt;p&gt;With the perl code it’s of course much easier; subscribing is already taken care of in the script, so it’s:&lt;br/&gt;
&lt;code&gt;&lt;br/&gt;
$ ./orvibo-s20.pl AC:CF:23:51:47:E4 status&lt;br/&gt;
off&lt;br/&gt;
$ ./orvibo-s20.pl AC:CF:23:51:47:E4 on&lt;br/&gt;
$ ./orvibo-s20.pl AC:CF:23:51:47:E4 status&lt;br/&gt;
on&lt;br/&gt;
$ ./orvibo-s20.pl AC:CF:23:51:47:E4 off&lt;br/&gt;
&lt;/code&gt;&lt;br/&gt;
When you download the script from &lt;a class=&#34;extlink&#34; href=&#34;https://github.com/franc-carter/bauhn-wifi/blob/master/bauhn.pl&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34;&gt;github&lt;/a&gt;, it’s called bauhn, but i renamed it to a name that makes more sense to me.&lt;/p&gt;
&lt;h2&gt;Domoticz&lt;/h2&gt;
&lt;p&gt;Controlling the switch from domoticz is not very complex. First you need to get the perl script into the &lt;b&gt;domoticz/scripts &lt;/b&gt; directory.&lt;br/&gt;
Next open the Domoticz web GUI, go to Setup -&amp;gt; Hardware and add a new Dummy device.&lt;br/&gt;
Go to Setup -&amp;gt; Devices and enable the device (click on the green arrow next to the name you gave it, and it should become a blue arrow).&lt;br/&gt;
The new dummy switch can be found in switches, click on edit and now you can configure the on and off actions:&lt;br/&gt;
&lt;a href=&#34;https://www.oiepoie.nl/wp-content/uploads/2015/10/Screen-Shot-2015-10-04-at-15.15.16.png&#34;&gt;&lt;img alt=&#34;Domoticz configure WiWo Switch&#34; class=&#34;alignright size-medium wp-image-511&#34; height=&#34;188&#34; sizes=&#34;(max-width: 300px) 85vw, 300px&#34; src=&#34;https://www.oiepoie.nl/wp-content/uploads/2015/10/Screen-Shot-2015-10-04-at-15.15.16-300x188.png&#34; srcset=&#34;https://www.oiepoie.nl/wp-content/uploads/2015/10/Screen-Shot-2015-10-04-at-15.15.16-300x188.png 300w, https://www.oiepoie.nl/wp-content/uploads/2015/10/Screen-Shot-2015-10-04-at-15.15.16-630x394.png 630w, https://www.oiepoie.nl/wp-content/uploads/2015/10/Screen-Shot-2015-10-04-at-15.15.16.png 772w&#34; width=&#34;300&#34;/&gt;&lt;/a&gt;&lt;br/&gt;
That’s all there is to it. Have fun!&lt;/p&gt;
&lt;p&gt;&lt;i&gt;Sources:&lt;/i&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;extlink&#34; href=&#34;https://stikonas.eu/wordpress/2015/02/24/reverse-engineering-orvibo-s20-socket/&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34;&gt;Blog of Andrius Štikonas&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;extlink&#34; href=&#34;https://github.com/franc-carter/bauhn-wifi&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34;&gt;Perl code on Github from Franc Carter&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    
  </channel>
</rss>
