SoulissApp doesn't see the ESP gateway

41 views
Skip to first unread message

guyc

unread,
Dec 28, 2017, 10:42:40 AM12/28/17
to souliss

Hi,
I have a sketch with only one node ( gateway) to control RGB stips with DMX
The ESP8266 I use is NodeMCU 12

The ESP is online, because I can see with FING app on address 77 and I can also ping to the ESP

SoulissApp stays offline and no ping possible

Please find my sketch :

// Let the IDE point to the Souliss framework
#include "SoulissFramework.h"

// Configure the framework
#include "bconf/MCU_ESP8266.h"              // Load the code directly on the ESP8266
#include <ESP8266mDNS.h>
#include "conf/Gateway.h"                     // The main node is the Gateway, we have just one node               
#include "conf/IPBroadcast.h"

// dmx LIBRARY
#include <ESPDMX.h>
DMXESPSerial dmx;

// **** Define the WiFi name and password ****
#define WIFICONF_INSKETCH

#define WiFi_SSID               "xxxxxxx"
#define WiFi_Password           "yyyyyyyy" 

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

// Include framework code and libraries
#include <ESP8266WiFi.h>
#include <EEPROM.h>

/*** All configuration includes should be above this line ***/
#include "Souliss.h"
 
// Include framework code and libraries
//#include <ESP8266WiFi.h>
#include <EEPROM.h>
#include "Souliss.h"

#define LEDCONTROL_A1          0               // This is the memory slot for the logic that handle the light - eethoek
#define LEDRED_A1              1               // This is the memory slot for the logic that handle the light
#define LEDGREEN_A1            2               // This is the memory slot for the logic that handle the light
#define LEDBLUE_A1             3               // This is the memory slot for the logic that handle the light

#define LEDCONTROL_A2          5               // This is the memory slot for the logic that handle the light - zitthoek
#define LEDRED_A2              6               // This is the memory slot for the logic that handle the light
#define LEDGREEN_A2            7               // This is the memory slot for the logic that handle the light
#define LEDBLUE_A2             8               // This is the memory slot for the logic that handle the light

#define LEDCONTROL_A5          10               // This is the memory slot for the logic that handle the light - leeshoek
#define LEDRED_A5              11               // This is the memory slot for the logic that handle the light
#define LEDGREEN_A5            12               // This is the memory slot for the logic that handle the light
#define LEDBLUE_A5             13               // This is the memory slot for the logic that handle the light



void setup()
{  
    Initialize();

      Serial.begin(9600);  // enkel voor testen programma
      dmx.init(100);
   
  
    Souliss_SetIPAddress(ip_address, subnet_mask, ip_gateway);
    SetAsGateway(myvNet_address);
    
   
    Set_LED_Strip(LEDCONTROL_A1);                  // Set a logic to control a LED strip
    Set_LED_Strip(LEDCONTROL_A2);                  // Set a logic to control a LED strip
    Set_LED_Strip(LEDCONTROL_A5);                  // Set a logic to control a LED strip
   
}

guyc

unread,
Dec 28, 2017, 3:12:37 PM12/28/17
to souliss
problem solved.

Soulissapp deleted and reinstalled


guyc

unread,
Dec 28, 2017, 4:28:18 PM12/28/17
to souliss

Please find the working code and the connections.

hardware connection:

 Nodemcu ESP12 -  RS485 adapter
          3.3 V                 DE
          earth                 RE
          TX(D4)              DI

sketch (maybe it can be optimized) :

/**************************************************************************
    Souliss - RGB LED Strips
   
    Control RGB LED Strips using DMX- controller
 
    Run this code on one of the following boards:
      -  ESP8266 + DMX-drivers
   
***************************************************************************/


// Let the IDE point to the Souliss framework
#include "SoulissFramework.h"

// 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/Gateway_wPersistence.h"
#include "conf/IPBroadcast.h"
#include <ESP8266WiFi.h>


// **** Define the WiFi name and password ****
#define WIFICONF_INSKETCH
#define WiFi_SSID               "xxxxxx"
#define WiFi_Password           "yyyyyy"   

// Include framework code and libraries
//#include <ESP8266WiFi.h>
#include <EEPROM.h>
#include "Souliss.h"

// dmx LIBRARY
#include <ESPDMX.h>
DMXESPSerial dmx;

 uint8_t ip_address[4]  = {192, 168, 0,178};

uint8_t subnet_mask[4] = {255, 255, 255, 0};
uint8_t ip_gateway[4]  = {192, 168,0,1};
#define Gateway_address 178

#define myvNet_address  ip_address[3]
#define myvNet_subnet   0xFF00
#define myvNet_supern   Gateway_address

#define LEDCONTROL_A1          0              
#define LEDRED_A1              1              
#define LEDGREEN_A1            2              
#define LEDBLUE_A1             3              

#define LEDCONTROL_A2          5               
#define LEDRED_A2              6              
#define LEDGREEN_A2            7              
#define LEDBLUE_A2             8              

#define LEDCONTROL_A5          10               
#define LEDRED_A5              11              
#define LEDGREEN_A5            12              
#define LEDBLUE_A5             13              



void setup()
{  
    Initialize();
    Serial.begin(9600);  // enkel voor testen programma

   //DMXSerial.init(DMXController);
      dmx.init(100);

   // Get the IP address from DHCP
   // GetIPAddress();                         

    Souliss_SetIPAddress(ip_address, subnet_mask, ip_gateway);
    SetAsGateway(myvNet_address);            
   
    Set_LED_Strip(LEDCONTROL_A1);                  // Set a logic to control a LED strip
    Set_LED_Strip(LEDCONTROL_A2);                  // Set a logic to control a LED strip
    Set_LED_Strip(LEDCONTROL_A5);                  // Set a logic to control a LED strip
   
}/**************************************************************************
    Souliss - RGB LED Strips
   
    Control RGB LED Strips using DMX- controller
 
    Run this code on one of the following boards:
      -  ESP8266 + DMX-drivers
   
***************************************************************************/


// Let the IDE point to the Souliss framework
#include "SoulissFramework.h"

// 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/Gateway_wPersistence.h"
#include "conf/IPBroadcast.h"
#include <ESP8266WiFi.h>


// **** Define the WiFi name and password ****
#define WIFICONF_INSKETCH
#define WiFi_SSID               "xxxxxx"
#define WiFi_Password           "yyyyyy"   

// Include framework code and libraries
//#include <ESP8266WiFi.h>
#include <EEPROM.h>
#include "Souliss.h"

// dmx LIBRARY
#include <ESPDMX.h>
DMXESPSerial dmx;

 uint8_t ip_address[4]  = {192, 168, 0,178};

uint8_t subnet_mask[4] = {255, 255, 255, 0};
uint8_t ip_gateway[4]  = {192, 168,0,1};
#define Gateway_address 178

#define myvNet_address  ip_address[3]
#define myvNet_subnet   0xFF00
#define myvNet_supern   Gateway_address

#define LEDCONTROL_A1          0              
#define LEDRED_A1              1              
#define LEDGREEN_A1            2              
#define LEDBLUE_A1             3              

#define LEDCONTROL_A2          5               
#define LEDRED_A2              6              
#define LEDGREEN_A2            7              
#define LEDBLUE_A2             8              

#define LEDCONTROL_A5          10               
#define LEDRED_A5              11              
#define LEDGREEN_A5            12              
#define LEDBLUE_A5             13              



void setup()
{  
    Initialize();
    Serial.begin(9600);  // enkel voor testen programma

   //DMXSerial.init(DMXController);
      dmx.init(100);

   // Get the IP address from DHCP
   // GetIPAddress();                         

    Souliss_SetIPAddress(ip_address, subnet_mask, ip_gateway);
    SetAsGateway(myvNet_address);            
   
    Set_LED_Strip(LEDCONTROL_A1);                  // Set a logic to control a LED strip
    Set_LED_Strip(LEDCONTROL_A2);                  // Set a logic to control a LED strip
    Set_LED_Strip(LEDCONTROL_A5);                  // Set a logic to control a LED strip
   
}
void loop()
{
    // Here we start to play
    EXECUTEFAST() {                    
        UPDATEFAST();  

        // Execute the code every 1 time_base_fast     
        FAST_10ms() {
                   
            // Execute the logic that handle the LED
            Logic_LED_Strip(LEDCONTROL_A1);
            Logic_LED_Strip(LEDCONTROL_A2);
            Logic_LED_Strip(LEDCONTROL_A5);


    //
      dmx.write(1, mOutput(LEDRED_A1+1));
      dmx.write(2, mOutput(LEDGREEN_A1+2));
      dmx.write(3, mOutput(LEDBLUE_A1+3));

      dmx.write(4, mOutput(LEDRED_A2+1));
      dmx.write(5, mOutput(LEDGREEN_A2+2));
      dmx.write(6, mOutput(LEDBLUE_A2+3));

      dmx.write(7, mOutput(LEDRED_A5+1));
      dmx.write(8, mOutput(LEDGREEN_A5+2));
      dmx.write(9, mOutput(LEDBLUE_A5+3));
    dmx.update();
     
 

            // Just process communication as fast as the logics
            ProcessCommunication();
        }

    // Process the other Gateway stuffs
    FAST_GatewayComms();
         
    }
    EXECUTESLOW()
    {  
        UPDATESLOW();

        SLOW_10s()  {
       
            // The timer handle timed-on states
            Timer_LED_Strip(LEDCONTROL_A1);
            Timer_LED_Strip(LEDCONTROL_A2);
            Timer_LED_Strip(LEDCONTROL_A5);
        }    
    }   
}
void loop()
{
    // Here we start to play
    EXECUTEFAST() {                    
        UPDATEFAST();  

        // Execute the code every 1 time_base_fast     
        FAST_10ms() {
                   
            // Execute the logic that handle the LED
            Logic_LED_Strip(LEDCONTROL_A1);
            Logic_LED_Strip(LEDCONTROL_A2);
            Logic_LED_Strip(LEDCONTROL_A5);


    //
      dmx.write(1, mOutput(LEDRED_A1+1));
      dmx.write(2, mOutput(LEDGREEN_A1+2));
      dmx.write(3, mOutput(LEDBLUE_A1+3));

      dmx.write(4, mOutput(LEDRED_A2+1));
      dmx.write(5, mOutput(LEDGREEN_A2+2));
      dmx.write(6, mOutput(LEDBLUE_A2+3));

      dmx.write(7, mOutput(LEDRED_A5+1));
      dmx.write(8, mOutput(LEDGREEN_A5+2));
      dmx.write(9, mOutput(LEDBLUE_A5+3));
    dmx.update();
     
 

            // Just process communication as fast as the logics
            ProcessCommunication();
        }

    // Process the other Gateway stuffs
    FAST_GatewayComms();
         
    }
    EXECUTESLOW()
    {  
        UPDATESLOW();

        SLOW_10s()  {
       
            // The timer handle timed-on states
            Timer_LED_Strip(LEDCONTROL_A1);
            Timer_LED_Strip(LEDCONTROL_A2);
            Timer_LED_Strip(LEDCONTROL_A5);
        }    
    }   
}




Reply all
Reply to author
Forward
0 new messages