tag:blogger.com,1999:blog-25913580128592757862024-02-20T05:35:18.548+13:00XBMCNutMy collection of Home Assistant, CoreELEC, IoT, Synology, Kodi and other technical tips gathered over the years.xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.comBlogger83125tag:blogger.com,1999:blog-2591358012859275786.post-32930766256159836412020-04-12T13:19:00.005+12:002021-02-10T10:11:47.459+13:00How to use the Home Assistant config add-on for VSCodeI've resisted moving from Atom as a yaml editor as I was so used to its ease of use and its shortcuts. Every now and then I'd dable with <a href="https://code.visualstudio.com/download" target="_blank">VSCode</a> but it was pretty overwhelming. Well, after several months of use, I'm pleased to announce that it's freak'n awesome, especially when you install a couple of add-ons that make Home Assistant yaml edits a breeze.<br />
<br />
Contents of the video:<br />
<br />
<span class="style-scope yt-formatted-string" dir="auto">1. Home Assistant Config add-on </span><a class="yt-simple-endpoint style-scope yt-formatted-string" dir="auto" href="https://www.youtube.com/watch?v=Zid0rbycnHE&t=110s" spellcheck="false">01:50</a><span class="style-scope yt-formatted-string" dir="auto"> </span><br />
<span class="style-scope yt-formatted-string" dir="auto">2. Atom Keymap add-on </span><a class="yt-simple-endpoint style-scope yt-formatted-string" dir="auto" href="https://www.youtube.com/watch?v=Zid0rbycnHE&t=240s" spellcheck="false">04:00</a><span class="style-scope yt-formatted-string" dir="auto"> </span><br />
<span class="style-scope yt-formatted-string" dir="auto">3. Indent Rainbow add-on </span><a class="yt-simple-endpoint style-scope yt-formatted-string" dir="auto" href="https://www.youtube.com/watch?v=Zid0rbycnHE&t=320s" spellcheck="false">05:20</a><span class="style-scope yt-formatted-string" dir="auto"> </span><br />
<span class="style-scope yt-formatted-string" dir="auto">4. Rainbow Brackets add-on </span><a class="yt-simple-endpoint style-scope yt-formatted-string" dir="auto" href="https://www.youtube.com/watch?v=Zid0rbycnHE&t=375s" spellcheck="false">06:15</a><span class="style-scope yt-formatted-string" dir="auto"> </span><br />
<span class="style-scope yt-formatted-string" dir="auto">5. Home Assistant Tools </span><a class="yt-simple-endpoint style-scope yt-formatted-string" dir="auto" href="https://www.youtube.com/watch?v=Zid0rbycnHE&t=430s" spellcheck="false">07:10</a><span class="style-scope yt-formatted-string" dir="auto"> </span><br />
<span class="style-scope yt-formatted-string" dir="auto">6. Home Assistant config in action </span><a class="yt-simple-endpoint style-scope yt-formatted-string" dir="auto" href="https://www.youtube.com/watch?v=Zid0rbycnHE&t=500s" spellcheck="false">08:20</a><span class="style-scope yt-formatted-string" dir="auto"> </span><br />
<span class="style-scope yt-formatted-string" dir="auto">7. Global Search </span><a class="yt-simple-endpoint style-scope yt-formatted-string" dir="auto" href="https://www.youtube.com/watch?v=Zid0rbycnHE&t=690s" spellcheck="false">11:30</a><span class="style-scope yt-formatted-string" dir="auto"> </span><br />
<span class="style-scope yt-formatted-string" dir="auto">8. File Search </span><a class="yt-simple-endpoint style-scope yt-formatted-string" dir="auto" href="https://www.youtube.com/watch?v=Zid0rbycnHE&t=845s" spellcheck="false">14:05</a><span class="style-scope yt-formatted-string" dir="auto"> </span><br />
<span class="style-scope yt-formatted-string" dir="auto">9. Managing Tabs </span><a class="yt-simple-endpoint style-scope yt-formatted-string" dir="auto" href="https://www.youtube.com/watch?v=Zid0rbycnHE&t=910s" spellcheck="false">15:10</a><br />
<br />
P.S For those wanting mdi icon auto-complete like the VSCode Home Assistant add-on, simply search the extension library for materialdesignicons-intellisense and install that. Wait about 2 minutes for it to update and now when you type icon mdi: it will start searching the MDI icon library. Cool. <br />
<br />
Enjoy.<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div><div class="separator" style="clear: both; text-align: left;"></div><div class="separator" style="clear: both; text-align: left;"></div><div class="separator" style="clear: both; text-align: left;"></div><div class="separator" style="clear: both; text-align: left;"></div><div class="separator" style="clear: both; text-align: left;"></div><div class="separator" style="clear: both; text-align: left;"></div><div class="separator" style="clear: both; text-align: left;"></div><div class="separator" style="clear: both; text-align: left;"><iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/Zid0rbycnHE/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/Zid0rbycnHE?feature=player_embedded" width="320"></iframe></div><p>
Support my channel by choosing to rackmount your gear 30% faster using Rackstuds! </p><p>Amazon USA: <a href="https://amzn.to/2Ec4jpz" target="_blank">https://amzn.to/2Ec4jpz</a><br />
Amazon Canada: <a href="https://amzn.to/3g0vEsk" target="_blank">https://amzn.to/3g0vEsk</a><br />Amazon UK: <a href="https://amzn.to/3aCLisQ" target="_blank">https://amzn.to/3aCLisQ</a><br />
Amazon Germany: <a href="https://amzn.to/3kTU6Px" target="_blank">https://amzn.to/3kTU6Px</a></p>xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.com0tag:blogger.com,1999:blog-2591358012859275786.post-13668647302481027262020-04-11T23:30:00.000+12:002020-04-12T13:28:06.360+12:00How to check what entities are filling up your Home Assistant databaseIf you use the Home Assistant MariaDB add-on, this tip will show you how to query the database so see what Home Assistant entity states are triggering the most, filling up your database.<br />
<br />
What were going to do:<br />
<br />
<ul>
<li>Install the phMyAdmin add-on for MariaDB.</li>
<li>Query the MariaDB database.</li>
<li>See what entity state changes have the most action.</li>
</ul>
<br />
<span class="style-scope yt-formatted-string" dir="auto">Paste the code below into the SQL query box: </span><br />
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;">select entity_id,count(<span style="color: #333333;">*</span>) <span style="color: #008800; font-weight: bold;">from</span> <span style="color: #0e84b5; font-weight: bold;">states</span> <span style="color: #0e84b5; font-weight: bold;">group</span> <span style="color: #0e84b5; font-weight: bold;">by</span> <span style="color: #0e84b5; font-weight: bold;">entity_id</span> <span style="color: #0e84b5; font-weight: bold;">order</span> <span style="color: #0e84b5; font-weight: bold;">by</span> <span style="color: #0e84b5; font-weight: bold;">count</span>(<span style="color: #333333;">*</span>) desc;
</pre>
</div>
<br />
<span class="style-scope yt-formatted-string" dir="auto">And if you're using the internal home-assistant_v2.db instead, you can use the SQLite Web add-on to achieve the same thing.</span><br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/d4puc7_sikk/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/d4puc7_sikk?feature=player_embedded" width="320"></iframe></div>
xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.com0tag:blogger.com,1999:blog-2591358012859275786.post-86603279283944975302019-02-07T17:57:00.000+13:002019-06-13T22:16:10.953+12:00How to use the Synology Chat platform with Home AssistantGet notifications <u>and now images</u> sent to your mobile from Home Assistant so you can keep an eye on your house. If you own a Synology NAS, this is a totally free notification option with no file limits. Awesome!<br />
<br />
No Android smart watch support for Chat just yet but hopefully that is coming soon.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/Ze73EoNxOAU/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/Ze73EoNxOAU?feature=player_embedded" style="clear: left; float: left;" width="320"></iframe></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
An example script that uses the platform is shown below<br />
<br />
<!-- HTML generated using hilite.me --><br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"> - service: notify.hass_synochat
data:
message: <span style="background-color: #fff0f0;">"Pool</span><span style="color: #996633;"> </span><span style="background-color: #fff0f0;">Gate</span><span style="color: #996633;"> </span><span style="background-color: #fff0f0;">was</span><span style="color: #996633;"> </span><span style="background-color: #fff0f0;">opened"</span>
data:
file_url: http://ipaddressofhass:8123/local/images/pool_gate.jpg
</pre>
</div>
<br />
<b>N.B</b> <span style="background-color: yellow;">Ensure you turn off your phones battery optimisation feature for the Synology Chat app otherwise you won't get notifications coming through in near real time.</span><br />
<br />
Buy your Synology NAS <a href="https://amzn.to/2Gf7YTn" target="_blank">here</a>.<br />
Home Assistant Chat add-on <a href="https://www.home-assistant.io/components/notify.synology_chat/" target="_blank">here</a>.<br />
Info on the Synology Chat platform is <a href="https://www.synology.com/en-global/dsm/feature/chat" target="_blank">here</a>.xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.com2tag:blogger.com,1999:blog-2591358012859275786.post-2091327210689012932018-10-09T14:30:00.004+13:002018-10-09T14:39:07.449+13:00Shelly adds MQTT support for their WiFi switches<a href="https://shelly.cloud/" target="_blank">Shelly</a> have added native support for their WiFi relay switches in version 1.3 officially released this week<br />
<a name='more'></a>Configure under <b>Internet and Security</b> > <b>Advanced - Developer Settings</b> and tick " Enable action execution via MQTT"<br />
<br />
Once you add your MQTT broker IP and username/password if applicable, you can use an application like <a href="https://mqttfx.jensd.de/index.php/download" target="_blank">MQTT.fx</a> to subscribe to "shellies/#" to discover all of the MQTT goodness coming from your device/s.<br />
<br />
The MQTT reference library is available from the Shelly API page <a href="http://shelly-api-docs.shelly.cloud/#mqtt-support-beta" target="_blank">here.</a><br />
<br />
For reference, below is my MQTT <a href="https://www.home-assistant.io/docs/configuration/packages/" target="_blank">packages</a> config for Home Assistant. Simply replace the device ID with yours. Note that on one of the Shelly2 relays, I've only configured one of the two relays.<br />
<br />
Shelly1 on Amazon <a href="https://amzn.to/2Qdexag" target="_blank">https://amzn.to/2Qdexag</a><br />
Shelly2 on Amazon <a href="https://amzn.to/2Io5aSf" target="_blank">https://amzn.to/2Io5aSf</a><br />
<br />
<script src="https://gist.github.com/xbmcnut/bd6b199d5f6ab61ccd4dba135d40ff7a.js"></script>
xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.com2tag:blogger.com,1999:blog-2591358012859275786.post-71629240936422539022018-09-29T13:27:00.001+12:002018-09-30T17:01:04.028+13:00Shelly2 Wi-Fi double switch reviewGot two of the Shelly2's last week and got around to a couple of overview videos today. I must say, very impressed. High quality and great GUI. Much better build than the Sonoff.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRM46m7QxpQAkkU6C06OFpgQw9-DBTjqXITQAXskWLs6MSLqxzxioTIC6APXTO72kuOaMc9NRyR55ZiiQHbfxGDVX8W_xrpl2RVGEFwXq71k1x5ITVrkhXn1E0HyXsHHhtrGCAXdxIXMI/s1600/shelly-index.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="500" data-original-width="500" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRM46m7QxpQAkkU6C06OFpgQw9-DBTjqXITQAXskWLs6MSLqxzxioTIC6APXTO72kuOaMc9NRyR55ZiiQHbfxGDVX8W_xrpl2RVGEFwXq71k1x5ITVrkhXn1E0HyXsHHhtrGCAXdxIXMI/s320/shelly-index.png" width="320" /></a></div>
<br />
<br />
Hardware overview here <a href="https://www.youtube.com/watch?v=peykCQm90-c" target="_blank">https://www.youtube.com/watch?v=peykCQm90-c</a><br />
GUI overview and API control here <a href="https://www.youtube.com/watch?v=Gok8YBQl97k" target="_blank">https://www.youtube.com/watch?v=Gok8YBQl97k</a><br />
Killer feature! 2-way switching <a href="https://www.youtube.com/watch?v=SVQYt5vw2k4" target="_blank">https://www.youtube.com/watch?v=SVQYt5vw2k4 </a><br />
<br />
Shelly1 on Amazon <a href="https://amzn.to/2Qdexag" target="_blank">https://amzn.to/2Qdexag</a><br />
Shelly2 on Amazon <a href="https://amzn.to/2Io5aSf" target="_blank">https://amzn.to/2Io5aSf</a><br />
<br />
From what I understand, more stock should be available mid Oct/18. xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.com0tag:blogger.com,1999:blog-2591358012859275786.post-4218098646354067482017-08-22T23:30:00.001+12:002017-08-22T23:43:30.014+12:00Getting Hass.io to boot from a USB thumb drive without a SD Card (Pi3)If you want to be able to exclusively use an external USB drive without a Micro SD Card in a Pi3 for <a href="https://home-assistant.io/hassio/" target="_blank">Hass.io</a>, these are the steps you’ll need to make it happen.<br>
<ol>
<li>Installed <a href="https://www.raspberrypi.org/downloads/raspbian/">Raspbian1</a> Lite (2017-04-10) on a MicroSD card and followed the instructions <a href="https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md">here3</a> to enable USB boot mode.
</li>
<li>Rebooted Pi then shut down a few minutes later.
</li>
<li>Burned <a href="https://home-assistant.io/hassio/installation/">hassio2</a> Pi3 image to a 16GB USB drive.
</li>
<li>Booted PC into <a href="http://gparted.org/download.php">Gparted1</a> to re-partition hassio image.
</li>
<li>Increased /dev/sdb4 from 1GB to around 4GB (must do first otherwise you can’t expand the resin-data partition).
</li>
<li>Increased /dev/sdb6 from 1GB to pretty much whatever was left.</li></ol><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghcv1uKI6a_1cGCp_dJ1qXEf03xavg6tQ_QVnm7gNeQCoIXuhtcX7c3Lh5Fr6h9VBX7D5Ld0-QFhACO6N721WkGeSk9ZufTsYFPhAP-aZmypJNPrRwbySi3n0psLd7Pw7LeiTBqvQKPYE/s1600-h/Resin-os+Hassio+File+System%255B4%255D"><img width="644" height="356" title="Resin-os Hassio File System" style="display: inline; background-image: none;" alt="Resin-os Hassio File System" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEii8D42a38yueQwKVFxgSohNNXIqOffE5pSexkq3xTy7MtYrRrJqxTAGwMQ9f775BvRQJk2Y47uB84SRP8Rh9ePj576v9nq0pSW2U83Q-4X9xQhyphenhyphenkSacKPwH60oM-2IvWozsszBNcGuCHg/?imgmax=800" border="0"></a><br></p>
<ol start="7">
<li>With the modified thumb drive back in my PC, I added the following located in the resin-boot drive <b><i>and also in the resin-rootA partition inside the resin-boot folder</i></b>:<br>I changed the “root” option in <b>cmdline.txt</b> to:<br><code>root=/dev/sda2</code><br>and I added the usb boot line below to <b>config.txt</b>, right at the end:<br><code>program_usb_boot_mode=1</code></li>
<li>I then put the reworked thumb drive back in my Pi3 without the MicroSD card and after about 1 minute, the Home Assistant logo appeared so I knew we were underway. 20 mins later, working Hassio system with no MicroSD card. Yay.</li>
</ol>xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.com0tag:blogger.com,1999:blog-2591358012859275786.post-56936676003556200382017-07-26T11:15:00.001+12:002017-08-11T11:57:48.021+12:00My collection of Hass.io help videos<div class="separator" style="clear: both; text-align: center;">
<br /></div>
I made a few videos detailing my experience with <a href="http://hass.io/">Hass.io</a>; the all-in-one version of Home Assistant that makes it easier to update Home Assistant and install add-ons. Ben from <a href="https://www.youtube.com/channel/UCLecVrux63S6aYiErxdiy4w" target="_blank">BRUH Automation</a> also added one today (26th July 2017) that goes into great detail and that’s at the bottom too. Enjoy.<br />
<a name='more'></a><b>Quick overview of Hass.io from Home Assistant</b><br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/8yMWRtEpQhM/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/8yMWRtEpQhM?feature=player_embedded" width="320"></iframe> </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>How to add HomeBridge easily to Hass.io for Siri control </b></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/A_LmQ5OlofY/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/A_LmQ5OlofY?feature=player_embedded" width="320"></iframe></div>
<br />
<b>N.B</b> Ensure you have no more than 100 entities in Home Assistant (HomeKit limit) otherwise it won't work. You can limit what gets exposed to HomeBridge from Home Assistant using the instructions <a href="https://github.com/home-assistant/homebridge-homeassistant#customization" target="_blank">here</a> and <a href="https://github.com/home-assistant/homebridge-homeassistant#configuration" target="_blank">here</a>.<br />
<br />
<b>How to enable SSH on Hass.io using encrypted keys </b><br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/GYJTy3UniHc/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/GYJTy3UniHc?feature=player_embedded" width="320"></iframe> </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>The Beginner's Guide to Home Assistant - HassIO</b> </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/XWPluWcYRMI/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/XWPluWcYRMI?feature=player_embedded" width="320"></iframe></div>
<br />xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.com0tag:blogger.com,1999:blog-2591358012859275786.post-22040783034702432302017-07-09T15:32:00.001+12:002017-07-09T15:48:09.151+12:00Syncing two Sonoff’s for 2-way light switchingFor as long as I've been playing with home automation, I've wanted a straight forward low-cost solution for replacing standard light switches. Although I have several Z-wave dimmers and Aeon Labs touch panels, these work out to be $180 NZD each! At least in NZ, the common 2-way and 3-way light circuits have the mains coming in on one switch and the load connected to another. The two switches are connected together as shown below. <br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSzL_FPOouMujxRBJJC3XD7-Jq8CMn-4FJWawvX4k94eeef0WDZkUZsHBaHflx-FhODpoLaGVHR1TJNFtAMzX3QE_MpJ0lQctIwJ_6kG_Qn1BC_urZuCJpPlLEcosOiLDUQ6YCnF-k8MU/s1600-h/3-way_switches196"><img alt="3-way_switches" border="0" height="252" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitb9VF4rGlkQJIhY-6t5K3SA0qvKHJ_ZAI3wal3UubZTqPFtmgz8qepOr3m62dvJSJQbuhqxE9VZJ-x3kitW7qJ8oLYhZ50Fnsxnxz-9q4o9YwB5DHbXGTYJweFFBiBXEsbZuXvs8D9Ts/?imgmax=800" style="background-image: none; border-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="3-way_switches" width="430" /></a> <br />
<br />
<a name='more'></a>While the excellent Fibaro dimmers allow for 2-way circuits, @ $139 NZD ea., that's not a cost effective long-term solution either. If you see <a href="http://tinkerman.cat/esp8266-multi-relay-boards-sonoff-dual-electrodragon/" target="_blank">this blog pos</a>t, the author of <a href="https://bitbucket.org/xoseperez/espurna" target="_blank">Espurna firmware</a> for Sonoff has written a post on how he achieved it using devices with two SPDT relays like the Electrodragon. <br />
<br />
My solution is even simpler (?) and leverage's the rules capability built into ESPEasy along with another very cool feature. There are several ways to do this and the first is using UDP as the ESPEasy devices can know about and talk to each other without the need for a home automation controller! <br />
<br />
To enable this, you need to define three things; <br />
<ol>
<li>Turn on rules in the advanced menu. </li>
<li>Enable UDP and define a port (I used 65432). </li>
<li>Ensure your device has a unit number between 1-32. </li>
</ol>
After that, reboot your device and on the main page at the bottom you
should see that the devices have discovered one another. Cool! To leverage UDP, you would use the SendToUDP command from the command reference guide here <a href="https://www.letscontrolit.com/wiki/index.php/ESPEasy_Command_Reference">https://www.letscontrolit.com/wiki/index.php/ESPEasy_Command_Reference</a> however I found UDP to be decidedly intermittent so I'm recommending a more reliable method below by publishing MQTT commands to a broker. <br />
<br />
In my early testing, both units come on and off at the same time which is great. Controlling either unit with MQTT turns on the other at the same time. To my mind, this is even better than a standard 2-way circuit as both status LED's for the chosen light switch/LED combo are on when the light is on. <br />
<br />
As the Sonoff's have a spare GPIO on pin 14, I'll bring this out externally to control a LED built-in to the stainless steel push button I'll be using or maybe I'll just leave the LED around the button on all the time (dimly). <br />
<br />
<b>## Sonoff1 ##</b><br />
<i><span style="background-color: #cccccc;">
on button#state do<br /> if [relay#state] = 0<br /> GPIO,12,1<br /> else<br /> GPIO,12,0<br /> endif<br />
endon</span></i><br />
<i><span style="background-color: #cccccc;">
</span></i><i><span style="background-color: #cccccc;">on relay#state do<br />
if [relay#state] = 1<br />
gpio,13,0<br />
Publish /sonoff2/gpio/12,1<br />
else<br />
gpio,13,1<br />
Publish /sonoff2/gpio/12,0<br />
endif<br />
endon</span></i><br />
<b>## Sonoff2 ##</b><br />
<i><span style="background-color: #cccccc;">
on button#state do<br /> if [relay#state] = 0<br /> GPIO,12,1<br /> else<br /> GPIO,12,0<br /> endif<br />
endon</span></i><br />
<i><span style="background-color: #cccccc;">
</span></i><i><span style="background-color: #cccccc;">on relay#state do<br />
if [relay#state] = 1<br />
gpio,13,0<br />
Publish /sonoff1/gpio/12,1<br />
else<br />
gpio,13,1<br />
Publish /sonoff1/gpio/12,0<br />
endif<br />
endon</span></i><br />
<br />
My video on this working using MQTT below:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/xQltSHSVleI/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/xQltSHSVleI?feature=player_embedded" width="320"></iframe></div>
<br />
Great video on how to use ESPEasy rules here:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/Hq253MiRjPs/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/Hq253MiRjPs?feature=player_embedded" width="320"></iframe></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.com0tag:blogger.com,1999:blog-2591358012859275786.post-26771393168023570052017-07-09T14:54:00.001+12:002017-07-09T15:07:06.185+12:00How to reboot Kodi using Google Home and ha-bridge<p>If you have an instance of <a href="http://xbmcnut.blogspot.com/2016/10/installing-ha-bridge-on-your-raspberry.html" target="_blank">ha-bridge</a> (highly recommended) running on your network like I do, it enables you to create devices that can be ‘seen’ by Google Home and Alexa for remote control via voice.</p><p>Recent versions of ha-bridge allow you to create custom commands, one of those being JSON commands so you can set up a device that sends something like the following to your Kodi instance to reboot it.</p><a name='more'></a><p><a title="http://192.168.100.13:8080/jsonrpc?request={"jsonrpc":"2.0","method":"System.Reboot","id":1}" href="http://192.168.100.13:8080/jsonrpc?request={"jsonrpc":"2.0","method":"System.Reboot","id":1} --Reboot">http://192.168.100.13:8080/jsonrpc?request={"jsonrpc":"2.0","method":"System.Reboot","id":1} –Reboot</a> (replace the IP address with that of your Kodi instance). You can test it in a browser first (recommended) and you should get the following response </p><pre>{"id":1,"jsonrpc":"2.0","result":"OK"}</pre><p>An extensive list of working Kodi JSON commands can be found here: <a title="https://forum.kodi.tv/showthread.php?tid=157996&page=7" href="https://forum.kodi.tv/showthread.php?tid=157996&page=7">https://forum.kodi.tv/showthread.php?tid=157996&page=7</a></p><p>How to set up a ‘Reboot Kodi’ command in ha-bridge</p><ol><li>Click Add/Edit top right</li><li>Under <strong>Name</strong>, type <em>Reboot Media Player</em> (or whatever you like).</li><li>Under <strong>Device Type (Informational)</strong>, select <em>Custom</em>.</li><li>Under <strong>On Items</strong> > <strong>Type</strong>, select <em>HTTP Device.</em></li><li>Under <strong>On Items</strong> > <strong>Target Item</strong>, paste in the following: <a title="http://10.0.1.101:8080/jsonrpc" href="http://10.0.1.101:8080/jsonrpc">http://10.0.1.101:8080/jsonrpc</a> (but using your IP address)</li><li>Under <strong>On Items</strong> > <strong>Http Verb</strong>, select <em>POST.</em></li><li>Under <strong>On Items</strong> > <strong>Http Body</strong>, paste in the following: <em>{"jsonrpc": "2.0", "method": "System.Reboot", "id": 1}</em></li><li><em>Under <strong>On Items</strong> > <strong>Content Type</strong>, </em>select <em>application/json</em></li><li>Click the blue “Add Bridge Device” button</li><li>Now go to Bridges Devices (top left) and find your <em>Reboot Media Player</em> device you just added and click on the light blue “Test On” button to see if your Kodi instance reboots.<br><br><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHY81mbU8OkK1eRjS_stdTjuI0o_MqKqrAk3mbZNmDX0IJRUUgNeIU1OIwTy3XP6ZHX7Louhrc_nqo0fawSfJlwgkAXO0v5lPJnBTyHJ6Ktx4ZdHdTIeHx_p1wApHN-QTEfPXrlKbIi-o/s1600-h/ha-bridge_JSON%255B6%255D"><img width="644" height="99" title="ha-bridge_JSON" style="display: inline; background-image: none;" alt="ha-bridge_JSON" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc0y9hyncW8qfzxnY1BwuT9hDbMRgw7wY6JeRSQwX9teuU-H5ebdjtqLq5Hz_G1e3B5Ru4fIFCM6YUDvDOLcgPcylMIuCR3XS-8RMOIkohvR9NIQc9zeQaasTm5tx8DMva377iP4R0fvA/?imgmax=800" border="0"></a><br><br clear="all"></li></ol><p>N.B You do not need any DIM or Off items.</p><p>One last step in Google Home using the shortcuts feature as ideally we don’t want to have to say “OK Google, Turn on Reboot Media Player” every time we want to use it.</p><ol><li>In the Google Home app in the menu top left, go to …<strong>More Settings</strong></li><li>Scroll down to Shortcuts<br><br><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV1hn1yw-U5vgcfkHjmfGWfks712qRN2vbxGtya-M7952NJJAVmruDoVD1zZ6NTM5UiMix4drAmVB9l0Du4FY_r9SFEtDcuhXfL6MMxgdLWdI01vby_njrywU6JBEzn4K5o48FRhK4IZQ/s1600-h/Screenshot_20170709-132520%25281%2529%255B7%255D"><img width="292" height="484" title="Screenshot_20170709-132520(1)" style="display: inline; background-image: none;" alt="Screenshot_20170709-132520(1)" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNe53lVUai4NphMgKdnbHiYclmSPl2lQenqejHYyabX67lyu8bKySO9ceDgyqis7aio5rO1Tpv_Xsn_U1S52wAZm1ynV3Tfh9FCFMWz8hoazn3VmjcF2gFUcIcndv-3jGoYb7MDNghULY/?imgmax=800" border="0"></a><br clear="all"><br><br clear="all"></li><li>Add a new voice command called say “Reboot Kodi” and map it to Turn on Reboot Media Player.<br><br><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgto7JblVoKUt446rLaDCmvnS6tsH6C16AXSVAMZ8YoM43iF6s-ERdB7fhkczZ5_0_tTHDT9368o7zZPfjfMcjXuJQFdRcf3LS0SlFNXkWN1LpVAOfvtRDGFPpNEFjXeSKeiHD3PVZg49s/s1600-h/Screenshot_20170709-132455%255B3%255D"><img width="456" height="484" title="Screenshot_20170709-132455" style="display: inline; background-image: none;" alt="Screenshot_20170709-132455" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixr-g4stdZCgollaE7wx_Gs7ONGVolu4j6P5p9-RoQZFVZttvFol5jxP7b5B1VIwD0cusnHhAoV2IRdI7eNPQugH_eAKtkUf5qGJgLTaYZH3Q5ragxq4rDlOdygzLi8iVrdDuxVam6tag/?imgmax=800" border="0"></a><br><br clear="all"></li></ol><p>All done. You can now reboot Kodi using Google Home. One important thing to note is that if Kodi has actually locked up badly, a JSON call may not work so your best bet is to use SSH for a reboot. If you’re on Android, use the excellent SSH Button for that available in the play store <a href="https://play.google.com/store/apps/details?id=com.pd7l.sshbutton&hl=en" target="_blank">here</a>.</p>xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.com0tag:blogger.com,1999:blog-2591358012859275786.post-11657942186126819562017-06-08T22:15:00.001+12:002020-03-30T19:22:55.543+13:00Running iPerf in Docker on Synology NAS >6.1<p>I have a DS713+ that supports Docker and needed a way to install an iPerf3 server for WLAN testing. Fortunately, that is pretty easy.</p><ul><li>Activate SSH on your Synology so you can remote in.</li><li>Using PuTTY, login as an admin user and type the following:</li><li><code><font face="Calibri" size="3"><em><strong>sudo docker pull networkstatic/iperf3</strong> </em>(then type your admin password again)</font></code></li></ul><a name='more'></a><ul><li><code><font face="Calibri" size="3">It should present you with a screen similar to the one below. This means the image was downloaded.</font><br><br clear="all"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVADC3KcGlHV-YagP6m_8VK1DEz2z42XLhLNFkKrpPLiBodlxZiriOMoFkM-LAlsdK3FmnI6aZBM_VQp6i2kL1pfcqKEFCsNnIPP82bZG8gDHOnNaJ-BCjg9L1HqBBuM21l6nrRsEidaY/s1600-h/image%255B4%255D"><em><img width="644" height="187" title="image" style="display: inline; background-image: none;" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjocRz9SaAjKL2hWknr9zfvozA9znB_Z_mzxmfFUr85HGTzaiAqxDg274F8hUNko0UrhuzUeUtYinx72cZ-ceXKYDKJWwrDMubpxp_K9AmC0WdJgGRkcKZc80uBF9YHzi4qG60rWbKKPTk/?imgmax=800" border="0"></em></a></code></li><li><code><font face="Calibri" size="3">If you look at Docker on your NAS, you should have the latest iPerf3 image now.</font><br><br clear="all"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCwCUGkCOH3RUpL3ABYQaVMzqKfZqoWqWc7N86b_1lcAEHhf9HvEgmdoZpVKXzrLLenhUF73WZn6hCUZTMdvTHucpRM2tIT3qZ3LYFFjVJGia-zfM2rNuWv53lBweh1hTCoFa9Qcf-yzs/s1600-h/image%255B8%255D"><img width="644" height="392" title="image" style="display: inline; background-image: none;" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtwgCKHM-jE98f_GbH5RNF78f62GYawMrh3duzb9Io5Z6JDeLME_kVeJQHcKpYdaeqwVNZRX3IdVGbOp3IstLmzY67Df7UPAG9wQhmL3jiyrQMTOOaKjO9nBLg5C0j7Pc0yeEhox-3YZA/?imgmax=800" border="0"></a></code></li><li><code><font face="Calibri" size="3">Now run the following command to launch a container with an iPerf3 server running in it.</font></code></li><li><strong><em>sudo docker run -it --rm -p 5201:5201 networkstatic/iperf3 -s</em></strong> (then type your admin password again) or better yet</li><li><code><font face="Calibri" size="3"><strong><em>sudo docker run -it --rm --name=iperf3-server -p 5201:5201 networkstatic/iperf3 -s </em></strong>(as this will name the container correctly on your NAS)</font></code></li><li>You should get feedback your iPerf3 server is running<br><br clear="all"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR6-eoLNuOSONcwuiJCirrGlnFbYcTdCt_RNJdQBaMa6OfsJWm_wemxUQk5idkSf2qCnXGLaulnzje_W2Aq5yaoA9KZcsMs5VQJNaOjQt9c2Qa8kmU6pHBzD6QC-cUmJCrhVtx0cqspXY/s1600-h/image%255B12%255D"><img width="644" height="91" title="image" style="display: inline; background-image: none;" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhu0VMIPmR4ZYKVnvyhIEH0qMOzZthYX46zucHqkvWJmifcdNfpJW7sa7ibRI-v3HFOPdwZeTogXwDtu0TvroGWT58TYp2iwtuh8kdzzxVewnSA9YA99eRJYxlP-xbTGy9i0U83RVBik0Y/?imgmax=800" border="0"></a></li><li>You can now run the iPerf client with something like the following transposing the <strong><iperf3 server=""></iperf3></strong> for the IP address of your Synology NAS.</li><p>Upload: <strong><em> iperf3 -c <iperf3 server=""> -w 640k -P 5 -t 60</iperf3></em></strong><br>
Download: <strong><em> iperf3 -c <iperf3 server=""> -w 640k -P 5 -t 60 -R</iperf3></em></strong></p><p>To kill the container, simply use CTRL + C in PuTTY or turn it off using the container switch inside Docker on your NAS.</p><p><strong><em>Good luck.</em></strong></p><p>References and thanks to:<br><a title="https://hub.docker.com/r/networkstatic/iperf3/" href="https://hub.docker.com/r/networkstatic/iperf3/">https://hub.docker.com/r/networkstatic/iperf3/</a><br><a title="https://forum.synology.com/enu/viewtopic.php?t=115257" href="https://forum.synology.com/enu/viewtopic.php?t=115257">https://forum.synology.com/enu/viewtopic.php?t=115257</a><br><a title="https://www.shadowandy.net/2017/01/synology-router-rt2600ac-review.htm/7" href="https://www.shadowandy.net/2017/01/synology-router-rt2600ac-review.htm/7">https://www.shadowandy.net/2017/01/synology-router-rt2600ac-review.htm/7</a> (my Router!)</p><p><br></p></ul>xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.com0tag:blogger.com,1999:blog-2591358012859275786.post-52298119249763381882017-03-09T15:15:00.001+13:002017-07-25T16:22:32.459+12:00Building an automated iPerf3 server with Ubuntu on Odroid C1+<span style="font-family: "calibri";">The Odroid devices make great iPerf servers for portable use as they can be powered by 5V micro USB and have a Gigabit Ethernet adapter on its own bus so they don’t have the limitations the Raspberry Pi’s do. OK, let’s get started.</span><br />
<span style="font-family: "calibri";">We are going to assume that you already have Ubuntu 16.04 up and running but if not, you can download official images here <a href="http://odroid.com/dokuwiki/doku.php?id=en:c1_release_linux_ubuntu" title="http://odroid.com/dokuwiki/doku.php?id=en:c1_release_linux_ubuntu">http://odroid.com/dokuwiki/doku.php?id=en:c1_release_linux_ubuntu</a>. Extract the downloaded image and burn it to a SD Card using Win32 Disk Imager. I only used a 2GB card and it works fine. First boot might take a minute or two. After it’s booted, scan your network (Fing) to find your device IP. It should show up as a device by JF Light Industries with the MAC vendor as Wibrain.</span><br />
<a name='more'></a><ol>
<li><span style="font-family: "calibri";">Launch a SSH session (root:odroid for the Ubuntu 16.04 minimal image) and type:</span><span style="font-family: "calibri";"><b><i>sudo apt-get install iperf3</i></b></span><span style="font-family: "calibri";"> </span></li>
<li><span style="font-family: "calibri";">Once installed, you can run:</span><span style="font-family: "calibri";"><b><i>sudo iperf3 -s </i></b>(CTRL + C to exit)</span></li>
</ol>
<span style="font-family: "calibri";">The -s switch starts iperf3 in server mode. However, I was interested in automating this a bit more. I wanted to be able to have iperf3 start up when the server did, with no interaction necessary. This allows for any of our engineers to use iperf3 without worrying if it has been started up. To do this, run the following commands:</span><br />
<ol>
<li><span style="font-family: "calibri";"><b><i>sudo touch /etc/init.d/iperf3</i></b></span><span style="font-family: "calibri";"><b><i> </i></b></span></li>
<li><span style="font-family: "calibri";"><b><i>sudo chmod +x /etc/init.d/iperf3</i></b></span></li>
</ol>
<span style="font-family: "calibri";">These two commands create a script called iperf3 and make it executable. Next, we’ll load the script in nano:</span><br />
<ol>
<li><span style="font-family: "calibri";"><b><i>sudo nano /etc/init.d/iperf3</i></b></span></li>
<li><span style="font-family: "calibri";">and add the following lines:</span><span style="font-family: "calibri";"><b><i><br />#!/bin/bash</i></b></span><br /><span style="font-family: "calibri";"><b><i>/usr/bin/iperf3 -s &</i></b></span></li>
</ol>
<br />
<span style="font-family: "calibri";">then save the file. You can add any switch you would like. Run iperf3 –help to see a full list of switches. Finally, we need to tell Ubuntu when we want iperf3 to run during the boot sequence:<br /><b><i> </i></b></span><br />
<span style="font-family: "calibri";"><b><i>sudo update-rc.d iperf3 defaults</i></b></span><br />
<br />
<span style="font-family: "calibri";">Ok, our server should be setup. To recap, we installed iperf3 from the default Ubuntu repos and automated its start up. The service should be running after a reboot. Type sudo reboot to reboot your Odroid and see if iPerf is running.</span><br />
<br />
<span style="font-family: "calibri";">To test, run an instance of <b>iPerf3</b> in client mode on your MAC, PC or phone with something like this</span>:<br />
<br />
Upload<br />
<b><i>iperf3.exe -c ip.of.your.Odroid -w 640k -P 5 -t 60</i></b><br />
<br />
Download<br />
<b><i>iperf3.exe -c ip.of.your.Odroid -w 640k -P 5 -t 60 -R</i></b><br />
<span style="color: #666666;"><br />-w, --window n[KM] Sets the socket buffer sizes to the specified value. For TCP, this sets the TCP window size. (this gets sent to the server and used on that side too)<br />-P, --parallel n The number of simultaneous connections to make to the server. Default is 1.<br />-t, --time n The time in seconds to transmit for. Default is 10 seconds.<br />-R, --reverse Run in reverse mode (server sends, client receives).</span><br />
From my Gigabit connected Lenovo X220 I get the following under test with the Odroid C1+ also connected to Ethernet.<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJk_j-ry2rrf6dDWUk2sGnnvvbPq4aPMgirKSr8yoTB4lq7kQr8Jp5K3EhmJPjtFxIZwDhKSb-YeO71gC-PM0yUNHeXLcQJYQ5iYEoSmSmeFr_X5nouutebp-DQQJo6-CrFtcr1mcfoaw/s1600-h/image%25255B3%25255D.png"><img alt="image" border="0" height="295" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhacytPR_56qmBAGxWGnGkQhVkB0THDbJipSi05RWEZirWEeEPAS1HUg_NC37AEac49gYamv-x_AQzWEEHE2CZIToq9Od_8edqb3cnUHGgiGqeKdNw8BAB0EqkdRTUi48k1sNhQu_GuxfM/?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="640" /></a><span style="font-family: "calibri";"> </span><br />
<span style="font-family: "calibri";"> </span><br />
<span style="font-family: "calibri";"><br clear="all" />If you want to run iPerf2 instead, simply remove all the instances of the numeral ‘3’ from the code above.</span><br />
<br />
<span style="font-family: "calibri";">N.B To prevent crashing your SD Card, you should SSH into the box and run <b><i>shutdown</i></b> or <b><i>shutdown now</i></b> to gracefully turn the Odroid off. (I use the excellent 'SSH button' available for Android only <a href="https://play.google.com/store/apps/details?id=com.pd7l.sshbutton&hl=en" target="_blank">here</a>).</span><br />
<br />
<span style="font-family: "calibri";"> Good luck.</span>xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.com0tag:blogger.com,1999:blog-2591358012859275786.post-51472893551301490282017-03-06T14:26:00.001+13:002017-07-26T13:40:59.785+12:00Running ha-bridge inside LibreELEC on your Pi2/3…yes, really!This is huge! Thanks to <a href="https://github.com/aptalca" target="_blank">aptalca</a> for creating an arm based Docker container for the Raspberry Pi (and Odroid C2!) that allows ha-bridge to run inside the LibreELEC Docker add-on! <br />
<br />
<span style="font-size: medium;">First thing you need to do is ensure your Raspberry Pi LibreELEC has a static IP address so you always know how to get to the </span><a href="https://github.com/bwssytems/ha-bridge" target="_blank"><span style="font-size: medium;">ha-bridge</span></a><span style="font-size: medium;"> web interface.</span><br />
<ul>
<li><b>Kodi > Programs > LibreELEC configuration > Connections</b> then select your active connection (LAN or Wi-Fi) and use the context menu to select ‘<b>Edit</b>’. </li>
<li>Scroll to IPV4 and change your IP address settings so they are static by using the <b>Manual</b> settings. Of course, you could always create a DHCP lease in your router if you are savvy with that and that is the better way to go. </li>
</ul>
<a name='more'></a>If you have more than one media player, I recommended settings them with static IP’s next to each other like xxx.xxx.xxx.201, xxx.xxx.xxx.202 etc. In that way, (if you use Android) you can use the excellent <a href="https://play.google.com/store/apps/details?id=com.pd7l.sshbutton&hl=en" target="_blank">SSH Button</a> app by David Grootendorst to create buttons to easily reboot Kodi from your phone or tablet if Kodi ever hangs. Sadly, I have not found a IOS app that’s as nice.<br />
<br />
<span style="font-size: medium;">Second thing you need to do (<b><span style="color: red;">IMPORTANT</span></b>) is change the web server port that Kodi is using as the default is port 80 which </span><a href="https://github.com/bwssytems/ha-bridge" target="_blank"><span style="font-size: medium;">ha-bridge</span></a><span style="font-size: medium;"> needs to use in order to be compatible with Google Home.</span><br />
<ul>
<li><b>Kodi > Settings > Services > Control > Web server</b> and change the port to 8080 (or whatever you like) as long as it’s not 80.</li>
</ul>
<span style="font-size: medium;">Now you can go ahead and get the Docker add-on for LibreELEC made by the devs at LE.</span><br />
<ul>
<li><b>Kodi > Add-ons > Install from repository > LibreELEC Add-ons > Services > Docker</b></li>
<li>Once installed, use the context menu to edit the settings in Docker if you want Kodi to pop-up notifications when your Docker container starts, stops or otherwise farts. <b>Docker > Settings > Notifications</b>. Either select ‘All’ or ‘Custom’.</li>
</ul>
<span style="font-size: medium;">Now you’re ready to bring down the Docker image file for ha-bridge and start the container.</span><br />
<ul>
<li>Login to your Raspberry Pi (root:libreelec) and run the following command.</li>
<li><span style="color: #666666;"><b><i>docker run -d --name="habridge" --restart=always --net="host" -e SERVERIP="your-pi’s-ip-address" -e SERVERPORT="80" -v /storage/downloads/habridge:/config:rw -v /etc/localtime:/etc/localtime:ro aptalca/home-automation-bridge-arm</i></b></span></li>
<ul>
<li>Replace “your-pi’s-ip-address with the static IP address of your Pi (do not use localhost as this will prevent ha-bridge from ‘seeing’ devices on your network).</li>
<li>Replace the "/path/to/config" with your choice of location. For LibreELEC, <u><span style="background-color: yellow;">the path must start with</span></u> <b><i><span style="color: #666666;">/storage</span></i></b> as that is the only location that is writeable.</li>
<li>If the -v /etc/localtime:/etc/localtime:ro mapping causes issues, you can try -e TZ="<timezone>" with the timezone in the format of "America/New_York" instead. Get your time zone here <a href="http://www.timezoneconverter.com/cgi-bin/zoneinfo" title="http://www.timezoneconverter.com/cgi-bin/zoneinfo">http://www.timezoneconverter.com/cgi-bin/zoneinfo</a>.</li>
</ul>
<li>It will take about 5 mins for your Raspberry Pi to download, extract and install the required components.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjlRtH3s5XEO979HSxTjzD5L1HG1M1_rp7cEY2otSqtBpTRAEOGHuNVGDDSfq67rgOXw0ZbOkkrMCjeQZL91QeDFgyx6rTd-7VVLwI24G78rcnPXk4JP0vSsrhG7OYjK6KSYkGu7C9Auw/s1600-h/image%25255B8%25255D.png"><img alt="image" border="0" height="267" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMxDN4FjAekovtZm5d4tO1KGHQewzRsj2HiboFqTp2KPjyQzukBvKDipUfXhQhsp4zbtow_FYADaSscYSSHy2XEfeTWEAlC3Ukt2ropoftOeUQnbAn4Lo0PbnY9lI47OzQyG3EH8oVBUM/?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="786" /></a></li>
<li>After the installation is finished, the ha-bridge container should be running. Test this using <b>docker ps -a. </b>This will list the running containers showing you the container ID and name (habridge).</li>
<li>Open a browser and navigate to the IP address of your Pi. You should now see the ha-bridge web interface. If you see the Kodi interface, you did not change the Kodi web server port at the start of this guide. Go back and do that then refresh the web page.</li>
</ul>
Full and comprehensive instructions on configuring ha-bridge are on the GitHub repository <a href="https://github.com/aptalca/docker-ha-bridge" title="https://github.com/aptalca/docker-ha-bridge">https://github.com/aptalca/docker-ha-bridge</a>. Mad props to BWS Systems, the creators of <a href="https://github.com/bwssytems/ha-bridge" target="_blank">ha-bridge</a>. It really brings your Amazon Echo or Google Home to life. Additional info on the ha-bridge docker image is on the GitHub repository <a href="https://github.com/aptalca/docker-ha-bridge" title="https://github.com/aptalca/docker-ha-bridge">https://github.com/aptalca/docker-ha-bridge</a> (<b><span style="background-color: yellow;">DO NOT</span></b> use the instructions on the GitHub repository to download and start your container as those instructions are for <b>x86</b> based processors).<br />
<span style="font-size: medium;">Some Docker commands for controlling your ha-bridge container</span><br />
<ul>
<li><b>docker ps -a</b> (list all running containers so you can copy the container ID for use in the next commands)</li>
<li><b>docker stop <container ID> or <container name> </b>(e.g. <b>docker stop habridge</b>)</li>
<li><b>docker start <container ID> or <container name></b></li>
<li><b>docker restart <container ID> or <container name> </b>(restarts the container downloading the latest ha-bridge build if necessary)</li>
<li><b>docker stats <Container ID></b> (Show statistics including CPU use. Control + C to exit)</li>
<li><b>docker logs <Container ID> </b>(Hopefully you’ve already tried this, but if not, start here. This’ll give you the full STDOUT and STDERR from the command that was run initially in your container).</li>
<li><b>docker cp <Container ID>:/path/to/useful/file /local-path</b>Often just getting hold of more log files is enough to sort you out. If you already know what you want, docker cp has your back. Copy any file from any container back out onto your local machine, so you can examine it in depth.</li>
<li><b>docker rm <container ID> </b>(removes the container. Stop it first)</li>
<li><b>docker rmi aptalca/home-automation-bridge-arm</b> (removes the complete docker image file). Simply use the ‘<b>docker run -d…</b>’ command above to re-download the image and start a new container.</li>
<li>Additional info about removing Images and Containers can be found here <a href="https://tecadmin.net/remove-docker-images-and-containers/" target="_blank">https://tecadmin.net/remove-docker-images-and-containers/ </a></li>
</ul>
<div class="wlWriterEditableSmartContent" id="scid:77ECF5F8-D252-44F5-B4EB-D463C5396A79:775987d2-3c6b-4d10-9cf6-676ec5112f3b" style="display: inline; float: none; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
Technorati Tags: <a href="http://technorati.com/tags/Home+Assistant" rel="tag">Home Assistant</a>,<a href="http://technorati.com/tags/Docker" rel="tag">Docker</a>,<a href="http://technorati.com/tags/LibreELEC" rel="tag">LibreELEC</a>,<a href="http://technorati.com/tags/How+To" rel="tag">How To</a>,<a href="http://technorati.com/tags/Google+Home" rel="tag">Google Home</a>,<a href="http://technorati.com/tags/Amazon+Echo" rel="tag">Amazon Echo</a>,<a href="http://technorati.com/tags/Raspberry+Pi" rel="tag">Raspberry Pi</a>,<a href="http://technorati.com/tags/Kodi" rel="tag">Kodi</a></div>
xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.com0tag:blogger.com,1999:blog-2591358012859275786.post-60143471003517639102017-02-11T17:02:00.001+13:002017-05-29T09:34:22.461+12:00How to flash ESPEasy onto the Sonoff Touch for MQTT control<br />
<div style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;">
You can completely remove the low voltage board and connect as shown below. GPIO0 needs to be pulled to ground on power up (it can be left grounded during flashing) to enter programming mode. Power the device from your FTDI programmer set to <b>3.3V</b>.</div>
<br />
The <a href="https://www.itead.cc/sonoff-touch.html" target="_blank">Sonoff Touch</a> is a nice glass touch panel based on an ESP<b>8285</b> with 1MB of integrated flash that can be quite easily flashed with a self compiled version of ESP Easy. You need to <u>compile yourself</u> as the builds available online are all made for the ESP8266 and will not work with the Sonoff Touch.<br />
<a name='more'></a><div align="left">
<img align="left" alt="Sonoff Touch US" src="https://github.com/arendst/arendst.github.io/raw/master/media/touchus.jpg" style="display: inline; float: left;" width="230" /></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<ol>
<li>Download the latest release candidate from here <a href="http://www.letscontrolit.com/wiki/index.php/ESPEasy#Release_candidates" title="http://www.letscontrolit.com/wiki/index.php/ESPEasy#Release_candidates">http://www.letscontrolit.com/wiki/index.php/ESPEasy#Release_candidates</a> and the copy the compiled version I created <a href="https://1drv.ms/u/s!AjRs7Xpm-jMMg6EYYOO2yP4G3WH2rg" target="_blank">here</a> into the same folder. </li>
<li>Run flash.cmd and choose your com port, then <b>1024</b> to match the flash size of the Sonoff Touch and then <b>148</b> for the version number. Flashing should take about 30s. </li>
<li>Once completed, disconnect from your programmer and reconnect. The device will boot into AP mode with a SSID of ESP_0. </li>
<li>Connect to that network using configesp as the password then navigate to 192.168.4.1</li>
<li>Connect to your SSID and enter your network password. The Sonoff should now connect to your Wi-Fi and tell you what IP it got assigned. </li>
<li>Connect your PC back to your network and navigate to the IP your Sonoff got assigned.</li>
<li>Under ‘Config’, give your device a name (I called mine sonofft1) and change the protocol to OpenHAB MQTT and set your broker IP, username and password.</li>
<li>Under Tools > Advanced, tick ‘MQTT Retain Msg:’ and ‘Rules:’ right at the bottom and click Submit.</li>
<li>At the top, you’ll now have a new tab called Rules. Paste the following into the rules section and click submit.<br /><br /><i>on button#state do<br /> if [button#state]=0<br /> gpio,12,0<br />if [button#state]=1<br /> gpio,12,1<br />endon</i></li>
<li>Under devices, add a switch input configured as shown to enable the touch button<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcvyXbR0qehqd3Jvl9GGjcQZl3wkLPPgGZhAOw9kIDEHLRsH4hdyTZxFPczCkwUqzA_6NChulK5RGs72drTU5lZH_7dBRpTQINEcxGo5Fe_LahJZdpGcE0APF3Z2QmZxRpcM4ahyphenhyphennELmw/s1600-h/image%25255B3%25255D.png"><img alt="image" border="0" height="484" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhldIBsuc6u08cpmbi5JhhDZ6N0Wn_jX_icZub5z6-RdkTXRk2-9vgLzkAz0sXKKC_ulbsj2dIA4Glj9RWA_I6Q_egRjYYhCH_vIryUYglKZFO3HEX6ZYrDp_9aiRQOWaXs-ROqxhyphenhyphenC25c/?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="456" /></a></li>
<li>Add another switch input for the relay as shown. The IDX/Var you can make up and I don’t think they matter if you’re using MQTT. They do if you’re connecting to Domoticz.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq9xW6T3mtaVflEU3Ihh0WPmMd4mVPD-4xVzG8vaj95Nts8Hsc_s-GgkhwfSC8W1Mz8BAdx9HCcZODplVyWz_CXiF7nP9TQAZ2LlCPgX8AthX3m8uhJmBl8Lud2TjeSDyDQFjip7tdvxE/s1600-h/image%25255B7%25255D.png"><img alt="image" border="0" height="484" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaMSPXFIQopaEDQNLu_NDR0XVc14b9e-aStM-lmK-9SMhUn-o5FfDdjCNndnPYf6DJb21Nuwfg8ZCASBoc2IyH7ueQ1XfpT_TYOthRcY7Y8fcyNV2LN_Qay54X5usqMFzh4FJRus3Qe54/?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="459" /></a></li>
<li>You should now be able to push the button and your light will come on. Using the rules I’ve posted, the light should go off when the Sonoff is rebooted and stay off.</li>
<li>You can get a report on the button and relay states by subscribing to:<br /><i>/devicename/button/state<br />/devicename/relay/state</i></li>
<li>You can control the relay by publishing to <i>/devicename/gpio/12</i> with a payload of 1 for on and 0 for off<br /><br />N.B The integrated LED does not need control and simply tracks the button/relay state.</li>
</ol>
For your reference, here are the GPIO assignments. <br />
BUTTON is on GPIO0<br />
RELAY is on GPIO12<br />
LED is on GPIO13xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.com5tag:blogger.com,1999:blog-2591358012859275786.post-67610359764455342822017-02-02T20:51:00.000+13:002017-03-16T13:46:15.443+13:00How to enable Samba on the HASSBian imageThe videos prior to 1st Feb 2017 like Ben's one below all indicate the following instructions for installing Samba but if you use the HASSBian image like I've now done, the path to 'Home Assistant' in the samba.conf file is wrong.<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/iQwWEsuRWUw/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/iQwWEsuRWUw?feature=player_embedded" width="320"></iframe> </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<i>[HOME ASSISTANT]<br />path = /var/opt/homeassistant</i> <u>becomes</u></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<a name='more'></a><br />
<div class="separator" style="clear: both; text-align: left;">
[HOME ASSISTANT]</div>
<b>path = /home/homeassistant/.homeassistant</b><br />
<br />
The updated instructions follow.<br />
<br />
<b>Installing Samba:</b><br />
sudo apt-get update<br />
sudo apt-get install samba<br />
sudo nano /etc/samba/smb.conf<br />
<br />
With nano open, hold down CTRL + K to remove all entries<br />
Paste in the code below<br />
CTRL + X to exit<br />
Type Y then enter to save the updated file<br />
<br />
<span style="color: #cc0000;"><span style="color: #666666;">Configuration:<br />[global]<br />netbios name = RP2<br />server string = The Pi File Center<br />workgroup = WORKGROUP<br />hosts allow =<br />socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536<br />remote announce =<br />remote browse sync =<br /><br />[HOMEPI]<br />path = /home/pi<br />comment = No comment<br />browsable = yes<br />read only = no<br />valid users =<br />writable = yes<br />guest ok = yes<br />public = yes<br />create mask = 0777<br />directory mask = 0777<br />force user = root<br />force create mode = 0777<br />force directory mode = 0777<br />hosts allow =<br /><br />[HOME ASSISTANT]<br /><b>path = /home/homeassistant/.homeassistant</b><br />comment = No comment<br />browsable = yes<br />read only = no<br />valid users =<br />writable = yes<br />guest ok = yes<br />public = yes<br />create mask = 0777<br />directory mask = 0777<br />force user = root<br />force create mode = 0777<br />force directory mode = 0777<br />hosts allow =</span></span><br />
<br />
<b><br />Creating Samba User:</b><br />
sudo smbpasswd -a pi<br />
type password, press enter<br />
<br />
<b>Restart Samba Service:</b><br />
sudo service smbd restart<br />
<br />
********************************************<br />
Thanks to <a href="http://www.bruhautomation.com/" target="_blank">Ben</a> for his excellent guides and videos.xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.com0tag:blogger.com,1999:blog-2591358012859275786.post-58029636286229633252016-11-29T13:03:00.001+13:002017-03-16T13:46:55.623+13:00Enabling the integrated Mosquitto broker on the HASSbian imageThe Home Assistant image <a href="https://home-assistant.io/getting-started/installation-raspberry-pi-image/" target="_blank">HASSbian</a> has the Mosquitto MQTT broker integrated into the image but it is not enabled by default. To get it working and persistent on reboot, perform the following:<br />
<ol>
<li><b><i>sudo systemctl enable mosquitto</i></b></li>
<li><b><i>sudo systemctl start mosquitto</i></b></li>
<li><b><i>sudo reboot</i></b></li>
</ol>
To test, once your system is back up, type <b><i>sudo systemctl status mosquitto.service</i></b> and you should get back the following:<br />
<br />
<a name='more'></a><br />
<a href="mailto:pi@raspberrypi">pi@raspberrypi</a>:~ $ sudo systemctl status mosquitto.service<br />
● mosquitto.service - LSB: mosquitto MQTT v3.1 message broker<br />
Loaded: loaded (/etc/init.d/mosquitto)<br />
Active: active (running) since Tue 2016-11-29 12:54:25 NZDT; 6min ago<br />
Process: 390 ExecStart=/etc/init.d/mosquitto start (code=exited, status=0/SUCCESS)<br />
CGroup: /system.slice/mosquitto.service<br />
└─399 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf<br />
Nov 29 12:54:24 raspberrypi mosquitto[390]: Starting network daemon:: mosquitto.<br />
Nov 29 12:54:25 raspberrypi systemd[1]: Started LSB: mosquitto MQTT v3.1 message broker.<br />
<br />
Note that by default, the HASSbian version of Mosquitto does not have a username and password set for MQTT unlike the all-in-one installer.<br />
<br />
To add a password, follow the instructions on Ben’s video below at the 1:53s mark.<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/AsDHEDbyLfg/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/AsDHEDbyLfg?feature=player_embedded" width="320"></iframe></div>
xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.com0tag:blogger.com,1999:blog-2591358012859275786.post-65174856751687908832016-11-17T14:10:00.002+13:002022-10-31T15:54:35.557+13:00Adding 4 relays to your Home Assistant Pi with Arduino UNO<p>For those that want 4 relays cheaply using a clone of the Seeed studio V2.0 relay board available on AliExpress <a href="https://goo.gl/6Gm20R">here</a>, this is how it's configured in HA. Simply follow the <a href="https://home-assistant.io/components/arduino/">Arduino instructions</a> to load the Firmata firmware on your board then plug the Arduino board into your Raspberry Pi.</p> <a name='more'></a> <p> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwWNbzQR4R2cW9QcAuKH86YMDLHtq9XcNuT5FfKpKFnxsXsBEIBoZf7JobJ0GwNWOUENxMsNSMMNoEtGC8hIMgwOYj_3exftXozmyMhZuKi2r_fZyj16H3JckS9MrNGDJzOQBz-TQMm_0J2v5TH2XQ1-pYHDdO2e29L1WSeoCgWRksFInsALazLOee/s1500/4-CHANNEL-5V-RELAY-SHIELD-FOR-ARDUINO.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1500" data-original-width="1500" height="603" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwWNbzQR4R2cW9QcAuKH86YMDLHtq9XcNuT5FfKpKFnxsXsBEIBoZf7JobJ0GwNWOUENxMsNSMMNoEtGC8hIMgwOYj_3exftXozmyMhZuKi2r_fZyj16H3JckS9MrNGDJzOQBz-TQMm_0J2v5TH2XQ1-pYHDdO2e29L1WSeoCgWRksFInsALazLOee/w603-h603/4-CHANNEL-5V-RELAY-SHIELD-FOR-ARDUINO.jpg" width="603" /></a></div><br /><p><br /></p><p></p><code><font size="2">arduino:<br /> port: /dev/ttyACM0<br /> <br />switch:<br /> platform: arduino<br /> pins:<br /> 4:<br /> name: Relay 4<br /> 5:<br /> name: Relay 3<br /> 6:<br /> name: Relay 2<br /> 7:<br /> name: Relay 1<br /> 13:<br /> name: Internal LED</font></code> <p>The manual for the relay board is <a href="https://seeeddoc.github.io/Relay_Shield_V2.0/">here</a>. </p><p></p><p></p>xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.com0tag:blogger.com,1999:blog-2591358012859275786.post-4950756453595222122016-10-19T12:42:00.001+13:002016-10-19T15:47:08.887+13:00Getting HADashboard up and running on Jessie for use with Home AssistantHADashboard is a very cool dashboard for use with Home Assistant. I’ve tested the installation process on a Raspberry Pi1 version B (yes I know) and although it took nearly a whole day to get working, work it does and by golly, does it look good. More info on GitHub here <a href="https://github.com/home-assistant/hadashboard" target="_blank">https://github.com/home-assistant/hadashboard</a><br />
<ol>
<li>First step is to install docker on your Raspberry Pi if you have never done that before:<br /><b><i>curl -sSL get.docker.com | sh</i></b></li>
<li>If you would like to use Docker as a non-root user, you should now consider adding your user to the "docker" group with something like:<br /><b><i>sudo usermod -aG docker pi</i></b></li>
<li>Set Docker to auto-start:<br /><b><i>sudo systemctl enable docker</i></b></li>
</ol>
More info here and credit to <a href="http://blog.alexellis.io/author/alex/" target="_blank">Alex Ellis</a> <a href="http://blog.alexellis.io/getting-started-with-docker-on-raspberry-pi/" target="_blank">http://blog.alexellis.io/getting-started-with-docker-on-raspberry-pi/</a><br />
<br />
<hr />
<br />
<a name='more'></a><b>Installing HADashboard for Home Assistant on Jessie</b><br />
<ol>
<li>Clone the Repository:<br />Clone the hadashboard repository to the current local directory on your machine.<br /><b><i>git clone </i></b><a href="https://github.com/home-assistant/hadashboard.git"><b><i>https://github.com/home-assistant/hadashboard.git</i></b></a></li>
<li>Change your working directory to the repository root. Moving forward, we will be working from this directory:<br /><b><i>cd hadashboard</i></b></li>
<li>Install the hadashboard docker file:<br />Raspberry pi needs to use a different docker build file so the build command is slightly different:<br /><b><i>docker build -f Docker-raspi/Dockerfile -t hadashboard .</i></b> (Don’t forget the full stop (.) at the end. N.B This took 5hrs on a Pi1 B so be prepared to wait).</li>
<li>Next, in the ./lib directory, copy the <b>ha_conf.rb.example</b> file to <b>ha_conf.rb</b> and edit its settings to reflect your installation, pointing to the machine Home Assistant is running on and adding your api_key.<br /><br />$ha_url = "<a href="http://10.0.2.17:8123"">http://10.0.2.17:8123"</a><br />$ha_apikey = "your key"<br /><br />$ha_url is a reference to your home assistant installation and must include the correct port number and scheme (<a href="http:// or">http:// or</a> <a href="https:// as">https:// as</a> appropriate) <br />$ha_apikey should be set to your key if you have one, otherwise it can remain blank. <br /><br />The file also contains example newsfeeds for the News widget:<br /><br />$news_feeds = {<br /> "Traffic" => "<a href="http://api.sr.se/api/rss/traffic/2863%22">http://api.sr.se/api/rss/traffic/2863"</a>,<br /> "News" => <a href="http://feeds.bbci.co.uk/news/rss.xml">http://feeds.bbci.co.uk/news/rss.xml</a>,<br />}<br /><br />You can leave these alone for now or if you prefer customize them as described in the News widget section here <a href="https://github.com/home-assistant/hadashboard#news" target="_blank">https://github.com/home-assistant/hadashboard#news</a>.</li>
<li>Make a copy of <b>dashboards/example.erb</b> and call it '<b>main.erb</b>', then edit this file to reference the items you want to display and control and to get the layout that you want. Leave the original example.erb intact and unchanged so that you don't run into problems when trying to update using the git commands mentioned later in "<a href="https://github.com/home-assistant/hadashboard#updating-the-dashboard" target="_blank">Updating the Dashboard</a>". Full instructions here <a href="https://github.com/home-assistant/hadashboard#configuring-the-dashboard-all-installations" target="_blank">https://github.com/home-assistant/hadashboard#configuring-the-dashboard-all-installations</a>.</li>
<li>In the directory /home/pi/hadashboard/hapush, copy the <b>hapush.cfg.example</b> file to <b>hapush.cfg</b> then edit it to reflect your environment. This is what mine looks like.<br /><br />ha_url = "<a href="http://10.0.2.17:8123"">http://10.0.2.17:8123"</a><br />ha_key = <br />dash_host = "10.0.2.17:3030"<br />dash_dir="/app/dashboards"<br />logfile = "/app/hapush/hapush.log"</li>
<li>You are now ready to run the docker image.<br /><b><i>docker run --name="hadashboard" -d -v /home/pi/hadashboard/dashboards:/app/dashboards -v /home/pi/hadashboard/lib/ha_conf.rb:/app/lib/ha_conf.rb -v /home/pi/hadashboard/hapush:/app/hapush --net=host hadashboard</i></b> (all in one line)<br /><br />You may need to double check your paths are correct for mapping to the <b>dashboards</b>, <b>ha_conf.rb</b> and <b>hapush</b> locations? These are for my Pi with a standard Jessie install.</li>
<li>You should get back something like this meaning your container has at least started:<br />0aac704f2093dd10ff0413f0e77c50769c5c569ee25fd57cb67ee1d338e51f3b</li>
<li>You should now be able to go to <ipaddressofyourPi>:3030/main to see the example hadashboard. By default, if you do not append the <b>/main</b> it will load the example file <ipaddressofyourPi>:3030/example</li>
</ol>
<b><span style="font-size: small;">DEBUGGING STEPS</span></b><br />
<ol>
<li>Test your docker instance:<br /><b><i>docker ps -a</i></b></li>
<li>This should return:<br />CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES<br /><b>0aac704f2093</b> hadashboard "/bin/sh -c '/app/hap" About an hour ago Up 59 minutes hadashboard<br />You need the “Container ID” for the next step.</li>
<li>Using the container ID, inspect the logs:<br /><b><i>docker logs xxxxxxx</i></b> (Transpose xxxxxxx with your container ID).</li>
<li>To restart your docker container:<br /><b><i>docker restart <yourcontainerID></i></b></li>
<li>To check all of your file mappings and to make sure everything is supposed to be where it supposed to be, try this:<br /><b><i>docker exec -t -i <yourcontainerID> /bin/bash</i></b> then,<br /><br /><b><i>ls /app/hapush/</i></b> should give you:<br /><br />root@raspberrypi:/app# ls /app/hapush/<br />hapush.cfg hapush.cfg.example hapush.log hapush.py<br /><a href="mailto:root@raspberrypi:/app">root@raspberrypi:/app</a>#<br /><br /><b><i>ls /app/dashboards</i></b> should give you:<br /><br />root@raspberrypi:/app# ls /app/dashboards<br />example.erb layout.erb main.erb<br /><a href="mailto:root@raspberrypi:/app">root@raspberrypi:/app</a>#</li>
<li>Navigate to <b>/home/pi/hadashboard/hapush/hapush.log</b> using WinSCP to see what is going on. If everything is OK, there should only be two lines:<br /><br />2016-10-18 21:48:27,891 INFO Reading dashboard: /app/dashboards/main.erb<br />2016-10-18 21:48:27,948 INFO Reading dashboard: /app/dashboards/example.erb</li>
</ol>
For the more adventurous out there that even know what a docker-compose.yaml file is, user <a href="https://github.com/snizzleorg" target="_blank">@snizzleorg</a> has provide some information on starting the docker containers using a better method. More info here <a href="https://github.com/home-assistant/hadashboard#starting-at-reboot" target="_blank" title="https://github.com/home-assistant/hadashboard#starting-at-reboot">https://github.com/home-assistant/hadashboard#starting-at-reboot</a><br />
<br />
<hr />
“I personally prefer docker-compose to create and run the images:<br />
This is my docker-compose.yaml file for hadashboard:”<br />
---<br />
home-assistant:<br />
build: Dockerfile-rpi<br />
restart: always<br />
net: "host"<br />
volumes:<br />
- '/etc/localtime:/etc/localtime:ro'<br />
- '/etc/timezone:/etc/timezone:ro'<br />
- '/etc/home-assistant/hadashboard/dashboards:/app/dashboards<br />
- '/etc/home-assistant/hadashboard/config/:/app/lib/<br />
- '/etc/home-assistant/hadashboard/hapush/:/app/hapush/<br />
<br />
<hr />
Good luck and may the force be with you.<br />
Post your issues in GitHub here <a href="https://github.com/home-assistant/hadashboard/issues" target="_blank" title="https://github.com/home-assistant/hadashboard/issues">https://github.com/home-assistant/hadashboard/issues</a>xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.com5tag:blogger.com,1999:blog-2591358012859275786.post-1443765236481722192016-10-18T16:59:00.001+13:002017-03-16T13:47:19.911+13:00My Notepad++ tricks when editing YAML files in Home Assistant<b>To comment out a whole section in one go:</b>Highlight the text you want to comment out and use CTRL + Q. If you do this at the start of a line, it will only comment that line. CTRL + Q is toggle mode (comment on/off). CTRL + K will allow you to add multiple comments one after the other.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigeeX1UNEPZDAUn_NwLxubJ8HwZVayQ67GTP4HmXm6TzgT3ioDReu_-s0PuqAW_eYVqjawy0NE2DZAsUk4jQGT336i2a65ZFkwZD9EloAAXHD80KoVYVaOrS1Xj22vKWvVvLi_kP58ohE/s1600/ScreenGrab186.bmp" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigeeX1UNEPZDAUn_NwLxubJ8HwZVayQ67GTP4HmXm6TzgT3ioDReu_-s0PuqAW_eYVqjawy0NE2DZAsUk4jQGT336i2a65ZFkwZD9EloAAXHD80KoVYVaOrS1Xj22vKWvVvLi_kP58ohE/s1600/ScreenGrab186.bmp" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<a name='more'></a><br />
<b>To automatically insert two spaces when you use the TAB key:</b><br />
<ol>
<li>In the <b>'</b><b>Tab Settings' </b>list, scroll down to <b>'yaml'</b> and click on it.</li>
<li>Make sure <b>'Use default value'</b> is unchecked. Set <b>'Tab size'</b> to <b>2</b> and check <b>'Replace by space'</b></li>
<li>Then click close and Notepad++ will use spaces instead of tab.</li>
</ol>
<b>To fix trailing and leading spaces causing YAML errors:</b><br />
The most common problems with config files is spaces or tabs where they do not belong, here are 2 ways to fix this.<br />
<ol>
<li>Open the file in Notepad++ then select <b>Edit</b> > <b>Blank Operations</b> > <b>TAB to space</b>, </li>
<li>Then select<b> Edit</b> > <b>Blank Operations</b> > <b>Trim Trailing Space</b></li>
</ol>
<b>Online YAML Testers:</b><br />
<ol>
<li><a href="http://codebeautify.org/yaml-validator" target="_blank" title="http://codebeautify.org/yaml-validator">http://codebeautify.org/yaml-validator</a></li>
<li><a href="http://www.yamllint.com/" target="_blank" title="http://www.yamllint.com/">http://www.yamllint.com/</a></li>
<li><a href="http://yaml-online-parser.appspot.com/" target="_blank" title="http://yaml-online-parser.appspot.com/">http://yaml-online-parser.appspot.com/</a></li>
</ol>
Enjoy. xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.com2tag:blogger.com,1999:blog-2591358012859275786.post-24981297723922464922016-10-06T11:17:00.001+13:002017-06-14T21:34:47.193+12:00Installing ha-bridge on your Raspberry PiEDIT: Updated 14th June 2017 to reflect version 4.5.5. Default port is now 80 to keep Google Home happy and service now supports MQTT! Advice on backups also added 7th Feb. Version 4x also supports adding a Home Assistant instance which is great!<br />
<br />
Want to control your Vera, Harmony hub or Home Assistant entities with your Amazon echo or Google Home? <a href="https://github.com/bwssytems/ha-bridge" target="_blank">ha-bridge</a> is the best way to achieve that and installation is actually quite easy and takes less than 5 minutes. Here are the steps.<br />
<a href="https://www.blogger.com/null" name="more"></a><br />
<a name='more'></a><br />
<ol>
<li>On your Raspberry Pi, make sure you are in the Pi home folder:<br /><b>cd /home/pi/</b></li>
<li>Then make a habridge folder:<br /><b>mkdir habridge</b></li>
<li>Now change to the folder and download the latest ha-bridge jar file:<br /><b>cd habridge<br />wget </b><a href="https://github.com/bwssytems/ha-bridge/releases/download/v4.5.5/ha-bridge-4.5.5.jar" target="_blank">https://github.com/bwssytems/ha-bridge/releases/download/v4.5.5/ha-bridge-4.5.5.jar</a></li>
<li>Create a ‘data’ holder inside the habridge folder:<br /><b>mkdir data</b></li>
<li>Now you have to create the systemd service file:<br /><b>nano habridge.service</b></li>
<li>Then copy and paste the following:<br /> <hr />
<i><span style="background-color: white;">[Unit]<br />Description=HA Bridge<br />Wants=network.target<br />After=network.target<br /><br />[Service]<br />Type=simple<br />ExecStart=/usr/bin/java -jar -Dconfig.file=/home/pi/habridge/data/habridge.config /home/pi/habridge/ha-bridge-4.5.5.jar<br /><br />[Install]<br />WantedBy=multi-user.target</span><br /> <hr />
</i></li>
<li>Now, to save the file, hit <b>CTRL-X</b>, then hit <b>Y</b> and RETURN</li>
<li>You need Java 8 JDK to be able to run ha-bridge<br /><b>sudo apt-get update && sudo apt-get install oracle-java8-jdk</b></li>
<li>Then run:<br /><b>sudo update-alternatives --config java </b>and select the JDK 8 version (/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/bin/java) if asked.</li>
<li>Then run the following to confirm you have the right Java version:<br /><b>java -version</b></li>
<li>Next you need to enable the systemd service so it will automatically start every time you reboot your Raspberry Pi (ignore the Shell script instructions on the ha-bridge ReadMe as newer Debian builds [Jessie] work best with systemd):<br /><b>sudo systemctl enable /home/pi/habridge/habridge.service</b></li>
<li>Now that it is enabled, you have to start it. Since it is enabled, you don’t need the full path to run it:<br /><b>sudo systemctl start habridge</b></li>
<li>The default port for HA Bridge is 80, so open your browser and go to your RPI address, port 80:<br /><b><a href="http://[your-ip-address]:8080" target="_blank">http://[your-ip-address]:80</a></b></li>
</ol>
<b>N.B </b>If the ha-bridge version is updated, simply edit the WGET line in step 3 to download the correct version and edit the code used in step 6 (habridge.service) to reflect the correct version. If you want, you can have multiple versions downloaded in the habridge folder and simply switch between them by modifying the code in the habridge.service file (the ExecStart line).<br />
<br />
<ol>
<li>Stop ha-bridge either via the GUI or using <b>sudo systemctl stop habridge.service</b></li>
<li>Change into the ha-bridge directory <b>cd /home/pi/habridge</b></li>
<li>Edit the service file <b>nano habridge.service</b></li>
<li>Save the change then run <b>sudo systemctl daemon-reload</b></li>
<li>Start the service using <b>sudo systemctl start habridge.service</b></li>
<li>Check the status after a few seconds with <b>sudo systemctl status habridge.service</b></li>
</ol>
If you want to control your Home Assistant entities with ha-bridge, there is a great guide here <a href="http://fearoffish.com/home-automation/home-assistant-and-ha-bridge/" target="_blank" title="http://fearoffish.com/home-automation/home-assistant-and-ha-bridge/">http://fearoffish.com/home-automation/home-assistant-and-ha-bridge/</a> and here on Pete Scargill's blog <a href="http://tech.scargill.net/toying-with-ha-bridge/" target="_blank">http://tech.scargill.net/toying-with-ha-bridge/</a>. There is also one on controlling the MiLight bridge here <a href="http://codecorner.galanter.net/2016/05/12/full-control-of-your-limitless-ledmilight-bulbs-from-amazon-echo/" target="_blank">http://codecorner.galanter.net/2016/05/12/full-control-of-your-limitless-ledmilight-bulbs-from-amazon-echo/</a>.<br />
<br />
<b>Backups</b><br />
Immediately after configuring the bridge and all of you devices, I would run a backup at the bottom of the "Bridge Devices" tab and the "Bridge Control" tab. If you do not choose a name, ha-bridge will automatically create one for you.<br />
<br />
<u>Bridge Devices</u> is all of the individual actions you've created and if the defaults are left, the backup file will be located in <i><b>/data</b></i> and look something like <i>device.db-2017-02-07-20-28-06.bk.</i><br />
<br />
<u>Bridge Control</u> contains the actual bridge configuration like your Harmony Hubs IP, Vera, MQTT etc. The backup is located in <i><b>/home/pi/habridge/data</b></i> and looks something likes <i>habridge.config-2017-02-07-20-28-19.cfgbk</i>.<br />
<i> </i><br />
I strongly encourage you to remote in to your Pi using WinSCP and save these backup files locally just in case your Pi's SD card goes duff as mine has on three occasions now. Popping these backups into the appropriate folders after a rebuild certainly makes getting ha-bridge live again much simpler.xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.com11tag:blogger.com,1999:blog-2591358012859275786.post-59011365353519255142016-08-31T21:12:00.000+12:002017-06-04T16:03:11.622+12:00Using ESPEasy with Home Assistant via MQTT<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:RelyOnVML/>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]-->Preface: I've just started playing around with Home Assistant on a Raspberry Pi and exploring the world of MQTT to control devices on the network. Learning curve is a bit steep but worth the effort as MQTT is very fast.<br />
<br />
The hardware and software tools I'm using are as follows:<br />
2 x <a href="http://www.banggood.com/DC-5V-24V-DIY-WIFI-Wireless-Switch-Sonoff-SV-Module-For-Smart-Home-p-1063987.html?p=IT12193003357201511Y" target="_blank">Sonoff</a> relay units<br />
2 x <a href="http://www.banggood.com/Geekcreit-Doit-NodeMcu-Lua-ESP8266-ESP-12E-WIFI-Development-Board-p-985891.html?p=IT12193003357201511Y" target="_blank">NodeMCU</a> Boards<br />
<a href="http://www.esp8266.nu/index.php/ESPEasy" target="_blank">ESPEasy</a> firmware (must be version 121 or above as that contains the MQTT 'retain' flag option.<br />
<a href="https://home-assistant.io/" target="_blank">Home Assistant</a> software on Raspberry Pi2<br />
MQTT Test Software:<br />
PC: <a href="http://mqttfx.jfx4ee.org/index.php/download" target="_blank">MQTT.fx</a><br />
Android: <a href="https://play.google.com/store/apps/details?id=com.thn.iotmqttdashboard&hl=en" target="_blank">MQTT Dashboard</a> <br />
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:RelyOnVML/>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><br />
<a name='more'></a><br />
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-NZ</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0mm 5.4pt 0mm 5.4pt;
mso-para-margin:0mm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;
mso-fareast-language:EN-US;}
</style>
<![endif]-->
<br />
<div class="MsoNormal">
IMPORTANT: To ensure ESPEasy MQTT works with Home Assistant, make sure you set the MQTT protocol to <b>OpenHAB MQTT</b> under the config tab.<br />
<br />
I have flashed the Sonoff units with ESPEasy (R121) and there is plenty of info online on how to do that. The code to use with the rules section for relay control via the switch
is below. It will also report the relay state via the LED if remotely
controlled via MQTT.</div>
<div style="background: #F2F2F2; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-element: para-border-div; mso-pattern: gray-5 auto; mso-shading: windowtext; padding: 1.0pt 4.0pt 1.0pt 4.0pt;">
<div class="MsoNormal" style="background: #F2F2F2; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-pattern: gray-5 auto; mso-shading: windowtext; padding: 0mm;">
on <b style="mso-bidi-font-weight: normal;"><i style="mso-bidi-font-style: normal;">relay</i></b>#state do</div>
<div class="MsoNormal" style="background: #F2F2F2; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-pattern: gray-5 auto; mso-shading: windowtext; padding: 0mm;">
<span style="mso-spacerun: yes;">
</span>if [<b style="mso-bidi-font-weight: normal;"><i style="mso-bidi-font-style: normal;">relay</i></b>#state]=0</div>
<div class="MsoNormal" style="background: #F2F2F2; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-pattern: gray-5 auto; mso-shading: windowtext; padding: 0mm;">
<span style="mso-spacerun: yes;">
</span>gpio,13,1</div>
<div class="MsoNormal" style="background: #F2F2F2; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-pattern: gray-5 auto; mso-shading: windowtext; padding: 0mm;">
<span style="mso-spacerun: yes;">
</span>else</div>
<div class="MsoNormal" style="background: #F2F2F2; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-pattern: gray-5 auto; mso-shading: windowtext; padding: 0mm;">
<span style="mso-spacerun: yes;">
</span>gpio,13,0</div>
<div class="MsoNormal" style="background: #F2F2F2; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-pattern: gray-5 auto; mso-shading: windowtext; padding: 0mm;">
<span style="mso-spacerun: yes;">
</span>endif</div>
<div class="MsoNormal" style="background: #F2F2F2; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-pattern: gray-5 auto; mso-shading: windowtext; padding: 0mm;">
endon</div>
<div class="MsoNormal" style="background: #F2F2F2; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-pattern: gray-5 auto; mso-shading: windowtext; padding: 0mm;">
on <b style="mso-bidi-font-weight: normal;"><i style="mso-bidi-font-style: normal;">button</i></b>#state do</div>
<div class="MsoNormal" style="background: #F2F2F2; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-pattern: gray-5 auto; mso-shading: windowtext; padding: 0mm;">
<span style="mso-spacerun: yes;">
</span>if [<b style="mso-bidi-font-weight: normal;"><i style="mso-bidi-font-style: normal;">button</i></b>#state]=0</div>
<div class="MsoNormal" style="background: #F2F2F2; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-pattern: gray-5 auto; mso-shading: windowtext; padding: 0mm;">
<span style="mso-spacerun: yes;">
</span>gpio,12,0</div>
<div class="MsoNormal" style="background: #F2F2F2; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-pattern: gray-5 auto; mso-shading: windowtext; padding: 0mm;">
<span style="mso-spacerun: yes;">
</span>gpio,13,1</div>
<div class="MsoNormal" style="background: #F2F2F2; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-pattern: gray-5 auto; mso-shading: windowtext; padding: 0mm;">
<span style="mso-spacerun: yes;">
</span>else</div>
<div class="MsoNormal" style="background: #F2F2F2; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-pattern: gray-5 auto; mso-shading: windowtext; padding: 0mm;">
<span style="mso-spacerun: yes;">
</span>gpio,12,1</div>
<div class="MsoNormal" style="background: #F2F2F2; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-pattern: gray-5 auto; mso-shading: windowtext; padding: 0mm;">
<span style="mso-spacerun: yes;">
</span>gpio,13,0</div>
<div class="MsoNormal" style="background: #F2F2F2; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-pattern: gray-5 auto; mso-shading: windowtext; padding: 0mm;">
<span style="mso-spacerun: yes;">
</span>endif</div>
<div class="MsoNormal" style="background: #F2F2F2; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-pattern: gray-5 auto; mso-shading: windowtext; padding: 0mm;">
endon</div>
</div>
<div class="MsoNormal">
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-NZ</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]-->Note that the items highlighted refer to devices that have
been configured in the devices list below and must match (case sensitive).</div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh68G2HjoD4IvxXEq9zOxmqHyMZ56RrqUA8XBRyRjgGx_W3JFMT-N5crdpe3hu_xr_ZL9EqGo7WFSbVSPEW3xwomRvmf-D0V9v41RovFgeaOPX7JmZfZcWBx5bVQoFRMtL9hKFNBLBSKZM/s1600/ESPEasy01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="172" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh68G2HjoD4IvxXEq9zOxmqHyMZ56RrqUA8XBRyRjgGx_W3JFMT-N5crdpe3hu_xr_ZL9EqGo7WFSbVSPEW3xwomRvmf-D0V9v41RovFgeaOPX7JmZfZcWBx5bVQoFRMtL9hKFNBLBSKZM/s640/ESPEasy01.png" width="640" /></a></div>
<div class="MsoNormal">
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7C9IFm4PC8J6hymoVsN0lk2aYeKFCr4LmuxwW1F0TXIA_LJr4s1QgHQIPUU083kaoL3y_fGcBbTdMBfh5N8gJCFa5SUAKXThWZgErZpCa3snY_PFfN8rx1fJmOOXU8HKcN5HtLcUeRrc/s1600/Sonoff2-3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="284" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7C9IFm4PC8J6hymoVsN0lk2aYeKFCr4LmuxwW1F0TXIA_LJr4s1QgHQIPUU083kaoL3y_fGcBbTdMBfh5N8gJCFa5SUAKXThWZgErZpCa3snY_PFfN8rx1fJmOOXU8HKcN5HtLcUeRrc/s640/Sonoff2-3.jpg" width="640" /></a></div>
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:RelyOnVML/>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><br />
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-NZ</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0mm 5.4pt 0mm 5.4pt;
mso-para-margin:0mm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;
mso-fareast-language:EN-US;}
</style>
<![endif]-->
<br />
<div class="WordSection1">
<div class="MsoNormal">
<span style="mso-fareast-language: EN-NZ; mso-no-proof: yes;">To
control the relay via MQTT, send /{devicename}/gpio/12 with payload 0 or 1 so
for ESP03 it would be:</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="mso-fareast-language: EN-NZ; mso-no-proof: yes;">/ESP03/gpio/12</span></b><span style="mso-fareast-language: EN-NZ; mso-no-proof: yes;"> with payload 1 for on. Note
there is no trailing forward slash (/) after the gpio number but there is one
preceeding the {devicename} if the ESPEasy defaults are left. Note: The sonoff
has the relay connected to gpio 12 and the LED on 13.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="mso-fareast-language: EN-NZ; mso-no-proof: yes;">If
you subscribe to {devicename}/relay/state you get a response back from the
sonoff whether the relay is flipped using MQTT or the button (either a 0 or 1).</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="mso-fareast-language: EN-NZ; mso-no-proof: yes;">If
you loose access to any ESP8266 device with ESPEasy on it, you can connect to
it’s local AP when it goes into AP mode which is normally ESP## and use the
passphrase ‘configesp’. Once connected to that AP, you can reach the device on
192.168.4.1 where you can reconfigure the WLAN or MQTT broker information.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span style="font-size: 14.0pt; mso-bidi-font-size: 11.0pt; mso-fareast-language: EN-NZ; mso-no-proof: yes;">How to get feedback using MQTT on a ESP8266 device when you
are using /{devicename}/gpio/{pin#}</span></b></div>
<div class="MsoNormal">
<span style="mso-fareast-language: EN-NZ; mso-no-proof: yes;">You
do not need to configure anything on ESPEasy for gpio control so if you want to
turn a relay on that is configured on gpio 14, you can send either send HTTP or
MQTT as shown below</span>:</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">MQTT: </b></div>
<div class="MsoNormal">
/{devicename}/gpio/{pin#} with payload of 1 for on or 0 for
off.</div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">HTTP:</b></div>
<div class="MsoNormal">
http://<ESP IP address>/control?cmd=GPIO,<pin>,0</div>
<div class="MsoNormal">
http://<ESP IP address>/control?cmd=GPIO,<pin>,1</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
If using http, the webpage will return the pin state. If you
are using MQTT, you will need to subscribe to {devicename}/status and then by
sending the following, you’ll get a json report on that subscription.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">Sonoff via MQTT (two
ways)</b></div>
<div class="MsoNormal">
Publish to <b style="mso-bidi-font-weight: normal;">{devicename}/cmd</b>
with the payload <b style="mso-bidi-font-weight: normal;">gpio,12,0</b> to turn
the relay off (and LED if you have rules set) or <b style="mso-bidi-font-weight: normal;">gpio,12,1</b> to turn the relay on. You’ll get the following back on <b style="mso-bidi-font-weight: normal;">{devicename}/status</b>:</div>
</div>
<span style="font-family: "calibri" , "sans-serif"; font-size: 11.0pt;"><br clear="all" style="mso-break-type: section-break; page-break-before: auto;" />
</span>
<br />
<div class="WordSection2">
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">On:</b></div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
"log": "GPIO 12 Set to 1",</div>
<div class="MsoNormal">
"plugin": 1,</div>
<div class="MsoNormal">
"pin": 12,</div>
<div class="MsoNormal">
"mode": "output",</div>
<div class="MsoNormal">
"state": 1</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">Off:</b></div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
"log": "GPIO 12 Set to 0",</div>
<div class="MsoNormal">
"plugin": 1,</div>
<div class="MsoNormal">
"pin": 12,</div>
<div class="MsoNormal">
"mode": "output",</div>
<div class="MsoNormal">
"state": 0</div>
<div class="MsoNormal">
}</div>
</div>
<span style="font-family: "calibri" , "sans-serif"; font-size: 11.0pt;"><br clear="all" style="mso-break-type: section-break; page-break-before: auto;" />
</span>
<br />
<div class="MsoNormal">
</div>
<div class="MsoNormal">
You can also publish status,gpio,12 directly to query the
gpio pin. This also works directly in the serial console. Just type status,gpio,12
to check the relay state and you’ll get Jason back like this:</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
>status,gpio,12</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
"log": "",</div>
<div class="MsoNormal">
"plugin": 1,</div>
<div class="MsoNormal">
"pin": 12,</div>
<div class="MsoNormal">
"mode": "output",</div>
<div class="MsoNormal">
"state": 1</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Many thanks to this <a href="http://www.esp8266.nu/forum/viewtopic.php?p=8519#p8476" target="_blank">post</a>.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
I used Sonoff configuration mentioned <a href="https://forum.pimatic.org/topic/1372/sonoff-wifi-wireless-smart-switch-for-mqtt-coap-smart-home/13" target="_blank">here</a>
which provides feedback on <b style="mso-bidi-font-weight: normal;">/{devicename}/relay/state</b>.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
This was mirrored on my NodeMCU device and the GPIO pin that
was used for my relay was configured as a switch under the devices tab. Simply
choose the gpio pin you are using for the relay output under the 1<sup>st</sup>
GPIO section as shown below.</div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVASvNFJR-oWTwxnF7-sOFTb7qL214IqVn2WMZhjw1niZdBaYt18Xg2675iKD_dVxU3aJ1_ikv8bDluesLmESvDsRJMg70EsMTZx51pgcFjniGGHXVxDbHKSshAbRRYHv9j9epNFUynTc/s1600/ESPEasy04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="572" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVASvNFJR-oWTwxnF7-sOFTb7qL214IqVn2WMZhjw1niZdBaYt18Xg2675iKD_dVxU3aJ1_ikv8bDluesLmESvDsRJMg70EsMTZx51pgcFjniGGHXVxDbHKSshAbRRYHv9j9epNFUynTc/s640/ESPEasy04.png" width="640" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
If you then subscribe to <b style="mso-bidi-font-weight: normal;">/{devicename}/relay/state</b>, when you publish a 0 or 1 to <b style="mso-bidi-font-weight: normal;">/{devicename}/gpio/{pin#}</b>, you will get
either a 0 or 1 back. If you have more than one relay, best to call them say relay12
and relay14 (corresponding to the GPIO #) so you know what relay fires if you
monitor <b style="mso-bidi-font-weight: normal;">/{devicename}/+/state</b>.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><u>Note</u></b>: The
downside of configuring the GPIO as a switch input to allow MQTT status reports
(at least during my testing) is that if you configure the pin using <b style="mso-bidi-font-weight: normal;">/{devicename}/pwm/14</b> and payload from 0
to 1000 for dimming the LED, this will confuse ESPEasy and you’ll get repeating
state messages alternating from 0 to 1 and back again until you send pwm 0.
Best to configure another GPIO if you want PWM control.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The full ESPEasy command reference is available <a href="https://www.letscontrolit.com/wiki/index.php/ESPEasy_Command_Reference" target="_blank">here</a>.<br />
<br />
And lastly, below is an extract from my swiches.yaml file which shows how Home Assistant is configured with MQTT<br />
<br />
# switch 1:<br />
- platform: mqtt<br />
name: "GPIO14"<br />
state_topic: "/ESP01/relay14/state"<br />
command_topic: "/ESP01/gpio/14"<br />
payload_on: "1"<br />
payload_off: "0"<br />
qos: 1<br />
retain: true<br />
<br />
# switch 2:<br />
- platform: mqtt<br />
name: "Sonoff1"<br />
state_topic: "/sonoff1/relay/state"<br />
command_topic: "/sonoff1/gpio/12"<br />
payload_on: "1"<br />
payload_off: "0"<br />
qos: 1<br />
retain: true<br />
<br />
# switch 3:<br />
- platform: mqtt<br />
name: "Sonoff2"<br />
state_topic: "/sonoff2/relay/state"<br />
command_topic: "/sonoff2/gpio/12"<br />
payload_on: "1"<br />
payload_off: "0"<br />
qos: 1<br />
retain: true<br />
<br />
# switch 4:<br />
- platform: mqtt<br />
name: "Sonoff3"<br />
state_topic: "/sonoff3/relay/state"<br />
command_topic: "/sonoff3/gpio/12"<br />
payload_on: "1"<br />
payload_off: "0"<br />
qos: 1<br />
retain: true<br />
<br />
I trust this has been helpful in some way as it took me many weeks to get here but so far it is working well and rock solid.<br />
<br />
Oooh, and my advanced settings page from my ESPEasy R121 is shown below (user request)<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi4kLKhndmOENDr3s_r6unRgQePfa3yMdwYWCgmqWnYqwJph9QoX-GqFuVsd8oplDEQy7ES2B1pic38v27wxCFYow6O1WYPcfH_zwHPdHukFV_-19C9rVkReM1UqNGf7TLLiJEKMmj8fQ/s1600/Sonoff_advanced.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi4kLKhndmOENDr3s_r6unRgQePfa3yMdwYWCgmqWnYqwJph9QoX-GqFuVsd8oplDEQy7ES2B1pic38v27wxCFYow6O1WYPcfH_zwHPdHukFV_-19C9rVkReM1UqNGf7TLLiJEKMmj8fQ/s640/Sonoff_advanced.jpg" width="563" /></a></div>
</div>
</div>
xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.com17tag:blogger.com,1999:blog-2591358012859275786.post-43287709982174138202016-08-26T23:07:00.000+12:002016-08-27T00:15:18.176+12:00My views on using Trakt with KodiI've been a long time user of Kodi (+10yrs) and recently started exploring Trakt weighing up the
pro's and cons as I look after a few Kodi Pi's for friends. I have an
Intel NUC in my lounge and a Pi in another room but as I use a Synology
NAS to serve up my library, I already had synced watched states. I must
say, the learning curve for Trakt is pretty steep. I was a TV Technician
by trade so I pick things up pretty quickly but I didn't find the
Trakt website all that intuitive.<br />
<br />Here is what I've found to be the pros and cons over the last eight weeks or so.<br />
<br />
<a name='more'></a><br />
<b>Pros:</b><br />
<ul>
<li>Your Trakt 'Collections' be they TV or Movies are available in all add-ons that support Trakt.</li>
<li>With a supported skin (I use
Xonfluence), the <i>Movies</i> and <i>TV Shows</i> headings in Kodi can be altered to open your Trakt 'Collection' via your favourite add-on. Makes it look like a library</li>
<li>Movies or TV Shows can be added to your Kodi 'collection' via the
Trakt website or IOS/Android app. Personally I use the 'Movie Roll' app
for Android which supports both the Movie watchlist and TV watchlist
which is rare. Don't but the Pro version though as it doesn't work and
the developer has gone dark.</li>
<li>Correspondingly, a widget set can be made for your TV Shows to show
you where your up to in your season playback as Trakt has a progress
menu available for TV Shows. This populates after a few seconds when I
navigate to my TV Shows menu and is always up-to-date. This is nice.</li>
<li>Using 'Lists', you can create a custom list for your child and then
modify the main menu in Kodi to display this list directly. I've added
my Son's favourite cartoon shows to a Trakt custom list with my Son's
name (via the Trakt website) then created a new menu item in Kodi called
Cartoons and pointed it to this list on Trakt (via your favourite
add-on). That is actually pretty cool and was very well received.</li>
<li>Of course, watched state is tracked across all devices that are set
up they same. You must have the official Kodi Trakt add-on installed for
this though.</li>
<li>You can review your entire watched history on Trakt.TV (and others
too if your account is not set to 'Private') which is a great feature.
You can also 'see' what your kids have been watching and when!</li>
<li>The Kodi Trakt add-on will 'upload' your Kodi Movie and TV Show libraries to your Trakt account so your Trakt 'Collection' (then filtered by Movies or Shows) will contain all of your Library items. This feature may also belong in the Cons?</li>
</ul>
<b>Cons:</b><br />
<ul>
<li>Learning curve is steep for the average end user</li>
<li>Tends to be a lot of confusion between what the Kodi Library is and a
Collection or Watchlist and if your friend or Family member has local
content, they will most likely have a library.</li>
<li>Many of the integrated Kodi library features don't work with Trakt. '<i>TV Showed Next Aired'</i> which I use and love does not work with a Trakt TV collection. Shows need to be in the Kodi Library. </li>
<li>Some of the native Kodi sub menus don't work either like the
'Suggested' or 'In Progress' which I use all the time with the Kodi
Library. Having a list pop up on the right showing you all the Movies
you're part way though is pretty cool (Suggested) but you can't get this
from a Trakt Collection.</li>
<li>The level of Trakt integration in add-ons varies between each
add-on. e.g. Using the context menu in Exod.. allows you to access the
Trakt Manager and add/delete a show from a Collection/Watchlist or
Custom List. Context menu in Spect... has no Trakt Manager creating
confusion.</li>
<li>The terminology between Trakt, mobile apps and Kodi add-ons is not
completely standardized so get to where you need to go can be
frustrating</li>
</ul>
There you go...whew! All I can think of for now. So if you want a
simple wife friendly experience, stick with the Kodi Library or use an
add-on that allows you to add items to the Library like Spect... If you
want synced lists between devices and the killer feature of being to add
a show to Kodi remotely using your phone, then put the effort into
getting to understand Trakt. It takes a bit of time but the rewards may
well justify the effort :)xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.com0tag:blogger.com,1999:blog-2591358012859275786.post-18682827571502638082016-07-20T23:58:00.002+12:002016-07-21T00:02:58.019+12:00Windows 10 search doesn't show results from Settings or Control PanelRun <span style="color: #666666;"><code>Lpksetup /u</code></span> and uninstall any possible duplicate language you find there, restart Windows and wait a few minutes. Worked for me after scouring the Internet for hours.<br />
<br />
This also provided some users with relief but did not work for me.
<br />
<pre><span style="color: #666666;"><code>%LOCALAPPDATA%\Packages\windows.immersivecontrolpanel_cw5n1h2txyewy\LocalState</code></span></pre>
Right-click the <i>Indexed</i> folder → Properties → Advanced → Check <b>Allow files in this folder to have indexed in addition to file properties</b>. <br />
Click Apply and Exit.<br />
<br />
If it is already checked, uncheck it → apply → recheck it → apply and wait a few minutes for the folder to be reindexed.<br />
<br />
Reference machine was a Lenovo T400 with a clean install of Windows 10. <br />
<br />
<span style="font-size: x-small;"><a href="http://superuser.com/questions/958279/windows-10-settings-not-indexed" target="_blank">Source</a>: </span>xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.com0tag:blogger.com,1999:blog-2591358012859275786.post-82985969755883809892016-07-07T10:37:00.001+12:002016-07-07T10:37:38.549+12:00How to rename photos using the date and time the photo was taken as the filenameSo you have thousands of photos with random file names. What's the best way to sort them?<br />
<br />
Although it would be nice to have every photo contain the event name and the date is was taken, managing this is a nightmare. Also, to make the photos cross-platform compatible, the photos should ideally be in folders. To have them sort chronologically, the photos name should start with the year it was taken, then the month, day, hour, minute and second. That makes Kodi very happy as having too many photos in one folder will freeze things up. Other programs like iPhoto don't really care about the folder structure and file name anyway as photos can be sorted using the <a href="https://en.wikipedia.org/wiki/Exchangeable_image_file_format" target="_blank">EXIF</a> data embedded in each photo.<br />
<a name='more'></a>In the video below, I'll show you how to use a free Windows program to automatically rename all of your photos in minutes (or even seconds) using the embedded date and time the photo was taken as the file name and the year the photo was taken as the folder name. If you have a MAC, you can use <a href="http://www.qdev.de/?location=mac/exifrenamer" target="_blank">ExifRenamer</a> which looks like it can achieve the same results.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/Y6ZiIeDHzRQ/0.jpg" src="https://www.youtube.com/embed/Y6ZiIeDHzRQ?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.com0tag:blogger.com,1999:blog-2591358012859275786.post-80518679480681594642016-07-03T18:24:00.002+12:002016-07-07T10:46:50.754+12:00How to enable a GPIO IR Receiver on LibreELEC 7.x.xGetting this to work is actually pretty easy now.<br />
<br />
Login to your Pi using SSH and perform the following commands in order.<br />
<ol>
<li>mount -o remount,rw /flash</li>
<li>nano /flash/config.txt</li>
<ol>
<li>On the last line, paste in the following text<br /><span style="color: #666666;"><i>device_tree_overlay=lirc-rpi</i></span></li>
<li>CTRL + X to exit and choose 'Y' save.</li>
</ol>
<li>mount -o remount,ro /flash</li>
<li>reboot</li>
</ol>
(Or you could remove the MicroSD card and edit the config.txt in Windows).<br />
<a name='more'></a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikjVshNlE5_5aJSVlqTf6iIpgIMMGFRyyZd6oXFwDhIa1V4m0blElZCuyKmbYdUL9-Tyi3v1FS2W-L2upJYDby0yiutXZgzTZypLDhOGzLI359o1MtpzFwtzlYCs9buBVnJVuqNwHpniI/s1600/Pi.GPIO.IR.TSOP38238.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="187" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikjVshNlE5_5aJSVlqTf6iIpgIMMGFRyyZd6oXFwDhIa1V4m0blElZCuyKmbYdUL9-Tyi3v1FS2W-L2upJYDby0yiutXZgzTZypLDhOGzLI359o1MtpzFwtzlYCs9buBVnJVuqNwHpniI/s320/Pi.GPIO.IR.TSOP38238.jpg" width="320" /></a></div>
<br />
After the Pi has restarted, right click in the top left of your PuTTy session and choose 'Restart session'. Log back in and type the following:<br />
<br />
<span style="color: #666666;"><i>dmesg | grep lirc_rpi</i></span><br />
<br />
<br />
<br />
<br />
<br />
<br />
You should see the following indicating the O/S is happy.<br />
<br />
<span style="background-color: #cccccc;">LibreELEC:~ # dmesg | grep lirc_rpi<br />[ 5.256588] lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned.<br />[ 6.154621] lirc_rpi: auto-detected active low receiver on GPIO pin 18<br />[ 6.154867] lirc_rpi lirc_rpi: lirc_dev: driver lirc_rpi registered at minor = 0<br />[ 6.154876] lirc_rpi: driver registered!</span><br />
<br />
<span style="background-color: yellow;"><b>Note</b>: Even if I remove the actual IR receiver altogether, the Pi still reports the above. </span><br />
<br />
According to my testing, no remote.xml file is required in /Userdata/keymaps or a lircd.conf in /storage/.config, it just works.<br />
<br />
I tested remote control operation under LibreELEC 7.0.1 on a RPi3 with a home-made IR receiver and a standard RC6 IR remote like this <a href="http://amzn.to/29DKp3y" target="_blank">one</a>.<br />
<br />
Instructions for making a GPIO receiver were found <a href="https://learn.adafruit.com/using-an-ir-remote-with-a-raspberry-pi-media-center/hardware" target="_blank">here</a>.xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.com1tag:blogger.com,1999:blog-2591358012859275786.post-80464608263836598502016-04-12T12:25:00.005+12:002016-04-12T12:26:27.245+12:00Preserving 'Watched State' when re-organising your Kodi LibraryI have lots of friends with various Kodi devices (NUC, Pi, Zbox etc.) and most with Synology NAS boxes but unfortunately, many also with media libraries that are a mess. Asked to get a house with three Kodi devices onto one central Synology based database, I wanted a way to export the media library preserving the watched state and another way to organise the media into separate folders.<br />
<br />
<a name='more'></a><br />
Having done it before with two Pi's but with a library that already had movies in separate folders (recommended), I wanted to test a way to do this when my friend had all their movies in one folder and then to bring them back in to all three devices but with the library organised correctly and the watched state preserved.<br />
<br />
If you are going to use a central SQL database, all Kodi versions must be the same release but I it it OK to have say 15.1 and 15.2 on the same database. <br />
<br />
<ol>
<li>Export the video library in the master Kodi device (one with most up-to-date library) choosing separate files, YES to 'Export thumbnails and Fanart' and NO to actor thumbs (as these would also be placed in one folder called .actors which is a bit difficult to deal with).</li>
<li>The export process will create .NFO files (containing the embedded watched state) along with all other artwork. If the movies are in one big folder as mine were, the artwork and .NFO will automatically be renamed with the movies name appended to the beginning of the file name</li>
<li>Install '<a href="http://forum.kodi.tv/showthread.php?tid=191781" target="_blank">Ember Media Manager</a>', tell it where your movie library is and accept all the default options proceeding with <b>>next</b> every time until it's ready to go. Your movies should now be in the Ember database.</li>
<li>Under 'Tools', select 'Sort Files into Folders', tell it where the root directory for your movies is under 'Path to Sort' and push 'Go'. In a few seconds, your .NFO, Movie and artwork files will all be in their own folders. Great!</li>
<li>Modify the <a href="http://kodi.wiki/view/Advancedsettings.xml" target="_blank">advancedsettings.xml</a> on all of your Kodi devices to include the following:<br /><advancedsettings><br /><videolibrary><br /> <importwatchedstate>true</importwatchedstate><br /> <importresumepoint>true</importresumepoint><br /> </videolibrary><br /></advancedsettings></li>
<li>Wipe the library from each device by deleting the TVxx.db and MyVideosx.db from Userdata/Database (easiest way to clean database!).</li>
<li>Reboot</li>
<li>Under Video > Files > Add videos... point to your new media library and choose the option "Movies are in separate folders..." when you set the content for your directory. Your movies will now be imported without scraping the Internet as the .NFO files will be read from each movie folder and the 'watched state' and resume point (exported in Step 1) will be restored.</li>
</ol>
xbmcnuthttp://www.blogger.com/profile/01810815406555210279noreply@blogger.com0