Get in touch with your Things

Any object that can be attached to an Arduino / AVR microcontroller is a potential Things: get interaction in wireless or wired, acts automatically and is even remotely controllable from you smartphone or tablet.

Starts in three steps : get your building blocks, load Souliss and get your Things on the smartphone.

Do it simple!

Do it simple!
A network of Things in minutes for your Android and Arduino / AVR

Building Blocks

Building Blocks
Easily compose hardware

Souliss on AVRs

Souliss on AVRs
Load Souliss on your Things

Android App

Android App
Get your Things on your Smartphone

Thursday, May 28, 2015

Smart Home with ESP8266 and openHAB

Smart Home based on ESP8266 controlled via openHAB
Last weeks were full of news, as announced in a previous post we have started and basically completed the porting of Souliss on ESP8266 modules, isn't a simple use of the ESP8266 as a transceiver for an Arduino based on an Atmel AVR microcontroller, but is the Souliss framework itself that runs on the ESP8266. 
All has started from Saverio, it was Easter when he came out with the news, he compiled successfully most of Souliss code for an ESP8266 and after a couple of days we got some basic functionality available.This has been possible thanks to the amazing work of the guys that has ported the cores in the Arduino IDE for ESP8266.

Just the time to release a first try of Souliss for ESP8266 and a bunch of people in our mailing list were ready to test and share feedback, as result Souliss release v.7.0.5 is now ready to be installed from the Library Manager.

Just a couple of days ago we also got the official inclusion of the Tonino's binding in openHAB, so you can now officially use openHAB with a Souliss, and of course with ESP8266 running Souliss.

To use ESP8266 you need to install the relevant cores by ESP8266 community, this can be done directly from the Board Manager of your IDE using the instruction here. Then load the following sketch and follow the instruction to configure the binding.

 /**************************************************************************
    Souliss - Hello World
    
    This is the basic example, control one LED via a push-button or Android
    using SoulissApp (get it from Play Store).  
    
    Run this code on ESP8266 as WiFi SoC.
        
***************************************************************************/

// Configure the framework
#include "bconf/MCU_ESP8266.h"          
#include "conf/Gateway.h"                  
#include "conf/IPBroadcast.h"

// **** Define the WiFi name and password ****
#define WIFICONF_INSKETCH
#define WiFi_SSID               "mywifi"
#define WiFi_Password           "mypassword"   

// Include framework code and libraries
#include 
#include "Souliss.h"

// This identify the number of the LED logic
#define MYLEDLOGIC          0               

// Define the network configuration according 
// to your router settings
uint8_t ip_address[4]  = {192, 168, 1, 77};
uint8_t subnet_mask[4] = {255, 255, 255, 0};
uint8_t ip_gateway[4]  = {192, 168, 1, 1};
#define Gateway_address 77
#define myvNet_address  ip_address[3]  
#define myvNet_subnet   0xFF00
#define myvNet_supern   Gateway_address

// **** Define here the right pin for your ESP module **** 
#define OUTPUTPIN   5

void setup()
{   
    Initialize();

     // Set network parameters
    Souliss_SetIPAddress(ip_address, subnet_mask, ip_gateway);
    SetAsGateway(myvNet_address);  
    
    // Define a simple LED light logic
    Set_SimpleLight(MYLEDLOGIC);        
    
    pinMode(OUTPUTPIN, OUTPUT);  // Power the LED
}

void loop()
{ 
    // Here we start to play
    EXECUTEFAST() {                     
        UPDATEFAST();   
        
        // We process the logic and relevant input 
        // and output every 50 milliseconds
        FAST_50ms() {   
            // Drive the LED as per command
            Logic_SimpleLight(MYLEDLOGIC);    
            DigOut(OUTPUTPIN, Souliss_T1n_Coil, MYLEDLOGIC);                
        } 
              
        // Here we handle here the communication
        FAST_GatewayComms();                                        
        
    }
} 

Ensure that the pins available on your module matches the one in the sketches, so that you can control it via openHAB and of course SoulissApp.

Enjoy!

Saturday, May 16, 2015

Preview : Run Souliss on Olimex ESP8266-EVB

Expressif ESP8266 run Souliss directly on the module
A couple of weeks ago we got some Olimex ESP8266-EVB a small board to quickly prototype on the cheapest WiFi module for DIYers actually on the market, yesterday the porting of Souliss has been completed and now we can run directly on this module without have an Arduino ATmega inbetween.

The Arduino core for the ESP8266 is constantly updated and for this reason we are distributing an Arduino IDE for Windows that includes the tested cores (available here for download), just ensure that in your Documents/Arduino/libraries there isn't a Souliss library, this because the IDE that we provide contains also the latest Souliss code.

Run this sketch, considering the GPIO available on your module, this use GPIO5 that is used in Olimex ESP8266-EVB with a relay.

 /**************************************************************************  
   Souliss - Hello World for Expressif ESP8266  
   This is the basic example, create a software push-button on Android  
   using SoulissApp (get it from Play Store).   
   Load this code on ESP8266 board using the porting of the Arduino core  
   for this platform.  
 ***************************************************************************/  
 // Configure the framework  
 #include "bconf/MCU_ESP8266.h"       // Load the code directly on the ESP8266  
 #include "conf/Gateway.h"          // The main node is the Gateway, we have just one node  
 #include "conf/DynamicAddressing.h"     // Use dynamic addressing  
 #include "conf/DisableEEPROM.h"  
 // Define the WiFi name and password  
 #define WIFICONF_INSKETCH  
 #define WiFi_SSID        "mywifi"  
 #define WiFi_Password      "mypassword"    
 // Include framework code and libraries  
 #include <ESP8266WiFi.h>  
 #include "Souliss.h"  
 // This identify the number of the LED logic  
 #define MYLEDLOGIC     0          
 void setup()  
 {    
   Initialize();  
   // Connect to the WiFi network and get an address from DHCP  
   Setup_ESP8266();                
   SetAsGateway(myvNet_esp8266);    // Set this node as gateway for SoulissApp   
   // This node will serve all the others in the network providing an address  
   SetAddressingServer();  
   Set_SimpleLight(MYLEDLOGIC);    // Define a simple LED light logic  
   pinMode(5, OUTPUT);         // Use pin 5 as output   
 }  
 void loop()  
 {   
   // Here we start to play  
   EXECUTEFAST() {             
     UPDATEFAST();    
     FAST_50ms() {  // We process the logic and relevant input and output every 50 milliseconds  
       Logic_SimpleLight(MYLEDLOGIC);  
       DigOut(5, Souliss_T1n_Coil,MYLEDLOGIC);  
     }   
     // Here we handle here the communication with Android  
     FAST_GatewayComms();                      
   }  
 }   

If you have the Olimex module, is enough to press the button and then power the module, this set the module in firmware mode and let you load the code from the IDE using an FTDI at 3.3v as shown in Olimex post.

Using the ESP-01 and other modules from other vendors require an external connection as per following scheme
Connection between FTDI 3v3 and ESP-01

In the sketch insert your WiFi SSID and Password, once loaded the module connects to your router and you can control it directly from SoulissApp (download the app here) and the app will automatically discover your node.

The result is SoulissApp showing the node and the relay for control,
SoulissApp control the ESP8266
This is just a simple example, because the ESP8266 runs a full Souliss framework and you can communicate with other ESP and AVR based boards (where also wireless-RF and RS485 are supported) to have a full network between your nodes.

The support for ESP8266 has just started, use the community to get help and follow the wiki for details.

What's next? WiFi with ESP8266 and nRF24 based Battery Board

Rendering of the battery operated board
Things are changing and mostly in a (nice) unpredicted way, for long time we keep out from PCB design and support for MCU different than AVRs, there was several good reason to didn't jump in these fields and mostly were time driven resons.

It happens suddenly that you find your self on a complete different way, like a month or more ago when Joosof joined our team sharing its own PCB design and spending his time on project related design. We focused on a battery operated board, designed to run for a years and more on a LiPo battery with support for Gove sensors and nRF24L01, a small a quick to use board to build mobile sensors or avoid to pull cables around you home.
The first design was so quick that in no time we were looking for partnership to build few prototype at a reasonable price, isn't easy build just a couple of fully assembled boards, only friend does, and we start looking around.

So lucky that one of Souliss best friend is KMP Electronics, their ProDINo relay board is widely used within Souliss automations and this has created a good relationship in the time. Once convinced, we started to move from the first design to the final one, looking in details for components and PCB layout, and after a couple of weeks we have now a final design to prototype some boards.

That's not the only good news, many of us are falling in love with the ESP8266, is actually mostly a bet, because we are sure that more and more products for DIYers will be based on this SoC with integrated WiFi.
The ESP8266 is our from a year or so, I've seen it and never been very enthusiast, but few weeks ago Saverio opened my mind and now we have a mostly full Souliss code that can run on this module. The Souliss code is no longer binded to AVR 8 bits architectures, and can now easily be ported to every MCU or SoC that has Arduino cores.

In the while, the friariello branch has been promoted to official release as Souliss v7 and for the first time a release is no longer marked as Alpha. The v7 is a compeltely new Souliss especially in the user space (that has been break) and slowly people are moving, but the results are good.
Gabriele is intensely using v7, contribuiting to consolidate the actual base code.

Those are a lot of new for a small team like us, stay tuned for the next ones!

Saturday, April 25, 2015

First experiment, run Souliss on ESP8266

The ESP8266 development board from Olimex

The interest around the ESP8266 is increasing, is mostly an years that this SoC is in the hand of DIYers and news are on a daily base. Starting from the support in GCC till the porting of the SDK into the Arduino IDE, the ESP8266 is now near simple to use as a standard Arduino board.

Just after Easter, Saverio started to port the Souliss code for the ESP8266 and he ignited a spark, yesterday I've received a development board from Olimex and I've started playing a bit on it.
Using the code ported by Saverio I've been able to get something working in a day, isn't a full working Souliss but a reference for the porting.

I can say that the effort to get Souliss running directly on the ESP8266 isn't too much and now we have all the information to proceed. Probably in the next months you will be able to run Souliss directly on that small SoC with integrated Wifi.

Stay Tuned!

Tuesday, April 21, 2015

Joseph Smarthome! Enjoy the video



 Joseph has just shared this nice video, is a Souliss based automation system that controls standard lights and LED strips, you can see a set of hand-made PCB that are used for the Souliss boards. He is a professional in electronics and is designing for the project a Battery Operated Board that is now available on GitHub with a CC Share Alike license.


The 3D model in the below picture is a preview of the board, we are now working to build a small batch in order to test those prototypes and then provide a fully tested design.

You can get the source files on out souliss/board GitHub account!

Enjoy,
The Souliss Team!