<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title>souliss</title>
  <generator uri="https://github.com/jekyll/jekyll">Jekyll v3.9.5</generator>
    <icon>http://souliss.github.io/apple-touch-icon-precomposed.png</icon>
  <subtitle>Arduino and Android SmartHome</subtitle>
  <link href="http://souliss.github.io/atom.xml" rel="self"/>
  <link href="http://souliss.github.io/" rel="alternate" type="text/html"/>
  <updated>2024-03-14T11:50:40+00:00</updated>
  <id>http://souliss.github.io/</id>
  <author>
    <name>Souliss Team</name>
    <uri>http://souliss.github.io/</uri>
    
  </author>

  
  <entry>
    <title>Souliss and Visual Studio 2019</title>
    <link href="http://souliss.github.io/articles/visual-studio-2019/"/>
    <updated>2019-11-06T00:00:00+00:00</updated>
    <id>http://souliss.github.io/articles/visual-studio-2019</id>
    <author>
      <name>Souliss Team</name>
      <uri>http://souliss.github.io/</uri>
      
    </author>
    <content type="html">
      &lt;img src=&quot;http://souliss.github.io/images/2019-11/debug-2.png&quot;&gt;&lt;br/&gt;
      &lt;p&gt;Using a convenient Integrated environment can ease the task of writing and mantaining your Souliss sketches, especially if it’s possible to use some of a modern IDE features. Visual Studio 2019, free in its &lt;em&gt;community&lt;/em&gt; flavour, can be a relevant enhancement to your development environment. Setting it up to run and debug souliss sketches is really easy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;YOU WILL NEED:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Visual Studio 2019 - Download it at &lt;a href=&quot;https://visualstudio.microsoft.com/&quot;&gt;https://visualstudio.microsoft.com/&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Visual Micro plugin, available directly from the IDE&lt;/li&gt;
  &lt;li&gt;An existing Arduino installation w/ Souliss library installed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For the installation of the Souliss library refer to &lt;a href=&quot;https://github.com/souliss/souliss/wiki/Your-First-Upload&quot;&gt;relevant wiki guide&lt;/a&gt;. It’s not very up to date, But it’s easy to ‘map’ it to current Arduino version (1.8.10 at the time of this post). The Arduino IDE is still needed, as Visual micro plugin will be using libraries and boards installed on it. You could copy your environment and let Visual Studio use another one, I frankly didn’t notice any interferences though.&lt;/p&gt;

&lt;p&gt;After having installed Visual Studio and chosen a comfortable theme, you can immediately install Visual Micro plugin, searching among &lt;em&gt;online&lt;/em&gt; extensions (search for “arduino”). After a VS reboot and minimal setup (Arduino IDE path), fork https://github.com/souliss/demoNode, thus creating a new project. Please notice that for ease of setup I committed IDE-only files (.sln, .vcxproj, etc.) that shouldn’t really be there, but it’s pretty easy to create your own new &lt;em&gt;solution&lt;/em&gt; (yes, that’s still the term used) starting from existing sketches.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2019-11/debug-1.png&quot; alt=&quot;Debugging windows&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I suggest to test a basic sketch before going on with Souliss’ ones, but as long as the plugin reads same folders and libs, you should have no issue in get &lt;strong&gt;up and debugging the demo node&lt;/strong&gt;, with Souliss libraries linked and navigable directly from source code. &lt;strong&gt;Code auto-complete works&lt;/strong&gt;, too.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2019-11/autocomplete.png&quot; alt=&quot;Debugging windows&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Once set-up, Visual Studio will let you debug with ease, setting up conditional break-points and investigating variables values (with some obvious limitation)&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2019-11/logo.png&quot; alt=&quot;Visual Micro logo&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEPS:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Install Visual studio&lt;/li&gt;
  &lt;li&gt;Add Visual micro plugin and point it to your existing Arduino environment&lt;/li&gt;
  &lt;li&gt;[optional] Fork souliss demo sketch and test your environment&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tested with Arduino IDE 1.8.10 on Olimex Boards, using &lt;a href=&quot;https://github.com/souliss/souliss/tree/friariello/examples/demoNode&quot;&gt;demoApp&lt;/a&gt; example by Shine 11/2019&lt;/p&gt;

    </content>
  </entry>
  
  <entry>
    <title>SoulissApp Android 10 update</title>
    <link href="http://souliss.github.io/articles/sapp-update/"/>
    <updated>2019-10-31T00:00:00+00:00</updated>
    <id>http://souliss.github.io/articles/sapp-update</id>
    <author>
      <name>Souliss Team</name>
      <uri>http://souliss.github.io/</uri>
      
    </author>
    <content type="html">
      &lt;img src=&quot;http://souliss.github.io/images/2019-10/Screenshot_home.png&quot;&gt;&lt;br/&gt;
      &lt;p&gt;Updating soulissApp is both a pleasure and a pain. Proud of mantaining a 7 years old app, born under Android 2 &lt;em&gt;Gingerbread&lt;/em&gt; environment, it still takes some old legacy dependancy with it and several spiderwebs. Hard to update and/or mantain, especially because of the earthquaking environment. But it still works, I “just” had to redo backgroud services and remove much legacy code. This new version is compiled &lt;strong&gt;targeting sdk 29&lt;/strong&gt;, aka Q, Android 10, but the biggest changes came adapting to previous Android’s major release.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2019-10/Screenshot_permission.png&quot; alt=&quot;New permissions request modal&quot; /&gt;
&lt;img src=&quot;http://souliss.github.io/images/2019-10/Screenshot_settings.png&quot; alt=&quot;new settings screen&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Demo mode has been temporanely removed, as the public IP isn’t available any longer. Write us if you can host one and are willing to.&lt;/p&gt;

&lt;p&gt;Please be patient, as this software is entirely free. As always, I’d be glad to receive some pull request and/or translations&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CHANGELOG:&lt;/strong&gt;
Quite a long list, even though it doesn’t look so.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Preferences screen entirely re-made according to new &lt;a href=&quot;https://developer.android.com/guide/topics/ui/settings/&quot;&gt;Settings&lt;/a&gt; API.&lt;/li&gt;
  &lt;li&gt;Watchdog died. He was a good boy, but Android now &lt;a href=&quot;https://developer.android.com/about/versions/pie/android-9.0-migration&quot;&gt;forbids receiving system Intents&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Because of Android 8.0 &lt;a href=&quot;https://developer.android.com/about/versions/oreo/android-8.0-changes&quot;&gt;Behavior Changes&lt;/a&gt;, SoulissDataService has been deeply slimmed&lt;/li&gt;
  &lt;li&gt;New Font style, merged old (API &amp;lt; 19) ones&lt;/li&gt;
  &lt;li&gt;Several useless lint suggestions/forced changes&lt;/li&gt;
  &lt;li&gt;Migrated some dependency to &lt;a href=&quot;https://developer.android.com/jetpack/&quot;&gt;Jetpacks&lt;/a&gt;. I don’t even know what does it mean, frankly.&lt;/li&gt;
  &lt;li&gt;Several once-fine deprecated methods updated&lt;/li&gt;
&lt;/ul&gt;


    </content>
  </entry>
  
  <entry>
    <title>DST - Digital Souliss Thermostat</title>
    <link href="http://souliss.github.io/articles/DST/"/>
    <updated>2018-03-08T00:00:00+00:00</updated>
    <id>http://souliss.github.io/articles/DST</id>
    <author>
      <name>Souliss Team</name>
      <uri>http://souliss.github.io/</uri>
      
    </author>
    <content type="html">
      &lt;img src=&quot;http://souliss.github.io/images/2018-03/main.jpeg&quot;&gt;&lt;br/&gt;
      &lt;p&gt;The need to be able to find your heated environment when you return is a necessity that everyone must meet, and here it is born
“DST”, the SOULISS digital thermostat based on the WiFi ESP8266-12 chip, connected to the 3.2 inch NEXTION HMI display
allows you to manage your heating from a local area using a touch screen graphic interface,
The DST can also be managed by SoulissApp (Play Store) both locally and remotely.&lt;/p&gt;

&lt;p&gt;The graphic interface is divided into two different pages, the HOME PAGE and the PAGE SETTINGS:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;INFO:&lt;/strong&gt;
Temperature and Humidity, ntp time, Setpoint set, WiFi connection status to the local router, System power status, Heating status
Timer, Icon of light blue color when the temperature is below 17 ° C&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CONTROLS:&lt;/strong&gt;
System power button, Setpoint setting, setpoint ECO, NORMAL, COMFORT timer 60m, 120m,&lt;/p&gt;

&lt;p&gt;The timer function if set, will turn off the heaters at the end of the time …. if the timer will not be activated and the heating will
be turned on leaving the decision to us, the timer will still count the time since the start, and if we decide later to to activate a
time established by the timer menu, automatically it will decide the time already elapsed from the switching on.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2018-03/HMI_1.png&quot; alt=&quot;&quot; /&gt;
&lt;img src=&quot;http://souliss.github.io/images/2018-03/HMI_2.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The “DST” code is based on the Souliss Framework, and hosts the Telegram bot that alerts you in real time on your smartphone when
the system and / or the heating systems are switched on or off. Update home page&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2018-03/HMI_3.png&quot; alt=&quot;&quot; /&gt;
&lt;img src=&quot;http://souliss.github.io/images/2018-03/HMI_4.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;COMPONENTS USED:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;NodeMCU Esp8266-12
3.2 “Nextion
DHT22 Temperature &amp;amp; Humidity sensor
Relay ON / OFF Boiler
For those who do not know what Souliss is, please read the corresponding wiki at https://github.com/souliss/souliss/wiki.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HOW TO START TO REALIZE THE PROJECT&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;First we need to install the necessary software on the PC to load the firmware on the ESP8266 chip
Then download the 1.6.12 .zip version of the IDE Arduino, https://www.arduino.cc/en/Main/OldSoftwareReleases#00xx once downloaded we
create a portable folder in C: \ programs and extract our IDE to ‘ inside the newly created folder.Done this we launch the IDE program
from the .exe file, once started we must install the ESP8266 cores, here I report the extract taken from the ESP8266 support site 
http://esp8266.github.io/Arduino/versions/2.0.0/doc/installing.htmlCORE&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ESP8266 Core installation:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Start Arduino and open Preferences window.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs field. You can add multiple
URLs, separating them with commas.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Open Boards Manager from Tools&amp;gt; Board menu and find esp8266 platform.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Select the version you need from a drop-down box.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Click install button.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Do not forget to select your ESP8266 board from Tools&amp;gt; Board menu after installation.You may optionally use the staging boards manager
package link: http://arduino.esp8266.com/staging/package_esp8266com_index.json. This may contain some new features, but at the same
time, some things might be broken.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can always check the cores supported by Souliss at the following link 
If something is not clear, read this article http://souliss.github.io/media/how-to-load-a-sketch-on-ESP/
https://github.com/souliss/souliss/wiki/Supported%20Hardware#expressif-esp8266-based-board&lt;/p&gt;

&lt;p&gt;After installing the ESP cores, we close the IDE, pick up the necessary libraries from my github repository at the following link
https://github.com/Giuseppe-P/souliss-DST-CODE and the stable souliss framework 
https://drive.google.com/drive/folders/0BzyjHRwlzov4SmFkUXNNcFJ0LTg and once downloaded, copy the folders inside the path C: \ Users &lt;br /&gt;
xxxxx \ Documents \ Arduino \ libraries, now the IDE is ready to load the DST sketck “always available from my repository” on the 
ESP8266 chip.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TELEGRAM CONFIGURATION&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Download and install the Telegram App from your Play Store, done this, for the creation of the bot I invite you to faces page at the
following link http://www.nigiara.it/telegram/come-aprire-i-bot-su-telegram.htm&lt;/p&gt;

&lt;p&gt;Without this we need the ID of the chat easily available by following these steps&lt;/p&gt;

&lt;p&gt;First we start the chat by clicking on the button just created and type the command /start&lt;/p&gt;

&lt;p&gt;So we open any browser at the address&lt;/p&gt;

&lt;p&gt;https://api.telegram.org/bot&lt;token&gt;/getUpdates&lt;/token&gt;&lt;/p&gt;

&lt;p&gt;replacing &lt;token&gt; the code generated during the creation of the bot.
  
Now your bot is ready to receive the messages from the DST Souliss&lt;/token&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FLASH SKETCH DST&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I preferred to use the board nodeMCU ready for the USB connection, so before connecting it to the PC to load the sketch you need to set 
the ESP bootloader, and to do this just hold down the flash button on the board and then insert the cable usb to the pc.Now open the 
.ino file and automatically open IDE, and set the following parameters&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Board as Generic ESP8266 Module&lt;/li&gt;
  &lt;li&gt;Flash Mode QIO&lt;/li&gt;
  &lt;li&gt;Flash Frequency 40 MHz&lt;/li&gt;
  &lt;li&gt;CPU Frequency 80 MHz&lt;/li&gt;
  &lt;li&gt;Flash Size 4M (1M SPIFFS)&lt;/li&gt;
  &lt;li&gt;Upload Speed 115200&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now you have to enter some parameters in sketch necessary to make the ESP work, consequently enter your SSID and PASWORD for Wifi, enter
the required data for telegrams to receive status notifications,and upload the sketch to the board.&lt;/p&gt;

&lt;p&gt;The first time the sketch is loaded via cable, subsequent updates can be uploaded via OTA 
http://esp8266.github.io/Arduino/versions/2.0.0/doc/ota_updates/ota_updates.html&lt;/p&gt;

&lt;p&gt;NEXTION CONFIGURATION&lt;/p&gt;

&lt;p&gt;First of all, download the https://nextion.itead.cc/resources/download/nextion-editor/ software from the following link and install it
on your PC.&lt;/p&gt;

&lt;p&gt;To load the firmware on the nextion we need a FTDI serial converter, I used the CP2102 and connected as follows&lt;/p&gt;

&lt;p&gt;NEXTION——- -&amp;gt;FTDI
  GND————-&amp;gt;GND
  TX————–&amp;gt;RX
  RX————–&amp;gt;TX
  5V————–&amp;gt;5V&lt;/p&gt;

&lt;p&gt;This done open the .HMI file downloaded from my repository, the program will open and the only thing you need to do to load the firmware 
on the nextion, is to click on the upload button&lt;/p&gt;

&lt;p&gt;Once the loading is completed on the NEXTION we are ready to put into production our DST, connecting the coma components from the
following diagram&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2018-03/diagram.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;After installation in the sApp we will have the Temperature slot, the Humidity slot, the Heating slot, the digital Input slot that will 
switch its status according to the boiler on or off, and the slot to dim the brightness of the nextion display.&lt;/p&gt;

&lt;p&gt;Create your case and your frame according to your needs, I do not have 3D print files or preconfigured accommodation, this is just the 
hw / sw project.&lt;/p&gt;

&lt;p&gt;I have adapted a frame for three buttons and I glued the display with hot glue and inserted the electronic board in the back space.&lt;/p&gt;

&lt;p&gt;Controll remote openHAB or Souliss App&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2018-03/soulissapp.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The system requires 5v 1.5a power supply&lt;/p&gt;

&lt;p&gt;I hope I will be a great contribution.&lt;/p&gt;

&lt;p&gt;Giuseppe Preite&lt;/p&gt;

    </content>
  </entry>
  
  <entry>
    <title>Use the KMP DINo WiFi (ESP8266)</title>
    <link href="http://souliss.github.io/media/kmp-dino-wifi/"/>
    <updated>2016-10-30T00:00:00+00:00</updated>
    <id>http://souliss.github.io/media/kmp-dino-wifi</id>
    <author>
      <name>Souliss Team</name>
      <uri>http://souliss.github.io/</uri>
      
    </author>
    <content type="html">
      &lt;img src=&quot;http://souliss.github.io/images/2016-10/dino_wifi_1.jpg&quot;&gt;&lt;br/&gt;
      &lt;p&gt;The KMP DINo WiFi is finally here and has full support starting from &lt;a href=&quot;https://github.com/souliss/souliss/releases/tag/v7.2-friariello.1&quot;&gt;Souliss v7.2.1&lt;/a&gt; here we describe how get started with this board.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Generally the DINo WiFi can be used as any other ESP8266 based board, but there are some tips that you should not to get started quickly!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This board is a natural evolution of previous KMP DINo boards that has been largely used with Souliss, we worked closely with KMP while defining the requirements of this board and as result there are Grove and UEXT connector to easily expand the functionality of the board with external sensor and peripherals without additional wiring.
As previous KMP DINo boards also the DINo WiFi has relays and opto-isolated inputs, is smaller than previous boards and share a similar &lt;strong&gt;switching&lt;/strong&gt; regulated &lt;em&gt;on-board&lt;/em&gt; power supply that goes from 5VDC to 30VDC.&lt;/p&gt;

&lt;p&gt;The board comes boxed into a 3 modules DIN rail enclosure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Loading Souliss on DINo WiFi&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The first code upload need an USB to USART converter, next upload can use OTA. The board is not powered from the USART adapter so you need to connect and external power supply every time. The image below show the connection of the power supply wires and the correct position of the USART adapter provided (optionally) with the board.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-10/dino_wifi_6.jpg?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The pin mapping is the classic one that can be found on many USB to USART adapter, the GND is on the right side of the header and a 3.3VDC adapter shall be used&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Near the header used to connect the USB to USART converter there is a jumper and a pushbutton (visible in the below picture), jumping it will allow to program the board. As alternative, power-off the board and press the &lt;em&gt;FLASH&lt;/em&gt; button, with the button pressed power-on and then start uploading the code.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-10/dino_wifi_2.jpg?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Setup the Arduino IDE&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Just program this board as any other ESP8266 using the following settings:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Flash Mode: QIO&lt;/li&gt;
  &lt;li&gt;Flash Frequency : 40 MHz&lt;/li&gt;
  &lt;li&gt;CPU Frequency : 80 MHz&lt;/li&gt;
  &lt;li&gt;Flash Size : 4M (1M SPIFFS)&lt;/li&gt;
  &lt;li&gt;Reset Methods : nodemcu&lt;/li&gt;
  &lt;li&gt;Upload Speed : 115200&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The use of the &lt;strong&gt;portable&lt;/strong&gt; mode in the IDE (just create a folder called &lt;em&gt;portable&lt;/em&gt;) is suggested, so that all libraries and cores will be locally installed with in the IDE folder.&lt;/p&gt;

&lt;p&gt;You can use the DINo WiFi with Souliss v7.2.1 (or greater) mixing WiFi and RS485 networks, a couple of examples are bundled to build a chain of boards connected via RS485 with a WiFi bridge.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The code below is for the Gateway&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This code will connect via WiFi to SoulissApp and via RS485 to the Peers&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;span class=&quot;cm&quot;&gt;/**************************************************************************
    Souliss - Lights
    It handle the four relays either via IN1 to IN4 inputs or using the
    Android interface. Connecting the relays to lights or similar electrical 
    appliance, you can get remote control of them.
    Connect multiple ProDINo Wroom via RS485 using the e08_WiFi_Lights_n2.ino
    on the peer boards.
        
    Applicable for:
        - Light
        - Other ON/OFF electrical appliance
    
    Runs on KMP Electronics ProDINo Wroom (WiFi ESP8266)
***************************************************************************/&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// Let the IDE point to the Souliss framework&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;SoulissFramework.h&quot;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;bconf/DINo_WiFi_Bridge_RS485.h&quot;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;   // Define the board type&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;conf/Gateway.h&quot;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;                   // The main node is the Gateway, we have just one node&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;conf/Webhook.h&quot;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;                   // Enable DHCP and DNS&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;conf/DynamicAddressing.h&quot;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;         // Use dynamic address&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// **** Define the WiFi name and password ****&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#define WIFICONF_INSKETCH
#define WiFi_SSID               &quot;mywifi&quot;
#define WiFi_Password           &quot;mypassword&quot;    
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// Include framework code and libraries&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;SPI.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;ESP8266WiFi.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;EEPROM.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt;/*** All configuration includes should be above this line ***/&lt;/span&gt; 
&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;Souliss.h&quot;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#define LIGHT1                  0           // This is the memory slot used for the execution of the logic
#define LIGHT2                  1           
#define LIGHT3                  2           
#define LIGHT4                  3           
&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;setup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;   
    &lt;span class=&quot;c1&quot;&gt;// Init the board&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;InitDINo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

    &lt;span class=&quot;c1&quot;&gt;// Connect to the WiFi network and get an address from DHCP&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;GetIPAddress&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;                           
    &lt;span class=&quot;n&quot;&gt;SetAsGateway&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;myvNet_dhcp&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;       &lt;span class=&quot;c1&quot;&gt;// Set this node as gateway for SoulissApp  &lt;/span&gt;
    
    &lt;span class=&quot;c1&quot;&gt;// Define Simple Light logics for the relays&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;Set_SimpleLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LIGHT1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;Set_SimpleLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LIGHT2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;Set_SimpleLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LIGHT3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;Set_SimpleLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LIGHT4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;    
    
    &lt;span class=&quot;c1&quot;&gt;// This node will act as addressing server for the other peers in the network&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;SetAddressingServer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; 
    &lt;span class=&quot;c1&quot;&gt;// Here we start to play&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;EXECUTEFAST&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;                     
        &lt;span class=&quot;n&quot;&gt;UPDATEFAST&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;   
        
        &lt;span class=&quot;n&quot;&gt;FAST_50ms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;   &lt;span class=&quot;c1&quot;&gt;// We process the logic and relevant input and output every 50 milliseconds&lt;/span&gt;
        
            &lt;span class=&quot;n&quot;&gt;DigIn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;IN1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Souliss_T1n_ToggleCmd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;LIGHT1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;          &lt;span class=&quot;c1&quot;&gt;// Read inputs from IN1&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;DigIn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;IN2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Souliss_T1n_ToggleCmd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;LIGHT2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;          &lt;span class=&quot;c1&quot;&gt;// Read inputs from IN2&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;DigIn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;IN3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Souliss_T1n_ToggleCmd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;LIGHT3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;          &lt;span class=&quot;c1&quot;&gt;// Read inputs from IN3&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;DigIn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;IN4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Souliss_T1n_ToggleCmd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;LIGHT4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;          &lt;span class=&quot;c1&quot;&gt;// Read inputs from IN4&lt;/span&gt;
        
            &lt;span class=&quot;n&quot;&gt;Logic_SimpleLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LIGHT1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                          &lt;span class=&quot;c1&quot;&gt;// Execute the logic for Relay 1&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;Logic_SimpleLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LIGHT2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                          &lt;span class=&quot;c1&quot;&gt;// Execute the logic for Relay 2&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;Logic_SimpleLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LIGHT3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                          &lt;span class=&quot;c1&quot;&gt;// Execute the logic for Relay 3&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;Logic_SimpleLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LIGHT4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                          &lt;span class=&quot;c1&quot;&gt;// Execute the logic for Relay 4&lt;/span&gt;
            
            &lt;span class=&quot;n&quot;&gt;DigOut&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;RELAY1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Souliss_T1n_Coil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;LIGHT1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;           &lt;span class=&quot;c1&quot;&gt;// Drive the Relay 1&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;DigOut&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;RELAY2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Souliss_T1n_Coil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;LIGHT2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;           &lt;span class=&quot;c1&quot;&gt;// Drive the Relay 2&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;DigOut&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;RELAY3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Souliss_T1n_Coil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;LIGHT3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;           &lt;span class=&quot;c1&quot;&gt;// Drive the Relay 3&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;DigOut&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;RELAY4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Souliss_T1n_Coil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;LIGHT4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;           &lt;span class=&quot;c1&quot;&gt;// Drive the Relay 4&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; 
        
        &lt;span class=&quot;c1&quot;&gt;// Here we process all communication with other nodes&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;FAST_GatewayComms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;    
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    
    &lt;span class=&quot;n&quot;&gt;EXECUTESLOW&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; 
        &lt;span class=&quot;n&quot;&gt;UPDATESLOW&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;SLOW_10s&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;// Process the timer every 10 seconds  &lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;Timer_SimpleLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LIGHT1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;Timer_SimpleLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LIGHT2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;  
            &lt;span class=&quot;n&quot;&gt;Timer_SimpleLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LIGHT3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;Timer_SimpleLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LIGHT4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;     
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;strong&gt;The code below is for the Peers&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Each of the board running this code will connect to the Gateway via RS485&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;span class=&quot;cm&quot;&gt;/**************************************************************************
    Souliss - Lights
    It handle the four relays either via IN1 to IN4 inputs or using the
    Android interface. Connecting the relays to lights or similar electrical 
    appliance, you can get remote control of them.
    Connect multiple ProDINo Wroom via RS485 using the e08_WiFi_Lights_n2.ino
    on the peer boards.
        
    Applicable for:
        - Light
        - Other ON/OFF electrical appliance
    
    Runs on KMP Electronics ProDINo Wroom (WiFi ESP8266)
***************************************************************************/&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// Let the IDE point to the Souliss framework&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;SoulissFramework.h&quot;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;bconf/DINo_WiFi_RS485.h&quot;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;   // Define the board type&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;conf/DynamicAddressing.h&quot;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;         // Use dynamic address  &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// Include framework code and libraries&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;SPI.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;ESP8266WiFi.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;EEPROM.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt;/*** All configuration includes should be above this line ***/&lt;/span&gt; 
&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;Souliss.h&quot;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#define LIGHT1                  0           // This is the memory slot used for the execution of the logic
#define LIGHT2                  1           
#define LIGHT3                  2           
#define LIGHT4                  3           
&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;setup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;   
    &lt;span class=&quot;c1&quot;&gt;// Init the board&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;InitDINo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
   
    
    &lt;span class=&quot;c1&quot;&gt;// Define Simple Light logics for the relays&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;Set_SimpleLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LIGHT1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;Set_SimpleLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LIGHT2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;Set_SimpleLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LIGHT3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;Set_SimpleLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LIGHT4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;    
    
    &lt;span class=&quot;c1&quot;&gt;// This board (peer) request an address to the gateway one at runtime, no need&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// to configure any parameter here&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;SetDynamicAddressing&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;GetAddress&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; 
    &lt;span class=&quot;c1&quot;&gt;// Here we start to play&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;EXECUTEFAST&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;                     
        &lt;span class=&quot;n&quot;&gt;UPDATEFAST&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;   
        
        &lt;span class=&quot;n&quot;&gt;FAST_50ms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;   &lt;span class=&quot;c1&quot;&gt;// We process the logic and relevant input and output every 50 milliseconds&lt;/span&gt;
        
            &lt;span class=&quot;n&quot;&gt;DigIn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;IN1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Souliss_T1n_ToggleCmd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;LIGHT1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;          &lt;span class=&quot;c1&quot;&gt;// Read inputs from IN1&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;DigIn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;IN2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Souliss_T1n_ToggleCmd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;LIGHT2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;          &lt;span class=&quot;c1&quot;&gt;// Read inputs from IN2&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;DigIn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;IN3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Souliss_T1n_ToggleCmd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;LIGHT3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;          &lt;span class=&quot;c1&quot;&gt;// Read inputs from IN3&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;DigIn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;IN4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Souliss_T1n_ToggleCmd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;LIGHT4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;          &lt;span class=&quot;c1&quot;&gt;// Read inputs from IN4&lt;/span&gt;
        
            &lt;span class=&quot;n&quot;&gt;Logic_SimpleLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LIGHT1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                          &lt;span class=&quot;c1&quot;&gt;// Execute the logic for Relay 1&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;Logic_SimpleLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LIGHT2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                          &lt;span class=&quot;c1&quot;&gt;// Execute the logic for Relay 2&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;Logic_SimpleLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LIGHT3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                          &lt;span class=&quot;c1&quot;&gt;// Execute the logic for Relay 3&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;Logic_SimpleLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LIGHT4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                          &lt;span class=&quot;c1&quot;&gt;// Execute the logic for Relay 4&lt;/span&gt;
            
            &lt;span class=&quot;n&quot;&gt;DigOut&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;RELAY1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Souliss_T1n_Coil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;LIGHT1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;           &lt;span class=&quot;c1&quot;&gt;// Drive the Relay 1&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;DigOut&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;RELAY2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Souliss_T1n_Coil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;LIGHT2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;           &lt;span class=&quot;c1&quot;&gt;// Drive the Relay 2&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;DigOut&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;RELAY3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Souliss_T1n_Coil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;LIGHT3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;           &lt;span class=&quot;c1&quot;&gt;// Drive the Relay 3&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;DigOut&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;RELAY4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Souliss_T1n_Coil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;LIGHT4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;           &lt;span class=&quot;c1&quot;&gt;// Drive the Relay 4&lt;/span&gt;
        
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; 
            
        &lt;span class=&quot;c1&quot;&gt;// Here we process all communication with other nodes&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;FAST_PeerComms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
        
        &lt;span class=&quot;c1&quot;&gt;// At first runs, we look for a gateway to join&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;START_PeerJoin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    
    &lt;span class=&quot;n&quot;&gt;EXECUTESLOW&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; 
        &lt;span class=&quot;n&quot;&gt;UPDATESLOW&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;SLOW_10s&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;// Process the timer every 10 seconds  &lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;Timer_SimpleLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LIGHT1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;Timer_SimpleLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LIGHT2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;  
            &lt;span class=&quot;n&quot;&gt;Timer_SimpleLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LIGHT3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;Timer_SimpleLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LIGHT4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;              
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;     
        
        &lt;span class=&quot;c1&quot;&gt;// Here we periodically check for a gateway to join&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;SLOW_PeerJoin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;        
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;strong&gt;Enjoy!&lt;/strong&gt;&lt;/p&gt;

    </content>
  </entry>
  
  <entry>
    <title>Parliamo di SmartHome a Torino, Bologna, Milano e Roma!</title>
    <link href="http://souliss.github.io/articles/smarthomenow-bologna/"/>
    <updated>2016-04-17T00:00:00+00:00</updated>
    <id>http://souliss.github.io/articles/smarthomenow-bologna</id>
    <author>
      <name>Souliss Team</name>
      <uri>http://souliss.github.io/</uri>
      
    </author>
    <content type="html">
      &lt;img src=&quot;http://souliss.github.io/images/2016-04/FulviosSpeech2.jpg&quot;&gt;&lt;br/&gt;
      &lt;p&gt;&lt;a href=&quot;http://smarthomenow.it/&quot;&gt;SmartHomeNow&lt;/a&gt; è una serie d’incontri incentrati sugli sviluppi degli oggetti domestici e la loro interazione con internet ed altre nuove tecnologie, quello che ieri era chiamato domotica ed oggi rientra nel più moderno concetto di SmartHome abbracciando l’IoT.&lt;/p&gt;

&lt;p&gt;La formula è classica, con una serie di presentazioni brevi al mattino e tavoli di discussione al pomeriggio, ingresso gratuito ma a numero chiuso ed una selezione di partecipanti variegata, grandi società come Cisco, ABB e Gewiss, associazioni come Energy@Home, integratori e sviluppatori di soluzioni open-source.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-04/FulviosSpeech.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;La prima tappa di Torino è stata una sperimentazione e la principale ingonita era capire come potevamo collocarci all’interno di questo contesto misto, sopratutto nei confronti di società da anni nella domotica classica. La presentazione di &lt;a href=&quot;https://github.com/FulvioSpelta&quot;&gt;Fulvio&lt;/a&gt; è stata diretta ed ha mostrato come soluzioni open-source possano porsi come alternativa ai prodotti commerciali, pur se diretta ad una platea di nicchia e competente.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;L’interesse è cresciuto mostrando l’integrazione tra Souliss, openHAB ed altri strumenti per il monitoraggio dei dati raccolti nella rete.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Le slide principali sono riportate sotto come immagine, ma il file completo è &lt;a href=&quot;http://souliss.github.io/images/2016-04/Souliss_SmartHomeNow_v0.pdf&quot;&gt;disponibile&lt;/a&gt;.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;&lt;strong&gt;Integrazione con openHAB&lt;/strong&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-04/slide1.jpg&quot; alt=&quot;&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Monitoraggio distribuito riscaldamento&lt;/strong&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-04/slide2.jpg&quot; alt=&quot;&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Consumi elettrici&lt;/strong&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-04/slide4.jpg&quot; alt=&quot;&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;Dall’esperienza positiva di Torino è nato l’invito per partecipare anche a Bologna, dove &lt;a href=&quot;https://github.com/shineangelic&quot;&gt;Alessandro&lt;/a&gt; ha introdotto con un taglio diverso la storia ed i motivi per cui è nato Souliss.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-04/Pexoratore.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;La presenza di un piccolo Laboratorio mobile ha poi permesso ai partecipanti di vedere qualche esempio da vivo, toccando con mano il lavoro delle notti insonni di &lt;a href=&quot;https://github.com/mcbittech&quot;&gt;Flavio&lt;/a&gt; ed &lt;a href=&quot;https://github.com/fazioa&quot;&gt;Antonino&lt;/a&gt; con la loro idea di riuscire ad emulare NEST in open-source con &lt;a href=&quot;https://github.com/souliss/smart-thermostat&quot;&gt;SST&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-04/slide3.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Il risultato è stato interessante e l’impegno è quello di partecipare ad altre tappe tra cui Milano e Roma, dove probabilmente verrà replicato l’esperimento del laboratorio mobile per mostrare direttamente ai partecipanti come utilizzare Souliss.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-04/Nostromo_Pex.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Registrate la vostra presenza (l’ingresso è gratuito, ma la registrazione è obbligatoria) per le prossime tappe sul sito di &lt;a href=&quot;http://smarthomenow.it/&quot;&gt;SmartHome Now&lt;/a&gt;, ci vediamo al prossimo evento!&lt;/p&gt;

    </content>
  </entry>
  
  <entry>
    <title>Using Eclipse Arduino IDE with Souliss</title>
    <link href="http://souliss.github.io/media/Using-Eclipse-Arduino-IDE/"/>
    <updated>2016-03-13T00:00:00+00:00</updated>
    <id>http://souliss.github.io/media/Using-Eclipse-Arduino-IDE</id>
    <author>
      <name>Souliss Team</name>
      <uri>http://souliss.github.io/</uri>
      
    </author>
    <content type="html">
      &lt;img src=&quot;http://souliss.github.io/images/2016-03/eclipse-feature.jpg&quot;&gt;&lt;br/&gt;
      &lt;p&gt;This is tutorial how to setup Eclipse Arduino IDE to compile sketches using Souliss.&lt;/p&gt;

&lt;p&gt;I assume you use Windows (Windows 7 64-bit in my case) - for other operating systems there are minor differences.&lt;/p&gt;

&lt;h2 id=&quot;download-and-install&quot;&gt;Download and install&lt;/h2&gt;

&lt;h3 id=&quot;download-arduino-ide-bundle&quot;&gt;Download Arduino IDE Bundle&lt;/h3&gt;

&lt;p&gt;I recommend to download whole bundle: Eclipse + Arduino IDE plugin in stable version &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;V2.4_win64.2015-12-06_20-24-02&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;http://eclipse.baeyens.it/stable-win.html&lt;/p&gt;

&lt;p&gt;Select 32 or 64 bit version, according to your Windows version.&lt;/p&gt;

&lt;p&gt;I choose 64-bit version and downloaded &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;V2.4_win64.2015-12-06_20-24-02.tar.gz&lt;/code&gt; file.&lt;/p&gt;

&lt;h3 id=&quot;unpack-eclipse-arduino-ide&quot;&gt;Unpack Eclipse Arduino IDE&lt;/h3&gt;

&lt;p&gt;Unpack &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;V2.4_win64.2015-12-06_20-24-02.tar.gz&lt;/code&gt; using for example 7-zip, to any directory without spaces in name.&lt;/p&gt;

&lt;p&gt;In my case it is: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C:\Apps\eclipseArduino-V2.4_win64.2015-12-06_20-24-02\&lt;/code&gt;&lt;/p&gt;

&lt;h3 id=&quot;download-arduino-ide-165&quot;&gt;Download Arduino IDE 1.6.5&lt;/h3&gt;

&lt;p&gt;You need exactly that version - 1.6.5!&lt;/p&gt;

&lt;p&gt;Page: https://www.arduino.cc/en/Main/OldSoftwareReleases#previous&lt;/p&gt;

&lt;p&gt;I recommend Windows ZIP file for non admin install: 
http://arduino.cc/download_handler.php?f=/arduino-1.6.5-r5-windows.zip&lt;/p&gt;

&lt;p&gt;So you need to unpack arduino-1.6.5-r5-windows.zip to any directory. 
In my case it is: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C:\Apps\arduino-1.6.5-r5\&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You can also use Windows installer, but remember to use correct Arduino installation path later.&lt;/p&gt;

&lt;h3 id=&quot;download-makeexe&quot;&gt;Download make.exe&lt;/h3&gt;

&lt;p&gt;Windows users need &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;make&lt;/code&gt; utillity, because it is no more in Arduino.&lt;/p&gt;

&lt;p&gt;Download from ftp://ftp.equation.com/make/32/make.exe and place on your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PATH&lt;/code&gt; or in your Arduino IDE &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;hardware\tools\avr\bin&lt;/code&gt; directory.
In my case it is: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;c:\Apps\arduino-1.6.5-r5\hardware\tools\avr\bin&lt;/code&gt;&lt;/p&gt;

&lt;h2 id=&quot;configure-eclipse-arduino-ide&quot;&gt;Configure Eclipse Arduino IDE&lt;/h2&gt;

&lt;p&gt;Launch &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;eclipseArduinoIDE.exe&lt;/code&gt;&lt;/p&gt;

&lt;h3 id=&quot;configure-arduino-plugin&quot;&gt;Configure Arduino plugin&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;Enter Preferences: Menu &lt;em&gt;Window&lt;/em&gt;, &lt;em&gt;Preferences&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;select &lt;em&gt;Arduino&lt;/em&gt; on the left tree&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Enter correct paths&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-03/774e8604-e5d3-11e5-9396-c41c90aa51a1.png&quot; alt=&quot;configure1&quot; /&gt;&lt;/p&gt;

    &lt;p&gt;You should see green text: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ide is supported&lt;/code&gt;&lt;/p&gt;

    &lt;p&gt;If &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;make.exe&lt;/code&gt; is on your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PATH&lt;/code&gt; you can check &lt;em&gt;test if make can be found&lt;/em&gt; and you should see green &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Make is found on your system&lt;/code&gt;.&lt;/p&gt;

    &lt;p&gt;If &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;make.exe&lt;/code&gt; is in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;hardware\tools\avr\bin&lt;/code&gt; you will see &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;make is not found on your system&lt;/code&gt; but it still should work.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;em&gt;Apply&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;set-the-save-before-build-option&quot;&gt;Set the save before build option&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;Enter Preferences: Menu &lt;em&gt;Window&lt;/em&gt;, &lt;em&gt;Preferences&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;select &lt;em&gt;General&lt;/em&gt;, &lt;em&gt;Workspace&lt;/em&gt; on left tree&lt;/li&gt;
  &lt;li&gt;Mark &lt;em&gt;Save automatically before build&lt;/em&gt; checkbox&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;Apply&lt;/em&gt;
&lt;img src=&quot;http://souliss.github.io/images/2016-03/795c4d5a-e5d3-11e5-95a9-93861bf4a1f6.png&quot; alt=&quot;configure2&quot; /&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;add-ino-and-pde-as-c-source&quot;&gt;Add &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.ino&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.pde&lt;/code&gt; as C++ Source&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;Enter Preferences: Menu &lt;em&gt;Window&lt;/em&gt;, &lt;em&gt;Preferences&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Select &lt;em&gt;C/C++&lt;/em&gt;, &lt;em&gt;File types&lt;/em&gt; on left tree
&lt;img src=&quot;http://souliss.github.io/images/2016-03/68d5dbb8-e5d8-11e5-8643-ffc032ceed61.png&quot; alt=&quot;configure3a&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Press &lt;em&gt;New..&lt;/em&gt;, enter &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.ino&lt;/code&gt; and select &lt;em&gt;C++ Source File&lt;/em&gt;, &lt;em&gt;OK&lt;/em&gt;
&lt;img src=&quot;http://souliss.github.io/images/2016-03/7f5b724e-e5d3-11e5-87b2-7a933b17dadb.png&quot; alt=&quot;configure3b&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Again press &lt;em&gt;New..&lt;/em&gt;, enter &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.pde&lt;/code&gt; and select &lt;em&gt;C++ Source File&lt;/em&gt;, &lt;em&gt;OK&lt;/em&gt;
&lt;img src=&quot;http://souliss.github.io/images/2016-03/813f7006-e5d3-11e5-9376-7dde45133642.png&quot; alt=&quot;configure3c&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;em&gt;Apply&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;create-and-compile-first-sketch&quot;&gt;Create and compile first Sketch&lt;/h2&gt;

&lt;h3 id=&quot;create-new-arduino-sketch-based-on-blink-example&quot;&gt;Create new Arduino Sketch based on blink example&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Connect your Arduino board to computer&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Menu &lt;em&gt;File&lt;/em&gt;, &lt;em&gt;New&lt;/em&gt;, &lt;em&gt;New Arduino sketch&lt;/em&gt; or press &lt;em&gt;New sketch&lt;/em&gt; on toolbar&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-03/261b70a6-e5da-11e5-95f3-28b06d33079b.png&quot; alt=&quot;newsketchbutton&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Enter &lt;em&gt;Project name&lt;/em&gt;, for example &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;hello&lt;/code&gt;, &lt;em&gt;Next&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;Select your board and COM port, for example &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Arduino/Genuino Uno&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;COM11&lt;/code&gt;, &lt;em&gt;Next&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;In Select code choose: &lt;em&gt;Sample Sketch&lt;/em&gt;. In Select Example code mark checkbox for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Blink&lt;/code&gt; under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;01.Basics&lt;/code&gt;, &lt;em&gt;Next&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;OK&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;compile-verify-your-sketch&quot;&gt;Compile (Verify) your sketch&lt;/h2&gt;
&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Press &lt;em&gt;Verify&lt;/em&gt; button on toolbar&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-03/2618f010-e5da-11e5-9361-1e45d6398dcf.png&quot; alt=&quot;verifybutton&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On &lt;em&gt;Console&lt;/em&gt; tab you should see many messages and at the end:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;'Finished building target: hello'
Build Finished
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-03/86aae28c-e5d3-11e5-8e7f-4cfd4d276e7a.png&quot; alt=&quot;blinkcompiled&quot; /&gt;&lt;/p&gt;

&lt;p&gt;On &lt;em&gt;Problems&lt;/em&gt; tab should be no red &lt;em&gt;Errors&lt;/em&gt;&lt;/p&gt;

&lt;h2 id=&quot;upload-your-sketch&quot;&gt;Upload your sketch&lt;/h2&gt;
&lt;ul&gt;
  &lt;li&gt;Press &lt;em&gt;Upload&lt;/em&gt; button on toolbar&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-03/261d85a8-e5da-11e5-83ec-474452f33a00.png&quot; alt=&quot;uploadbutton&quot; /&gt;&lt;/p&gt;

&lt;p&gt;On &lt;em&gt;Console&lt;/em&gt; Tab you can see messages like this:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Starting upload
using arduino loader
Starting reset using DTR toggle process
Flushing buffer
Toggling DTR
Continuing to use COM12
Ending reset using DTR toggle process


Launching C:\Apps\arduino-1.6.5-r5\hardware\tools\avr/bin/avrdude -CC:\Apps\arduino-1.6.5-r5\hardware\tools\avr/etc/avrdude.conf -patmega328p -carduino -PCOM12 -b115200 -D -Uflash:w:C:\Apps\eclipseArduino-V2.4_win64.2015-12-06_20-24-02\workspace\hello/Release/hello.hex:i 
Output:

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f
avrdude: reading input file &quot;C:\Apps\eclipseArduino-V2.4_win64.2015-12-06_20-24-02\workspace\hello/Release/hello.hex&quot;
avrdude: writing flash (1030 bytes):

Writing | ################################################## | 100% 0.18s

avrdude: 1030 bytes of flash written
avrdude: verifying flash memory against C:\Apps\eclipseArduino-V2.4_win64.2015-12-06_20-24-02\workspace\hello/Release/hello.hex:
avrdude: load data flash data from input file C:\Apps\eclipseArduino-V2.4_win64.2015-12-06_20-24-02\workspace\hello/Release/hello.hex:
avrdude: input file C:\Apps\eclipseArduino-V2.4_win64.2015-12-06_20-24-02\workspace\hello/Release/hello.hex contains 1030 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.15s

avrdude: verifying ...
avrdude: 1030 bytes of flash verified

avrdude done.  Thank you.

avr/bin/avrdude finished
upload done
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And your Arduino board should blink!&lt;/p&gt;

&lt;p&gt;If uploading is very slow and you see on &lt;em&gt;Console&lt;/em&gt; tab:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x39
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;it meanse you have communication problems.&lt;/p&gt;

&lt;p&gt;Double check your cables and COM port number.&lt;/p&gt;

&lt;p&gt;You can change COM port (or even board type)&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Select in menu: &lt;em&gt;Project&lt;/em&gt;, &lt;em&gt;Properties&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;Select &lt;em&gt;Arduino&lt;/em&gt; on the left tree&lt;/li&gt;
  &lt;li&gt;Correct your COM &lt;em&gt;port&lt;/em&gt; and/or &lt;em&gt;board&lt;/em&gt; type&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-03/261630be-e5da-11e5-9945-cf63662a1a5d.png&quot; alt=&quot;changeboard&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;create-and-compile-souliss-sketch&quot;&gt;Create and compile Souliss sketch&lt;/h2&gt;

&lt;h2 id=&quot;download-souliss&quot;&gt;Download Souliss&lt;/h2&gt;

&lt;p&gt;Open https://github.com/souliss/souliss/ and Download zip (https://github.com/souliss/souliss/archive/friariello.zip)&lt;/p&gt;

&lt;h2 id=&quot;unpack-souliss&quot;&gt;Unpack Souliss&lt;/h2&gt;

&lt;p&gt;Unpack &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;souliss-friariello.zip&lt;/code&gt; to your Arduino library - the same you configured in &lt;em&gt;Configure Arduino plugin&lt;/em&gt; step as &lt;em&gt;Private Library path&lt;/em&gt;.
Rename &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;souliss-friariello&lt;/code&gt; directory to just &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;souliss&lt;/code&gt;.&lt;/p&gt;

&lt;h3 id=&quot;create-new-arduino-sketch-based-on-souliss-example&quot;&gt;Create new Arduino Sketch based on Souliss example&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Connect your Arduino board to computer&lt;/li&gt;
  &lt;li&gt;Press &lt;em&gt;New sketch&lt;/em&gt; on toolbar&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-03/261b70a6-e5da-11e5-95f3-28b06d33079b.png&quot; alt=&quot;newsketchbutton&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Enter Project name, for example &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;souliss-test&lt;/code&gt;, &lt;em&gt;Next&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;Select your &lt;em&gt;board&lt;/em&gt; and COM &lt;em&gt;port&lt;/em&gt;, for example &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Arduino/Genuino Uno&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;COM11&lt;/code&gt;, &lt;em&gt;Next&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;In Select code choose: &lt;em&gt;Sample Sketch&lt;/em&gt;. In Select Example code mark checkbox for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;e01_HelloWorld&lt;/code&gt; under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;souliss&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ethernet&lt;/code&gt;, &lt;em&gt;Next&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;OK&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;add-libraries-to-your-sketch&quot;&gt;Add libraries to your sketch&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Menu &lt;em&gt;Arduino&lt;/em&gt;, &lt;em&gt;Add a library to the seleected project&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;Mark checkboxes on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;souliss&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;SPI&lt;/code&gt;, &lt;em&gt;Finish&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;exclude-some-souliss-file-from-compilation&quot;&gt;Exclude some souliss file from compilation&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Because all souliss files (both .h and .cpp) are actually included in your sketch, compile must not compile .cpp files.
So you need to exclude them from compilation!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In &lt;em&gt;Project Explorer&lt;/em&gt;, expand your project, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Libraries&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;souliss&lt;/code&gt;, select all directories from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;base&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;webhook&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-03/44f2e95e-e5e0-11e5-86c5-ecd7bb5fc4cd.png&quot; alt=&quot;excludesoulissdirs1&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Then select from context menu &lt;em&gt;Resource Configuration&lt;/em&gt;,  &lt;em&gt;Exlude from builds&lt;/em&gt;, &lt;em&gt;Select all&lt;/em&gt;, &lt;em&gt;OK&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Directories &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;base&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bconf&lt;/code&gt;, … &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;webhook&lt;/code&gt; should be grayed out:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-03/451d9550-e5e0-11e5-83e5-d2ce478b8ccb.png&quot; alt=&quot;excludesoulissdirs2&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;compile-verify-your-sketch-1&quot;&gt;Compile (Verify) your sketch&lt;/h2&gt;
&lt;ul&gt;
  &lt;li&gt;Press &lt;em&gt;Verify&lt;/em&gt; button on toolbar&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sketch should build without errors (but with many warnings - it’s normal) and you can upload it to board.&lt;/p&gt;

    </content>
  </entry>
  
  <entry>
    <title>How much power a smart bulb need?</title>
    <link href="http://souliss.github.io/articles/how-much-power-smart-bulb-need/"/>
    <updated>2016-01-30T00:00:00+00:00</updated>
    <id>http://souliss.github.io/articles/how-much-power-smart-bulb-need</id>
    <author>
      <name>Souliss Team</name>
      <uri>http://souliss.github.io/</uri>
      
    </author>
    <content type="html">
      &lt;img src=&quot;http://souliss.github.io/images/2016-01/lyt-power.JPG&quot;&gt;&lt;br/&gt;
      &lt;p&gt;Recently &lt;a href=&quot;https://plus.google.com/+greatscottlab&quot;&gt;GreatScott&lt;/a&gt; published an interesting video on the LYT bulbs by &lt;a href=&quot;http://authometion.com/&quot;&gt;Authometion&lt;/a&gt;, he focused his interest mostly on power consumption and &lt;em&gt;measured a very low efficiency and high power consumption for the LYT&lt;/em&gt;, &lt;strong&gt;he honestly admitted that his math was wrong&lt;/strong&gt;, but lets go deep inside.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Let’s start from the result, the LYT88 consume approximately 8.7 W at full bright and has an electrical efficiency of 81%.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now, take a bunch of minutes to see his video and read some comments&lt;/p&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/g0F-rFhNZGU&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;p&gt;In the comments some users point out that those measure can be affected by the reactive power and for this reason GreatScott has posted as &lt;a href=&quot;https://plus.google.com/+greatscottlab/posts/7opXdvYK7Sf&quot;&gt;errata corrige&lt;/a&gt; new measures and some scope waveform.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-01/lyt-current.JPG?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This picture has shocked me, it shows the voltage and current waveforms for the LYT bulb at full bright, is not a sinewave at all. None of the standard theory applies in these cases and I discovered that myself as many others has too little knowledge on how to measure the power for such type of device.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;em&gt;LONG STORY SHORT:&lt;/em&gt; If you want to measure power, don’t fight with math! Use a power meter&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Using a power meter is easy and quite cheap, the one in the picture isn’t a professional device but give an accurate enough measure to understand the power magnitude.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-01/power-meter.jpg?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now the question is, were the measure posted by Scott in the errata corrige right? The answer is a &lt;strong&gt;big no&lt;/strong&gt; and we will see below the reason.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WHAT’S THE REACTIVE POWER&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Powering a not resistive load like an electric motor with a sine-wave result in a sine-wave current with a different phase, from a physical point of view the device it self will source back some of the power that has sink. That portion of the power doesn’t produce any work because has a zero average value and is called &lt;strong&gt;reactive power&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Isn’t clear? The picture below shows the voltage, current and power for a resistive load (top) and inductive one (bottom). In case of an inductive load the power cross the zero and has negative values, while negative the load is sourcing back some of the power that has sink before crossing the zero.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-01/Sinewave-power.png?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In both resistive and inductive case, has been used normalized (1 V and 1 A magnitude) waves so you have the same peak value but different &lt;strong&gt;power values&lt;/strong&gt;. That’s the reason why you cannot simply measure the magnitude and get the power, the angle position of the waves matters.&lt;/p&gt;

&lt;p&gt;Without diving in details, you can use the cosine function of the angle between voltage and current (known as &lt;strong&gt;cosphi&lt;/strong&gt;) to get the &lt;strong&gt;active power&lt;/strong&gt; from the magnitude values. The &lt;strong&gt;active power&lt;/strong&gt; is the one that does the work and is the one that you pay in your home bill.
So, Scott has posted &lt;a href=&quot;https://plus.google.com/+greatscottlab/posts/7opXdvYK7Sf&quot;&gt;new measures and math&lt;/a&gt; using standard calculation that applies for sine-wave and has applied to the LYT that has a current that isn’t a sine-wave.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ESTIMATE THE POWER FOR A NOT SINE-WAVE CURRENT&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are multiple way to proceed but here we follow the short path, computer does the math for us and we can just apply the power formula, multiply voltage and power in a time constrained integral. Nowadays is easy, you just need to export the values from the oscilloscope and use a great tool like &lt;a href=&quot;http://www.scilab.org/&quot;&gt;Scilab&lt;/a&gt;, but Scott didn’t exported the values.&lt;/p&gt;

&lt;p&gt;So an estimation can be made calculating the normalized power of a voltage and current waveforms that are near to the one in the oscilloscope, here the &lt;a href=&quot;https://github.com/plinioseniore/lyt-current-estimation/tree/master&quot;&gt;code&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-01/Normalized-power.png?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The power waveform is always greater than zero and there is no &lt;em&gt;reactive power&lt;/em&gt; but is too far from a sine-wave to apply any standard math, a discrete integration of that wave gives a &lt;strong&gt;normalized power vale&lt;/strong&gt; that’s useful because is the scaling factor to be applied once we know the magnitude values. This is the equivalent of the &lt;strong&gt;cosphi&lt;/strong&gt; for our wave.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WHAT A MULTIMETER MEASURE&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So now we just need the magnitude (maximum value in the wave) for both current and voltage, easy? Not at all!&lt;/p&gt;

&lt;p&gt;Without the values from the oscilloscope (because we don’t know the scaling factor and Scott hasn’t provided details about) the only source of information is the multimeter. In the video Scott has used a nice True RMS multimeter, so the measure is the mean square root value and not the peak value.&lt;/p&gt;

&lt;p&gt;Using the measure from the video we have and applying the following scaling factor we can get the peak value&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;Measure&lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;Waveform&lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;Scaling Factor&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Voltage&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Sinewave&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;1/0.707&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Current&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;-&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;1/0.365&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;The scaling factor of the current can be calculated as the RMS of the normalized wave&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-01/current-rms.png?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;So, using the scaling factor we can get the peak values and applying the normalized power value we get the estimation of the power consumption as 10 W, that’s an estimation because the wave form was just a raw shape from a picture and not an export from an oscilloscope.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-01/Power-math.png?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;These 10 W are a most reliable estimation and shows the proper way to follow, at the end the &lt;strong&gt;long story short&lt;/strong&gt; is the way to proceed, using a watt-meter that shows 8.7 W used on the AC side.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-01/Measures.png?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Back to the efficiency, the measure on the DC side at full bright are free from PWM and are supposed to be mostly constants because the microcontroller power consumption (that is clock driven) is negligible compared to the LED ones at full bright. So the 7.05 W on the DC side can be considered a good measure and compared to 8.7 W on the AC side gives a good 81% of efficiency.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UPDATES&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/orgs/souliss/people/ribico&quot;&gt;Gabriele&lt;/a&gt; has a professional meter and after reading the post has done some measures on the bulb. I’ve got the export from his scope and applied the integral into a period of time to get the average power on AC and DC side, with a 82% efficency as result in the case of 2.5 W consumption on the AC side.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-01/Measured-AC-power.png?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The measures as well as the Scilab code to get the plots are available &lt;a href=&quot;https://github.com/plinioseniore/reactive_power&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;

    </content>
  </entry>
  
  <entry>
    <title>The new ESP8266 based ProDINo is coming!</title>
    <link href="http://souliss.github.io/articles/The-new-WiFi-DINo/"/>
    <updated>2016-01-24T00:00:00+00:00</updated>
    <id>http://souliss.github.io/articles/The-new-WiFi-DINo</id>
    <author>
      <name>Souliss Team</name>
      <uri>http://souliss.github.io/</uri>
      
    </author>
    <content type="html">
      &lt;img src=&quot;http://souliss.github.io/images/2016-01/DINoWiFi.jpg&quot;&gt;&lt;br/&gt;
      &lt;p&gt;This is the time where more and more &lt;strong&gt;ESP8266 based&lt;/strong&gt; devices are popping-up and &lt;a href=&quot;http://www.kmpelectronics.eu/&quot;&gt;KMP Electronics&lt;/a&gt; is coming also with a new design, a ProDINo based on the popular WiFi SOC. In these years we had a very close partnership with KMP Electronics and the design of the new board has started based on a common brainstorming on specification required by the new module.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The board carriers four relays and four opto-input as the previous DINo and keep the RS485 transceiver to create mixed WiFi/Ethernet network, as well as UEXT and Grove connector for easy expansion.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is an earlier design started around our experience with ESP8266 and RS485, the new WiFi ProDINo (the final name hasn’t yet been defined) will keep compatibility with the &lt;a href=&quot;http://www.kmpelectronics.eu/en-us/products/prodinoethernet.aspx&quot;&gt;actual ProDINo based on Wiznet W5200&lt;/a&gt;, so that you can build a Souliss based network with a mix of Ethernet, WiFi and RS485.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;Specification&lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;Type and Nominal Value&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Power Supply&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;DC/DC Switching from 9 to 30 VDC&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;SoC&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;ESP8266 - ESP-12&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;MCU&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;32-bit RISC CPU based on Tensilica Xtensa LX106 running at 80 MHz&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Communication&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;WiFi - IEEE 802.11 b/g/n&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Communication&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Half Duplex RS485 - TIA-485-A&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;I/O Expansion&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;I2C MCP23S08&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Input&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;No. 4 Opto-isolated&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Output&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;No. 4 Monostable Relay 15 A / 10 A&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Programming&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Via onboard USB connection&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Expansion&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Grove and UEXT&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Terminal&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Pluggable&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;Overall the new board will be smaller than the actual ProDINo and will get more flexibility from the &lt;strong&gt;pluggable terminals&lt;/strong&gt; and the expansion connector based on &lt;strong&gt;Grove and UEXT&lt;/strong&gt;, price and release date are not yet available, but on these pages will get all the updates.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-01/DINoWiFi-fist-assemble.JPG&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Stay tuned!&lt;/p&gt;

    </content>
  </entry>
  
  <entry>
    <title>Have fun with WiFiPixels</title>
    <link href="http://souliss.github.io/media/Have-fun-with-WiFiPixels/"/>
    <updated>2016-01-16T00:00:00+00:00</updated>
    <id>http://souliss.github.io/media/Have-fun-with-WiFiPixels</id>
    <author>
      <name>Souliss Team</name>
      <uri>http://souliss.github.io/</uri>
      
    </author>
    <content type="html">
      &lt;img src=&quot;http://souliss.github.io/images/2016-01/wifipixels.jpg&quot;&gt;&lt;br/&gt;
      &lt;p&gt;Far from the New Zeland the WiFi Pixel has arrived in my mailbox, this is a combination of a NeoPixel Ring and an ESP8266 WiFi SoC that gives the awesome effects of 16 WS2812 addressable LEDs.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The WS2812 combine three LED (Red, Green and Blue) and a small circuit that acts as a shift register 24 bit memory. So you can use a proper waveform to have it store a color as input and as any shift register it output the previous value, the result it that a single pin can drive an array of LED with the length as you want.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The below image by &lt;a href=&quot;https://learn.adafruit.com/assets/10668&quot;&gt;Adafruit&lt;/a&gt; shows the internal view of the addressable LED&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2016-01/leds_neo-closeup.jpg?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Assuming that you know how to use the &lt;a href=&quot;http://souliss.github.io/media/how-to-load-a-sketch-on-ESP/&quot;&gt;Arduino IDE and the ESP8266&lt;/a&gt;, you just have to download the &lt;a href=&quot;https://github.com/plinioseniore/Adafruit_NeoPixel&quot;&gt;Adafruit NeoPixel library&lt;/a&gt; and have the latest Souliss release (v7.1.1 at time of writing) to run the following sketch&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;span class=&quot;cm&quot;&gt;/**************************************************************************
    Souliss - WiFi Pixels

    Control a WiFi Pixels board from Android or openHAB, it network the node
    so that you can control the light effect also from other Souliss nodes
    using peer to peer send or listening for broadcasted/multicasted topics.

    Need Adafruit NeoPixel library.

    Run this code on one of the following boards:
      - Protoneer WiFi Pixels
      - An ESP8266 with WS2812 LEDs

***************************************************************************/&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// Configure the framework&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;bconf/MCU_ESP8266.h&quot;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;              // Load the code directly on the ESP8266&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;conf/Gateway.h&quot;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;                   // The main node is the Gateway, we have just one node&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// **** Define the WiFi name and password ****&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#define WIFICONF_INSKETCH
#define WiFi_SSID               &quot;mywifi&quot;
#define WiFi_Password           &quot;mypassword&quot;    
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// Include framework code and libraries&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;ESP8266WiFi.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;EEPROM.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;Souliss.h&quot;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// Dependency&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;Adafruit_NeoPixel.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// WiFi Pixels pin&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#define WS2812_PIN        2
#define WS2812_PIXELS     16
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// Souliss logic (aka typical) slots&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#define LEDCONTROL        0
#define LEDRED            1
#define LEDGREEN          2
#define LEDBLUE           3
#define ALLTHESAME        4
#define COLORWIPE         5
#define THEATERCHASE      6
&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt;/*** 
    Color Effect Mode:

        4 - All The Same
        5 - Color Wipe
        6 - Theater Chase
***/&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;uint8_t&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;coloreffect&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ALLTHESAME&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// Index of the addressed pixel&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;uint8_t&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i_coloreffect&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;    
&lt;span class=&quot;kt&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;long&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;timedelay&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;millis&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#define TIME_DELAY           50     // Not stopping delay in milliseconds
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// Init the LED object, refer to Adafruit NeoPixel library for more details&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;Adafruit_NeoPixel&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;strip&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Adafruit_NeoPixel&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;WS2812_PIXELS&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;WS2812_PIN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;NEO_GRB&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;NEO_KHZ800&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;setup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;   
    &lt;span class=&quot;n&quot;&gt;Initialize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

    &lt;span class=&quot;c1&quot;&gt;// Get the IP address from DHCP&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;GetIPAddress&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;                          
    &lt;span class=&quot;n&quot;&gt;SetAsGateway&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;myvNet_dhcp&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                  &lt;span class=&quot;c1&quot;&gt;// Set this node as gateway for SoulissApp                        &lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;Set_T16&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDCONTROL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                        &lt;span class=&quot;c1&quot;&gt;// Set a logic to control a LED strip&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;Set_T11&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ALLTHESAME&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                        &lt;span class=&quot;c1&quot;&gt;// Set a button for the All The Same effect&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;Set_T11&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;COLORWIPE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                         &lt;span class=&quot;c1&quot;&gt;// Set a button for the Color Wipe effect&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;Set_T11&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;THEATERCHASE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                      &lt;span class=&quot;c1&quot;&gt;// Set a button for the Theater Chase effect&lt;/span&gt;

    &lt;span class=&quot;c1&quot;&gt;// Init the pixels&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;strip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;begin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;strip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;show&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt; 

    &lt;span class=&quot;c1&quot;&gt;// Init the All The Same mode as default&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;mOutput&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ALLTHESAME&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; 
    &lt;span class=&quot;c1&quot;&gt;// Here we start to play&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;EXECUTEFAST&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;                     
        &lt;span class=&quot;n&quot;&gt;UPDATEFAST&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;   

        &lt;span class=&quot;c1&quot;&gt;// Execute the code every 10 milliseconds   &lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;FAST_10ms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;

            &lt;span class=&quot;c1&quot;&gt;// Execute the logic that handle the LED&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Logic_T16&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDCONTROL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;timedelay&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;millis&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;setColor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

            &lt;span class=&quot;c1&quot;&gt;// Just process communication as fast as the logics&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;ProcessCommunication&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; 

        &lt;span class=&quot;c1&quot;&gt;// Execute the code every 110 milliseconds  &lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;FAST_110ms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            
            &lt;span class=&quot;c1&quot;&gt;// Select the effect mode&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Logic_T11&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ALLTHESAME&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;coloreffect&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ALLTHESAME&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

                &lt;span class=&quot;c1&quot;&gt;// Reset the other color mode&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;mOutput&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;COLORWIPE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;mOutput&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;THEATERCHASE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Logic_T11&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;COLORWIPE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;coloreffect&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;COLORWIPE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

                &lt;span class=&quot;c1&quot;&gt;// Reset the other color mode&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;mOutput&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ALLTHESAME&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;mOutput&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;THEATERCHASE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Logic_T11&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;THEATERCHASE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;coloreffect&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;THEATERCHASE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

                &lt;span class=&quot;c1&quot;&gt;// Reset the other color mode&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;mOutput&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;COLORWIPE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;mOutput&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ALLTHESAME&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;// Process the other Gateway stuffs&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;FAST_GatewayComms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;EXECUTESLOW&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;   
        &lt;span class=&quot;n&quot;&gt;UPDATESLOW&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;SLOW_10s&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;  &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;

            &lt;span class=&quot;c1&quot;&gt;// The timer handle timed-on states&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;Timer_LED_Strip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDCONTROL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                      
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;     
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;       
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// Set the selected color and effect&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;setColor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;coloreffect&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;COLORWIPE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;          &lt;span class=&quot;n&quot;&gt;colorWipe&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;coloreffect&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;THEATERCHASE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;n&quot;&gt;theaterChase&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;                                &lt;span class=&quot;n&quot;&gt;alltheSame&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;strip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;show&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// Set the same color for all pixels&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;alltheSame&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kt&quot;&gt;uint32_t&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;strip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;mOutput&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDRED&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mOutput&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDGREEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mOutput&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDBLUE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i_coloreffect&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i_coloreffect&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;strip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;numPixels&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i_coloreffect&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;strip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;setPixelColor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i_coloreffect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// Set the current color one pixel per time&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;colorWipe&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;c1&quot;&gt;// Update periodically&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;long&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;millis&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timedelay&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;

        &lt;span class=&quot;kt&quot;&gt;uint32_t&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;strip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;mOutput&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDRED&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mOutput&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDGREEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mOutput&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDBLUE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;strip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;setPixelColor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i_coloreffect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;i_coloreffect&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i_coloreffect&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;strip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;numPixels&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
        
        &lt;span class=&quot;n&quot;&gt;timedelay&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;millis&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;TIME_DELAY&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// Turn the third pixel and shut the previous&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;theaterChase&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;c1&quot;&gt;// Update periodically&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;long&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;millis&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timedelay&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;

        &lt;span class=&quot;kt&quot;&gt;uint32_t&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;strip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;mOutput&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDRED&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mOutput&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDGREEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mOutput&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDBLUE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;strip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;setPixelColor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i_coloreffect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;strip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;setPixelColor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i_coloreffect&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;i_coloreffect&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i_coloreffect&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;strip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;numPixels&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;timedelay&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;millis&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;TIME_DELAY&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;In SoulissApp you will have direct control of the main color and you will be able to select a light effect between three choices, more can of course be added, just keep in mind that Souliss is running in the background and effect shall not stop the code execution.&lt;/p&gt;

&lt;p&gt;Enjoy this little light module and share were you will use it!&lt;/p&gt;

    </content>
  </entry>
  
  <entry>
    <title>Smart Socket Hack Tutorial</title>
    <link href="http://souliss.github.io/media/smart-socket-hack/"/>
    <updated>2015-12-25T00:00:00+00:00</updated>
    <id>http://souliss.github.io/media/smart-socket-hack</id>
    <author>
      <name>Souliss Team</name>
      <uri>http://souliss.github.io/</uri>
      
    </author>
    <content type="html">
      &lt;img src=&quot;http://souliss.github.io/images/2015-12/MAINIMAGE.jpg&quot;&gt;&lt;br/&gt;
      &lt;p&gt;These 2200W wifi controlled Smart Sockets are available from suppliers on Ebay for about £15 - they are available with various Mains input plug formats (Europe, UK, US), they have multi-standard Mains output sockets, onboard USB charging socket, onboard configuration push button, and 2 onboard LEDs (green and blue).&lt;/p&gt;

&lt;h3 id=&quot;in-a-nutshell&quot;&gt;In a Nutshell&lt;/h3&gt;

&lt;p&gt;This article is more than just a tutorial, it is also a ‘Goodies Bag’ offering some other helpful nuggets.
The tutorial shows how to hack the Smart Socket to remove its original wifi board and fit an alternative ESP8266 stripboard DIY replacement, resulting in a user-programmable versatile switched-mains power socket that is capable of being used with any of the ESP8266 programming and control alternatives such as AT commands, Lua scripts, MicroPython, Arduino sketches etc, and particularly Souliss (link to go here).&lt;/p&gt;

&lt;p&gt;It is a &lt;strong&gt;&lt;em&gt;safe low voltage hack&lt;/em&gt;&lt;/strong&gt; because none of the potentially dangerous Mains stuff is involved, and the hack can be &lt;strong&gt;&lt;em&gt;powered via a 5v USB cable for testing and flashing&lt;/em&gt;&lt;/strong&gt;, so the Smart Socket is only plugged into the Mains for usage after being completed.&lt;/p&gt;

&lt;p&gt;It uses an ESP-12 or similar (ESP-202, ESP-07 etc), a BMP180 temp+humidity sensor (or BME280 which also includes barometric pressure), a small logic level converter module, four 10K resistors, and a 0.1uF bypass capacitor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; If you would prefer to include this hack functionality into your own home-built switched socket(s), see the &lt;strong&gt;Footnotes&lt;/strong&gt; section at the end.&lt;/p&gt;

&lt;p&gt;The Souliss example sketch can integrate the Smart Socket as a peer node or gateway on the Souliss automation network (the gateway can also include peer functionality) thereby allowing it to be controlled by android devices using SoulissApp.&lt;/p&gt;

&lt;p&gt;###Why Bother?&lt;/p&gt;

&lt;p&gt;If you are a visitor to Souliss and wondering why bother going to the effort of ESP-8266 conversion just to arrive back at a similar starting point with phone app control of the Smart Socket, here’s a brief overview of Souliss to explain why…&lt;/p&gt;

&lt;p&gt;Compare Souliss to the global postal service:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Souliss peer ‘&lt;strong&gt;&lt;em&gt;nodes&lt;/em&gt;&lt;/strong&gt;’ are the equivalent of postal addresses.&lt;/li&gt;
  &lt;li&gt;The Souliss ‘&lt;strong&gt;&lt;em&gt;gateway&lt;/em&gt;&lt;/strong&gt;’ is the local post office which routes all unopened mail from the sending addresses to the appropriate delivery addresses.&lt;/li&gt;
  &lt;li&gt;Postal address ‘nodes’ may have multiple mail-box ‘&lt;strong&gt;&lt;em&gt;slots&lt;/em&gt;&lt;/strong&gt;’ for multiple residents (GPIO slots).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sure, you could create an alternative local delivery system, but the real power of the postal service lies in its ability to reliably deliver messages globally from door to door anywhere around the world without the end-users ever needing to know details of the road, rail, sea and air transport stages that were required for the delivery. 
Similarly, the true power of Souliss lies in its sophisticated hidden delivery infrastructure which allows messages to be automatically routed and transparently bridged across different types of network media (Ethernet, Wifi, RF, RS485, Serial etc). Souliss also includes a ‘quickie’ postcard-like system for optimal communication efficiency which allows nodes to send concise ‘&lt;strong&gt;&lt;em&gt;typical&lt;/em&gt;&lt;/strong&gt;’ standardised event-related messages which can be automatically responded to by receiving nodes where applicable, and the free android SoulissApp contains appropriate corresponding controls and status displays for these standardised ‘typical’ messages (plus other goodies such as voice control). Peer to peer interaction is &lt;em&gt;autonomous&lt;/em&gt;, so no additional controlling hardware or software is required, but Souliss can be integrated with OpenHAB (open-source) home automation computer systems if wished. It is also possible to access nodes via web browsers. Software will soon be available that can treat a Souliss ESP node plus its relevent sensors and devices as a simple ‘black box’ that can easily be configured via web page then re-programmed wirelessly ‘Over The Air’ without requiring any programming skills or knowledge… essentially ‘Souliss IOT for Dummies’ like me.&lt;/p&gt;

&lt;p&gt;What all this means is that with minimal effort and programming knowledge it is relatively easy to get Souliss nodes interacting with each other across different network media, and to have overall android or web remote control and monitoring of everything, on an extensible automation framework which can accomodate evolving automation systems without requiring any major restructuring, and because Souliss runs on the ubiquitous Arduino framework its nodes can offer integration of almost anything that can be done using an Arduino or ESP8266.&lt;/p&gt;

&lt;p&gt;And all for free, because Souliss is open-source, and driven by a knowledgable and welcoming community who are ever reaching out to new horizons, and ever ready to give help and advice whenever needed.&lt;/p&gt;

&lt;p&gt;So that is the incentive for using Souliss, but it is not an essential requirement of this hardware hack, which allows the ESP8266 to be used with whatever software is preferred.&lt;/p&gt;

&lt;p&gt;###Smart Socket Hack&lt;/p&gt;

&lt;p&gt;This hack is intended for DIY construction on a postage stamp sized piece of stripboard, and is aimed at people like myself who don’t have any PCB design or manufacturing resources.&lt;/p&gt;

&lt;p&gt;The hack has a basic Souliss sketch available to provide quick and simple Android remote control of the Smart Socket, but the real benefit comes from what else is possible.&lt;/p&gt;

&lt;p&gt;For example, the switched-socket hack also includes an internal temp+humidity sensor which offers potential for environmental monitoring using SoulissApp or Internet Web Browser, plus automatic environmental triggering of other peer to peer nodes, and even the potential for the Smart Socket to be a local self-contained programmable thermostat.&lt;/p&gt;

&lt;p&gt;Additionally, other external sensors can be plugged in via the USB socket - perhaps a PIR sensor for occupancy detection, or an LDR for automatic light level switching, or both together, plus almost any other analog and digital sensors you could realistically need.&lt;/p&gt;

&lt;p&gt;The USB socket also provides easy external ‘flashing’ access to the ESP using ‘mode-sharing’.&lt;/p&gt;

&lt;p&gt;All the ESP hack hardware details are offered, but it is for users to provide appropriate software to exploit their hardware potential.&lt;/p&gt;

&lt;p&gt;###Onboard Facilities&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/11SSCircuit.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The interesting elements of the Smart Socket are a &lt;strong&gt;3.3v regulato&lt;/strong&gt;r, two &lt;strong&gt;LEDs&lt;/strong&gt;, a &lt;strong&gt;pushbutton&lt;/strong&gt;, a &lt;strong&gt;USB charging socket&lt;/strong&gt;, and a transistor-driven 20A &lt;strong&gt;relay&lt;/strong&gt; with ‘back-emf’ protection diode.&lt;/p&gt;

&lt;p&gt;This hack uses a couple of GPIOs to provide an i2c bus for sensors, a couple more for relay and button controls, and optionally a couple for independent control of the 2 LEDS.&lt;/p&gt;

&lt;p&gt;###USB Charging Socket
&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/15USBfrontCover3.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The Smart Socket has a USB charging socket which provides 5v and Gnd on the outer pins.&lt;/p&gt;

&lt;p&gt;The USB 5v also supplies a 3.3v regulator on the Mains board which powers the wifi board.&lt;/p&gt;

&lt;p&gt;A useful consequence of this is that the onboard electronics and hack can be safely tested or re-flashed simply by plugging in an external 5v USB male cable into the USB socket, without the Smart Socket being connected to the Mains or being Live during testing or re-flashing.&lt;/p&gt;

&lt;p&gt;An added bonus is that the 2 inner USB serial data pins which are not being used by the Smart Socket are therefore available for hack purposes, and can provide:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Quick plug-in external access to RX and TX for easy re-flashing.&lt;/li&gt;
  &lt;li&gt;Quick plug-in access of external analog and digital sensors.&lt;/li&gt;
  &lt;li&gt;Quick plug-in access for re-flashing AND external sensors - this takes advantage of the fact that when in flashing mode the GPIOs are floating, and when in normal mode the TX and RX lines are floating… so the 2 USB data wires can be ‘mode shared’ without conflict.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;###Hack Circuit&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/17i2cCircuit3.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This hack uses i2c to communicate with internal and external sensors, and so uses a Logic level Converter module to interface the ESP 3.3v i2c pins to the 5v USB socket.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GPIO2&lt;/strong&gt; is used for SCL because it requires a pullup, and the BMP180 internal sensor already has 4.7K i2c pullups on board, which can conveniently also be used for the GPIO2 pullup.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GPIO13&lt;/strong&gt; is used for SDA, with similar i2c pullup from the BMP180.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;RX&lt;/strong&gt; is paired with GPIO13 for mode-sharing of SDA on the USB (-) data line.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TX&lt;/strong&gt; is paired with GPIO2 for mode-sharing of SCL on the USB (+) data line.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GPIO0&lt;/strong&gt; is used for reading the ‘WPS’ button, allowing the button to conveniently set the ESP into flashing mode at Reset/PowerOn, and also be used for user input if required.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GPIO15&lt;/strong&gt; is used for the ‘active high’ RLY1 relay because it needs a pulldown resistor anyway.&lt;/p&gt;

&lt;p&gt;By default the hack board track bridges the Green RLY1_LED to WPS for visual confirmation of button presses, and similarly bridges the Blue RLY2_LED to RLY1 to echo relay status.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(The relay draws negligable current because of it’s 4.7K transistor base resistor, and the LEDS have 1K series limiting resistors, so each adds less than 5mA load to a GPIOs 12mA max output)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/18i2cCircuitOptions1&amp;amp;2cropped.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Options 1 &amp;amp; 2&lt;/strong&gt; omit the LED wires by bridging the LEDS on the Mains board solder pads.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/19i2cCircuitOptions3&amp;amp;4cropped.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Option 3&lt;/strong&gt; uses GPIO5 and a track cut to give independent software control of the Green LED.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Option 4&lt;/strong&gt; uses GPIO4 and a track cut to give independent software control of the Blue LED.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Option 5&lt;/strong&gt; simply replaces the BMP180 with a BME280 to also read barometric pessure.&lt;/p&gt;

&lt;p&gt;That’s quite a lot of functionality to squeeze onto a stripboard area the size of a postage stamp. All the necessary information is present, so If you are confident of where you’re going and how to get there then feel free to go ahead and ‘do your own thing’, but be aware that even with much careful planning there is only just enough room for things to fit, so if you prefer to tread in known footsteps then follow the step-by-step instructions carefully. 
No electronics knowledge is required, just some competence with a soldering iron and the ability to use a small file and hacksaw blade, but you are assumed to already know how to ‘flash’ your ESP.&lt;/p&gt;

&lt;p&gt;Many accompanying pictures and diagrams have been included in an effort to lead by example. Besides showing what to do, they also show what’s already been done and therefore is plainly possible, and should offer confidence that if a short-sighted pensioner (me) can do this hack then anybody else can too. When you are ready, let’s get started.&lt;/p&gt;

&lt;p&gt;###Disassembly&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/20Dissassembly.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Remove the screws and the front plastic cover, taking careful note of the location and positioning of a loose un-attached clear piece of plastic which is sandwiched underneath the front cover - it’s placement is not particularly obvious, but it is there for a reason (safety), so needs properly replacing again during final re-assembly.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/22Tip1.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;None of the Mains stuff needs to be interfered with, and the hack is easily achieved with the thick blue internal Mains wires still attached, so leave them alone to avoid any problems.&lt;/p&gt;

&lt;p&gt;###Connections&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/30Info.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Looking underneath the Mains pcb, and ignoring the 2 larger structural side joints for the moment, you will see three groups of  3, 4, and 5  small solder pads which attach the wifi pcb to the Mains pcb (see the pic above).&lt;/p&gt;

&lt;p&gt;From left to right, the first group of 3 are:   Gnd,  3v3,  Gnd&lt;/p&gt;

&lt;p&gt;The second group of 4 are:   WPS,  RLY1_LED,  RLY2_LED,  RLY1&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;WPS  goes to the mains boards ‘config’ push-button which switches directly to Gnd.&lt;/li&gt;
  &lt;li&gt;RLY1_LED  goes to an ‘active-high’ green LED  via a 1K series current limiting resistor.&lt;/li&gt;
  &lt;li&gt;RLY2_LED  goes to an ‘active-high’ blue LED  via a 1K series current limiting resistor.&lt;/li&gt;
  &lt;li&gt;RLY1  goes to the 20A Mains switching relay via a transistor and its 4.7K ‘base’ resistor.&lt;/li&gt;
  &lt;li&gt;The third group of 5 are just spare outputs from the wifi board and are not used by the Smart Socket, so you don’t need to worry about reconnecting to any of those.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Nor do you need to worry about reconnecting to the 2 Gnd pads each side of the 3v3, because the 2 side structural joints are both Gnds anyway and much easier to solder to, and likewise it is easier to pick up +3.3v from the Mains board C11 capacitor than the smaller 3v3 solderpad.&lt;/p&gt;

&lt;p&gt;Also don’t worry about the tiny SMD component which is bridging the WPS pin to its neighbour, because we won’t be needing that anymore.&lt;/p&gt;

&lt;p&gt;###Better Than Expected&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/33flyingwiresDSC05062.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Out of the 12 small pads that need de-soldering to remove the old wifi board, only the centre group of 4 require reconnection again (and perhaps only 2 of them, depending on chosen options). And to make things easier for soldering wires to the 4 solder pads we will be cutting out a lower access slot on the replacement wifi board (see above) to offer better unhindered access… so hopefully the job is not as daunting as it may have initially appeared.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/35Unsoldered.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I had been expecting removal problems, but it was much easier than first thought.  All the pads and joints de-soldered ok (including the SMD component), and the wifi module was able to be removed in one piece without causing any damage or needing to nibble bits away with cutters. It’s certainly worth de-soldering everything twice though, and using a magnifier to double-check for remaining solder splashes rather than risk ripping off any pads or tracks.&lt;/p&gt;

&lt;p&gt;After the original wifi board is removed, re-tin the required group of 4 pads on the Mains board with a blob of solder to aid re-attaching wires. Don’t re-tin the side structural joints yet though, because that could obstruct sliding the replacement board over the slots.&lt;/p&gt;

&lt;p&gt;###A Tight Squeeze&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/37WhiteLines.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If you view the underside of the top cover you can see the integral plastic walls which fit over and around the Mains pins to insulate them from the rest of the protruding electronics.&lt;/p&gt;

&lt;p&gt;The position of the insulating walls is marked by white lines on the Mains board pcb, so you can use the line as a guide of how much room is available to fit your hack into - everything on the wifi board needs to fit between the white line and outside edge of the Mains board.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/38old.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(Pictures of an earlier hack version which included internal DHT sensor and flashing socket)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Follow the instructions carefully and everything fits in ok as shown above - there is not much room to get away with poor soldering though, so the following soldering tips are for those who would welcome them to help improve results, and for others to just skip over.&lt;/p&gt;

&lt;p&gt;###Soldering Tips&lt;/p&gt;

&lt;p&gt;My own soldering is terrible due to poor eyesight… a case of take aim, dive in for a couple of seconds (timing is everything) then check for damage afterwards with a magnifier (I sometimes miss target completely and discover I’ve soldered an empty adjacent track).  So I wouldn’t have a hope in hell of soldering anything if I didn’t heed the following points.&lt;/p&gt;

&lt;p&gt;The difference between soldering success or failure is mainly just a matter of having the patience for cleanliness and attention to detail. Impatient or lazy soldering shortcuts inevitably have unwanted consequences… which may seem obvious when you know, but can be a hard lesson to learn, and makes much more sense if you know the reasons why.&lt;/p&gt;

&lt;p&gt;Soldering requires heating the local area of the two items to be joined sufficiently for the solder to melt into them and create a molecular bond… so what’s to go wrong?&lt;/p&gt;

&lt;p&gt;Well, if heat is applied for too long (for whatever reason, and there are many) it causes overheating of surrounding areas, resulting in charred insulation, naked wires, de-laminated tracks, possibly even component damage. If that sounds familiar, then there is room for improvement, which is fairly easy once you know the reasons for the problems, and how to avoid them.&lt;/p&gt;

&lt;p&gt;Solder will only fuse with clean metal, so any impurites will hinder or prevent it from fusing. Therefore ensure no plastic cable insulation can make contact with the joint, or it will contaminate the area and repel the solder away to prevent it from bonding.&lt;/p&gt;

&lt;p&gt;Gold is used for contacts because it doesn’t react with air to cause the surface corrosion problems that plague copper and alluminium. Those cheaper conductive metals just have a spray laquer coating to act as an air barrier, because without protection the copper will react with oxygen in the air to form a tarnished green copper oxide coating, and aluminium will similarly go black. But oxides aren’t metal, so they will repel solder. Fine abrasive paper can get back to clean shiny metal suitable for soldering, but it won’t last long.&lt;/p&gt;

&lt;p&gt;Multi-core solder contains veins of flux, which acts like a sort of active detergent for breaking down the surface tension barriers between the different metals to help the solder ‘run’ and flow evenly between them. But the active life of hot flux is brief (it’s the few seconds of wispy smoke seen from freshly melted solder), so continued heating just leaves a charred contaminating residue which actually repels solder and prevents it from flowing - and continued stubborn overheating inevitably makes things worse, eventually degrading the conductive metalic solder into a dirty carbonised resistive blob of impurities which will never bond to metal… resulting in a mechanically and electrically unsafe ‘dry joint’.&lt;/p&gt;

&lt;p&gt;To avoid that, the hot clean soldering iron tip needs to be applied to the clean joint for maximum heat transfer for minimum time necessary for the solder to run and fuse into the metals - ideally for just a brief ‘dab’ of a second or two. But before even trying, touch solder onto the soldering iron tip to make sure the solder melts quickly (within 1 second) - because the dirtier the tip, the poorer the heat transfer, the longer it takes the solder to melt and flow… and every second of excessive heat on the joint can be causing worsening damage.&lt;/p&gt;

&lt;p&gt;Don’t leave the soldering iron switched on when it’s not being used. Don’t leave the heated tip to dry out for any length of time, keep it ‘whetted’ with solder to prevent it burning. The tip should be shiny silver, any dullness shows a coating of impurities building up which will act as a barrier to heat transfer as well as contaminate any fresh solder and flux applied to the joint. So clean the tip frequently on a damp sponge to remove the dead solder, then ‘whet’ it again with a drop of new solder. And do it before every joint… a clean fresh bead of solder on the tip offers much better surface contact area and quicker heat transfer than the small point of contact of a crusty dry tip.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/39cleaner3.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Dirty residues will still gradually build up and blacken the tip anyway, causing contamination of the fresh solder and flux before it can do its job, but a quick poke into a metal mesh tip cleaner then a fresh blob of solder should make the tip shiny again.&lt;/p&gt;

&lt;p&gt;All surfaces should be in good physical contact with each other to give good heat transfer, otherwise it is effectively trying to create a hot solder bridge across a colder air gap between surfaces at different temperatures… which ain’t gonna work!&lt;/p&gt;

&lt;p&gt;It is important for the soldering iron tip to make good contact with both surfaces to be joined at the same time so that they both heat equally quickly, because if the tip only touches one surface then the heat must transfer all the way through that first item before it can get to the second surface sufficient to fuse solder into the metal… by which time the first surface is already overheating and causing problems.&lt;/p&gt;

&lt;p&gt;The flat surface of a bevel or chisel tip provides a bigger surface contact area for increased and quicker heat transfer from the iron. If using a pointed tip, instead of using the pointy end, try using its side, held parallel to the joint to offer more side surface contact area.&lt;/p&gt;

&lt;p&gt;The first stage of the hack is to create a stripboard carrier, so there’s no way the copper track will be clean after such handling, Invisible finger-prints are a greasy mask to flux chemistry which repels molten solder and prevents it bonding to the metal below, so it is important to ensure no contaminants are lurking on any surface to act as a barrier which interferes with the flux process and obstructs the clean molecular flow of the solder. I have an old toothbrush and jar of acetone on hand to ensure removal of any invisible sweaty fingerprints, and some fine abrasive paper for making dull surfaces shiny… but things don’t stay shiny for long, so clean just before use.&lt;/p&gt;

&lt;p&gt;Due to the tight squeeze, some wires need soldering directly to the copper tracks (rather than the usual luxury of soldering convenient conductors poking through from the component side). So although it might seem convenient to poke a trimmed wire end into a handy hole on the copper side for soldering to the track, the tip will have so little conductor available for heat transfer that it will end up melting the plastic insulation which will contaminate both flux and solder, requiring even more heat, making the mess ever worse.&lt;/p&gt;

&lt;p&gt;The solution is easy… pre-solder (‘tin’) the required area of copper track first, and also the bared cable end, then bend it at right-angles and trim off the surplus. Leave sufficient tinned conducter sticking out sideways from the insulation to provide good physical contact with the track and offer somewhere more tangible for ‘dabbing’ the freshly-cleaned and ‘whetted’ tip in order to quickly fuse the two pre-soldered surfaces together. If it takes long enough to burn your fingers while holding the wire in place, then it’s taken too long - and if you jerk away and cause movement in the molten solder just as it’s solidifying it will cause it to crystalise into a dull dry joint that has resistance and can cause all sorts of problems.&lt;/p&gt;

&lt;p&gt;The melting point of solder is obviously much lower than of the metals to be soldered, so when in doubt, remember the surest way to ensure a good, quick, clean joint is to pre-solder the two surfaces first. This allows both surfaces to already have a fused layer of solder so that when they are brought together for joining it takes significantly less time heating the two touching pre-soldered surfaces sufficient to re-melt together, than it would to also heat up their underlying metal surfaces sufficient for solder to fuse into the metal.&lt;/p&gt;

&lt;p&gt;Lastly, if you don’t want shiny copper tracks and joints to tarnish and corrode, brush them clean with solvent to remove flux residue, then seal from the air with a light spray of laquer.&lt;/p&gt;

&lt;p&gt;###Stripboard&lt;/p&gt;

&lt;p&gt;The key to success for this Smart Socket hack is to pre-prepare a suitable replacement wifi carrier board from some stripboard. It is not difficult, and just needs a bit of care and  patience - you need to get this right though, because available space is at a premium, and the hack instructions depend on a replacement carrier board which is the same as shown.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/41StripBoards.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Cut out a 19 holes by 9 holes stripboard blank, then cut out the 2 side ‘locating’ slots (using the original wifi board as a template), then cut out the lower ‘access’ slot as shown above.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/44FitBoth.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Check that it slides onto the Mains board ok (copper side out). Also check it against the original wifi board to ensure it does not stick up higher, or hang lower, and if so, file level.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/45i2cTrackCutsBoth.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Cut the tracks where shown above, the coloured overlays have been added to help visualise circuit connections and serve as an aid for subsequent component and wiring placement.
&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/46Tip2.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;###Construction Overview&lt;/p&gt;

&lt;p&gt;The BMP180 (or BME280) is connected by short wires to offer some slight flexibility in its positioning. 
The level converter at the opposite end is connected by longer wires to allow it to be hinged around and folded back tight against the outboard copper side of the ESP board, preferably into the unsoldered track area behind the ESP so it can fit more flush.
The replacement wifi board needs to slot over the Mains board component side first (inboard), therefore nothing can be mounted on the component side in the area between the two side slots which could prevent the board from being fully located. This means that the GND link wire (black) and 0.1uF bypass capacitor both need soldering onto the outboard side directly to the copper tracks. Similarly for the solder pad ‘flying’ wires routed from underneath the Mains board. All these outboard items can be soldered to anywhere along their respective tracks - their locations on the diagram are shown for clarity, not best fit, so try to keep them clear of the area where you wish the level converter to be ‘hinged’ into.&lt;/p&gt;

&lt;p&gt;###Construction Details
&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/51resistors.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Solder the component-side jumper wire to link up the two +3.3v (red) rails as shown above.
Install the 4 resistors. Values aren’t critical, you can use anything from a couple of K up to 20K, but for RST and EN you may want to tend towards lower values for better stability.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/55i2cESP3.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Solder wires to the ESP - including the 2 option wires if required - and ‘stick’ the ESP to the board with some double-sided tape, then connect it up as shown above. The long looping wires are only shown for diagram clarity, but in practice they need to be routed neatly and as short as practical, and cannot stick out above the top or below the bottom of the ESP.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/56i2cRearComponents.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Install the 0.1uF Bypass Cap and GND Link Wire directly on to the copper track side. If requiring Option 3 or 4 for Independent LEDs, make the appropriate track cuts.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/58i2cSensor.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Connect the sensor with sufficient ‘slack’ to allow some flexibility for best positioning.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/59i2cLevelConverter.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Connect the Level Converter with wires of sufficient length to allow the module to be hinged around and laid flat to the un-used copper area behind the ESP (see below).  Don’t connect the USB ‘flying’ wires yet because they are only shown above for circuit clarification.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/62i2cFolded.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Check that the board stills fits onto the Mains board ok, then remove it again.&lt;/p&gt;

&lt;p&gt;###Board Installation&lt;/p&gt;

&lt;p&gt;Solder a +3v3 connecting wire to the inboard (+) leg of capacitor C11 on the Mains board.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/64C11.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Trim the loose end to length, bare the end, and insert into the replacement wifi board where shown below as the board is slid onto the Mains board, then solder the wire in place.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/66i2csupply.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Solder a couple of thicker bare wire off-cuts between each of the side structural solder joints on the Mains board to their nearest adjacent copper track on the bottom of the stripboard - these are to anchor the replacement board in place as well as supply the Gnd.&lt;/p&gt;

&lt;p&gt;###Final Wiring&lt;/p&gt;

&lt;p&gt;The lower access slot offers easier soldering of wires to the group of 4 small solder pads on the underside of the Mains boards, and allows the wires to be conveniently routed up ‘outboard’ and soldered directly to their appropriate copper tracks. Use thin flexible (not solid) wires to prevent the small fragile pads and tracks from being put under cable ‘stress’ to reduce risk of any pads or tracks being pulled off the pcb.&lt;/p&gt;

&lt;p&gt;Ensure the required Mains board pads are pre-tinned first with a small blob of fresh solder.
Cut the wires to length and bare the ends… if requiring Option 1 or Option 2 for bridged LEDs, spread those wire ends sufficient to bridge the 2 pads. Tin the wires then ‘dab’ them on to their appropriate WPS, RLY2_LED, RLY1_LED, RLY1 pads on the Mains board.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/69i2cFlyingWires.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Route the wires up through the access slot and solder them directly to anywhere convenient along their appropriate copper tracks, as per the diagram above.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/71USBpins.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Remove the SMD component bridging the 2 inner USB socket pads on the underside of the Mains board, then solder 4 thin flexible wires to the USB pads. Route the wires towards the Button end of the Mains board (right-hand side of the picture) so that they go away from the Mains - then arc them back down and along the outer edge of the Mains board until they can be routed up through the access slot of the replacement wifi board.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/73i2cUSB.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Trim the wires to fit into their appropriate Level Converter holes, then ease out the Level Converter module sufficient to solder the wires in place.  Use a bit of double-sided tape afterwards to hold the module back where it belongs. Hold all the wires in place with some duct tape, and particularly the USB wires on the underside of the Mains board to prevent any possible broken wires from moving and touching any nasty Mains stuff.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/75taped.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Finally, stick duct tape over the wifi board to hold everything in place, then re-assemble.&lt;/p&gt;

&lt;p&gt;###Flashing&lt;/p&gt;

&lt;p&gt;Ensure the Smart Socket is not plugged into a Mains outlet… I cannot advocate flashing the Smart Socket while it is powered by Mains unless using non-contact OTA (Over The Air).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/78USBhacked.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Make a simple USB Flashing Adapter by salvaging an old USB mouse cable with plug, then crimping on 4 female Duponts (or solder a bit of header socket) to the cut end for easy connection to the 5v UARTs appropriate pins, remembering to cross-connect RX and TX.
Boot into flashing mode by holding down the on-board WPS button as the flashing adapter is plugged into the USB socket, then release the button and start the upload.&lt;/p&gt;

&lt;p&gt;###External Sensors&lt;/p&gt;

&lt;p&gt;I2c sensors such as the BME 280 sensor modules can offer things like barometric pressure, temp and humidity all on the same little i2c pcb, but you aren’t just limited to those.&lt;/p&gt;

&lt;p&gt;A small PCF8591 AD/DA Converter Module (available for about £1) offers four i2c addressable analog channels, plus even includes on-board temp and LDR sensors.&lt;/p&gt;

&lt;p&gt;A similarly addressable PCF8574 I/O expander can offer up to 8 digital channels (of mixed inputs/outputs) and an MCP23017 module offers 16 (both are cascadable for more).&lt;/p&gt;

&lt;p&gt;If you want to use 3.3v sensors, include an AMS1117-3.3 module and level converter.
Much flexibility is possible for various alternative plug-in digital and/or analog sensors, either plugged directly into the Smart Socket, or via USB extension cables and splitters.&lt;/p&gt;

&lt;p&gt;So although originally only a hack ‘bonus’, the ability for plug-in external sensors actually offers a very useful and convenient mains-powered sensor platform just in its own right!&lt;/p&gt;

&lt;p&gt;To see how useful, take a look at the ‘K2’ smart socket which has come on the market since I started this article (search AliExpress.com). It is probably unlikely to use an ESP8266 so therefore would probably need hacking to be Souliss compatable, but the important point to note is the fact that the manufacturer has standardised on a range of USB plug-in sensor modules, and that those neat USB plug-in sensors are sold separately.&lt;/p&gt;

&lt;p&gt;They certainly give an idea of how useful the facility for external sensors could be, but perhaps they may also use i2c… in which case there could be a 50% chance of them being hardware compatable without even needing to swap the Smart Sockets 2 USB data wires.&lt;/p&gt;

&lt;p&gt;Remember that i2c is a daisy-chained ‘bus’, so pullups are only needed on the last device in the chain - which means that some devices with onboard pullups (such as BMP180) may need their i2c pullups disabling (typically by removing a track link).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/82i2cbus.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Adding or removing i2c devices is likely to affect the required value for the pullups, so if devices are expected to be changed, it may be better to use separate plug-in terminating resistor modules to allow quick changes of alternative value pullups when required.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/84USBadapter2c.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You can get a handfull of these USB to DIP adapters for less than £2 from ebay. They can be soldered directly to your external sensor adapters, or use ‘flying’ wires for connecting to a small ‘development’ terminator breadboard offering quick-change i2c resistor selection, or they could directly accomodate the two i2c pullup resistors and then perhaps be neatly housed in any old unwanted USB dongles you might have lying around.&lt;/p&gt;

&lt;p&gt;Those with an osilloscope could select for best resistor values by monitoring for the squarest i2c waveform, but others can use some lateral thinking to select for best communications speed and reliability (which is the real goal anyway). Loop commonly available i2c scanner code and keep checking for valid device responses as the i2c comms speed is progressively increased until the device response fails - now try substituting higher or lower value resistor pullup pairs (easy if using the above mentioned terminator breadboard) and keep repeating the speed test until unable to improve further… then you can more permanently install the ‘best’ i2c pullups with some confidence.&lt;/p&gt;

&lt;p&gt;###Software&lt;/p&gt;

&lt;p&gt;The Souliss ‘Smart Socket Hack’ example code gives ‘Basic’ wifi On/Off control of the relay, plus local manual On/Off toggle of the relay using the WPS button for test purposes. The simple ‘Basic’ Mains switching functionality could be usefully enhanced by software to offer additional benefits such as…&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Scheduled Control - automatic Daily/Weekly switching according to pre-set dates/times.&lt;/li&gt;
  &lt;li&gt;Duration Timers - automatic switching Off or On after preset duration or delay.&lt;/li&gt;
  &lt;li&gt;Reboot Sequence - SoulissApp Button to cause the selected device to power Off for 10 seconds then automatically back On again, for rebooting routers or servers etc (could also be auto-triggered by loss of connection if wished).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The inclusion of the internal temp sensor offers potential for a programmable thermostat.&lt;br /&gt;
Note: Electronics generates heat, therefore the temperature measured inside the Smart Socket (or any closed housing) is likely to be higher than the ambient temperature outside. To compensate for this, run the assembled Smart Socket long enough for the temperature readings to stabilise, then dismantle it and safely power it via USB to measure the ambient temperature and compare the difference after readings stabilise again. A simple software subtraction of that difference from the sensor reading in your program would then give the effective ambient temperature rather than the warmer level inside the Smart Socket.&lt;/p&gt;

&lt;p&gt;OTA Web Configuration could allow all such Smart Socket features and sensors to be easily configured and enabled on an as needed basis, and hopefully that is just around the corner.&lt;/p&gt;

&lt;p&gt;Alternatively, some simple i2c Scanner code could check responses of specific device addresses from a ‘&lt;em&gt;possibles&lt;/em&gt;’ list to automatically discover and configure available sensors.&lt;/p&gt;

&lt;p&gt;It is up to users to provide the software to suit their own needs and hardware options, and hopefully to contribute back their successes for the benefit of others.&lt;/p&gt;

&lt;p&gt;###Footnotes&lt;/p&gt;

&lt;p&gt;Although this hack was specifically developed for the Smart Socket, it is worth pointing out that all the features and expansion options are also equally as applicable for any home-built switched mains sockets… or any other devices it can be fitted into, for that matter.&lt;/p&gt;

&lt;p&gt;A larger piece of stripboard could allow easier component placement and even accomodate an ESP-12 adapter plate if wished, plus offer room for things like side header pins for easy GPIO test access, flashing buttons, 3.3v regulator module and 470uF smoothing cap, etc.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/86i2cbig3.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The drawing above only suggests a possible starting point - your own stripboard shape and size should take advantage of available space to best accomodate your own required items.&lt;/p&gt;

&lt;p&gt;For those wanting a more professional-looking result, a 5cm x 5cm ESP-12E printed circuit board offering similar functionality is available from Juan Pinto (link to go here). He can also supply populated boards if wished, including suitable Souliss software, plus a matching range of convenient 3D printed housings (including DIN Rail and Table Lamp versions).&lt;/p&gt;

&lt;p&gt;And for those prefering the convenience of a completed and ready-to-use switched-mains socket,  Lesjaw Ardi (link to go here) produces a range of ready-built Souliss items.&lt;/p&gt;

&lt;p&gt;One of the problems when creating a home-built switched mains socket is how to power the electronics without using a second dedicated external mains plug just for powering the low voltage supply - which can makes things clunky, untidy, and unsatisfactory. Ideally the low voltage supply for the electronics would be included within the home-built switched socket housing, so here’s a cheap compact mains-derived PSU complete with USB charging socket that some people may not be aware of - it may not be the best option for everybody, but it is worth pointing out as a potential alternative that otherwise could be over-looked.&lt;/p&gt;

&lt;p&gt;It’s available for just £1 and free postage off ebay, and in any colour you like - not that colour matters when the first thing to do is prise the plug apart to remove the 5V 1A USB charging module from within… and if it can be stuffed into a UK mains plug, it should be relatively easy to fit inside a home-built switched socket housing.
&lt;em&gt;(Anyone thinking ‘but I need a NON-UK version’ should be using battery power for their own safety!)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/souliss/souliss.github.io/master/images/2015-12/88plugsDSC05057.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;To find them, enable ‘&lt;em&gt;Buy it now&lt;/em&gt;’, ‘&lt;em&gt;Worldwide&lt;/em&gt;’ and ‘&lt;em&gt;FreeP&amp;amp;P&lt;/em&gt;’ in the ebay side panel (do each separately and wait for the screen refresh between each option change), and similarly enter a ‘&lt;em&gt;to&lt;/em&gt;’ price of £2 (or equivalent) to cut out the more expensive clutter - then do a search for ‘mains plug usb charger’, and find the cheapest resulting seller who delivers to your country.&lt;/p&gt;

&lt;p&gt;You might want to do similar search options for ‘AMS1117-3.3 Module’, and perhaps again for ‘5v relay module 1 channel’, and also ‘Logic Level Converter’.  All 4 items can be bought for a combined total of less than £4 including free delivery, and along with the Smart Socket hack could provide all the electronics needed to make a home-built switched mains socket… but I am only suggesting ingredients, what recipes you choose to cook up are down to you.  Don’t forget you won’t have the Smart Sockets C11 capacitor to use as the smoothing cap for your 3.3v supply, so you will need to add one of your own - but you can salvage almost any low voltage electrolytic between 100uF and 1000uF (preferably mid value) for that job.&lt;/p&gt;

&lt;p&gt;Another Smart Socket alternative worth considering is to put the ESP hack into an RF switched socket housing, or even a plug-in electronic timer (not a mechanical one) - they offer a safe and neat housing with integral mains plug and switched mains output socket, and are available much cheaper than the Smart Socket. You might even be able to retain use of the existing low voltage supply and/or the relay, but if you need to discard everything it could offer sufficient room to fit the replacement items, and perhaps even for a display.&lt;/p&gt;

&lt;p&gt;Almost done, but this couldn’t be complete without giving special thanks to Dario for his brilliant concept and very thorough professional implementation of Souliss, and to Alessandro for his excellent and indispensable Souliss App, and to the many others who have contributed to making Souliss as good as it is, and thanks also to all of the Souliss community - and others - who take the time and effort to share their innovations for the benefit of us all.&lt;/p&gt;

&lt;p&gt;And finally - this is my first real hack, my first tutorial, and my first experience of ESPs. So I am certainly no expert, nor the best person to be offering such advice - but rather than taking the quick easy selfish option of just implementing the hack for myself, I prefer taking the opportunity to offer a contribution for others to benefit from if they wish (and hopefully most can find something of interest from within, however small it may be). Discovering the Smart Socket circuitry was the easy part compared to evolving a suitable solution for diverse needs and skill levels, plus producing the subject matter for every picture, and creating every component used in the drawings from scratch and to scale. It’s been a large and lengthy task which has continually changed and grown, so please don’t expect everything to be set in stone and absolutely perfect, just consider it a collection of helpful tips for anyone who would welcome them until they are able to learn any better for themselves.&lt;/p&gt;


    </content>
  </entry>
  
  <entry>
    <title>Automate with Automate</title>
    <link href="http://souliss.github.io/media/automate-with-automate/"/>
    <updated>2015-11-28T00:00:00+00:00</updated>
    <id>http://souliss.github.io/media/automate-with-automate</id>
    <author>
      <name>Souliss Team</name>
      <uri>http://souliss.github.io/</uri>
      
    </author>
    <content type="html">
      &lt;img src=&quot;http://souliss.github.io/images/2015-11/Automate-splash.png&quot;&gt;&lt;br/&gt;
      &lt;p&gt;After quite a lot of words on the integration of &lt;a href=&quot;http://souliss.github.io/articles/soulissapp-integrations/&quot;&gt;SoulissApp with Automate and Tasker&lt;/a&gt; through &lt;a href=&quot;http://souliss.github.io/articles/happy-laziness-automate-tasker/&quot;&gt;intents and plugins&lt;/a&gt;, is now time to have a detailed look on how to get it working.&lt;/p&gt;

&lt;p&gt;We focus on Tasker Plugin that is a set of open API supported from multiple Android software like Tasker (of course) or Automate that will be covered in this tutorial. The Plugin allow an interaction with Souliss via common language like &lt;em&gt;turn on the living room light&lt;/em&gt; or &lt;em&gt;is the living room light on?&lt;/em&gt;.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Using Automate you can have preemptive notification, that asks you if you want to perform common task based on time, position or other condition (open app, accelerometer sensor of the smartphone)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-11/dialog-suggestion.jpg?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Execute an Action or take Decision&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-11/AutomatePlugin.png?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In the flow editor, included in the APPS menu there are the two Plugin that can be used with SoulissApp, the Action and Decision. The former is used to execute an action, the latter to take a decision based on the state of a device in SoulissApp.&lt;/p&gt;

&lt;p&gt;So you can turn on the &lt;em&gt;Main Light&lt;/em&gt; using the &lt;strong&gt;Action&lt;/strong&gt; one or,&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-11/ActionPlugin.jpg?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Check if the &lt;em&gt;Main Light&lt;/em&gt; is on using the &lt;strong&gt;Decision&lt;/strong&gt; one&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-10/ConditionPlugin.png?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;These two Plugin can be used in any Automate flow, even if this is not a full Automate tutorial, lets see how we can build simple conditional actions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Recursively check for a condition with Forks&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Flows are easy to use but needs recursive check to be effective, the flow in the below picture checks for a time frame and later show a notification if the ambient light cross a threshold value.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-11/Automate-not-recursive.jpg?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Once started the flow will wait for a time frame, after 9 PM it enters in the next step and check for the ambient light using the embed sensor of the smartphone. If in the time frame the ambient light is too high,it will show a notification and will ask the user if he want to lower the brightness.&lt;/p&gt;

&lt;p&gt;That’s works nice if after 9 PM you cross the threshold, if not the flow will check the light value and waits there. So, the morning after you will likely get the notification even if this wasn’t your goal.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;You need a recursive check of a condition using parallel flow, those are called Fork. In Automate Flows can interact with their Forks but not with other Flows.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-11/Automate-recursive.png?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Having a recursive check needs a dedicated fork, like in the above picture. It first checks if connected to &lt;em&gt;Plinio&lt;/em&gt; WiFi network (set it as &lt;em&gt;Immediately&lt;/em&gt;) is not it holds on the same check with &lt;em&gt;On Change&lt;/em&gt; parameter. This will not drain your battery while waiting for a change in the connection state.&lt;/p&gt;

&lt;p&gt;Once connected, it starts a fork that will be a new flow starting from that point that will do something else, and checks again the WiFi state &lt;em&gt;On Change&lt;/em&gt;, if the connection is lost it will stop the fork and restart the flow. So in this way you are recursively checking for the WiFi state and your flow will stop at every time if this condition is missed.&lt;/p&gt;

&lt;p&gt;This applies to any block as a time frame or else, &lt;strong&gt;after the fork you can apply the same scheme&lt;/strong&gt; creating multiple condition in AND, like check for &lt;em&gt;WiFi and time frame&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create Custom Interaction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Even if the Plugin allow few commands like &lt;a href=&quot;https://github.com/souliss/souliss/wiki/SoulissApp-API&quot;&gt;&lt;em&gt;turn on, turn off and toggle&lt;/em&gt;&lt;/a&gt; you can create custom and complex interaction with dedicated code on your node.&lt;/p&gt;

&lt;p&gt;Lets assume that you have three LYT bulbs and you want to set a &lt;em&gt;Movie Time&lt;/em&gt; to lower the switch off two of the three bulbs and use a low brightness amber light, this quite complex state can be achieved with a custom action defined in your node.&lt;/p&gt;

&lt;p&gt;In the &lt;em&gt;Gateway&lt;/em&gt; node include a set of pushbutton as &lt;a href=&quot;https://github.com/souliss/souliss/wiki/Typical_T1n#typical-14--pulse-digital-output&quot;&gt;T14&lt;/a&gt; and configure them to  &lt;a href=&quot;https://github.com/souliss/souliss/wiki/Peer2Peer#user-defined-publish--subscribe&quot;&gt;broadcast a topic&lt;/a&gt;, like in this case &lt;em&gt;LowMood, FullLight and MediumLight&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;In this way any other node in your network can listen for this topic and apply the required changes.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;span class=&quot;p&quot;&gt;...&lt;/span&gt;

&lt;span class=&quot;cp&quot;&gt;#define LowMood                                 0xFF01,0x01
#define FullLight                               0xFF01,0x02
#define MediumLight                             0xFF01,0x03
&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;...&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;setup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; 
  &lt;span class=&quot;p&quot;&gt;...&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;Set_T14&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PUSH1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;Set_T14&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PUSH2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;Set_T14&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PUSH3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; 
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;...&lt;/span&gt; 

    &lt;span class=&quot;n&quot;&gt;FAST_110ms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;c1&quot;&gt;// LowMood Command&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Logic_T14&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PUSH1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;mOutput&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PUSH1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;  &lt;span class=&quot;n&quot;&gt;publish&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LowMood&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

    &lt;span class=&quot;c1&quot;&gt;// Full Light Command&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Logic_T14&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PUSH2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;mOutput&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PUSH2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;  &lt;span class=&quot;n&quot;&gt;publish&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;FullLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

    &lt;span class=&quot;c1&quot;&gt;// Full Light Command&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Logic_T14&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PUSH3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;mOutput&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PUSH3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;  &lt;span class=&quot;n&quot;&gt;publish&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;MediumLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;On the node side, as example&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;span class=&quot;p&quot;&gt;...&lt;/span&gt;

&lt;span class=&quot;cp&quot;&gt;#define LowMood                                 0xFF01,0x01
#define FullLight                               0xFF01,0x02
#define MediumLight                             0xFF01,0x03
&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;...&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;...&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// Listen for topic published by other nodes&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;FAST_110ms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    
        &lt;span class=&quot;c1&quot;&gt;// Set LowMood&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;subscribe&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LowMood&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;c1&quot;&gt;// Do something&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;...&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;// Set Full Light&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;subscribe&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;FullLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;c1&quot;&gt;// Do something&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;...&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;// Set Medium Light&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;subscribe&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;MediumLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;c1&quot;&gt;// Do something&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;...&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;At this time you will get on SoulissApp the three T14 that can be renamed as you like and be activated from the Plugin.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Automate extend SoulissApp features and gives sense to your automation&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So, what if you smartphone &lt;strong&gt;will preempt you asking if you want to lower the light?&lt;/strong&gt; This give sense to your automation that is no longer a simple remote control.&lt;/p&gt;

&lt;p&gt;What if SoulissApp will be &lt;strong&gt;able to recognize when you and your family are at home?&lt;/strong&gt; Simply build a flow that periodically trigs a state (one for each people at home) when you enters at home and connect to your WiFi, use a timer on the node side to clear the state. This will show when you are at home and any node can benefit from.&lt;/p&gt;

&lt;p&gt;What if you build a &lt;strong&gt;shortcut that open your IPCamera app and at same time turn on the lights&lt;/strong&gt; without have you to dig in SoulissApp?&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;


    </content>
  </entry>
  
  <entry>
    <title>Are you lazy enough? Automate and Tasker integration</title>
    <link href="http://souliss.github.io/articles/happy-laziness-automate-tasker/"/>
    <updated>2015-11-08T00:00:00+00:00</updated>
    <id>http://souliss.github.io/articles/happy-laziness-automate-tasker</id>
    <author>
      <name>Souliss Team</name>
      <uri>http://souliss.github.io/</uri>
      
    </author>
    <content type="html">
      &lt;img src=&quot;http://souliss.github.io/images/2015-11/happy-laziness.jpg&quot;&gt;&lt;br/&gt;
      &lt;p&gt;Laziness is a life style and tap your finger on the smartphone screen looking for the button to dimmer out lights or do any other routine action is boring as step-up to the wall button. Wouldn’t be nice if your smartphone can propose you what you need?&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-11/dialog-suggestion.jpg?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Is not yet time for an Artificial Intelligence that learns your habit, it will likely be in the next future but our laziness cannot wait, so starting from SoulissApp 1.6.1 any other Android application can interact through &lt;a href=&quot;http://developer.android.com/guide/components/intents-filters.html&quot;&gt;Intents&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;A special Intent is the &lt;a href=&quot;http://tasker.dinglisch.net/plugins.html&quot;&gt;Tasker Plugin&lt;/a&gt;, that is supported by &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.llamalab.automate&amp;amp;hl=en&quot;&gt;Automate&lt;/a&gt;, &lt;a href=&quot;https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm&amp;amp;hl=en&quot;&gt;Tasker&lt;/a&gt; and other Android application that lets build If-Then-Else rules based on sensors and internet data.&lt;/p&gt;

&lt;p&gt;There are two types of plugins, the Action Plugin can be used to send command through SoulissApp as you were using Voice Commands, the &lt;a href=&quot;https://github.com/souliss/souliss/wiki/SoulissApp-API&quot;&gt;wiki has more details&lt;/a&gt; but basically you just have to write something like &lt;strong&gt;turn on bedroom lights&lt;/strong&gt; where you have a set of keyword like &lt;em&gt;turn on, turn off, open, close&lt;/em&gt; and others that shall be followed with the name that the target device has in SoulissApp&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-11/ActionPlugin.jpg?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;As well a state can be retrieved in a similar way using the Conditional Plugin, having a True/False statement as result.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-10/ConditionPlugin.png?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We will soon start to release examples for Automate and Tasker, but the SoulissApp Plugins will generally be the last step in your flow, there are several example that can be build and fully customized based on your needs:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Using the light sensor of your phone, in the evening and if connected to your home WiFi, a notification can ask you if you want to lower the brightness of your lights in the living room,&lt;/li&gt;
  &lt;li&gt;Using the GPS or Cell Tower position to open automatically the Garage Door or ask with a notification if you want to open it,&lt;/li&gt;
  &lt;li&gt;Catch the sunset using an online service and turn gradually on an &lt;a href=&quot;http://souliss.github.io/articles/multicolor-wifi-bulb-arduino-based/&quot;&gt;LYT Bulb&lt;/a&gt; with a warm yellow.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The release 1.6.1 of SoulissApp is in preview on the &lt;a href=&quot;https://github.com/souliss/souliss/wiki/Community&quot;&gt;mailing list&lt;/a&gt; and will be available in the &lt;a href=&quot;https://play.google.com/store/apps/details?id=it.angelic.soulissclient&quot;&gt;Play Store&lt;/a&gt; in few days.&lt;/p&gt;

&lt;p&gt;Have fun!&lt;/p&gt;

    </content>
  </entry>
  
  <entry>
    <title>SoulissApp Tasker and Automate integrations</title>
    <link href="http://souliss.github.io/articles/soulissapp-integrations/"/>
    <updated>2015-10-28T00:00:00+00:00</updated>
    <id>http://souliss.github.io/articles/soulissapp-integrations</id>
    <author>
      <name>Souliss Team</name>
      <uri>http://souliss.github.io/</uri>
      
    </author>
    <content type="html">
      &lt;img src=&quot;http://souliss.github.io/images/2015-10/plugin.jpg&quot;&gt;&lt;br/&gt;
      &lt;p&gt;&lt;a href=&quot;http://siliconangle.com/blog/2015/10/22/creepy-iot-3-ways-to-automate-halloween/&quot;&gt;Chit-Chat&lt;/a&gt; about #IoT is becoming noisy, automation being part of it. So we couldn’t delay SoulissApp APIs any longer, even doubting anyone will ever use them. &lt;a href=&quot;http://tasker.dinglisch.net/&quot;&gt;Tasker&lt;/a&gt; and &lt;a href=&quot;http://llamalab.com/automate/&quot;&gt;Automate&lt;/a&gt; are two popular tools to automate thing, they already implement any sort of complex and integrated behaviour so that we only had to figure out how to integrate them. Now you can open window blinds shaking your phone. Neat? Please let us know about creative and weird Tasker profiles you may be using with Souliss.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Automation is a buzzword? We can automate without a server&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-10/ActionPlugin.png&quot; alt=&quot;Automate Send Intent&quot; /&gt;&lt;/p&gt;

&lt;p&gt;From next release of SoulissApp, send and receive from SoulissApp through general Intent or Tasker (and Automate) Plugin will be supported, we have a growing &lt;a href=&quot;https://github.com/souliss/souliss/wiki/SoulissApp-API&quot;&gt;wiki page&lt;/a&gt; dedicated to SoulissApp integrations.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-10/ConditionPlugin.png&quot; alt=&quot;Automate Send Intent&quot; /&gt;&lt;/p&gt;

    </content>
  </entry>
  
  <entry>
    <title>Maker Faire Rome 2015</title>
    <link href="http://souliss.github.io/articles/maker-faire-rome-2015/"/>
    <updated>2015-10-24T00:00:00+00:00</updated>
    <id>http://souliss.github.io/articles/maker-faire-rome-2015</id>
    <author>
      <name>Souliss Team</name>
      <uri>http://souliss.github.io/</uri>
      
    </author>
    <content type="html">
      &lt;img src=&quot;http://souliss.github.io/images/2015-10/soulissteam.jpg&quot;&gt;&lt;br/&gt;
      &lt;p&gt;Are almost three years that Maker Faire is in Rome for the European edition, this year we have powered the Authometion and IONO booths with Souliss and had the change to meet them and have some fun looking over the many expositor of the faire.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-10/lytbooth.jpg?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;At the Authometion booth there were a couple of LYT8266 running Souliss and our logo on their flayers, has been nice and hopefully next year we will be there again.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-10/authometionbooth.jpg?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;It was of course an opportunity for an informal meeting with pizzas, friarielli and other street food dishes&lt;/p&gt;

&lt;figure&gt;
	&lt;img src=&quot;http://souliss.github.io/images/2015-10/fazioa.jpg?raw=true&quot; /&gt;&amp;lt;/a&amp;gt;
&lt;/figure&gt;

&lt;figure&gt;
	&lt;img src=&quot;http://souliss.github.io/images/2015-10/ribico.jpg?raw=true&quot; /&gt;&amp;lt;/a&amp;gt;
&lt;/figure&gt;

&lt;figure&gt;
	&lt;img src=&quot;http://souliss.github.io/images/2015-10/pex.jpg?raw=true&quot; /&gt;&amp;lt;/a&amp;gt;
&lt;/figure&gt;

&lt;figure&gt;
	&lt;img src=&quot;http://souliss.github.io/images/2015-10/plinio.jpg?raw=true&quot; /&gt;&amp;lt;/a&amp;gt;
&lt;/figure&gt;

&lt;p&gt;See you next year at Maker Faire Rome!&lt;/p&gt;

    </content>
  </entry>
  
  <entry>
    <title>IONO Ethernet Relay Board</title>
    <link href="http://souliss.github.io/articles/Iono-Relay-Board/"/>
    <updated>2015-09-27T00:00:00+00:00</updated>
    <id>http://souliss.github.io/articles/Iono-Relay-Board</id>
    <author>
      <name>Souliss Team</name>
      <uri>http://souliss.github.io/</uri>
      
    </author>
    <content type="html">
      &lt;img src=&quot;http://souliss.github.io/images/2015-09/Iono-1.jpg&quot;&gt;&lt;br/&gt;
      &lt;p&gt;This year September has been &lt;a href=&quot;http://souliss.github.io/articles/multicolor-wifi-bulb-arduino-based/&quot;&gt;a month full of news&lt;/a&gt;, and the latest is the support of &lt;a href=&quot;http://iono.cc/&quot;&gt;IONO&lt;/a&gt; a professional-like relay board that can be used for home automation. We just got a sample to work with and evaluate the product, that has a good manufacturing and interesting features.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-09/Iono-3.jpg?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;IONO&lt;/strong&gt; is mostly an Arduino shield with a DIN-rail enclosure, you can purchase it as standalone (IONO Solo) or packed with an Arduino Ethernet. The board has a socket compatible with Arduino UNO rev3, so you can plug in any compatible Arduino board or Arduino Ethernet.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The focus for the IONO is on the I/O side, because it support input as Digital or Analog 0-10V / 4-20 mA and has six relays with bistable coil with 12 A of steady current and 80 A for inrush.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The inputs use an Operational Comparator to work either as digital or analog, using resistor to scale the value from 0-10V or 4-20 mA as 0-5V. The use of 0-10V and 4-20 mA is a standard in industrial application, current loop have better noise rejection, but isn’t common for home application.
There are totally 6 inputs, 4 of them are connected to an Analog Input with ADC so that can be used either as digital or analog values; the other two are connected to digital inputs and can be attached to an interrupt.
The use of digital is in &lt;strong&gt;voltage-free&lt;/strong&gt; configuration, so you should connect a switch and power the input.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-09/Iono-4.jpg?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;On the output side, the relays have a bistable coil and an embed driver, so from the user point of view are just standard digital outputs but there is no current waste because the relay is designed to mechanical retrieve the last position. As example, in case of power outage relays will remain in their position.
Generally speaking this nice trick can improve relays life very much.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-09/Iono-2.jpg?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;All terminals are detachable, this is also a common feature in industrial protocol, allow easy and reliable replacement of the electronics without have to rewire all the connection and helps in case of constrained spaces.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;detailed focus&lt;/strong&gt; on the I/O design is available on the &lt;a href=&quot;http://iono.cc&quot;&gt;IONO website&lt;/a&gt; with details on &lt;a href=&quot;https://iono.cc/highlights-power-supply&quot;&gt;power supply&lt;/a&gt;, &lt;a href=&quot;https://iono.cc/highlights-inputs&quot;&gt;inputs&lt;/a&gt;, &lt;a href=&quot;https://iono.cc/highlights-power-outputs&quot;&gt;digital outputs&lt;/a&gt; and &lt;a href=&quot;https://iono.cc/highlights-analog-outputs&quot;&gt;analog outputs&lt;/a&gt;. The &lt;a href=&quot;https://iono.cc/app/uploads/2015/02/iono-hardware-guide.pdf&quot;&gt;hardware manual&lt;/a&gt; is also a good reference to understand if the I/O fits your needs and how you can wire it.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;IONO support will be officially available in Souliss v7.1 but as preview you can get it from the current &lt;a href=&quot;https://github.com/souliss/souliss&quot;&gt;souliss&lt;/a&gt; branch&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The guys at IONO will expose their boards at Maker Faire Rome from 16th to 18th October, and they will also setup a small demo with Souliss running on two IONO Ethernet.&lt;/p&gt;

&lt;p&gt;Stay tuned!&lt;/p&gt;

    </content>
  </entry>
  
  <entry>
    <title>LYT8226: an Arduino LED Bulb based on ESP8266 WiFi</title>
    <link href="http://souliss.github.io/media/esp8266-wifi-multicolor-bulb/"/>
    <updated>2015-09-26T00:00:00+00:00</updated>
    <id>http://souliss.github.io/media/esp8266-wifi-multicolor-bulb</id>
    <author>
      <name>Souliss Team</name>
      <uri>http://souliss.github.io/</uri>
      
    </author>
    <content type="html">
      &lt;img src=&quot;http://souliss.github.io/images/2015-09/lyt8266.jpg&quot;&gt;&lt;br/&gt;
      &lt;p&gt;Working with the ESP8266 is always a great experience, it becomes just a matter of getting the proper I/O and then in few minutes your module is running. The introduction of the ESP8266 in the &lt;a href=&quot;http://souliss.github.io/articles/preview-souliss-on-esp8266/&quot;&gt;supported SoC for Souliss&lt;/a&gt; has open the world of &lt;strong&gt;smart devices&lt;/strong&gt; to the DIYers and the very competitive price of this IC will &lt;a href=&quot;http://souliss.github.io/articles/esp8266-in-commercial-product/&quot;&gt;spread it into consumer products&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In the last few days we have started working with &lt;a href=&quot;http://authometion.com/&quot;&gt;Authometion&lt;/a&gt; to support the new LYT8266, a variant of their RGBW LED Bulb that has an ESP8266 inside, so that you should program your sketches directly into the lamp (this is &lt;a href=&quot;http://souliss.github.io/media/diy-your-philips-hue-led-bulb/&quot;&gt;in contrast with the approach used with LYT88&lt;/a&gt;).&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Thanks to the &lt;a href=&quot;https://github.com/esp8266/Arduino&quot;&gt;Arduino cores&lt;/a&gt; for ESP8266 you can program this bulb directly from the Arduino IDE using &lt;strong&gt;OTA&lt;/strong&gt; (Over the Air) programming, running Souliss you have direct access via SoulissApp or &lt;a href=&quot;https://github.com/souliss/souliss/wiki/openHAB%20Binding&quot;&gt;openHAB&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-09/RGBWBulb_comparison.jpg?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;A side-to-side comparison show a LYT88 bulb (on the left side) with a LYT8266 (right one), the voltage regulation is based on a switching circuit (on top right, you can see the inductor and regulator) this is due to the high current required by the ESP8266 compared to a standard microcontroller with external RF radio (as on the left side).
The I/O is basically the same, with one mosfet for each channel used to sink the current from the LEDs powered at near 12 Vdc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LOAD YOUR SKETCH OverTheAir (OTA)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Loading a new sketch has two option, using the cable or the &lt;strong&gt;air&lt;/strong&gt;. The &lt;em&gt;Over the Air&lt;/em&gt; programming is very simple and can be used right out-of-the-box if your bulb has Souliss pre-loaded.&lt;/p&gt;

&lt;p&gt;You need the following pre-requisites to load a sketch:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Install the Arduino IDE 1.6.5 (this is the supported release at time of writing)&lt;/li&gt;
  &lt;li&gt;Install Python 2.7 and have it in your Windows path&lt;/li&gt;
  &lt;li&gt;Install the &lt;a href=&quot;https://github.com/esp8266/Arduino&quot;&gt;ESP8266 cores for Arduino&lt;/a&gt;, the cores are distributed via the Arduino IDE Board Manager and needs an URL for the distribution of the code. You can check the supported core &lt;a href=&quot;https://github.com/souliss/souliss/wiki/Supported%20Hardware#supported-cores&quot;&gt;here&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;As today, the URL to be used is http://arduino.esp8266.com/staging/package_esp8266com_index.json into &lt;em&gt;Additional Board Manager URLs&lt;/em&gt; field. You can add multiple URLs, separating them with commas.&lt;/li&gt;
  &lt;li&gt;Install Souliss library on &lt;a href=&quot;https://github.com/souliss/souliss/wiki/Your%20First%20Upload&quot;&gt;Library Manager&lt;/a&gt; of Arduino IDE&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once you will power your bulb, if is the first time and has never been configured before, you will see an &lt;em&gt;Access Point&lt;/em&gt; called &lt;strong&gt;Souliss&lt;/strong&gt;, just connect and point your browser to &lt;strong&gt;http://192.168.4.1&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-09/WebConfig.png?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You get a web interface from where you can configure the WiFi and IP parameters, and select the node as &lt;strong&gt;Gateway&lt;/strong&gt; or &lt;strong&gt;Peer&lt;/strong&gt;. Configure one bulb as &lt;strong&gt;Gateway&lt;/strong&gt; and the others as &lt;strong&gt;Peer&lt;/strong&gt;, they will build automatically a Souliss network and will be available in SoulissApp. Note: if the DHCP box is ticked it will over-ride a manually entered address if present - and likewise for the Gateway address - so don’t tick those boxes if you wish to manually specify the addresses.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-09/SoulissApp.jpg?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Your bulbs have full features, but if you want to upload a new sketch you just need to go in the Arduino IDE and set the following parameters:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Board as Generic ESP8266 Module&lt;/li&gt;
  &lt;li&gt;Flash Mode QIO&lt;/li&gt;
  &lt;li&gt;Flash Frequency 40 MHz&lt;/li&gt;
  &lt;li&gt;Upload Using &lt;strong&gt;OTA&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;CPU Frequency 80 MHz&lt;/li&gt;
  &lt;li&gt;Flash Size 1M (64K SPIFFS)&lt;/li&gt;
  &lt;li&gt;Upload Speed 115200&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
  &lt;p&gt;In the Port sub-menu you will see the bulb and its OTA IP address which allows you to upload a new sketch over wifi as if it was connected via cable (assuming your Arduino IDE computer has wifi access to the ESP device of course).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It is very important that you always upload an OTA enabled sketch each time, otherwise you will not see the OTA device available in the Port sub-menu for uploading to over the air, and therefore you will need to connect and upload via the cable. Start from the &lt;a href=&quot;https://github.com/souliss/souliss/blob/friariello/examples/LYTBulb/e02_LYT8266_WiFi_Bulb/e02_LYT8266_WiFi_Bulb.ino&quot;&gt;&lt;strong&gt;e02_LYT8266_WiFi_Bulb.ino&lt;/strong&gt;&lt;/a&gt; to build your own sketch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LOAD YOUR SKETCH VIA USART CABLE&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Using the cable to connect via USART can be useful if you don’t want OTA or if you have bricked your OTA sketch, also you can use the whole flash size (1 MByte) whereas on OTA you are only able to use 512 KBytes. All the previous pre-requisite applies also for this case.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-09/ProgrammingConnector.png?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;PIN&lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;Resistor&lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;Serial Adapter&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;ESP03_URXD&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;TX&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;ESP03_UTXD&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;RX&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;GPIO16_RESET&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;RTS*&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;GPIO0&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;DTR*&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;GND&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;GND&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;The two connection with * are not mandatory, without you need to turn OFF the bulb and place GPIO0 to GND every time that you want to program it, this is similar to any other ESP8266 based device, this &lt;a href=&quot;http://souliss.github.io/media/how-to-load-a-sketch-on-ESP/&quot;&gt;tutorial&lt;/a&gt; gives the basic to use the Arduino IDE and the ESP8266 cores.&lt;/p&gt;

&lt;p&gt;On board of the LYT8266 the programming connector, is very small and need an adaptor supplied with the dev kit, and expose the TX, RX together with GND and GPIO0 and others. You haven’t the Vcc, so you should power the ESP8266 board connecting it to main 220 Vac (or 110 Vac), so be careful.&lt;/p&gt;

&lt;p&gt;On the module there is an ESP-03, so on the Arduino IDE select the COM module as per your operating system and the following settings:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Board as Generic ESP8266 Module&lt;/li&gt;
  &lt;li&gt;Flash Mode QIO&lt;/li&gt;
  &lt;li&gt;Flash Frequency 40 MHz&lt;/li&gt;
  &lt;li&gt;Upload Using &lt;strong&gt;Serial&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;CPU Frequency 80 MHz&lt;/li&gt;
  &lt;li&gt;Flash Size 1M (64K SPIFFS)&lt;/li&gt;
  &lt;li&gt;Upload Speed 115200&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As first step, you need to load the &lt;a href=&quot;https://github.com/souliss/souliss/blob/friariello/examples/LYTBulb/e02_LYT8266_WiFi_Erase/e02_LYT8266_WiFi_Erase.ino&quot;&gt;&lt;strong&gt;e02_LYT8266_WiFi_Erase&lt;/strong&gt;&lt;/a&gt; sketch, this will clear the FLASH sector used as EEPROM from random data and later load the &lt;a href=&quot;https://github.com/souliss/souliss/tree/friariello/examples/LYTBulb/e02_LYT8266_WiFi_Bulb&quot;&gt;&lt;strong&gt;e02_LYT8266_WiFi_Bulb&lt;/strong&gt;&lt;/a&gt; this will start the bulb as access point with a web configuration interface restoring the factory firmware.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;span class=&quot;cm&quot;&gt;/**************************************************************************
   Souliss - LYT8266 WiFi RGBW LED Bulb
    
    This is the basic sketch for an LYT8266 a WiFi LED Bulb based on ESP8266,
    at first boot it starts as access point with a basic web interface to 
    allow WiFi and Souliss configuration.
    Info are stored in the module and used at next boot.
    
    Configure one module as Gateway for your network and all the other as 
    Peer. Before load this sketch, run the e02_LYT8266_WiFi_Erase to erase
    the memory.
    Once configured, can be accessed via SoulissApp or openHAB.
 
***************************************************************************/&lt;/span&gt;

&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;ESP8266WiFi.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;ESP8266WebServer.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;ESP8266mDNS.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;EEPROM.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;WiFiUdp.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// Configure the Souliss framework&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;bconf/LYT8266_LEDBulb.h&quot;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;          // Load the code directly on the ESP8266&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;conf/RuntimeGateway.h&quot;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;            // This node is a Peer and can became a Gateway at runtime&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;conf/DynamicAddressing.h&quot;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;         // Use dynamically assigned addresses&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;conf/WEBCONFinterface.h&quot;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;          // Enable the WebConfig interface&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;Souliss.h&quot;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;   
&lt;span class=&quot;c1&quot;&gt;// Define logic slots, multicolor lights use four slots&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#define LYTLIGHT1           0    
&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#define RED_STARTUP         0x50
#define GREEN_STARTUP       0x10
#define BLUE_STARTUP        0x00
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// Setup the libraries for Over The Air Update&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;OTA_Setup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;setup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// Init the network stack and the bulb, turn on with a warm amber&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;Initialize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;InitLYT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    
    &lt;span class=&quot;cm&quot;&gt;/****
        Generally set a PWM output before the connection will lead the 
        ESP8266 to reboot for a conflict on the FLASH write access.
        Here we do the configuration during the WebConfig and so we don't
        need to write anything in the FLASH, and the module can connect
        to the last used network.
    ****/&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;SetColor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LYTLIGHT1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;RED_STARTUP&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;GREEN_STARTUP&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;BLUE_STARTUP&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

    &lt;span class=&quot;c1&quot;&gt;// Read the IP configuration from the EEPROM, if not available start&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// the node as access point.&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;//&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// If you want to force the device in WebConfiguration mode, power OFF&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// your router and power OFF and then ON the bulb, you will see an access&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// point called Souliss.&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ReadIPConfiguration&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt; 
    &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;   
        &lt;span class=&quot;c1&quot;&gt;// Pulse a bit&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;LYTPulse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;// Start the node as access point with a configuration WebServer&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;SetAccessPoint&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;startWebServer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;// We have nothing more than the WebServer for the configuration&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;// to run, once configured the node will quit this.&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;while&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;yield&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;runWebServer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt; 
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;IsRuntimeGateway&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;// Connect to the WiFi network and get an address from DHCP                      &lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;SetAsGateway&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;myvNet_dhcp&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;       &lt;span class=&quot;c1&quot;&gt;// Set this node as gateway for SoulissApp  &lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;SetAddressingServer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; 
    &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;// This board request an address to the gateway at runtime, no need&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;// to configure any parameter here.&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;SetDynamicAddressing&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;  
        &lt;span class=&quot;n&quot;&gt;GetAddress&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; 

    &lt;span class=&quot;c1&quot;&gt;// Define a logic to handle the bulb&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;SetLYTLamps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LYTLIGHT1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    
    &lt;span class=&quot;c1&quot;&gt;// Init the OTA&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;OTA_Init&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;  
    &lt;span class=&quot;n&quot;&gt;EXECUTEFAST&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;                     
        &lt;span class=&quot;n&quot;&gt;UPDATEFAST&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;   
        
        &lt;span class=&quot;c1&quot;&gt;// Is an unusual approach, but to get fast response to color change we run the LYT logic and&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;// basic communication processing at maximum speed.&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;LogicLYTLamps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LYTLIGHT1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;       
        &lt;span class=&quot;n&quot;&gt;ProcessCommunication&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
      
        &lt;span class=&quot;c1&quot;&gt;// Run communication as Gateway or Peer&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;IsRuntimeGateway&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;FAST_GatewayComms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt; 
        &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; 
            &lt;span class=&quot;n&quot;&gt;FAST_PeerComms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;   
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;EXECUTESLOW&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;UPDATESLOW&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
        
        &lt;span class=&quot;c1&quot;&gt;// Slowly shut down the lamp&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;SLOW_10s&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;LYTSleepTimer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LYTLIGHT1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;      
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;       
        
        &lt;span class=&quot;c1&quot;&gt;// If running as Peer&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;IsRuntimeGateway&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;SLOW_PeerJoin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; 
    
    &lt;span class=&quot;c1&quot;&gt;// Look for a new sketch to update over the air&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;OTA_Process&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;    &lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The LYT8266 in our hands are actually prototypes that will be unvelived at Maker Faire Rome 2015 at the Authometion booth, there will be also a &lt;a href=&quot;http://www.makerfairerome.eu/it/eventi/?ids=74&quot;&gt;workshop to have your hands on these devices&lt;/a&gt;. The sales will start after the faire, so a month or so before having them available on the market.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The LYT8266 is now on the Authometion store, have a look &lt;a href=&quot;http://authometion.com/shop/en/home/14-lyt8266-mounting-kit.html&quot;&gt;here&lt;/a&gt; is also available as &lt;a href=&quot;http://authometion.com/shop/en/home/13-lyt8266.html&quot;&gt;pre-assembled device&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;


    </content>
  </entry>
  
  <entry>
    <title>Multicolor WiFi Bulb, the first Arduino based one</title>
    <link href="http://souliss.github.io/articles/multicolor-wifi-bulb-arduino-based/"/>
    <updated>2015-09-24T00:00:00+00:00</updated>
    <id>http://souliss.github.io/articles/multicolor-wifi-bulb-arduino-based</id>
    <author>
      <name>Souliss Team</name>
      <uri>http://souliss.github.io/</uri>
      
    </author>
    <content type="html">
      &lt;img src=&quot;http://souliss.github.io/images/2015-09/lyt8266-white.jpg&quot;&gt;&lt;br/&gt;
      &lt;p&gt;In these days we are working closed with Authometion and their new bulb, the LYT8266 that will be unveiled at &lt;a href=&quot;http://www.makerfairerome.eu/en/&quot;&gt;European Maker Faire in Rome&lt;/a&gt; (from 16th to 18th October 2015). These new bulbs share with the LYT88 the AC/DC and RGBW LED but instead of an ATmega88 use an ESP8266 that gives WiFi and control over the LEDs.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-09/lyt8266-color.jpg?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The LYT8266 compares directly with the most famous WiFi bulb, the &lt;a href=&quot;http://www.lifx.com/&quot;&gt;Lifx&lt;/a&gt;, with a more competitive price and most important with full access to the ESP8266 microcontroller and its &lt;a href=&quot;https://github.com/esp8266/Arduino&quot;&gt;Arduino support&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As any other ESP8266 based device, also the LYT8266 can be programmed using the Arduino IDE and can run &lt;a href=&quot;https://github.com/souliss/souliss/wiki/Supported%20Hardware&quot;&gt;Souliss natively&lt;/a&gt;, just before the start of the Maker Faire we will release Souliss v7.1 with example sketches for the new LYT bulb. In the while here a quick preview, the LYT8266 will be the first product that benefit the new WebConfig interface that allow full IP and Souliss network configuration on runtime.&lt;/p&gt;

&lt;p&gt;At the startup the ESP8266 starts as access point and stars a simple webserver as in the below picture, from where you can configure all the needs, included the &lt;a href=&quot;https://github.com/souliss/souliss/wiki/RuntimeConfiguration&quot;&gt;Gateway or Peer&lt;/a&gt; behavoir of the node.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-09/WebConfig.png?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;At the Maker Faire you can preview the LYT8266 running Souliss or any other Arduino sketch, this include SoulissApp and openHAB as well as all networking feature.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-09/SoulissApp.jpg?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

    </content>
  </entry>
  
  <entry>
    <title>SoulissApp 1.5.4 is out with Voice Recognition!</title>
    <link href="http://souliss.github.io/articles/souliss-app-voice-recognition/"/>
    <updated>2015-09-20T00:00:00+00:00</updated>
    <id>http://souliss.github.io/articles/souliss-app-voice-recognition</id>
    <author>
      <name>Souliss Team</name>
      <uri>http://souliss.github.io/</uri>
      
    </author>
    <content type="html">
      &lt;img src=&quot;http://souliss.github.io/images/2015-09/soulisapp_voicerecognition.png&quot;&gt;&lt;br/&gt;
      &lt;p&gt;SoulissApp 1.5.4 has just been released with voice recognition as new feature. You can simply use your voice to issue commands to Souliss, naming your things per name and command. After having enabled the relevant option, tap on the &lt;strong&gt;mic&lt;/strong&gt; icon and use one of the following:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;    &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;turn&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;|&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;turn&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;off&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;|&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;|&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;close&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;deviceName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;execute&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;scene&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sceneName&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sceneId&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The keywords has been translated, so you should talk in the language of your android device, using keyword to activate multiple commands like &lt;strong&gt;turn on living room light and kickten light&lt;/strong&gt;. Renaming devices is suggested in order to ease the recognition process.&lt;/p&gt;

&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/rUKhIjKXzoc&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;p&gt;Out of voice recognition other bugs were fixed, TAG section should now be almost ok. You can now sort TAGs, save them with backup function and restore as needed. Fahrenheit temperatures have been added, even though the process of converting every temperature to this unit is not yet complete.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://souliss.github.io/getting-started/&quot;&gt;Getting started&lt;/a&gt; downloading SoulissApp from the &lt;a href=&quot;https://play.google.com/store/apps/details?id=it.angelic.soulissclient&quot;&gt;Play Store&lt;/a&gt;.&lt;/p&gt;

    </content>
  </entry>
  
  <entry>
    <title>How to install OpenHAB on RaspberryPi2.</title>
    <link href="http://souliss.github.io/media/OH-on-RPI2/"/>
    <updated>2015-09-07T00:00:00+00:00</updated>
    <id>http://souliss.github.io/media/OH-on-RPI2</id>
    <author>
      <name>Souliss Team</name>
      <uri>http://souliss.github.io/</uri>
      
    </author>
    <content type="html">
      &lt;img src=&quot;http://souliss.github.io/images/2015-09/oh-souliss-rpi-feature.jpg&quot;&gt;&lt;br/&gt;
      &lt;p&gt;This tutorial has been written in occasion of my OH installation on a brand new RPi2 model B.
It is meant to be a step by step guide to help myself (and others) in case of new installations.&lt;/p&gt;

&lt;h1 id=&quot;purchasing-the-hardware&quot;&gt;Purchasing the hardware&lt;/h1&gt;

&lt;p&gt;I had a RPi1 model B already running in my apartment with OpenHAB and other backup services.
It was running not very fine, mainly suffering from the slow CPU trying to run the JVM.
On that machine OpenHAB was often slow giving a bad user experience.&lt;/p&gt;

&lt;p&gt;OpenHAB community have a hardware FAQ page &lt;a href=&quot;https://github.com/openhab/openhab/wiki/Hardware-FAQ&quot;&gt;here&lt;/a&gt; suggesting BananaPi over RPi due to its SATA connection much more efficient than the microSD.
Personally I decided for the RPi because of its vast community and because I did not like the idea to have an additional SATA HDD outside the tiny box.&lt;/p&gt;

&lt;p&gt;I decided to get a RPi2b + NOOBS + black case available for €46,50 from &lt;a href=&quot;http://it.rs-online.com/web/p/processor-microcontroller-development-kits/8772457/?origin=PSF_431027|fp&amp;amp;cm_sp=featureproducts-_-FeaturedProductsContent-_-8772457&quot;&gt;RS&lt;/a&gt;
&lt;img src=&quot;http://souliss.github.io/images/2015-09/raspi2.png&quot; alt=&quot;rpi2b&quot; /&gt;&lt;/p&gt;

&lt;h1 id=&quot;configuring-the-rpi-headless&quot;&gt;Configuring the RPi (headless)&lt;/h1&gt;

&lt;h2 id=&quot;connecting&quot;&gt;Connecting&lt;/h2&gt;

&lt;p&gt;Just plug the Ethernet connector to your network and power up the unit providing 5Vdc via the micro USB connector.
The unit is shipped with dynamic IP address and if you have a DHCP server in your LAN it will get a proper IP.
Open your router webpage and look for the assigned IP address, otherwise use &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.overlook.android.fing&amp;amp;hl=en&quot;&gt;Fing&lt;/a&gt; application for Android to get the address; you should look for Raspberry Pi Foundation device.&lt;/p&gt;

&lt;p&gt;In my case I got 192.168.1.204&lt;/p&gt;

&lt;p&gt;By using ssh (on Linux) or Putty (on Windows) you can connect to that IP.
The default root user is ‘pi’ and the default password is ‘raspberry’
You may eventually change the password with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo raspi-config&lt;/code&gt; command&lt;/p&gt;

&lt;h2 id=&quot;setting-a-static-ip-address&quot;&gt;Setting a static IP Address&lt;/h2&gt;
&lt;p&gt;I followed a really nice guide available &lt;a href=&quot;http://www.modmypi.com/blog/tutorial-how-to-give-your-raspberry-pi-a-static-ip-address&quot;&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And basically I edited the network configuration file with command &lt;em&gt;sudo nano /etc/network/interfaces&lt;/em&gt;
&lt;img src=&quot;http://souliss.github.io/images/2015-09/commandline.png&quot; alt=&quot;dhcp&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Simply change the line that reads:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;iface eth0 inet *dhcp*&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;to&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;iface eth0 inet *static*&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then directly below this line enter the following (Please Note. You will need your own addresses we gathered in Part B, more details below). . . .&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;span class=&quot;n&quot;&gt;address&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;192&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;168&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;netmask&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;255&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;255&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;255&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;network&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;192&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;168&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;broadcast&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;192&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;168&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;255&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;gateway&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;192&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;168&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-09/commandline2.png&quot; alt=&quot;2015-09-08 00_46_21-pi raspberrypi_&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo rm /var/lib/dhcp/*&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then we’ll need to reboot and check your changes. . .&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo reboot&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Log back in and run&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ifconfig&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Which should reveal your new settings.&lt;/p&gt;

&lt;h1 id=&quot;installing-jvm&quot;&gt;Installing JVM&lt;/h1&gt;

&lt;p&gt;NOOBS comes with pre-installed java.
You can easily check this by calling the command:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;java -version&lt;/code&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;span class=&quot;n&quot;&gt;pi&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rpi2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;openhab&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;~&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;java&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;version&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;java&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;version&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;1.8.0&quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;Java&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;TM&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SE&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Runtime&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Environment&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;build&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;b132&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;Java&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;HotSpot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;TM&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Client&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;VM&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;build&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;b70&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mixed&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h1 id=&quot;installing-openhab&quot;&gt;Installing OpenHAB&lt;/h1&gt;

&lt;p&gt;Derived from &lt;a href=&quot;http://www.instructables.com/id/OpenHAB-on-Raspberry-Pi/?ALLSTEPS&quot;&gt;instructables&lt;/a&gt; step by step guide.&lt;/p&gt;

&lt;p&gt;Create the OH folder&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo mkdir /opt/openhab&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Move to that folder&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd /opt/openhab&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Visit the OpenHAB &lt;a href=&quot;http://www.openhab.org/getting-started/downloads.html&quot;&gt;download page&lt;/a&gt; and copy the runtime package web address to be used in the command below.&lt;/p&gt;

&lt;p&gt;download the package typing:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo wget https://bintray.com/artifact/download/openhab/bin/distribution-1.7.1-runtime.zip&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;unzip the package&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo unzip distribution-1.7.1-runtime.zip&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;remove the package&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo rm distribution-1.7.1-runtime.zip&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Move to the addons directory&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd addons&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;download the addons package&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo wget https://bintray.com/artifact/download/openhab/bin/distribution-1.7.1-addons.zip&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;unzip the package&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo unzip distribution-1.7.1-addons.zip&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Remove the package&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo rm distribution-1.7.1-addons.zip&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Visit &lt;a href=&quot;https://drive.google.com/folderview?id=0BzyjHRwlzov4WlgtSG0tejJ3aE0&amp;amp;usp=sharing#list&quot;&gt;this page&lt;/a&gt; to get the latest version of Souliss OpenHAB binding&lt;/p&gt;

&lt;p&gt;Copy file org.openhab.binding.souliss_1.7.0.201507152300.jar in folder /opt/openhab/addons&lt;/p&gt;

&lt;h2 id=&quot;configure-souliss-binding&quot;&gt;Configure Souliss binding&lt;/h2&gt;

&lt;p&gt;The following steps are basically following the &lt;a href=&quot;https://github.com/souliss/souliss/wiki/openHAB-Binding&quot;&gt;souliss-openhab wiki&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;souliss-binding-basic-configuration&quot;&gt;Souliss binding basic configuration&lt;/h3&gt;

&lt;p&gt;Move to configuration folder:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd /opt/openhab/configurations&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Create a copy of the default cfg files to add your personal settings:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cp openhab_default.cfg openhab.cfg&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Edit the file :&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo nano openhab.cfg&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Add the following lines a the bottom:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;span class=&quot;cp&quot;&gt;################################ Souliss Binding ##########################################
#
# Souliss  
#
# For ITEM defination in file .item
#{souliss#&amp;lt;Typical&amp;gt;:&amp;lt;nodeID&amp;gt;:&amp;lt;slot&amp;gt;:[&amp;lt;bit&amp;gt;|&amp;lt;useOfSlot&amp;gt;]}
&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;souliss&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;IP_LAN&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;192&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;168&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;100&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;souliss&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;USER_INDEX&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;71&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;souliss&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;NODE_INDEX&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;134&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#SERVERPORT - Leave empty for casual port
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;souliss&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;SERVERPORT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;

&lt;span class=&quot;cp&quot;&gt;#time in mills - min 50
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;souliss&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;REFRESH_DBSTRUCT_TIME&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;600000&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;souliss&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;REFRESH_SUBSCRIPTION_TIME&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;120000&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;souliss&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;REFRESH_HEALTY_TIME&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;60000&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;souliss&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;REFRESH_MONITOR_TIME&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;500&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;souliss&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;SEND_DELAY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1500&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;souliss&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;SEND_MIN_DELAY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;100&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;souliss&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;SECURE_SEND_TIMEOUT_TO_REQUEUE&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5000&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;souliss&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;SECURE_SEND_TIMEOUT_TO_REMOVE_PACKET&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;30000&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;###########################################################################################&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;My complete openhab.cfg file is published &lt;a href=&quot;https://github.com/ribico/gr-home-automation/blob/master/openhab/configurations/openhab.cfg&quot;&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h3 id=&quot;items-configuration&quot;&gt;items configuration&lt;/h3&gt;

&lt;p&gt;Move to items folder:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd /opt/openhab/configurations/items&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Create an item file:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo nano souliss.items&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Add your souliss items using the syntax &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;{souliss=&amp;lt;Typical&amp;gt;:&amp;lt;nodeID&amp;gt;:&amp;lt;slot&amp;gt;:[&amp;lt;bit&amp;gt;]}&lt;/code&gt; as detailed described in the howto guide &lt;a href=&quot;https://github.com/souliss/souliss/wiki/openHAB-Binding#configure-items-file&quot;&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My souliss.items file is published &lt;a href=&quot;https://github.com/ribico/gr-home-automation/blob/master/openhab/configurations/items/souliss.items&quot;&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h3 id=&quot;sitemaps-configuration&quot;&gt;sitemaps configuration&lt;/h3&gt;

&lt;p&gt;Move to sitemaps folder:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd /opt/openhab/configurations/sitemaps&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Create a sitemap file:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo nano souliss.sitemap&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Create your personal sitemap according to the &lt;a href=&quot;https://github.com/openhab/openhab/wiki/Explanation-of-Sitemaps&quot;&gt;OpenHAB syntax&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I have two sitemaps, the one I use is published &lt;a href=&quot;https://github.com/ribico/gr-home-automation/blob/master/openhab/configurations/sitemaps/souliss.sitemap&quot;&gt;here&lt;/a&gt;, the one designed for my wife is &lt;a href=&quot;https://github.com/ribico/gr-home-automation/blob/master/openhab/configurations/sitemaps/WAF.sitemap&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;using-custom-icons&quot;&gt;using custom icons&lt;/h3&gt;

&lt;p&gt;My sitemaps uses some custom icons.&lt;/p&gt;

&lt;p&gt;These icons shall be copied in folder /opt/openhab/webapps/images&lt;/p&gt;

&lt;h2 id=&quot;start-openhab-manually&quot;&gt;Start OpenHAB manually&lt;/h2&gt;

&lt;p&gt;By default the “start.sh” script is not an executable file. Do the following in order to make it executable:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo chmod +x start.sh&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo ./start.sh&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And the fun begins! You should have a fully loaded system with your items and sitemps according to your configuration.
Open you favorite browser and type (of course subsitute my ip address with the one of your server):&lt;/p&gt;

&lt;p&gt;http://192.168.1.3:8080/openhab.app?sitemap=souliss&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-09/clima-screenshot.png&quot; alt=&quot;clima-screenshot&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;configuring-openhab-to-start-automatically-at-boot&quot;&gt;Configuring openHAB to Start Automatically at Boot&lt;/h2&gt;

&lt;p&gt;Follow &lt;a href=&quot;http://www.homeautomationforgeeks.com/openhab_start.shtml&quot;&gt;this guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In my first installation I encounter issues due to a wrong line end: the script was not working, a simple &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dos2unix&lt;/code&gt; command on the script solved the issue.&lt;/p&gt;

&lt;h1 id=&quot;installing-habmin&quot;&gt;Installing HABmin&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/cdjackson/HABmin#overview&quot;&gt;HABmin&lt;/a&gt; is a web administration console for openHAB. It aims to provide a complete interface to administer openHAB.&lt;/p&gt;

&lt;p&gt;Get the zip web address from the &lt;a href=&quot;https://github.com/cdjackson/HABmin/releases/latest&quot;&gt;habmin download page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Move to openhab folder:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd /opt/openhab&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Download the zip:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;wget https://github.com/cdjackson/HABmin/releases/download/0.1.3-snapshot/habmin.zip&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Unzip the package:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;unzip habmin.zip&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Remove the package:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rm habmin.zip&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Restart openhab:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo /etc/init.d/openhab restart&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Open habmin by simply pointing your browser to:&lt;/p&gt;

&lt;p&gt;http://192.168.1.3:8080/habmin/index.html&lt;/p&gt;

&lt;h1 id=&quot;enabling-openhab-persistence&quot;&gt;Enabling OpenHAB persistence&lt;/h1&gt;

&lt;p&gt;Check that package &lt;em&gt;org.openhab.persistence.rrd4j-1.7.1.jar&lt;/em&gt; is present in folder openhab/addons&lt;/p&gt;

&lt;h2 id=&quot;create-a-persistence-rule&quot;&gt;Create a persistence rule&lt;/h2&gt;

&lt;p&gt;Move to persistence folder:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd /opt/openhab/configurations/persistence&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Create a new persistence rule:&lt;/p&gt;

&lt;p&gt;`sudo nano rrd4j.persist’&lt;/p&gt;

&lt;p&gt;And create your own rule according to &lt;a href=&quot;https://github.com/openhab/openhab/wiki/Persistence&quot;&gt;openhab syntax&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;My persist file is published &lt;a href=&quot;https://github.com/ribico/gr-home-automation/blob/master/openhab/configurations/persistence/rrd4j.persist&quot;&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Restart openhab:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo /etc/init.d/openhab restart&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To check that persistence is working you can look in /opt/openhab/etc/rrd4j/ for fresh rrd files.&lt;/p&gt;

&lt;p&gt;If persistence and habmin are working on your system you may play a bit with very nice graphs:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-09/graphs.png&quot; alt=&quot;2015-09-09 23_54_52-openhab administration interface&quot; /&gt;&lt;/p&gt;

&lt;h1 id=&quot;general-tips&quot;&gt;General Tips&lt;/h1&gt;
&lt;p&gt;Some general tips about Java perfomace on Raspberry Pi.&lt;/p&gt;

&lt;h2 id=&quot;rpi-update&quot;&gt;rpi-update&lt;/h2&gt;

&lt;p&gt;Stay up to date with &lt;a href=&quot;https://github.com/Hexxeh/rpi-update/&quot;&gt;rpi-update&lt;/a&gt;
An easier way to update the firmware of your Raspberry Pi.&lt;/p&gt;

&lt;h2 id=&quot;system-memory&quot;&gt;System memory&lt;/h2&gt;

&lt;p&gt;Java loves memory.
I’d rather suggest you to operate this unit headless and reduce GPU memory.&lt;/p&gt;

&lt;p&gt;Run sudo raspi-config select memory_split and decrease GPU memory to 16. You’ll get more than 100 Mb of additional system memory.&lt;/p&gt;

&lt;p&gt;Disabling TV Service&lt;/p&gt;

&lt;p&gt;For headless, add these to /etc/rc.local:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;span class=&quot;cp&quot;&gt;## Limit GPU IRQs
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fbset&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;xres&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;yres&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vyres&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;depth&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;8&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;opt&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;bin&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tvservice&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;o&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;swap-file&quot;&gt;Swap file&lt;/h2&gt;

&lt;p&gt;Do not swap! Manage your JVM memory consumption with -ms and -mx keys. If you absolutely have to swap move swap file (/var/swap) to USB HDD of fast flash drive because swapping to SD card is painfully slow. You can set swap size in /etc/dphys-swapfile config file.&lt;/p&gt;

&lt;h2 id=&quot;overclocking&quot;&gt;Overclocking&lt;/h2&gt;

&lt;p&gt;Overclocking does not seem to have a significant impact on OpenHAB performances.&lt;/p&gt;

    </content>
  </entry>
  
  <entry>
    <title>The ESP8266 in Commercial Products!</title>
    <link href="http://souliss.github.io/articles/esp8266-in-commercial-product/"/>
    <updated>2015-08-29T00:00:00+00:00</updated>
    <id>http://souliss.github.io/articles/esp8266-in-commercial-product</id>
    <author>
      <name>Souliss Team</name>
      <uri>http://souliss.github.io/</uri>
      
    </author>
    <content type="html">
      &lt;img src=&quot;http://souliss.github.io/images/2015-08/rgbww_esp8266.JPG&quot;&gt;&lt;br/&gt;
      &lt;p&gt;The ESP8266 is a cheap WiFi SoC that is getting a growing interest within Makers and many people have asked them-self if this extremely low price (is sold at 5$ for a single piece) is hitting the market of cheap products.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://chaozlabs.blogspot.de/2015/08/esp8266-in-wild-wifi-led-controller-hack.html?m=1&quot;&gt;Andreas&lt;/a&gt; looking inside an RGBWW (5 channels, 3 for RGB and 2 for White) controller has found an ESP8266 and even the connector to program it with the &lt;a href=&quot;https://github.com/esp8266/Arduino&quot;&gt;Arduino cores&lt;/a&gt;.&lt;/p&gt;

&lt;iframe width=&quot;1600&quot; height=&quot;900&quot; src=&quot;https://www.youtube.com/embed/OrIDz9ky8zk&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;p&gt;This device sells at 10$ for a single piece and can be used with any custom Arduino sketch, like this one below&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;span class=&quot;cm&quot;&gt;/**************************************************************************
    Souliss - RGB LED Strip Hack
    
    Control and RGB LED or a Strip using the PWM, fade in/out and flash 
    effects are available as the Android interface or openHAB.
 
    Run this code on one of the following boards:
      - RGBW Led Strip Driver based on ESP8266
    
***************************************************************************/&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// Configure the framework&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;bconf/MCU_ESP8266.h&quot;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;              // Load the code directly on the ESP8266&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;conf/Gateway.h&quot;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;                   // The main node is the Gateway, we have just one node&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// **** Define the WiFi name and password ****&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#define WIFICONF_INSKETCH
#define WiFi_SSID               &quot;mywifi&quot;
#define WiFi_Password           &quot;mypassword&quot;    
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// Include framework code and libraries&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;ESP8266WiFi.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;EEPROM.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;Souliss.h&quot;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#define LEDCONTROL        0
#define LEDRED            1
#define LEDGREEN          2
#define LEDBLUE           3
#define	LEDSTRIP1         4
#define LEDWHITE1         5
#define LEDSTRIP2         6
#define LEDWHITE2         7
&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;setup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;   
    &lt;span class=&quot;n&quot;&gt;Initialize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

	  &lt;span class=&quot;n&quot;&gt;analogWriteFreq&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;500&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	  &lt;span class=&quot;n&quot;&gt;analogWriteRange&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;255&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

    &lt;span class=&quot;c1&quot;&gt;// Get the IP address from DHCP&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;GetIPAddress&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;                          
    &lt;span class=&quot;n&quot;&gt;SetAsGateway&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;myvNet_dhcp&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                  &lt;span class=&quot;c1&quot;&gt;// Set this node as gateway for SoulissApp                        &lt;/span&gt;
                
    &lt;span class=&quot;n&quot;&gt;Set_LED_Strip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDCONTROL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                  &lt;span class=&quot;c1&quot;&gt;// Set a logic to control a LED strip&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;Set_DimmableLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDSTRIP1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;Set_DimmableLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDSTRIP2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
   
    &lt;span class=&quot;c1&quot;&gt;// Define inputs, outputs pins&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pinMode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;OUTPUT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                 &lt;span class=&quot;c1&quot;&gt;// Power the LED&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pinMode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;13&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;OUTPUT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                 &lt;span class=&quot;c1&quot;&gt;// Power the LED&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pinMode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;OUTPUT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                 &lt;span class=&quot;c1&quot;&gt;// Power the LED    &lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pinMode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;14&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;OUTPUT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                 &lt;span class=&quot;c1&quot;&gt;// Power the LED&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pinMode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;n&quot;&gt;OUTPUT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                 &lt;span class=&quot;c1&quot;&gt;// Power the LED &lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; 
    &lt;span class=&quot;c1&quot;&gt;// Here we start to play&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;EXECUTEFAST&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;                     
        &lt;span class=&quot;n&quot;&gt;UPDATEFAST&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;   

        &lt;span class=&quot;c1&quot;&gt;// Execute the code every 1 time_base_fast      &lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;FAST_10ms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    
            &lt;span class=&quot;c1&quot;&gt;// Execute the logic that handle the LED&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;Logic_LED_Strip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDCONTROL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;Logic_DimmableLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDSTRIP1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;Logic_DimmableLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDSTRIP2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

            &lt;span class=&quot;c1&quot;&gt;// Use the output values to control the PWM&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;analogWrite&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mOutput&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDRED&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;analogWrite&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;13&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mOutput&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDGREEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;analogWrite&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mOutput&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDBLUE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;analogWrite&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;14&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mOutput&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDWHITE1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;analogWrite&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mOutput&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDWHITE2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;

            &lt;span class=&quot;c1&quot;&gt;// Just process communication as fast as the logics&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;ProcessCommunication&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; 

        &lt;span class=&quot;c1&quot;&gt;// Process the other Gateway stuffs&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;FAST_GatewayComms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
          
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;EXECUTESLOW&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;   
        &lt;span class=&quot;n&quot;&gt;UPDATESLOW&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;SLOW_10s&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;  &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        
            &lt;span class=&quot;c1&quot;&gt;// The timer handle timed-on states&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;Timer_LED_Strip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDCONTROL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; 
            &lt;span class=&quot;n&quot;&gt;Timer_DimmableLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDSTRIP1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;Timer_DimmableLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LEDSTRIP2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                       
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;     
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;       
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;A couple of friends are just &lt;a href=&quot;https://groups.google.com/forum/?utm_medium=email&amp;amp;utm_source=footer#!msg/souliss/x_ZmFFRWVCo/9-DwshERBgAJ&quot;&gt;getting a sample&lt;/a&gt; to use it with Souliss, stay tuned!&lt;/p&gt;

    </content>
  </entry>
  
  <entry>
    <title>Build your DIY Arduino compatible Philips Hue like LED Bulb, using LYT and Souliss </title>
    <link href="http://souliss.github.io/media/diy-your-philips-hue-led-bulb/"/>
    <updated>2015-08-13T00:00:00+00:00</updated>
    <id>http://souliss.github.io/media/diy-your-philips-hue-led-bulb</id>
    <author>
      <name>Souliss Team</name>
      <uri>http://souliss.github.io/</uri>
      
    </author>
    <content type="html">
      &lt;img src=&quot;http://souliss.github.io/images/2015-08/LYT88_bulb_shield.jpg&quot;&gt;&lt;br/&gt;
      &lt;p&gt;Recently a lot of RF light bulbs with smartphone enabled control has been on the market, the most known and expencive is the Philips Hue, but other cheaper solution like the Mi-Light has been out for a while. All offer a smartphone app to control remotely the brightness and the color, but none is Arduino compatible.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;In this video we review the LYT bulbs from Authometion, the first Arduino controlled light bulbs. Here instead of have a gateway that bridge your smartphone to your lamps you have an Arduino shield, this enable you to make your own Philips Hue like bulbs.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;In the video we runs Souliss as framework and control the light with SoulissApp, below you can find a step by step guide to get it working.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;iframe width=&quot;1600&quot; height=&quot;900&quot; src=&quot;https://www.youtube.com/embed/j4_wvbMCjWo&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h1 id=&quot;overview&quot;&gt;Overview&lt;/h1&gt;

&lt;p&gt;The shield is the piece of hardware that you are really looking for, is from that one that you can send radio commands to the lamps and get feedback. There are two radio, an ESP8266 WiFi SoC and a PL1167 2.4 GHz radio, the former is used to connect your Arduino with the home router and the latter is to control the bulbs.&lt;/p&gt;

&lt;p&gt;The PL1167 is a SPI radio wired to the microcontroller of your Arduino board (UNO and Leonardo are the most appropriate), the ESP8266 and the Arduino are connected via USART. From the &lt;a href=&quot;http://authometion.com/shop/&quot;&gt;Authometion store&lt;/a&gt; you can download the libraries and examples, those allow you to bridge command via WiFi to the USART and then to the PL1167. A mirror copy with few modification to integrate with Souliss is available on our &lt;a href=&quot;https://drive.google.com/folderview?id=0BzyjHRwlzov4fkl6c1RoYzRLbGhKOU1PbXRDR3VjZG43emd5QzNEWUozanNjLWo2S2tjdzQ&amp;amp;usp=drive_web#list&quot;&gt;Google Drive&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;In our case we will not use the Authometion examples, but a Souliss dedicated one, so that you can get control of your bulbs directly from &lt;a href=&quot;https://github.com/souliss/souliss/wiki/SoulissApp&quot;&gt;SoulissApp&lt;/a&gt; or &lt;a href=&quot;http://www.openhab.org/&quot;&gt;openHAB&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;We will run two instances of Souliss, one on the ESP8266 and the other on the Arduino board, this because Souliss embed the communication between different nodes and this let us skip the writing of a custom code to link these two devices.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-08/lyt_ledbulb.jpg?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The bulb is a 9 Watt with RGB+W LEDs, the white has a very good bright and colors allow to create moods effect with a good color depth, is bigger than standard bulbs but smaller than other radio controlled ones. It should generally fit in most of the lamps with E27 plug, but you should cross-check if you are using lamps with very small space or smaller plug type.&lt;/p&gt;

&lt;h2 id=&quot;lets-start-unpack-and-have-a-first-try&quot;&gt;Lets start, unpack and have a first try&lt;/h2&gt;

&lt;p&gt;As first step, we should load the &lt;a href=&quot;https://drive.google.com/folderview?id=0BzyjHRwlzov4fkl6c1RoYzRLbGhKOU1PbXRDR3VjZG43emd5QzNEWUozanNjLWo2S2tjdzQ&amp;amp;usp=drive_web#list&quot;&gt;Authometion libraries&lt;/a&gt; and use them to verify if our lamps are working properly. Those are standard Arduino libraries, so import them using the Arduino IDE and restart it, you should see three new more folders in the Example submenu: &lt;strong&gt;LYTWiFi&lt;/strong&gt;, PL1167 and Messanger in the LYTWiFi one there is the &lt;em&gt;demo_firmware_lytwifi.ino&lt;/em&gt; that is a good starting point.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-08/lytshield-softserial.jpg?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Ensure that the jumper on your shield are all on the left side as per previous picture, this means that PL1167 is using PIN10 as Chip Select (doesn’t play nice with Arduino Ethernet, be aware) and SoftwareSerial to communicate with ESP8266. Load the &lt;strong&gt;demo_firmware_lytwifi.ino&lt;/strong&gt; from Examples-&amp;gt;Lytwifi menu and start the Serial Monitor, ensure that you are matching the baudrate of your sketch (default is 9600 bps) and the Carriare Return is set, then type the following command&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;span class=&quot;n&quot;&gt;PON&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;	&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;This is the ON command for lamp with address &lt;strong&gt;0, 0&lt;/strong&gt; the last parameter means that you don’t want a feedback answer from the lamp. If your lamp is properly powered, it will turn ON in full white. Turn it OFF as,&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;span class=&quot;n&quot;&gt;POF&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;	&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;If you want to have a fun with colors, use the following to get a RED&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;span class=&quot;n&quot;&gt;RGB&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;255&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;address-of-the-lamps&quot;&gt;Address of the lamps&lt;/h2&gt;

&lt;p&gt;If you have multiple lamps, you may want to control them independently, so you need to assign them a unique address (this isn’t related to the vNet address of the Souliss nodes) that can be done using&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;span class=&quot;n&quot;&gt;SEA&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;	&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The command listed above assign the address &lt;strong&gt;0, 1&lt;/strong&gt; to the lamp &lt;strong&gt;0, 0&lt;/strong&gt;. All lamp are shipped with &lt;strong&gt;0, 0&lt;/strong&gt; as default address, so you should give power to one lamp per time and proceed assigning an unique address for each lamp.
You are free to use the digits that you like, a suggestion is to use the first digit to identify the room and the other for the lamp.&lt;/p&gt;

&lt;p&gt;Note down all the assigned address and relevant lamps, you will need this information while setting up the Souliss code.&lt;/p&gt;

&lt;p&gt;If desired, you can save a pre-defined state for the lamp (ON/OFF, color and brightness) typing &lt;strong&gt;SAV&lt;/strong&gt; in the Serial monitor, this will save the current state and every time the lamp is powered-on that state will be used as starting condition.&lt;/p&gt;

&lt;h2 id=&quot;load-souliss&quot;&gt;Load Souliss&lt;/h2&gt;

&lt;p&gt;As stated before, you will have two instanced of Souliss and that’s why you will found two sketches in the LYT folder. One is for the ESP8266 and the other for the Arduino board that control the PL1167.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Load Souliss on ESP8266&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Remove the shield from the Arduino and connect the pins to a USB to USART at 3v3 as shown in the below picture (pay attention, the brown wire is connected on the back of the shield on the GND and the last two pins on JP4 need a jumper &lt;strong&gt;only&lt;/strong&gt; while updating the sketch). &lt;em&gt;Unsure that you are powering the device at 3v3&lt;/em&gt;, in the picture you can see the &lt;strong&gt;red&lt;/strong&gt; wire that supply DC.&lt;/p&gt;

&lt;p&gt;You need to setup the Arduino IDE for the support of ESP8266, &lt;a href=&quot;http://souliss.github.io/media/how-to-load-a-sketch-on-ESP/&quot;&gt;this tutorial&lt;/a&gt; can help you if you haven’t done before; select &lt;strong&gt;Generic ESP8266&lt;/strong&gt; for the IDE menu and use 80 MHz as clock option leaving all the others at default settings.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-08/esp8266_connection.jpg?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Open the &lt;a href=&quot;https://github.com/souliss/souliss/blob/friariello/examples/LYTBulb/e01_LYTBulb_ESP8266/e01_LYTBulb_ESP8266.ino&quot;&gt;Souliss sketch for ESP8266&lt;/a&gt; from the &lt;strong&gt;Example-&amp;gt;souliss-&amp;gt;LYT&lt;/strong&gt; menu and load it, don’t forget to customize the sketch with your SSID and Password. If this succeed, you will see two empty node in SoulissApp.
The IP address of the ESP8266 depends on the DHCP, so you don’t know it in advance. Generally SoulissApp detect a gateway automatically, is enough that no IP address has been set in the application.
If this doesn’t work, open your router webpage and look for the assigned IP address, otherwise use &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.overlook.android.fing&amp;amp;hl=en&quot;&gt;Fing&lt;/a&gt; application for Android to get the address of the ESP8266 (look for ExpressIf as manufacturer).&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;span class=&quot;cm&quot;&gt;/**************************************************************************
    Souliss - LYT Light Bulb
    
    This sketch control the Authometion LYT bubls through the Authometion
    shield.
    
    Load this sketch on an ESP8266 WiFi module used to bridge via USART the
	Arduino AVR microcontroller that handle the radio.
    Verify shield's jumpers and select Hardware Usart while using this sketch, 
    remember to remove the jumpers before programming the Arduino. Use pin 10 as
	chip select for the radio.
        
***************************************************************************/&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// Configure the framework&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;bconf/MCU_ESP8266.h&quot;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;              // Load the code directly on the ESP8266&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;conf/Gateway.h&quot;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;                   // The main node is the Gateway, we have just one node&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;conf/usart_fast.h&quot;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;                // USART / RS485 transceiver&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;conf/IPBroadcast.h&quot;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// **** Define the WiFi name and password ****&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#define WIFICONF_INSKETCH
#define WiFi_SSID               &quot;mywifi&quot;
#define WiFi_Password           &quot;mypassword&quot;    
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// Include framework code and libraries&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;ESP8266WiFi.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;EEPROM.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;Souliss.h&quot;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;setup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;   
    &lt;span class=&quot;n&quot;&gt;Initialize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

    &lt;span class=&quot;c1&quot;&gt;// Connect to the WiFi network and get an address from DHCP&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;GetIPAddress&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;                           
    &lt;span class=&quot;n&quot;&gt;SetAsGateway&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;myvNet_dhcp&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;       &lt;span class=&quot;c1&quot;&gt;// Set this node as gateway for SoulissApp  &lt;/span&gt;

    &lt;span class=&quot;c1&quot;&gt;// This is the vNet address for this node, used to communicate with other&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// nodes in your Souliss network&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;SetAddress&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mh&quot;&gt;0xAB01&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mh&quot;&gt;0xFF00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mh&quot;&gt;0x0000&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;SetAddress&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mh&quot;&gt;0xCE01&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mh&quot;&gt;0xFF00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mh&quot;&gt;0x0000&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;SetAsPeerNode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mh&quot;&gt;0xCE02&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; 
    &lt;span class=&quot;c1&quot;&gt;// Here we start to play&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;EXECUTEFAST&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;                     
        &lt;span class=&quot;n&quot;&gt;UPDATEFAST&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;   
             
        &lt;span class=&quot;c1&quot;&gt;// Process the communication basic at max speed, this allow smooth handling of color and music synch                                &lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;ProcessCommunication&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt; 
            
        &lt;span class=&quot;c1&quot;&gt;// Complete the communication tasks at normal rate&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;FAST_GatewayComms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;   &lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;You will just see two empty node, because the dirty job is done by the Arduino board.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Load Souliss on Arduino&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Don’t insert the shield on the Arduino, just program the board as standalone using the &lt;a href=&quot;https://github.com/souliss/souliss/blob/friariello/examples/LYTBulb/e01_LYTBulb_Arduino/e01_LYTBulb_Arduino.ino&quot;&gt;appropiate sketch&lt;/a&gt; that is always in &lt;strong&gt;Example-&amp;gt;souliss-&amp;gt;LYT&lt;/strong&gt;, don’t forget to customize the address of your LYT (if you have changed them). Refer to the &lt;a href=&quot;&quot;&gt;Getting Started&lt;/a&gt; guide for details.&lt;/p&gt;

&lt;p&gt;Before insert the shield, ensure that the JP1 and JP2 are selected for the Hardware USART as shown in the picture below,&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-08/lytshield-hardwareserial.jpg?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;cm&quot;&gt;/**************************************************************************
    Souliss - LYT Light Bulb
    
    This sketch control the Authometion LYT bubls through the Authometion
    shield.
    
    Load this sketch on an Arduino UNO/Duemilanove (use of Leonardo require
    the use of the proper USART configuration) and using the USART bridge it
    to an ESP8266 WiFi module.
    Verify shield's jumpers and select Hardware Usart while using this sketch, 
    remember to remove the jumpers before programming the Arduino. Use pin 10 as
    chip select for the radio.
    
***************************************************************************/&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;bconf/StandardArduino.h&quot;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;              // Use an Arduino board&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;bconf/LYT88_LEDBulb_Radio.h&quot;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;          // Define the board type&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;conf/usart_fast.h&quot;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;                    // Ethernet through Wiznet W5100&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// Include framework code and libraries&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;SPI.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;Souliss.h&quot;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// Include Authometion libraries&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;PL1167.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;Lytwifi.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;WiFiInterrupt.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// There are not used in this sketch, keep it just to pat the compiler&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;EEPROM.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;SoftwareSerial.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// Define logic slots, multicolor lights use four slots&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#define LYTLIGHT1           0                   
&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;setup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;   
    &lt;span class=&quot;n&quot;&gt;Initialize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    
    &lt;span class=&quot;c1&quot;&gt;// Set network parameters&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;SetAddress&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mh&quot;&gt;0xCE02&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mh&quot;&gt;0xFF00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mh&quot;&gt;0xCE01&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    
    &lt;span class=&quot;c1&quot;&gt;// Se the LYT bulbs (index, bulb type, addr_a, addr_b, logic slot), here we have&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// the first lamp (index 0) with default addresses (0, 0). Change these based on&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// the configuration of your lamps.&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;InitLYT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;SetLYT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;LYTLIGHT1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

    &lt;span class=&quot;c1&quot;&gt;// Define a logic to handle the bulb(s)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;SetLYTLamps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LYTLIGHT1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; 
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; 
    &lt;span class=&quot;c1&quot;&gt;// Here we start to play&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;EXECUTEFAST&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;                     
        &lt;span class=&quot;n&quot;&gt;UPDATEFAST&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;   
        
        &lt;span class=&quot;c1&quot;&gt;// Is an unsual approach, but to get fast response to color change we run the LYT logic and&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;// basic communication processing at maximum speed.&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;LogicLYTLamps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LYTLIGHT1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;       
        &lt;span class=&quot;n&quot;&gt;ProcessCommunication&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
        
        &lt;span class=&quot;c1&quot;&gt;// Here we process all communication with other nodes&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;FAST_1110ms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;LYTState&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LYTLIGHT1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;   
    
    &lt;span class=&quot;n&quot;&gt;EXECUTESLOW&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;UPDATESLOW&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
        
        &lt;span class=&quot;n&quot;&gt;SLOW_10s&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;LYTStateRequest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;              &lt;span class=&quot;c1&quot;&gt;// Request the lamp state&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;LYTSleepTimer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LYTLIGHT1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;       &lt;span class=&quot;c1&quot;&gt;// Slowly shut down the lamp&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; 
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;You should now be able to see two nodes and one (or more, based on your sketch) light bulb ready to be controlled.&lt;/p&gt;

&lt;h2 id=&quot;add-multiple-bulbs&quot;&gt;Add multiple bulbs&lt;/h2&gt;

&lt;p&gt;If you have multiple bulbs the best option is to set for each one a dedicated address, this can be done using the } command as discussed before. Once you have your lamp with the relevant address you just need to copy/paste the relevant code and assigning a new slot and address, as example two bulbs with address &lt;strong&gt;0, 1&lt;/strong&gt; and &lt;strong&gt;0, 2&lt;/strong&gt; will looks like:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;bconf/StandardArduino.h&quot;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;              // Use an Arduino board&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;bconf/LYT88_LEDBulb_Radio.h&quot;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;          // Define the board type&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;conf/usart_fast.h&quot;&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;                    // Ethernet through Wiznet W5100&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// Include framework code and libraries&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;SPI.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&quot;Souliss.h&quot;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// Include Authometion libraries&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;PL1167.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;Lytwifi.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;WiFiInterrupt.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// There are not used in this sketch, keep it just to pat the compiler&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;EEPROM.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;SoftwareSerial.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#define LYTLIGHT1           0                   
#define LYTLIGHT2           4  // Each RGB lamp use 4 slots                   
&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;setup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;   
    &lt;span class=&quot;n&quot;&gt;Initialize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    
    &lt;span class=&quot;c1&quot;&gt;// Set network parameters&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;SetAddress&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mh&quot;&gt;0xCE02&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mh&quot;&gt;0xFF00&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mh&quot;&gt;0xCE01&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    
    &lt;span class=&quot;c1&quot;&gt;// Se the LYT bulbs (index, bulb type, addr_a, addr_b, logic slot), here we have&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// the first lamp (index 0) with default addresses (0, 0). Change these based on&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// the configuration of your lamps.&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;InitLYT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;SetLYT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;LYTLIGHT1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;SetLYT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;LYTLIGHT2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

    &lt;span class=&quot;c1&quot;&gt;// Define a logic to handle the bulb(s)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;SetLYTLamps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LYTLIGHT1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; 
    &lt;span class=&quot;n&quot;&gt;SetLYTLamps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LYTLIGHT2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; 

&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; 
    &lt;span class=&quot;c1&quot;&gt;// Here we start to play&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;EXECUTEFAST&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;                     
        &lt;span class=&quot;n&quot;&gt;UPDATEFAST&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;   
        
        &lt;span class=&quot;c1&quot;&gt;// Is an unsual approach, but to get fast response to color change we run the LYT logic and&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;// basic communication processing at maximum speed.&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;LogicLYTLamps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LYTLIGHT1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;       
        &lt;span class=&quot;n&quot;&gt;LogicLYTLamps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LYTLIGHT2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;       
        &lt;span class=&quot;n&quot;&gt;ProcessCommunication&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
        
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;  
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; 
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;


    </content>
  </entry>
  
  <entry>
    <title>New LYT Led Bulb are Here!</title>
    <link href="http://souliss.github.io/articles/new-lyt-just-arrived/"/>
    <updated>2015-08-03T00:00:00+00:00</updated>
    <id>http://souliss.github.io/articles/new-lyt-just-arrived</id>
    <author>
      <name>Souliss Team</name>
      <uri>http://souliss.github.io/</uri>
      
    </author>
    <content type="html">
      &lt;img src=&quot;http://souliss.github.io/images/2015-08/LYT bulb.jpg&quot;&gt;&lt;br/&gt;
      &lt;p&gt;Just received from our friends at &lt;a href=&quot;http://authometion.com/&quot;&gt;Authometion&lt;/a&gt; a sample kit with three LYT88 RGBW and a shield based on ESP8266. I’ve played in the past with the previous prototypes of LYT that has been in my home for almost a year with very good result.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The &lt;a href=&quot;http://authometion.com/shop/it/home/2-lampadina-lyt-9w-rgbw-e27.html&quot;&gt;LYT bulb sells at 24,90 euros&lt;/a&gt; and are as far as I know are the only Arduino controllable LED bulb on the market.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Those will be officially included in the next Souliss release, so lets start to get your lamps on the &lt;a href=&quot;http://authometion.com/shop/it/&quot;&gt;Authometion store!&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-08/LYT shield.jpg?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Have a look of what you can do using Souliss and LYT in the following video&lt;/p&gt;

&lt;iframe width=&quot;1600&quot; height=&quot;800&quot; src=&quot;https://www.youtube.com/embed/j4_wvbMCjWo&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;blockquote&gt;
  &lt;p&gt;Go to the &lt;a href=&quot;http://souliss.github.io/media/diy-your-philips-hue-led-bulb/&quot;&gt;step by step&lt;/a&gt; tutorial to get started with LYT88 Bulbs and Souliss!&lt;/p&gt;
&lt;/blockquote&gt;

    </content>
  </entry>
  
  <entry>
    <title>Use ThingSpeak and Pushbullet with Souliss</title>
    <link href="http://souliss.github.io/media/Souliss-ThingSpeaks-Pushbullet/"/>
    <updated>2015-07-26T00:00:00+00:00</updated>
    <id>http://souliss.github.io/media/Souliss-ThingSpeaks-Pushbullet</id>
    <author>
      <name>Souliss Team</name>
      <uri>http://souliss.github.io/</uri>
      
    </author>
    <content type="html">
      &lt;img src=&quot;http://souliss.github.io/images/2015-07/Souliss-pushbullet.PNG&quot;&gt;&lt;br/&gt;
      &lt;p&gt;This tutorial will make your Souliss Node able to send notification to &lt;a href=&quot;https://www.pushbullet.com/&quot;&gt;Pushbullet&lt;/a&gt; through &lt;a href=&quot;https://thingspeak.com/&quot;&gt;Thinkspeak&lt;/a&gt;, in this example we will notify the state of lamp controlled by a relay.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;This tutorial applies on all nodes that has internet connection via W5100 (for AVR based boards) or ESP8266, in case of W5100 is suggested to run the code on an Arduino Mega or any other AVR with larger RAM than a standard Arduino UNO or similar.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Start from a basic example like &lt;a href=&quot;https://github.com/souliss/souliss/blob/friariello/examples/ethernet/e01_HelloWorld/e01_HelloWorld.ino&quot;&gt;e01_HelloWorld&lt;/a&gt; for W5100 Ethernet based devices or &lt;a href=&quot;https://github.com/souliss/souliss/blob/friariello/examples/WiFi/e01_Hello_ESP8266/e01_Hello_ESP8266.ino&quot;&gt;e01_Hello_ESP8266&lt;/a&gt; for ESP8266. Add the following code to your Arduino sketch, first we got to declare ThingSpeak API and ThingSpeak server, add this in top of your sketch&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;span class=&quot;c1&quot;&gt;// ThingSpeak API&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;apiKey&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;Your ThingSpeak API key&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;serverTS&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;api.thingspeak.com&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;In your Souliss Node sketch you should have a code to push the output state, this can be added after the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Logic_SimpleLight()&lt;/code&gt; call, your sketch will looks like:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;&lt;span class=&quot;n&quot;&gt;FAST_50ms&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;   &lt;span class=&quot;c1&quot;&gt;// We process the logic and relevant input and output every 50 milliseconds&lt;/span&gt;
   &lt;span class=&quot;n&quot;&gt;Logic_SimpleLight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;MYLEDLOGIC&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
   &lt;span class=&quot;n&quot;&gt;DigOut&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;OUTPUTPIN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Souliss_T1n_Coil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;MYLEDLOGIC&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
   
   &lt;span class=&quot;n&quot;&gt;sendOutputState&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;MYLEDLOGIC&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Here we define the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sendOutputState&lt;/code&gt; that will push your data, place this before void loop(){}&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c&quot; data-lang=&quot;c&quot;&gt;  &lt;span class=&quot;c1&quot;&gt;// send data to ThingSpeak.com&lt;/span&gt;
  &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;sendOutputState&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;uint8_t&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;slot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
       
	   &lt;span class=&quot;c1&quot;&gt;// If there is nothing to show&lt;/span&gt;
	   &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;isTrigger&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt;
         &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
		 
       &lt;span class=&quot;n&quot;&gt;WiFiClient&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
       &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;connect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;serverTS&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;80&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;//   &quot;184.106.153.149&quot; or api.thingspeak.com&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;Serial&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;println&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Connection Fail!&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;postStr&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;apiKey&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                 &lt;span class=&quot;n&quot;&gt;postStr&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&amp;amp;field1=&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
                 &lt;span class=&quot;n&quot;&gt;postStr&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;mOutput&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;slot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
                 &lt;span class=&quot;n&quot;&gt;postStr&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\r\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
 
                 &lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;POST /update HTTP/1.1&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                 &lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Host: api.thingspeak.com&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                 &lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Connection: close&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                 &lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;X-THINGSPEAKAPIKEY: &quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;apiKey&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                 &lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Content-Type: application/x-www-form-urlencoded&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                 &lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Content-Length: &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                 &lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;postStr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;());&lt;/span&gt;
                 &lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                 &lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;postStr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                 &lt;span class=&quot;n&quot;&gt;Serial&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;println&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Send Relay State to Thingspeak&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
 
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;stop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;Serial&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;println&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Client to send Stoped&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Now we need to setup ThingSpeak Channel, ThingHTTP and React, but first you will need Pushbullet token, so create pushbullet account, then create ThingSpeak account. And follow those steps:&lt;/p&gt;

&lt;p&gt;Create New Channel in ThingSpeak, name it as you wish, in my case “PushbulletTriggerKamar”. Make sure you have one field, use field 1 and name it as “Relay State”&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-07/config1.PNG&quot; alt=&quot;tskamar&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Click APPS in ThingSpeak, and click ThingHTTP app, create new ThingHTTP, this will send http request to pushbullet if the Light ON, fill the field as the picture&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-07/config2.PNG&quot; alt=&quot;ts2&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Create another ThingHTTP for the Light OFF, follow the picture below..&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-07/config3.PNG&quot; alt=&quot;ts3&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You can change the text body to fit your need, but it must be in json format.. I suggest just change this line&lt;/p&gt;

&lt;p&gt;` 
{“type”: “note”, “title”: “IoT Message”, “body”: “Lampu Teras ON”}
`&lt;/p&gt;

&lt;p&gt;into something like this :&lt;/p&gt;

&lt;p&gt;` 
{“type”: “note”, “title”: “Message from Home”, “body”: “LIGHT ON”}
`&lt;/p&gt;

&lt;p&gt;Back to ThingSpeak APPS, now click React app, create new React, this will execute ThingHTTP is some condition meet.. we create a new React for Light ON&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-07/config4.PNG&quot; alt=&quot;ts4&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Last step, create another React for Light OFF&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-07/config5.PNG&quot; alt=&quot;ts5&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You are done, now everytime you pressing ON OFF button in SoulissApp you should get notification in Pushbullet.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-07/Souliss-pushbullet.PNG&quot; alt=&quot;lastts&quot; /&gt;&lt;/p&gt;


    </content>
  </entry>
  
  <entry>
    <title>How to load Souliss on ESP8266.</title>
    <link href="http://souliss.github.io/media/how-to-load-a-sketch-on-ESP/"/>
    <updated>2015-07-21T00:00:00+00:00</updated>
    <id>http://souliss.github.io/media/how-to-load-a-sketch-on-ESP</id>
    <author>
      <name>Souliss Team</name>
      <uri>http://souliss.github.io/</uri>
      
    </author>
    <content type="html">
      &lt;img src=&quot;http://souliss.github.io/images/2015-07/esp12_1600.jpg&quot;&gt;&lt;br/&gt;
      &lt;p&gt;This tutorial shows how to load custom code on the ESP8266 based modules, like Expressif ESP-01, ESP-12 or the Olimex ESP8266-EVB, this is based on the porting of Arduino cores for the ESP8266 microcontroller.&lt;/p&gt;

&lt;h1 id=&quot;esp-12&quot;&gt;ESP-12&lt;/h1&gt;

&lt;p&gt;Even if we focus on ESP-12, but this tutorial applies for all breakout modules based on ESP8266, you just need to cross check the pin assignment on the PCB, to start you need:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;ESP-12 module&lt;/li&gt;
  &lt;li&gt;USB to Serial Converter at 3v3 (FTDI PL2303 - CH340 and others)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;wiring&quot;&gt;Wiring&lt;/h2&gt;

&lt;p&gt;The are two main &lt;em&gt;wiring schemes&lt;/em&gt; that you will need to use, those are referred as &lt;strong&gt;USART Mode&lt;/strong&gt; and &lt;strong&gt;FLASH Mode&lt;/strong&gt;. The former is used to load a new code and the latter to run that code, from this point on is assumed that the code will be loaded into the companion FLASH memory. 
The use of the external FLASH memory is not the only available option with the ESP8266, but all the commercial modules based on this SoC use this approach, so that the MTDO pin is always at GND.&lt;/p&gt;

&lt;p&gt;The minimal setup required to load a new sketch on your ESP8266 based module is the following one&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;USART Mode ESP-01 and others&lt;/strong&gt;&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;PIN&lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;Resistor&lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;Serial Adapter&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;VCC&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;VCC (3.3V)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;GND&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;GND&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;TX or GPIO1&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;RX&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;RX or GPIO3&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;TX&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;GPIO0&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;GND&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;GPIO2&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;VCC (3.3V)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;Reset&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;RTS*&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;GPIO15&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;PullDown&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;CH_PD&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;PullUp&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;ul&gt;
  &lt;li&gt;Note
    &lt;ul&gt;
      &lt;li&gt;if no RTS is used a manual toggle is needed&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once the sketch has been loaded, you can run your module using the following setup&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Operating Mode ESP-01 and others&lt;/strong&gt;&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;PIN&lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;Resistor&lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;Power supply&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;VCC&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;VCC (3.3V)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;GND&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;GND&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;GPIO0&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;PullUp&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;GPIO15&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;PullDown&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;CH_PD&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;PullUp&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h3 id=&quot;minimal&quot;&gt;Minimal&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-07/ESP_min.png?raw=true&quot; alt=&quot;ESP min&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;improved-stability&quot;&gt;Improved Stability&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-07/ESP_improved_stability.png?raw=true&quot; alt=&quot;ESP improved stability&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important Note&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before load the code in the module you need to start it in &lt;strong&gt;USART Mode&lt;/strong&gt;, this is achieved following these steps:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Remove power from the module&lt;/li&gt;
  &lt;li&gt;Connect GPIO-0 to GND&lt;/li&gt;
  &lt;li&gt;Connect GPIO-2 to VCC&lt;/li&gt;
  &lt;li&gt;Power the module&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At this point the module is in &lt;strong&gt;USART Mode&lt;/strong&gt; and you can load the code from the Arduino IDE (see details below). Once completed the load of the code:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Remove power from the module&lt;/li&gt;
  &lt;li&gt;Connect GPIO-0 to VCC&lt;/li&gt;
  &lt;li&gt;Connect GPIO-2 to VCC&lt;/li&gt;
  &lt;li&gt;Power the module&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The module will start using the code loaded in the external FLASH memory, once the boot has been completed the GPIO-0 and GPIO-2 can be used as standard I/O pins.&lt;/p&gt;

&lt;h1 id=&quot;olimex-esp8266-evb&quot;&gt;Olimex ESP8266-EVB&lt;/h1&gt;

&lt;p&gt;The &lt;a href=&quot;https://www.olimex.com/Products/IoT/ESP8266-EVB/open-source-hardware&quot;&gt;Olimex ESP8266-EVB&lt;/a&gt; is an evaluation board for quick prototyping with ESP8266, it doesn’t require you any soldering action.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-07/ESP8266-EVB.jpg?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In order to start with this module you need&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;A regular 5V / 500 mA power supply with classic DC jack&lt;/li&gt;
  &lt;li&gt;USB to Serial Converter at 3v3 (FTDI PL2303 - CH340 and others)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You need to connect your USB to Serial converter according to the following table on the UEXT connector, the pinout that follow refers to a male connector&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://upload.wikimedia.org/wikipedia/en/thumb/d/d1/UEXTPINS.jpg/220px-UEXTPINS.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;ESP8266-EVB&lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;Serial Adapter&lt;/th&gt;
      &lt;th&gt; &lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;GND&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;GND&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;TX&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;RX&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;RX&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;TX&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;Is convenient to power the board from an external power-supply, because you need to remove power every time that you need to load a new code on the ESP8266 and because the USB to Serial converter is generally not able to provide enough power to on-board relay.&lt;/p&gt;

&lt;p&gt;Before load the code in the module you need to start it in &lt;strong&gt;Bootloader Mode&lt;/strong&gt;, this is achieved following these steps:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Remove power from the module&lt;/li&gt;
  &lt;li&gt;Press (keep pressed) the button on the board&lt;/li&gt;
  &lt;li&gt;Power the module and release the button after a couple of seconds&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At this point the module is in &lt;strong&gt;Bootloader Mode&lt;/strong&gt; and you can load the code from the Arduino IDE (see details below). Once completed the load of the code you just need to power-cycle the module to get your code executed.&lt;/p&gt;

&lt;h2 id=&quot;arduino-ide&quot;&gt;Arduino IDE&lt;/h2&gt;

&lt;p&gt;The Arduino IDE allow an easy add-on of cores that has been developed by the community, this allow you reuse Arduino-like codes and libraries on non official boards. Perform the following steps to add the ESP8266 cores:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Install the latest Souliss’ supported Arduino IDE and have a general read of the &lt;a href=&quot;https://github.com/souliss/souliss/wiki/Getting%20Started%20with%20Souliss&quot;&gt;Getting Started guide&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Create a folder called &lt;strong&gt;portable&lt;/strong&gt; inside the IDE main folder&lt;/li&gt;
  &lt;li&gt;Start Arduino and open Preferences window.&lt;/li&gt;
  &lt;li&gt;Refer to the latest supported core for Souliss in the &lt;a href=&quot;https://github.com/souliss/souliss/wiki/Supported%20Hardware#supported-cores&quot;&gt;wiki&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Follow the installation instruction &lt;a href=&quot;https://github.com/esp8266/Arduino&quot;&gt;ESP8266 cores for Arduino&lt;/a&gt;, the cores are distributed via the Arduino IDE Board Manager and needs an URL for the distribution of the code. You can check the supported core &lt;a href=&quot;https://github.com/souliss/souliss/wiki/Supported%20Hardware#supported-cores&quot;&gt;here&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;As today, the URL to be used is http://arduino.esp8266.com/stable/package_esp8266com_index.json into &lt;em&gt;Additional Board Manager URLs&lt;/em&gt; field. You can add multiple URLs, separating them with commas.&lt;/li&gt;
  &lt;li&gt;Open Boards Manager from Tools &amp;gt; Board menu and install &lt;strong&gt;ESP8266&lt;/strong&gt; platform (you will need to select your ESP8266 board from Tools &amp;gt; Board menu after installation).&lt;/li&gt;
  &lt;li&gt;Install Souliss library on &lt;a href=&quot;https://github.com/souliss/souliss/wiki/Your%20First%20Upload&quot;&gt;Library Manager&lt;/a&gt; of Arduino IDE&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At this point follow the procedure that has been reported previously to set the ESP8266 in &lt;strong&gt;Bootloader Mode&lt;/strong&gt; and load the code from the Arduino IDE. Souliss include several examples, some are listed below:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Gateway code for generic ESP8266 &lt;a href=&quot;https://github.com/souliss/souliss/tree/friariello/examples/WiFi/e01_Hello_ESP8266&quot;&gt;e01_Hello_ESP8266&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Peer code for generic ESP8266 &lt;a href=&quot;https://github.com/souliss/souliss/tree/friariello/examples/WiFi/e01_Peer_ESP8266&quot;&gt;e01_Peer_ESP8266&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Gateway code for Olimex ESP8266-EVB &lt;a href=&quot;https://github.com/souliss/souliss/tree/friariello/examples/Olimex/e04_Olimex_ESP8266-EVB&quot;&gt;e04_Olimex_ESP8266-EVB&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;a href=&quot;https://github.com/esp8266/Arduino&quot;&gt;ESP8266 cores for Arduino&lt;/a&gt; are maintained by the &lt;a href=&quot;http://www.esp8266.com/&quot;&gt;ESP8266 Community&lt;/a&gt;.&lt;/p&gt;

    </content>
  </entry>
  
  <entry>
    <title>First Prototypes are Ready!</title>
    <link href="http://souliss.github.io/articles/first-protypes-are-ready/"/>
    <updated>2015-06-21T00:00:00+00:00</updated>
    <id>http://souliss.github.io/articles/first-protypes-are-ready</id>
    <author>
      <name>Souliss Team</name>
      <uri>http://souliss.github.io/</uri>
      
    </author>
    <content type="html">
      &lt;img src=&quot;http://souliss.github.io/images/2015-06/battery_board-1.jpg&quot;&gt;&lt;br/&gt;
      &lt;p&gt;Just got an email from &lt;a href=&quot;http://kmpelectronics.eu/&quot;&gt;KMP Electronics&lt;/a&gt; in the Inbox with some nice picture attached.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;This works with nRF24L01 radios and ESP8266 WiFi transceiver, has three sockets for Grove sensors and works on LiPo battery with onboard charger.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Is designed to be as much as possible a plug&amp;amp;play solution for sensing data around your home and getting it into Souliss. The UEXT socket allow extension with relay I/O and others while working on wall charger.&lt;/p&gt;

&lt;p class=&quot;notice-info&quot;&gt;&lt;strong&gt;Stand a year:&lt;/strong&gt; By design all sensor can be switched off as long as the nRF24L01 radio to stay longer between charges. Using LiPo you can size the needed amount energy to keep the node running a year or more.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://souliss.github.io/images/2015-06/battery_board-2.jpg?raw=true&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

    </content>
  </entry>
  
  
</feed>