Last modified: 28.12.2018

started: 30.11.2018

My goal is to be able to control a addressable light strip out side my home using VoffCon to handle the commands the to it via internet.

The type of the light strip I will be using is WS2811 5V WS2801 addressable and to control the strip I will be using esp2866 development board

Component needed

I will be using these components to make the prototype.

  • NodeMcu development module
  • 100 Watts 5V Power supply
  • Addressable WS2811 5V WS2801, water-proof light strip
NodeMcu development module image 5V Power supply, 100 Watts image Light-strip image

The VoffCon Code

Last year I created this kind of project, but now I am going to rewrite it now. I will probably be using the same VoffCon Control and VoffCon Control Card. Below are the old VoffCon stuff. They will change a little but not much.


The VoffCon control Card:

    // Comming soon

VoffCon Control javascript class:

//comming soon 

VoffCon Control html template:

//comming soon 


The Device Code

The program for the device is made up from five files, christmasStrip.ino, passivestrip.h, passivestrip.cpp, ServerLib.h and ServerLib.cpp.


christmasStrip.ino is this the main program running on the device




passivestrip.h This is the header file for controlling the strip




passivestrip.cpp This is the implementation file for controlling the strip




ServerLib.h This is the header file for device helper classes




ServerLib.cpp This is the implementation file for device helper classes



Adding this project to your VoffCon server

In order for you to be able to use this project, VoffCon needs to be installed and you will need to be logged in to it.

Click here to download all the files shown above.

After downloading and unzipping you will need to create a device in VoffCon, get it's Id and add it to the Control Card and the device code which will be running on the device.

Registering a new Device in VoffCon
  1. Browse to VoffCon
  2. In main menu click Devices→Register a new Device
  3. Give it a name
  4. The type must be NodeMcu module with ESP2866 on board
  5. Describe it a little
  6. Describe it a little
  7. Make the url something like "http://192.168.1.19:5100"
  8. Press Submit
  9. Copy the device ID to use later.
Importing the control
  1. Browse to VoffCon
  2. In main menu click Controls→Upload a control
  3. Click the "Choose File" button
  4. Browse to where you unzipped the file christmasStripPack.zip
  5. Select the file "ChristmasStripCtrl.voffcon.ctrl" and click Open
  6. Click the "Upload control" button
  7. Click Save control
Importing the Control Card
  1. Browse VoffCon
  2. In main menu click Cards→Upload a card
  3. Click the "Choose File" button
  4. Browse to where you unzipped the file christmasStripPack.zip
  5. Select the file "christmasStrip_south.voffcon.card" and click Open
  6. Click the "Upload control" button
  7. Click Save Card

Change line 91 in the "christmasStrip south" card to use the device Id of the device you created.

Last thing to do is to is to open the file christmasStrip.ino and change three lines in the code line number 56 which is the device Id (Ids in lines christmasStrip.ino:56 and christmasStrip south:91 will need to match), line 59 which is the name of your wifi access point and line 62 which is the password to you wifi access point.

After all that you can safely delete files "christmasStrip_south.voffcon.card" and "ChristmasStripCtrl.voffcon.ctrl"

Now open the unzipped folder in Arduino IDE and upload the devcice program to the device. The device must be NodeMcu.