RGBWW Plugin development questions
Moderators: grovkillen, Stuntteam, TD-er
RGBWW Plugin development questions
Hi,
I am developing a RGBWW plugin at the moment. Normally sensor values are send periodically to controller. I would like to trigger this function to update the controller in realtime if a value has changed. Is there way to do that?
Edit: solution found: sendData(event)
I am developing a RGBWW plugin at the moment. Normally sensor values are send periodically to controller. I would like to trigger this function to update the controller in realtime if a value has changed. Is there way to do that?
Edit: solution found: sendData(event)
Last edited by dev0 on 12 Dec 2016, 08:41, edited 1 time in total.
Re: RGBWW Plugin development questions
Next question
I found a strange behavior if I define more than 4 values names:
- if I define 5 values names than the fifth value will not be saved on device web page.
- if I defnie 6 or more values names and try to save on device web page than ESPEasy hangs immediately and reboots after a few seconds.
Code looks like this:
Tested with R128, R147
Is it a bug or are only 4 values supported?
Edit: I think I need a new Device[deviceCount].VType SENSOR_TYPE_OCTA to submit 8 Values. Right?
Thanks in advance.

I found a strange behavior if I define more than 4 values names:
- if I define 5 values names than the fifth value will not be saved on device web page.
- if I defnie 6 or more values names and try to save on device web page than ESPEasy hangs immediately and reboots after a few seconds.
Code looks like this:
Code: Select all
#define PLUGIN_123
#define PLUGIN_ID_123 123
#define PLUGIN_NAME_123 "RGBWW"
#define PLUGIN_VALUENAME1_123 "rgb"
#define PLUGIN_VALUENAME2_123 "ct"
#define PLUGIN_VALUENAME3_123 "bri"
#define PLUGIN_VALUENAME4_123 "colormode"
#define PLUGIN_VALUENAME5_123 "state"
...
case PLUGIN_DEVICE_ADD:
{
Device[++deviceCount].Number = PLUGIN_ID_123;
Device[deviceCount].Type = DEVICE_TYPE_DUMMY;
Device[deviceCount].VType = SENSOR_TYPE_QUAD;
Device[deviceCount].ValueCount = 5;
Device[deviceCount].SendDataOption = true;
...
case PLUGIN_GET_DEVICEVALUENAMES:
{
strcpy_P(ExtraTaskSettings.TaskDeviceValueNames[0], PSTR(PLUGIN_VALUENAME1_123));
strcpy_P(ExtraTaskSettings.TaskDeviceValueNames[1], PSTR(PLUGIN_VALUENAME2_123));
strcpy_P(ExtraTaskSettings.TaskDeviceValueNames[2], PSTR(PLUGIN_VALUENAME3_123));
strcpy_P(ExtraTaskSettings.TaskDeviceValueNames[3], PSTR(PLUGIN_VALUENAME4_123));
strcpy_P(ExtraTaskSettings.TaskDeviceValueNames[4], PSTR(PLUGIN_VALUENAME5_123));
break;
}
Is it a bug or are only 4 values supported?
Edit: I think I need a new Device[deviceCount].VType SENSOR_TYPE_OCTA to submit 8 Values. Right?
Thanks in advance.
Re: RGBWW Plugin development questions
I would like to request to extend ESPEasy with two options:
1. an additional Device[x].VType with a value count of up to 8 => SENSOR_TYPE_OCTA
2. a way to send strings to the controller, not only floats.
Application use case:
1. a rgbww device with multiple color modes (rgb, ct, hsv) has to report more than 4 values to let the controller know the current state.
2. to send a rgb value to the controller in hex representation because this is the standard on all controllers I know. Otherwise all supported controller have to decode it and the such plugins would not work out of the box.
Is it possible to expand ESPEasy in this direction (after feature freeze for the next stable release) ?
1. an additional Device[x].VType with a value count of up to 8 => SENSOR_TYPE_OCTA
2. a way to send strings to the controller, not only floats.
Application use case:
1. a rgbww device with multiple color modes (rgb, ct, hsv) has to report more than 4 values to let the controller know the current state.
2. to send a rgb value to the controller in hex representation because this is the standard on all controllers I know. Otherwise all supported controller have to decode it and the such plugins would not work out of the box.
Is it possible to expand ESPEasy in this direction (after feature freeze for the next stable release) ?
Re: RGBWW Plugin development questions
hi dev0
i was thinking (and working a bit) on some similar option.
with a dummy item i could have an extra device for addition variable.
togeter with some rules you could store and use them.
http://www.letscontrolit.com/wiki/index ... mmy_Device
RGBWW is a challenge.
any ideas to create a RGB first and then expand to RGBW and RGBWW (H801)
Even an W only could be usefull when you want to dim and toggle a led with a button input?
i would love to help.
Currently i use an stable OpenHAB MQTT setup.
If it is ready, would you mind sharing? https://github.com/ESP8266nu/ESPEasyPluginPlayground
i was thinking (and working a bit) on some similar option.
with a dummy item i could have an extra device for addition variable.
togeter with some rules you could store and use them.
http://www.letscontrolit.com/wiki/index ... mmy_Device
RGBWW is a challenge.
any ideas to create a RGB first and then expand to RGBW and RGBWW (H801)
Even an W only could be usefull when you want to dim and toggle a led with a button input?
i would love to help.
Currently i use an stable OpenHAB MQTT setup.
If it is ready, would you mind sharing? https://github.com/ESP8266nu/ESPEasyPluginPlayground
Re: RGBWW Plugin development questions
I also had the idea with an additional (dummy) device but my intention is to develop an esay solution that fits seamlessly with ESPEasy.
At the moment the plugin sends all set parameters via http response in JSON Format like other plugins do if http is used. But this is only a workaround. It will be better to have the possibility to send via ESPEasy's sendData(event) function. This is already working but with the limitation of 4 values (min. 5 required) and missing option to send 'rgb values' like '00FFAA'.
I have to do some fine tuning regarding fading timer. After that I will publish the version to my github account (ddtlabs), first.
It would be nice if an ESPEasy developer could say something about the requested extension.
At the moment the plugin sends all set parameters via http response in JSON Format like other plugins do if http is used. But this is only a workaround. It will be better to have the possibility to send via ESPEasy's sendData(event) function. This is already working but with the limitation of 4 values (min. 5 required) and missing option to send 'rgb values' like '00FFAA'.
I have to do some fine tuning regarding fading timer. After that I will publish the version to my github account (ddtlabs), first.
It would be nice if an ESPEasy developer could say something about the requested extension.
Re: RGBWW Plugin development questions
A first public draft can be found here: https://github.com/ddtlabs/ESPEasy-Plugin-Lightsrwest wrote: If it is ready, would you mind sharing?
Due to limitations described above there is no feedback via controller plugin at the moment, just a custom JSON response to the http requests. The basic light functions should be given.
Re: RGBWW Plugin development questions
sorry for my dombo question.
Only can i or can i not control a rgbw strip, with easpeasy?
Only can i or can i not control a rgbw strip, with easpeasy?
Re: RGBWW Plugin development questions
Yes, you can control RGB, RGBW and RGBWW lights with my plugin.
Re: RGBWW Plugin development questions
Please tell me how.
Re: RGBWW Plugin development questions
Command description can be found on github, too: https://github.com/ddtlabs/ESPEasy-Plugin-Lights
Re: RGBWW Plugin development questions
Interesting piece of work, but i have a question. What kind of hardware do you use? Is it a ready pcb from a firm or is it diy hardware.dev0 wrote:Command description can be found on github, too: https://github.com/ddtlabs/ESPEasy-Plugin-Lights
Is possible to tell what kind of hardware you use for this plugin.
Thanks in advance.
Re: RGBWW Plugin development questions
I use different hardware: DIY with Wemos D1 and cheep Chinese H801 Controllers. Mostly only with warm white and cold white stripes to be able to adjust white color.
Re: RGBWW Plugin development questions
mm i do not understand how this is working..
Do i need to to flash the esp with espeasy?
And then use your plugin?
Or do i need your plugin with arduino ide and then flash?
Do i need to to flash the esp with espeasy?
And then use your plugin?
Or do i need your plugin with arduino ide and then flash?
Re: RGBWW Plugin development questions
For my information, you compile the plugin with esp easy and flashed it in the H801, or do you use the Wemos D1 to send commands to the H801?dev0 wrote:I use different hardware: DIY with Wemos D1 and cheep Chinese H801 Controllers. Mostly only with warm white and cold white stripes to be able to adjust white color.
I compiled the plugin together with ESPEasy R120
Is shows this:
C:\Users\Herman\Desktop\Led dimmer plugin\ESPEasy\_P123_LIGHTS.ino: In function 'boolean Plugin_123(byte, EventStruct*, String&)':
_P123_LIGHTS:88: error: 'SENSOR_TYPE_QUAD' was not declared in this scope
Device[deviceCount].VType = SENSOR_TYPE_QUAD;
What to do?
Re: RGBWW Plugin development questions
You have to comple with ESPEasy R124 at least. See __ReleaseNotes.ino
You can flash it on a H801 or any other ESP8266 device to which your leds are connected to.ManS-H wrote: For my information, you compile the plugin with esp easy and flashed it in the H801, or do you use the Wemos D1 to send commands to the H801?
Re: RGBWW Plugin development questions
dev0, ok i used the ESPEasy_R147_RC8 file, problem solved.dev0 wrote:You have to comple with ESPEasy R124 at least. See __ReleaseNotes.ino
You can flash it on a H801 or any other ESP8266 device to which your leds are connected to.ManS-H wrote: For my information, you compile the plugin with esp easy and flashed it in the H801, or do you use the Wemos D1 to send commands to the H801?
Only two questions:
Are those settings correct for flashing?
Setting for the H801: Flashsize "1M (64k SPIFFS)"
Setting for WeMos D1 mini: Flashsize "4M (1M SPIFFS)"
Re: RGBWW Plugin development questions
512k/64k for the H801
Re: RGBWW Plugin development questions
Compiling ESPEasy_R147_RC8 with this settings i see this:dev0 wrote:512k/64k for the H801
Sketch uses 427,305 bytes (98%) of program storage space. Maximum is 434,160 bytes.
Global variables use 50,012 bytes (61%) of dynamic memory, leaving 31,908 bytes for local variables. Maximum is 81,920 bytes.
When i used it together with your file i see this:
Sketch uses 440,605 bytes (101%) of program storage space. Maximum is 434,160 bytes.
Global variables use 50,656 bytes (61%) of dynamic memory, leaving 31,264 bytes for local variables. Maximum is 81,920 bytes.
processing.app.debug.RunnerException: Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.
at cc.arduino.Compiler.size(Compiler.java:335)
at cc.arduino.Compiler.build(Compiler.java:159)
at processing.app.SketchController.build(SketchController.java:641)
at processing.app.Editor$BuildHandler.run(Editor.java:1782)
at java.lang.Thread.run(Thread.java:745)
Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.
What do i wrong? and what to do to solve this problem.
Hope you can help me.
Re: RGBWW Plugin development questions
There is not enough space, you have to remove some unused plugins.ManS-H wrote:Sketch too big;
Please keep in mind that this is my support thread to request two new ESPEasy features/options and not a support thread for my plugin (that is still in development).
Re: RGBWW Plugin development questions
dev0, problem solved, i can create a binfile so the next step is upgrade the H801.dev0 wrote:There is not enough space, you have to remove some unused plugins.ManS-H wrote:Sketch too big;
Please keep in mind that this is my support thread to request two new ESPEasy features/options and not a support thread for my plugin (that is still in development).
Re: RGBWW Plugin development questions
dev0, sorry to bother you but i would love to get your plugin working. I tried to compile 147_RC8 8, but with you plugin loaded i can´t get it to work.
In
ESPEasy.ino sketch i changed #define FLASH_EEPROM_SIZE from 4096 to 512
Arduino Settings:
Board: Generic ESP8266 Module
Flash Mode: DIO
Flash Frequency: 40MHZ
CPU Frequency: 80 MHZ
Flash Size: 512 (64K SPIFFS)
Debug port: Disabled
Debug Level: none
Reset Method: ck
Upload Speed: 115200
Port: COM5
Please give us a hint how to setup the board with your plugin. A precompiled image would also help.
Having said this i like to mention that i love your idea to develop a plugin for h801 mqtt rgb control and it would be a pleasure to me to give you a feedback how it works.
Sorry for hijacking your thread
In
ESPEasy.ino sketch i changed #define FLASH_EEPROM_SIZE from 4096 to 512
Arduino Settings:
Board: Generic ESP8266 Module
Flash Mode: DIO
Flash Frequency: 40MHZ
CPU Frequency: 80 MHZ
Flash Size: 512 (64K SPIFFS)
Debug port: Disabled
Debug Level: none
Reset Method: ck
Upload Speed: 115200
Port: COM5
Please give us a hint how to setup the board with your plugin. A precompiled image would also help.
Having said this i like to mention that i love your idea to develop a plugin for h801 mqtt rgb control and it would be a pleasure to me to give you a feedback how it works.
Sorry for hijacking your thread

Re: RGBWW Plugin development questions
This is not needed. You have to set Flash Size tp 512k/64k in Arduino IDE only. Copy the plugin, remove 2-3 unused Plugins, compile.sledge wrote: ESPEasy.ino sketch i changed #define FLASH_EEPROM_SIZE from 4096 to 512
If there is a compiler error telling you that there is not enough space then remove another plugin. That's all.
Keep in mind that the plugin is not more then a proof of concept at the moment. A setup with only cw/ww stripes will work fine, but all other setups will not show an usable white for example. There is no color correction at all.
Re: RGBWW Plugin development questions
Hello Dev0, that is not correct. The H801 has the same flash chip as the ESP-01, Flash Chip ID: 1327328dev0 wrote:512k/64k for the H801
So you can use 1M (64K SPIFFS) for the H801.
I did it with my H801 and it going perfect.
Re: RGBWW Plugin development questions
I don't think you can know which flash chip is used on my hardware. May be there are other versions.ManS-H wrote:that is not correct.dev0 wrote:512k/64k for the H801
-
- Normal user
- Posts: 11
- Joined: 28 Nov 2016, 17:12
Re: RGBWW Plugin development questions
You are not able to flash or you don't get it working? I can flash but the RGB commands show no effect on a simple RGB stripe (R,G,B, VCC)sledge wrote:dev0, sorry to bother you but i would love to get your plugin working. I tried to compile 147_RC8 8, but with you plugin loaded i can´t get it to work:
Re: RGBWW Plugin development questions
Thx Dev0 it worked for me. Now we talk 
To keep your thread clean i started a new one with a little documentation how to get your plugin running. viewtopic.php?f=2&t=2582

To keep your thread clean i started a new one with a little documentation how to get your plugin running. viewtopic.php?f=2&t=2582
-
- Normal user
- Posts: 12
- Joined: 08 May 2017, 09:51
Re: RGBWW Plugin development questions
Is it possible to send MQTT messages to control the RGB functionality? I so, may I have an example of how to set this up (topic and payload syntax).
Thanks
Thanks
Re: RGBWW Plugin development questions
MQTT should be possible, as with all other plugins.
Re: RGBWW Plugin development questions
Is this plugin perhaps working??
Like to have a rgbw controller based on Espeasy..
Or are there @this time other espeasy rgbw controllers that are working with domoticz?
Like to have a rgbw controller based on Espeasy..
Or are there @this time other espeasy rgbw controllers that are working with domoticz?
Who is online
Users browsing this forum: No registered users and 20 guests