Add Lights Plugin in EspEasy Compiling Help needed
Moderators: grovkillen, Stuntteam, TD-er
Add Lights Plugin in EspEasy Compiling Help needed
Hallo Professionals,
i want to control a rgb stripe with ESPEasy , Thats why i want to add the "Lights" Plugin in my Firmware. https://github.com/ddtlabs/ESPEasy-Plugin-Lights
I read the Instructions here: https://www.letscontrolit.com/wiki/inde ... are_Upload
but whatever i done, there is a Error. The Compiling Process failed. Should i take a stable version of ESPEasy or a Nightly Build?
Is it right to copy the "Lights.ino" into the ESPEasy Folder and add a line in the "Custom.h" file like that:
"#define USES_C123 // Lights" ?
With the ESPEasy-mega-20201227 Build iv got an Error relatet to "/lwip/etharp.h" File. Because it is no present. LWIP is missing in the libs. What could i do?
Is there a better way to control a RGBW Stripe with ESPEasy and FHEM ?
I would be happy, if i get some help here.
(And sorry for my bad english, i hope everybody understands me...)
i want to control a rgb stripe with ESPEasy , Thats why i want to add the "Lights" Plugin in my Firmware. https://github.com/ddtlabs/ESPEasy-Plugin-Lights
I read the Instructions here: https://www.letscontrolit.com/wiki/inde ... are_Upload
but whatever i done, there is a Error. The Compiling Process failed. Should i take a stable version of ESPEasy or a Nightly Build?
Is it right to copy the "Lights.ino" into the ESPEasy Folder and add a line in the "Custom.h" file like that:
"#define USES_C123 // Lights" ?
With the ESPEasy-mega-20201227 Build iv got an Error relatet to "/lwip/etharp.h" File. Because it is no present. LWIP is missing in the libs. What could i do?
Is there a better way to control a RGBW Stripe with ESPEasy and FHEM ?
I would be happy, if i get some help here.
(And sorry for my bad english, i hope everybody understands me...)
Re: Add Lights Plugin in EspEasy Compiling Help needed
Looks like you are looking for the NeoPixel plugin? (I can't detect the required hardware from that, rather old, plugin code) but it uses a bit different commands.
NeoPixel is already included as Plugin 038 "Output - NeoPixel (Basic)" in the regular ESPEasy builds that have 'normal', 'test' or 'display' in their filename. Download from here: https://github.com/letscontrolit/ESPEasy/releases
The instructions you found are a bit outdated, as all documentation is to be moved to ReadTheDocs (where the source is maintained in the normal github repo, instead of on a separate wiki), so the most recent instructions are here:
PlatformIO and VSCode (or Atom): https://espeasy.readthedocs.io/en/lates ... ormIO.html
ArduinoIDE (deprecated, only use that if you have a lot of experience with ArduinoIDE) here (again: deprecated)
Because that Lights plugin functionality seems to be incorporated into the PlayGround plugin P124, it may be better to see if that better fits you use-case, might P038 (NeoPixel) not meet your requirements.
Compiling stuff from the PlayGround can be hard, because a lot of improvements to the plugin code has been done in the main repository, as that is being worked on towards a 'release' state. The PlayGround code is not kept up to date.
NeoPixel is already included as Plugin 038 "Output - NeoPixel (Basic)" in the regular ESPEasy builds that have 'normal', 'test' or 'display' in their filename. Download from here: https://github.com/letscontrolit/ESPEasy/releases
The instructions you found are a bit outdated, as all documentation is to be moved to ReadTheDocs (where the source is maintained in the normal github repo, instead of on a separate wiki), so the most recent instructions are here:
PlatformIO and VSCode (or Atom): https://espeasy.readthedocs.io/en/lates ... ormIO.html
ArduinoIDE (deprecated, only use that if you have a lot of experience with ArduinoIDE) here (again: deprecated)
Because that Lights plugin functionality seems to be incorporated into the PlayGround plugin P124, it may be better to see if that better fits you use-case, might P038 (NeoPixel) not meet your requirements.
Compiling stuff from the PlayGround can be hard, because a lot of improvements to the plugin code has been done in the main repository, as that is being worked on towards a 'release' state. The PlayGround code is not kept up to date.
/Ton (PayPal.me)
Re: Add Lights Plugin in EspEasy Compiling Help needed
Many Thanks!
Compiling works fine now with Visual Studio Code.
Now i find out how to put in the Lights Plugin.
EDIT: This works not how i thought. VSC tolds me to convert the .ino File manually to cpp. Thats to much for my skills...
I will control a normal rgb Stripe. Neopixels are Stripes with integrated Contollers.
I want to use an nodeMCU for experimental Use.
Compiling works fine now with Visual Studio Code.
Now i find out how to put in the Lights Plugin.
EDIT: This works not how i thought. VSC tolds me to convert the .ino File manually to cpp. Thats to much for my skills...
I will control a normal rgb Stripe. Neopixels are Stripes with integrated Contollers.
I want to use an nodeMCU for experimental Use.
Re: Add Lights Plugin in EspEasy Compiling Help needed
Just ignore that message/suggestion, you need the .ino file for plugins, other stuff can be .cpp/.h, but not the plugins.
/Ton (PayPal.me)
Re: Add Lights Plugin in EspEasy Compiling Help needed
ok, then the Plugin ist incompatible. iv got 104 Errors:
examples :
identifier "Settings" is undefined
pointer to incomplete class type is not allowed
identifier "WebServer" is undefined
identifier "PLUGIN_TEN_PER_SECOND" is undefined
I cant copy all Errors out of the Error Message Box. Only one by one?
Is there another Chance to control a normal RGBW Stripe? Is an old Hue Stripe from Philips...
Thank You!
examples :
identifier "Settings" is undefined
pointer to incomplete class type is not allowed
identifier "WebServer" is undefined
identifier "PLUGIN_TEN_PER_SECOND" is undefined
I cant copy all Errors out of the Error Message Box. Only one by one?
Is there another Chance to control a normal RGBW Stripe? Is an old Hue Stripe from Philips...
Thank You!
Re: Add Lights Plugin in EspEasy Compiling Help needed
Start by replacing with
then replace by
That should work away most of the compiler errors.
Code: Select all
Device[deviceCount].VType = SENSOR_TYPE_QUAD;
Code: Select all
Device[deviceCount].VType = Sensor_VType::SENSOR_TYPE_QUAD;
Code: Select all
WebServer
Code: Select all
web_server
That should work away most of the compiler errors.
/Ton (PayPal.me)
Re: Add Lights Plugin in EspEasy Compiling Help needed
Thanks for helping!
I figured out, that i need to set "#include_Plugin_Helper.h" in beginnig of the Lights.ino sketch. All other Plugins have it so.
Now i changed the Syntax Differences as you advised me.
After that, i need to have the "Ticker" Library, because there is a line "#include Ticker.h"in the Sketch.
Every Time the Compiling Process runs a little bit longer.
Now i stuck in the Ticker.cpp.
Here are 3 includes missing:
#include "c_types.h"
#include "eagle_soc.h"
#include "osapi.h"
And in Ticker.h
#include <functional>
What Library is this now? My Brain is overheating....
I figured out, that i need to set "#include_Plugin_Helper.h" in beginnig of the Lights.ino sketch. All other Plugins have it so.
Now i changed the Syntax Differences as you advised me.
After that, i need to have the "Ticker" Library, because there is a line "#include Ticker.h"in the Sketch.
Every Time the Compiling Process runs a little bit longer.
Now i stuck in the Ticker.cpp.
Here are 3 includes missing:
#include "c_types.h"
#include "eagle_soc.h"
#include "osapi.h"
And in Ticker.h
#include <functional>
What Library is this now? My Brain is overheating....
Re: Add Lights Plugin in EspEasy Compiling Help needed
Why does it need the Ticker library?
We do have a number of timer options that can be used to for example perform the next fade step as it tries to do here:
https://github.com/ddtlabs/ESPEasy-Plug ... #L274-L278
So what you can do for now, is just disable all lines in the code using Plugin_123_Ticker by putting two slashes (//) in front of it.
Like this:
Do it also for the include for this Ticker library.
Then you can at least continue with the compile for now and you don't have the fade option.
We do have a number of timer options that can be used to for example perform the next fade step as it tries to do here:
https://github.com/ddtlabs/ESPEasy-Plug ... #L274-L278
Code: Select all
// disable Timer if defaultFadingTime < 0
if (Plugin_123_defaultFadingTime >= 0) {
log += F("FADING ");
Plugin_123_Ticker.attach_ms(20, Plugin_123_FadingTimer);
}
Like this:
Code: Select all
// disable Timer if defaultFadingTime < 0
if (Plugin_123_defaultFadingTime >= 0) {
log += F("FADING ");
// Plugin_123_Ticker.attach_ms(20, Plugin_123_FadingTimer);
}
Then you can at least continue with the compile for now and you don't have the fade option.
Re: Add Lights Plugin in EspEasy Compiling Help needed
If you need the fading, we can help you to call this function in the PLUGIN_FIFTY_PER_SECOND loop.
Re: Add Lights Plugin in EspEasy Compiling Help needed
Ok i set the lines as comment.
Now its hanging here: Line 455
Plugin_123_SendStatus(event->Source);
if (Plugin_123_debug) Plugin_123_dumpValues();<
Error:
....../ESPEasy-mega-20201227/src/_P123_LIGHTS.ino:455:44: error: cannot convert 'EventValueSource::Enum' to 'byte {aka unsigned char}' for argument '1' to 'void Plugin_123_SendStatus(byte)'
and :
ESPEasy-mega-20201227/src/_P123_LIGHTS.ino:628:81: error: 'analogWrite' was not declared in this scope // this is related to the missing Ticker Library?
Should i comment out this Lines to?
Now its hanging here: Line 455
Plugin_123_SendStatus(event->Source);
if (Plugin_123_debug) Plugin_123_dumpValues();<
Error:
....../ESPEasy-mega-20201227/src/_P123_LIGHTS.ino:455:44: error: cannot convert 'EventValueSource::Enum' to 'byte {aka unsigned char}' for argument '1' to 'void Plugin_123_SendStatus(byte)'
and :
ESPEasy-mega-20201227/src/_P123_LIGHTS.ino:628:81: error: 'analogWrite' was not declared in this scope // this is related to the missing Ticker Library?
Should i comment out this Lines to?
Re: Add Lights Plugin in EspEasy Compiling Help needed
I think this is going to be somewhat of an endless exercise as the code of that plugin is over 4 years old, so I think there will be other things that may need additional includes or small prefix changes.
So I can try to compile it later this evening, to see what else is needed.
But it seems quite a lot of it may need a change to be compliant with the current coding standard.
So I can try to compile it later this evening, to see what else is needed.
But it seems quite a lot of it may need a change to be compliant with the current coding standard.
Re: Add Lights Plugin in EspEasy Compiling Help needed
Ok no hurry here. i have time. Its only for learning.
If i comment out these Lines, the Compiling is successfull...
Yes the Plugin is old. I wondering, that there is no other Solution for NodeMCU to control an RGBW Stripe, except Neopixels with FHEM.
May be I not knowing this...
Thank You!
If i comment out these Lines, the Compiling is successfull...
Yes the Plugin is old. I wondering, that there is no other Solution for NodeMCU to control an RGBW Stripe, except Neopixels with FHEM.
May be I not knowing this...
Thank You!
Re: Add Lights Plugin in EspEasy Compiling Help needed
Iv loaded the ESPEasy Version "Stable 2.0" from 2018. (https://github.com/letscontrolit/ESPEasy/tree/v2.0)
This should be can compiled with the Arduino IDE.
Installed Arduino 6.1.12 and ESP8266 Board Version 2.3.0.
All runs fine while compiling. Only one line makes a Problem and i dont understand why:
In Lights.ino Line 243 : (https://github.com/ddtlabs/ESPEasy-Plugin-Lights)
Plugin_123_options.sendData_enabled = Settings.TaskDeviceSendData[event->TaskIndex];
Error:
invalid conversion from 'boolean* {aka unsigned char*}' to 'boolean {aka unsigned char}' [-fpermissive]
From from 'boolean* {aka unsigned char*}' to 'boolean {aka unsigned char}??? Is it not the same??
If i marked out this line, compiling is successfully.
And it work to in FHEM !???
This should be can compiled with the Arduino IDE.
Installed Arduino 6.1.12 and ESP8266 Board Version 2.3.0.
All runs fine while compiling. Only one line makes a Problem and i dont understand why:
In Lights.ino Line 243 : (https://github.com/ddtlabs/ESPEasy-Plugin-Lights)
Plugin_123_options.sendData_enabled = Settings.TaskDeviceSendData[event->TaskIndex];
Error:
invalid conversion from 'boolean* {aka unsigned char*}' to 'boolean {aka unsigned char}' [-fpermissive]
From from 'boolean* {aka unsigned char*}' to 'boolean {aka unsigned char}??? Is it not the same??
If i marked out this line, compiling is successfully.
And it work to in FHEM !???
Re: Add Lights Plugin in EspEasy Compiling Help needed
Code: Select all
invalid conversion from 'boolean* {aka unsigned char*}' to 'boolean {aka unsigned char}' [-fpermissive]
boolean* is a pointer to a bool. (or actually an unsigned char according to the error, as the "boolean" type does not exist in C++)
boolean (without the asterisk) is a bool value, not a pointer to it.
But to be honest the error here is quite misleading, as it isn't just a matter of a pointer to something, but more like using a wrong way of addressing an item in an array.
Code: Select all
Plugin_123_options.sendData_enabled = Settings.TaskDeviceSendData[event->TaskIndex];
See its definition:
Code: Select all
boolean TaskDeviceSendData[CONTROLLER_MAX][N_TASKS];
I think this code is so old, it even pre-dates the fact ESPEasy does support upto 3 controllers to send data to.
Also the plugin itself does not need to handle it, as ESPEasy's core does it for you.
So I guess it is safe to remove this line.
Re: Add Lights Plugin in EspEasy Compiling Help needed
So far the device has been working properly. I have now connected a BME-280 sensor. That works well too.
Maybe the Lights plug-in can still be adapted for the newer version of ESPEasy?
Thank You for helping here!
Maybe the Lights plug-in can still be adapted for the newer version of ESPEasy?
Thank You for helping here!
Re: Add Lights Plugin in EspEasy Compiling Help needed
I think there are a few possible routes:
- Renovate the code to be more compliant with the regular plugins of ESPEasy and make a pull-request on the ESPEasy repository. You'll have to pick (or ask for) the correct Plugin-ID, as 123 isn't yet to be used
- Place your version of the plugin on the PluginPlayGround (add a pull-request there) and request TD-er to do the code-renovation (duplicate Plugin-ID doesn't really seem to matter)
- Make a PR on the site you got the code from (not sure if that's going to work, it seems abandoned by the owner), and motivate 'm to PR to ESPEasy
- Share your code here and ask if someone can adjust to current standards and do a PR in ESPEasy
As the code is quite old, the renovation part is possibly best to ensure maintainability and stability.
- Renovate the code to be more compliant with the regular plugins of ESPEasy and make a pull-request on the ESPEasy repository. You'll have to pick (or ask for) the correct Plugin-ID, as 123 isn't yet to be used
- Place your version of the plugin on the PluginPlayGround (add a pull-request there) and request TD-er to do the code-renovation (duplicate Plugin-ID doesn't really seem to matter)
- Make a PR on the site you got the code from (not sure if that's going to work, it seems abandoned by the owner), and motivate 'm to PR to ESPEasy
- Share your code here and ask if someone can adjust to current standards and do a PR in ESPEasy
As the code is quite old, the renovation part is possibly best to ensure maintainability and stability.
/Ton (PayPal.me)
Re: Add Lights Plugin in EspEasy Compiling Help needed
Hello Confusius,
I am looking for how to control an RGB stripe with an ESPEasy via FHEM and found this threat.
Does it all work with the Lights plugin or have you found an alternative in the meantime?
Would you provide your image containing ESPEasy and Lights?
Greeting
Jippy
I am looking for how to control an RGB stripe with an ESPEasy via FHEM and found this threat.
Does it all work with the Lights plugin or have you found an alternative in the meantime?
Would you provide your image containing ESPEasy and Lights?
Greeting
Jippy
Re: Add Lights Plugin in EspEasy Compiling Help needed
As said before in this thread, ESPEasy does have support for NeoPixel RGB and RGBW leds, they can also be controlled via MQTT, when using the OpenHAB/HA MQTT controller, as documented for that controller.
The Lights plugin is not available in the regular ESPEasy builds, I suggest to use the NeoPixel plugins as an alternative.
/Ton (PayPal.me)
Re: Add Lights Plugin in EspEasy Compiling Help needed
Hello Ath,
I have always understood that I can use NeoPixel to control the individual LEDs, for example to be able to control a 2812 RGB stripe.
But I have installed a "normal" RGB stripe where all LEDs are addressed together. Can I also use NeoPixel for this?
Greeting
Jippy
I have always understood that I can use NeoPixel to control the individual LEDs, for example to be able to control a 2812 RGB stripe.
But I have installed a "normal" RGB stripe where all LEDs are addressed together. Can I also use NeoPixel for this?
Greeting
Jippy
Re: Add Lights Plugin in EspEasy Compiling Help needed
Well, NeoPixels aren't like those "normal" RGB stripes, so, no, that won't work. The normal RGB stripes need an external power controller to regulate the separate voltages for the R, G and B lines. That's probably what the Lights plugin does, but it's been quite a while since it was last updated, and it's not very clear what exact controller model is to be used.
/Ton (PayPal.me)
Who is online
Users browsing this forum: No registered users and 94 guests