P141 RGB Strip Plugin

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
User avatar
soif
Normal user
Posts: 46
Joined: 20 Feb 2018, 19:11
Location: Solar System
Contact:

Re: P141 RGB Strip Plugin

#11 Post by soif » 03 Mar 2018, 12:47

I think Platform I/o looks very confusing.
I totally agree with you, but this is just a matter of having spent a few hours to be used with it.
A plugin should also work under Arduino.
Yes in an ideal and wonderful world:
- war should not exist,
- and I should be PAID to write code and provide support to other absolutely ungrateful people :shock:
Soif
-----
Want to update ALL your ESP babies OverTheAir, or backup their settings in ONE simple command, + many other cool features.... Adopt EspBuddy

TD-er
Core team member
Posts: 8729
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: P141 RGB Strip Plugin

#12 Post by TD-er » 03 Mar 2018, 19:20

micropet wrote: 03 Mar 2018, 11:47 I think Platform I/o looks very confusing.

A plugin should also work under Arduino.
Problem with the Arduino IDE is that it is quite some work to get all the libraries to the desired version and even then..
Did you try to create a portable install like I suggested earlier (was this thread???) with the libs dir from the ESPeasy sources in the lib dir of the portable install?
That way you'll have all the libraries at hand like they should work. All except for a very few like the Arduino ESP8266 core lib.
That one should you install in Arduino IDE and absolutely make sure you're using version 2.3.0.

r_255
Normal user
Posts: 32
Joined: 20 Nov 2015, 20:42

Re: P141 RGB Strip Plugin

#13 Post by r_255 » 04 Mar 2018, 13:57

soif wrote: 03 Mar 2018, 09:05 There are a little bit efforts to spend to learn Platform I/O : When starting, it looks like a 747 cockpit, but once used to it you will soon definitively forget the Arduino IDE
lol, well i did flight sims in the early days!

I am digging in as i want to compile my own firmware, and you are right it compiles fine on platform i/o but some how the other plugins i use don't
But that's part of the hobby i guess :D

I am doing 2 ways in... http domoticz and mqtt node-red, There for i use the lights and the mi-light plugins. Kind of exotic way of control.

Still did not manage to upload my firmware ota, so it might be i am having 512kb versions or struggle with some other issues. Just have read some more on how to do 1024 64k spiffs.


Mean while it did compile on the arduino 1.8.5 with 2.3 esp8266


WARNING: Category 'LED' in library CHT16K33 LED Matrix Library is not valid. Setting to 'Uncategorized'
WARNING: Category 'Input' in library MechInputs is not valid. Setting to 'Uncategorized'
WARNING: Category 'Input' in library SerialSensors is not valid. Setting to 'Uncategorized'
WARNING: library LiquidCrystal_I2C claims to run on (avr) architecture(s) and may be incompatible with your current board which runs on (esp8266) architecture(s).
In file included from C:\Users\robin\Documents\Arduino\src\ESPEasy\ESPEasy.ino:6:0:

C:\Users\robin\Documents\Arduino\libraries\FastLED-3.1.8/FastLED.h:17:21: note: #pragma message: FastLED version 3.001.008

# pragma message "FastLED version 3.001.008"

^

In file included from C:\Users\robin\Documents\Arduino\libraries\FastLED-3.1.8/FastLED.h:68:0,

from C:\Users\robin\Documents\Arduino\src\ESPEasy\ESPEasy.ino:6:

C:\Users\robin\Documents\Arduino\libraries\FastLED-3.1.8/fastspi.h:110:23: note: #pragma message: No hardware SPI pins defined. All SPI access will default to bitbanged output

# pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged output"

^

Archiving built core (caching) in: C:\Users\_______\AppData\Local\Temp\arduino_cache_421835\core\core_esp8266_esp8266_generic_CpuFrequency_80,FlashFreq_40,FlashMode_dio,UploadSpeed_115200,FlashSize_1M64,ResetMethod_ck,Debug_Disabled,DebugLevel_None_____1d601eb601aa3fffd59bf183f4a6eb20.a
Sketch uses 632201 bytes (65%) of program storage space. Maximum is 958448 bytes.
Global variables use 57132 bytes (69%) of dynamic memory, leaving 24788 bytes for local variables. Maximum is 81920 bytes.


Ill get there..
Thanks !

User avatar
soif
Normal user
Posts: 46
Joined: 20 Feb 2018, 19:11
Location: Solar System
Contact:

Re: P141 RGB Strip Plugin

#14 Post by soif » 05 Mar 2018, 06:13

Fastled related warning from the compiler are normal, and can be ignored.
Sketch uses 632201 bytes (65%) of program storage space. Maximum is 958448 bytes.
Sounds like it has finally compiled fine.

BTW OTA on 1Mb board need to be done in 2 steps, with an intermediate firmware. see the wiki about that. 8-)
Soif
-----
Want to update ALL your ESP babies OverTheAir, or backup their settings in ONE simple command, + many other cool features.... Adopt EspBuddy

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: P141 RGB Strip Plugin

#15 Post by papperone » 05 Mar 2018, 07:22

thanks for the plugin, it was in my to-do list but as no spare time recently I've been postponing so happy to see someone has made it! well done!
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

User avatar
soif
Normal user
Posts: 46
Joined: 20 Feb 2018, 19:11
Location: Solar System
Contact:

Re: P141 RGB Strip Plugin

#16 Post by soif » 05 Mar 2018, 08:30

You're welcome 8-)

As I would like to submit it as a testing plugin to the EspEasy main repo, I would be happy to get some feedback of people having success or bugs.
Soif
-----
Want to update ALL your ESP babies OverTheAir, or backup their settings in ONE simple command, + many other cool features.... Adopt EspBuddy

r_255
Normal user
Posts: 32
Joined: 20 Nov 2015, 20:42

Re: P141 RGB Strip Plugin

#17 Post by r_255 » 07 Mar 2018, 00:41

Hmmz, issue found.... even after uploading thru serial it did not work.
Seems 128k is the size for my 1024mb version.

So it does compile fine on the arduino ide 1.8.5 as long you use the 2.0 version of espeasy. I did clean my libs and espeasy folder and copied the supplied ( esp easy v2) ones before i did compile.
and did run it on the 2.3 version of the esp lib

I am familiar with the fastled errors as i had 8 esp's driving my led matrix on the fastled lib.
thx for the pointers and support ! ill report back after integrating.

1st expierences :
RGB works nice sofar, only got a issue(?) with setting the white light as in RGBW(W)
off seems to set the rgb channels to 0 but does not set the white channel(s) to 0

I got your plugin working allong with the _105 RGBW and _123 Lights plugin, there also seems to be some kind of cross talk between the Lights plugin and yours
as when i give a rgb command as issued in your doc, the light plugin reports back the status in http.


Cheers,
Robin

User avatar
soif
Normal user
Posts: 46
Joined: 20 Feb 2018, 19:11
Location: Solar System
Contact:

Re: P141 RGB Strip Plugin

#18 Post by soif » 10 Mar 2018, 11:44

Hi Robin, thanks for the feedback
So it does compile fine on the arduino ide 1.8.5 as long you use the 2.0 version of espeasy
Happy to learn it... 8-) :roll:
RGB works nice sofar, only got a issue(?) with setting the white light as in RGBW(W)
As stated in the plugin comments, W(W) channels (while they are reserved) are not already coded, because FastLed does not currently implement it, and because i have NO RGBWW strip to make tests, but I would welcome a PR of someone willing to add the code to support it correctly.

I got your plugin working allong with the _105 RGBW and _123 Lights plugin, there also seems to be some kind of cross talk between the Lights plugin and yours
It is not supposed to work with other ESPEasy PLayground lights plugins, especially if they use the SAME web commands : When any those plugins would be added to the official ESPEasy repo, the maintainers would have to tell each plugins author what command naming convention to use, in order to avoid conflicts.
But after looking at the source code of the 105 and 123 plugins, i don't even see any common Web commands, :shock:
Soif
-----
Want to update ALL your ESP babies OverTheAir, or backup their settings in ONE simple command, + many other cool features.... Adopt EspBuddy

r_255
Normal user
Posts: 32
Joined: 20 Nov 2015, 20:42

Re: P141 RGB Strip Plugin

#19 Post by r_255 » 10 Mar 2018, 13:29

Well i am digging into your plugin just to understand what and how its working. Some how when the esp64 gets released i might write my own code :D .
I did understand it as rgbw(w) and not as rgbw, but that's the way you read it i guess.

The code is very clear written, at least for me as a non programmer.
I did find that you only push rgb values in the code so i did learn something in the end.

I did a quick test in node red with the ui components, and h_rgb, connected all values to a slider and that worked fine.
not sure if all are needed, but dont we all love options.

Funny thing is it does not give me this reply all the time, and for sure its the light plugin ( based on return values ).

But on

http://192.168.1.198/control?cmd=off

i get this reply, funny enough not all the time. But that is just for the record, nothing important.
I do understand that its not common to use all these espeasy led plugins at once, but i love to push things to their limits.
Besides a few small issues it works pretty good.

188
{
"plugin": "123",
"onOff": "on",
"rgb": "08e600",
"pct": "0",
"ct": "3000",
"colormode": "rgb"
}
{
"plugin": "123",
"onOff": "on",
"rgb": "08e600",
"pct": "0",
"ct": "3000",
"colormode": "rgb"
}
{
"plugin": "123",
"onOff": "on",
"rgb": "08e600",
"pct": "0",
"ct": "3000",
"colormode": "rgb"
}
{
"plugin": "123",
"onOff": "on",
"rgb": "08e600",
"pct": "0",
"ct": "3000",
"colormode": "rgb"
}

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 0
Connection: close
Access-Control-Allow-Origin: *

More than happy to supply you with rgbw stipe/2812b so you get a little bit more back than a feed ( no obligations ), or we wait till the esp64 gets released.... ;)
Thanks for sharing !

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: P141 RGB Strip Plugin

#20 Post by papperone » 10 Mar 2018, 14:37

soif wrote: 10 Mar 2018, 11:44 It is not supposed to work with other ESPEasy PLayground lights plugins, especially if they use the SAME web commands : When any those plugins would be added to the official ESPEasy repo, the maintainers would have to tell each plugins author what command naming convention to use, in order to avoid conflicts.
I do believe each plugin should make his own specific command clearly understandable... In this case "ON" or "OFF" are not clear to which plugin they are sent to and other developpers can easily use the same for complete different purpouses.
You are right there's no "command naming convention" but I then would propose to have all commands of a pluing having specific prefix (e.g. for my 7-digits display all commands are "7dXXX" - infact I do have "7don" and "7doff" to turn on/off the 7 digit display)
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

r_255
Normal user
Posts: 32
Joined: 20 Nov 2015, 20:42

Re: P141 RGB Strip Plugin

#21 Post by r_255 » 10 Mar 2018, 17:28

I think this should be a espeasy issue...

As a plugin could be used twice on a esp. Like neopixel strips and 12v leds on one h801
Best would be like to address them on Task#.

Something like http://192.168.1.109/control?cmd1=Mode,4,400

where cmd1 - cmd12 is one of the task# in the devices list, but thats just my 2 cents.

TD-er
Core team member
Posts: 8729
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: P141 RGB Strip Plugin

#22 Post by TD-er » 10 Mar 2018, 18:52

Beter use the name given to the task.
That's already the convention for addressing the sensor values (e.g. [bedroom#temp] )

User avatar
soif
Normal user
Posts: 46
Joined: 20 Feb 2018, 19:11
Location: Solar System
Contact:

Re: P141 RGB Strip Plugin

#23 Post by soif » 11 Mar 2018, 21:45

r_255 wrote: 10 Mar 2018, 13:29More than happy to supply you with rgbw stipe/2812b so you get a little bit more back than a feed ( no obligations ), or we wait till the esp64 gets released.... ;)
At first I just don't clearly understand why such rgbW or (even rgbWW strip exists ? Is this just to have deeper whites (cold or warm?).

Is it just something like :

Code: Select all

if Requested_RGB_color==FF.FF.FF then RGBWW_Output=00.00.00.FF.FF
Soif
-----
Want to update ALL your ESP babies OverTheAir, or backup their settings in ONE simple command, + many other cool features.... Adopt EspBuddy

User avatar
soif
Normal user
Posts: 46
Joined: 20 Feb 2018, 19:11
Location: Solar System
Contact:

Re: P141 RGB Strip Plugin

#24 Post by soif » 11 Mar 2018, 21:47

r_255 wrote: 10 Mar 2018, 17:28 Something like http://192.168.1.109/control?cmd1=Mode,4,400
It doesn't sounds that bad... 8-)
Soif
-----
Want to update ALL your ESP babies OverTheAir, or backup their settings in ONE simple command, + many other cool features.... Adopt EspBuddy

User avatar
soif
Normal user
Posts: 46
Joined: 20 Feb 2018, 19:11
Location: Solar System
Contact:

Re: P141 RGB Strip Plugin

#25 Post by soif » 11 Mar 2018, 21:51

papperone wrote: 10 Mar 2018, 14:37 I do believe each plugin should make his own specific command clearly understandable... In this case "ON" or "OFF" are not clear to which plugin they are sent to and other developpers can easily use the same for complete different purpouses.
I absolutely agree with you, but without any command naming guidelines, and being at this stage only in the Playground repo, I've just named it as simple as possible. Onces told exactly how to name it, modifying the command names in the codes will be a matter of minutes if not seconds. :)
Soif
-----
Want to update ALL your ESP babies OverTheAir, or backup their settings in ONE simple command, + many other cool features.... Adopt EspBuddy

User avatar
soif
Normal user
Posts: 46
Joined: 20 Feb 2018, 19:11
Location: Solar System
Contact:

Re: P141 RGB Strip Plugin

#26 Post by soif » 11 Mar 2018, 21:53

TD-er wrote: 10 Mar 2018, 18:52 Beter use the name given to the task.
That's already the convention for addressing the sensor values (e.g. [bedroom#temp] )
Not sure to cleary understand what you mean :?:
(there are more commands than task values in this case)
Soif
-----
Want to update ALL your ESP babies OverTheAir, or backup their settings in ONE simple command, + many other cool features.... Adopt EspBuddy

r_255
Normal user
Posts: 32
Joined: 20 Nov 2015, 20:42

Re: P141 RGB Strip Plugin

#27 Post by r_255 » 11 Mar 2018, 22:49

soif wrote: 11 Mar 2018, 21:53
TD-er wrote: 10 Mar 2018, 18:52 Beter use the name given to the task.
That's already the convention for addressing the sensor values (e.g. [bedroom#temp] )
Not sure to cleary understand what you mean :?:
(there are more commands than task values in this case)
Instead of task number he means task name, like its used for rules and mqtt... i guess to be strict.


soif wrote: 11 Mar 2018, 21:45
r_255 wrote: 10 Mar 2018, 13:29More than happy to supply you with rgbw stipe/2812b so you get a little bit more back than a feed ( no obligations ), or we wait till the esp64 gets released.... ;)
At first I just don't clearly understand why such rgbW or (even rgbWW strip exists ? Is this just to have deeper whites (cold or warm?).

Is it just something like :

Code: Select all

if Requested_RGB_color==FF.FF.FF then RGBWW_Output=00.00.00.FF.FF
I use it for normal lighting or "party" lighting myself. So its not that its used to mix them but just to have a choice between a or b or mix a and b.
i know people that drive 5 white led stripes on a h801. Just because its possible and damned cheap.

As designer i do a lot of things with color, and i must say pastel a like colors look better with white mixed in and like my hue lamps the choice between warm and cold white is very nice to have....
But most of all, i dont see much color balanced rgb leds that do give a proper white light.

But thanks for the pointer, i will have another look....
:D

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: P141 RGB Strip Plugin

#28 Post by papperone » 12 Mar 2018, 07:20

r_255 wrote: 10 Mar 2018, 17:28 I think this should be a espeasy issue...

As a plugin could be used twice on a esp. Like neopixel strips and 12v leds on one h801
Best would be like to address them on Task#.

Something like http://192.168.1.109/control?cmd1=Mode,4,400

where cmd1 - cmd12 is one of the task# in the devices list, but thats just my 2 cents.
I don't think is is the right approach and neither easy to implement due to the current structure of plugin calls...
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

r_255
Normal user
Posts: 32
Joined: 20 Nov 2015, 20:42

Re: P141 RGB Strip Plugin

#29 Post by r_255 » 12 Mar 2018, 07:58

Well this might be a dirty solution then.

http://192.168.1.109/control?cmd=1Mode,4,400

:shock:

Nah just kidding,
But it might be something for future releases to fix this on espeasy level. As with more gpio's on the horizon, people will have more device connected and commands could easy overlap.

Ill pwm my white channels till i found some time and knowledge to change the code.
It's not a issue.

sisamiwe
Normal user
Posts: 14
Joined: 30 Jan 2018, 11:52

Re: P141 RGB Strip Plugin

#30 Post by sisamiwe » 24 Mar 2018, 17:44

Hi,

just a question to that plugin: Does it send the values for example HSV automatically to the defined controller on value change?

Thanks for the response.

User avatar
soif
Normal user
Posts: 46
Joined: 20 Feb 2018, 19:11
Location: Solar System
Contact:

Re: P141 RGB Strip Plugin

#31 Post by soif » 30 Mar 2018, 19:16

Not automatically, but HSV value are saved in the corresponding variables, so a simple rule, could do the job easily.
Soif
-----
Want to update ALL your ESP babies OverTheAir, or backup their settings in ONE simple command, + many other cool features.... Adopt EspBuddy

rwest
New user
Posts: 4
Joined: 06 Dec 2016, 15:23

Re: P141 RGB Strip Plugin

#32 Post by rwest » 16 Apr 2018, 13:01

just found your code and the idea is nice.

still have to test it but i already came up with an brigtness + / - command sample:

Command Examples :
- /control?cmd=dim_up
Steps brightness + 10
- /control?cmd=dim_up,x
Steps brightness + x
- /control?cmd=dim_up,3
Steps brightness + 3

Code: Select all

      //Brightness +
if (command == F("dim_up"))	{
	int dimstep = event->Par1 ? event->Par1 : 10 ;
        v_p141_cur_color.v 	= v_p141_cur_color.v + dimstep ;	 //Value/Brightness
        if(v_p141_cur_color.v > 100){
		v_p141_cur_color.v 	= 100;
	}
	else if(v_p141_cur_color.v < 0){
		v_p141_cur_color.v 	= 0;
	}
	Fp141_SetCurrentColor(v_p141_cur_color);
	Fp141_OutputCurrentColor();
}
      
      //Brightness -
if (command == F("dim_down"))	{
	int dimstep = event->Par1 ? event->Par1 : 10 ;
        v_p141_cur_color.v 	= v_p141_cur_color.v - dimstep ;	 //Value/Brightness
        if(v_p141_cur_color.v > 100){
		v_p141_cur_color.v 	= 100;
	}
	else if(v_p141_cur_color.v < 0){
		v_p141_cur_color.v 	= 0;
	}
	Fp141_SetCurrentColor(v_p141_cur_color);
	Fp141_OutputCurrentColor();
}
be aware this code is untested. i have to start with platformIO

im interested in fade/transition to ON and fade/transition to OFF and maybe there is a quick addition of controlling setting fade/transition for CW/WW single PWM/color led strip.
And i just recieved an Arilux / magic home with IR.

if i'll get it working i'll make an OpenHAB2 config example with the use of MQTT

User avatar
budman1758
Normal user
Posts: 301
Joined: 15 Apr 2017, 05:13
Location: Riverside CA USA

Re: P141 RGB Strip Plugin

#33 Post by budman1758 » 15 May 2018, 23:37

Hello Soif. Is there any chance you could make a bin file with this plugin available? I have the H801 controller. My compile skills are still not quite ready for primetime. :oops:
Would really like to try this. Thanks in advance.
"The glass is twice as big as it needs to be".

dolittle
Normal user
Posts: 17
Joined: 14 Jan 2018, 19:39

Re: P141 RGB Strip Plugin

#34 Post by dolittle » 12 Jun 2018, 06:58

r_255 wrote: 28 Feb 2018, 21:09 ...
C:\Users\robin\Documents\Arduino\src\ESPEasy\_P141_LedStrip.ino: In function 'boolean Plugin_141(byte, EventStruct*, String&)':
_P141_LedStrip:332: error: 'addFormSelector' was not declared in this scope
addFormSelector(string, F("LedStrip Type"), PLUGIN_141_CONF_0, i , options, optionValues, NULL ,type, true );


I did add the recommended fastled lib, added the include in espeasy.ino etc...
Should i declare all missing by hand or is there some other pointer you could think of ?
Hi Soif,
I'd like to use and compile the plugin with a current version of ESPEasy and I'm getting a lot of errors similar to the one noted above. Is it possible that you correct the plugin? I'm compiling it with your EspBuddy.

This would be really great.

Thanks ver much
>dolittle

choriz
New user
Posts: 1
Joined: 12 Jun 2018, 15:27

Re: P141 RGB Strip Plugin

#35 Post by choriz » 12 Jun 2018, 15:36

Hi Soif,

I have successful compile your code with platformIO and espeasy 2.0, but i 'm new to this and i have simple ( maybe stupid sorry) questions :

- I have magichome with ESP8285MOD, coud i use with this version ?

- If yes i have issue with compilation size for ESP8285 (Error: The program size (478829 bytes) is greater than maximum allowed (434160 bytes)),

do you have a solution for that ?

Regards

dolittle
Normal user
Posts: 17
Joined: 14 Jan 2018, 19:39

Re: P141 RGB Strip Plugin

#36 Post by dolittle » 27 Jun 2018, 08:21

Hi soif,
I was able to compile the plugin with the current version and posted a pull request. Nevertheless it turns out that your plugin somehow disables the rules functions TaskValSet and Publish <topic>, <value>. Is it possible for you to have a look on this? I like the plugin but these issues make it a no-go.

And btw, it would be very cool if the plugin could support transition fading e.g. when changing colors.

Thanks

Johny Mielony
New user
Posts: 2
Joined: 16 Jul 2018, 14:26

Re: P141 RGB Strip Plugin

#37 Post by Johny Mielony » 23 Jul 2018, 15:21

Did anyone manage to compile this plugin with the latest version of EspEasy Mega? If not, what's the latest version that this plugin works with?

dolittle
Normal user
Posts: 17
Joined: 14 Jan 2018, 19:39

Re: P141 RGB Strip Plugin

#38 Post by dolittle » 23 Jul 2018, 16:33

Johny Mielony wrote: 23 Jul 2018, 15:21 Did anyone manage to compile this plugin with the latest version of EspEasy Mega? If not, what's the latest version that this plugin works with?
Hi. There's a pending pull request in the Github repo (Commit #13ab228). Does it compile if you use this version of the plugin?

Johny Mielony
New user
Posts: 2
Joined: 16 Jul 2018, 14:26

Re: P141 RGB Strip Plugin

#39 Post by Johny Mielony » 24 Jul 2018, 11:16

dolittle wrote: 23 Jul 2018, 16:33
Johny Mielony wrote: 23 Jul 2018, 15:21 Did anyone manage to compile this plugin with the latest version of EspEasy Mega? If not, what's the latest version that this plugin works with?
Hi. There's a pending pull request in the Github repo (Commit #13ab228). Does it compile if you use this version of the plugin?
So I must've been using some earlier commit. Now with this one I don't get error related to 'addFormSelector' and other like that.
There are only left those errors:

Code: Select all

.pioenvs\normal_ESP8266_1024\libb3e\SoftwareSerial\SoftwareSerial.cpp.o: In function `sws_isr_0()':
SoftwareSerial.cpp:(.iram.text+0xf8): multiple definition of `sws_isr_0()'

.pioenvs\normal_ESP8266_1024\libb96\ESPEasySoftwareSerial\ESPeasySoftwareSerial.cpp.o:ESPeasySoftwareSerial.cpp:(.iram.text+0xd4): first defined here
.pioenvs\normal_ESP8266_1024\libb3e\SoftwareSerial\SoftwareSerial.cpp.o: In function `sws_isr_1()':
SoftwareSerial.cpp:(.iram.text+0x110): multiple definition of `sws_isr_1()'
.pioenvs\normal_ESP8266_1024\libb96\ESPEasySoftwareSerial\ESPeasySoftwareSerial.cpp.o:ESPeasySoftwareSerial.cpp:(.iram.text+0xec): first defined here
.pioenvs\normal_ESP8266_1024\libb3e\SoftwareSerial\SoftwareSerial.cpp.o: In function `sws_isr_2()':
SoftwareSerial.cpp:(.iram.text+0x128): multiple definition of `sws_isr_2()'
.pioenvs\normal_ESP8266_1024\libb96\ESPEasySoftwareSerial\ESPeasySoftwareSerial.cpp.o:ESPeasySoftwareSerial.cpp:(.iram.text+0x104): first defined here
I can get rid of those errors just by commenting out any occurrence of sws_isr in ESPeasySoftwareSerial.cpp, but that's just workaround, not a solution.

sledge
Normal user
Posts: 17
Joined: 20 Jan 2017, 20:42

Re: P141 RGB Strip Plugin

#40 Post by sledge » 11 Aug 2018, 15:17

Hi, i tried to compile the p141 plugin under actual mega branch and get a lot of errors.

Code: Select all

Linking .pioenvs\dev_ESP8266_4096\firmware.elf
.pioenvs\dev_ESP8266_4096\libe12\SoftwareSerial\SoftwareSerial.cpp.o: In function `sws_isr_0()':
SoftwareSerial.cpp:(.iram.text+0xf8): multiple definition of `sws_isr_0()'
.pioenvs\dev_ESP8266_4096\lib7f4\ESPEasySoftwareSerial\ESPeasySoftwareSerial.cpp.o:ESPeasySoftwareSerial.cpp:(.iram.text+0xd4): first defined here
.pioenvs\dev_ESP8266_4096\libe12\SoftwareSerial\SoftwareSerial.cpp.o: In function `sws_isr_1()':
SoftwareSerial.cpp:(.iram.text+0x110): multiple definition of `sws_isr_1()'
.pioenvs\dev_ESP8266_4096\lib7f4\ESPEasySoftwareSerial\ESPeasySoftwareSerial.cpp.o:ESPeasySoftwareSerial.cpp:(.iram.text+0xec): first defined here
.pioenvs\dev_ESP8266_4096\libe12\SoftwareSerial\SoftwareSerial.cpp.o: In function `sws_isr_2()':
SoftwareSerial.cpp:(.iram.text+0x128): multiple definition of `sws_isr_2()'
.pioenvs\dev_ESP8266_4096\lib7f4\ESPEasySoftwareSerial\ESPeasySoftwareSerial.cpp.o:ESPeasySoftwareSerial.cpp:(.iram.text+0x104): first defined here
collect2.exe: error: ld returned 1 exit status
*** [.pioenvs\dev_ESP8266_4096\firmware.elf] Error 1
Does this plugin work for the actual Mega branch or do i have to use an older version?

TD-er
Core team member
Posts: 8729
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: P141 RGB Strip Plugin

#41 Post by TD-er » 12 Aug 2018, 12:31

I don't see anything related to SoftwareSerial in the code of P141.
But it is including Fastled.h, so maybe that one is trying to assign some interrupt triggers to some pins.
This may cause issues. I guess.
These function call SoftwareSerial instead of ESPEasySoftwareSerial: https://github.com/letscontrolit/ESPEas ... wareSerial
Have you added other files, other than the P141 file?

sledge
Normal user
Posts: 17
Joined: 20 Jan 2017, 20:42

Re: P141 RGB Strip Plugin

#42 Post by sledge » 12 Aug 2018, 18:16

I only added p141 and the fastled lib. It works if i comment out sws_isr_0() like mentioned by johny Mielony. BUT now i am not able to send a pwm command to a specified pin. My problem is that i am using a rgb-W power led and am not able to set white to a value. Only RGB through p141 is working. Is there a way to change white whithin the plugin? I set the led strip type to rgbw and mapped white1 to pin5 but i can´t see a command to switch white on.

BTW the plugin is awesome!

sledge
Normal user
Posts: 17
Joined: 20 Jan 2017, 20:42

Re: P141 RGB Strip Plugin

#43 Post by sledge » 15 Aug 2018, 16:10

Would it be possible to add a command to the plugin just to set a value for white? Something like this maybe:

Code: Select all

			if (command == F("w1"))	{
				analogWrite(v_p141_pins[3], v_p141_pin_inverse ? (PWMRANGE - event->Par1)  : event->Par1);
			}
I´m not familiar with C so i don´t know how to add another command.

sledge
Normal user
Posts: 17
Joined: 20 Jan 2017, 20:42

Re: P141 RGB Strip Plugin

#44 Post by sledge » 19 Aug 2018, 15:03

How funny, the code i posted above is working :) Now i can control the white channel with mqtt command w1,255

I also added this line to void Fp141_CommandOff(){ function to ensure everything is off after command receives.

Code: Select all

analogWrite(v_p141_pins[3], v_p141_pin_inverse ? (PWMRANGE - 0)  : 0);
I know this is not intended by the plugin author but until the white channel is added it is useful for me and maybe an other.

coolduke
New user
Posts: 5
Joined: 03 Sep 2018, 15:11

Re: P141 RGB Strip Plugin

#45 Post by coolduke » 03 Sep 2018, 15:17

hi,

first of all, thx to the author for coding this plugin... I think it would be huge improvment for the whole project.

But I was not able to compile it successfully... got the following errors (compiled with platform IO):

Archiving .pioenvs/dev_ESP8266_1024/libFrameworkArduino.a
Indexing .pioenvs/dev_ESP8266_1024/libFrameworkArduino.a
Linking .pioenvs/dev_ESP8266_1024/firmware.elf
.pioenvs/dev_ESP8266_1024/lib52c/SoftwareSerial/SoftwareSerial.cpp.o: In function `sws_isr_0()':
SoftwareSerial.cpp:(.iram.text+0xf8): multiple definition of `sws_isr_0()'
.pioenvs/dev_ESP8266_1024/libc24/ESPEasySoftwareSerial/ESPeasySoftwareSerial.cpp.o:ESPeasySoftwareSerial.cpp:(.iram.text+0xd4): first defined here
.pioenvs/dev_ESP8266_1024/lib52c/SoftwareSerial/SoftwareSerial.cpp.o: In function `sws_isr_1()':
SoftwareSerial.cpp:(.iram.text+0x110): multiple definition of `sws_isr_1()'
.pioenvs/dev_ESP8266_1024/libc24/ESPEasySoftwareSerial/ESPeasySoftwareSerial.cpp.o:ESPeasySoftwareSerial.cpp:(.iram.text+0xec): first defined here
.pioenvs/dev_ESP8266_1024/lib52c/SoftwareSerial/SoftwareSerial.cpp.o: In function `sws_isr_2()':
SoftwareSerial.cpp:(.iram.text+0x128): multiple definition of `sws_isr_2()'
.pioenvs/dev_ESP8266_1024/libc24/ESPEasySoftwareSerial/ESPeasySoftwareSerial.cpp.o:ESPeasySoftwareSerial.cpp:(.iram.text+0x104): first defined here
collect2: error: ld returned 1 exit status
*** [.pioenvs/dev_ESP8266_1024/firmware.elf] Error 1


seems like there is still this problem with "sws_isr_0()"... but how to solve it?

when could we see this plugin in the "official" dev branch?

any help would be great!

thx

coolduke
New user
Posts: 5
Joined: 03 Sep 2018, 15:11

Re: P141 RGB Strip Plugin

#46 Post by coolduke » 12 Sep 2018, 09:25

.. using arduino IDE everyhting works fine :)

Tecumseh
Normal user
Posts: 37
Joined: 30 Sep 2016, 09:42

Re: P141 RGB Strip Plugin

#47 Post by Tecumseh » 27 Sep 2018, 21:05

Johny Mielony wrote: 24 Jul 2018, 11:16

Code: Select all

.pioenvs\normal_ESP8266_1024\libb3e\SoftwareSerial\SoftwareSerial.cpp.o: In function `sws_isr_0()':
SoftwareSerial.cpp:(.iram.text+0xf8): multiple definition of `sws_isr_0()'

.pioenvs\normal_ESP8266_1024\libb96\ESPEasySoftwareSerial\ESPeasySoftwareSerial.cpp.o:ESPeasySoftwareSerial.cpp:(.iram.text+0xd4): first defined here
.pioenvs\normal_ESP8266_1024\libb3e\SoftwareSerial\SoftwareSerial.cpp.o: In function `sws_isr_1()':
SoftwareSerial.cpp:(.iram.text+0x110): multiple definition of `sws_isr_1()'
.pioenvs\normal_ESP8266_1024\libb96\ESPEasySoftwareSerial\ESPeasySoftwareSerial.cpp.o:ESPeasySoftwareSerial.cpp:(.iram.text+0xec): first defined here
.pioenvs\normal_ESP8266_1024\libb3e\SoftwareSerial\SoftwareSerial.cpp.o: In function `sws_isr_2()':
SoftwareSerial.cpp:(.iram.text+0x128): multiple definition of `sws_isr_2()'
.pioenvs\normal_ESP8266_1024\libb96\ESPEasySoftwareSerial\ESPeasySoftwareSerial.cpp.o:ESPeasySoftwareSerial.cpp:(.iram.text+0x104): first defined here
I can get rid of those errors just by commenting out any occurrence of sws_isr in ESPeasySoftwareSerial.cpp, but that's just workaround, not a solution.
With the sws_isr commented in ESPeasySoftwareSerial.cpp I got it compiled and running. It is a very nice full featured RGB control. One thing that I am missing is the option to select a color and fade it in during a selectable time. This option is available in the lights plugin (https://github.com/ddtlabs/ESPEasy-Plugin-Lights), this one has not seen an update in the last 2 years so I am not sure if it would compile well with the latest version.

Dines
New user
Posts: 1
Joined: 10 Oct 2018, 23:39

Re: P141 RGB Strip Plugin

#48 Post by Dines » 10 Oct 2018, 23:59

Hi,

Can anyone share a .bin file with this RGB plugin for Wimos D1 mini? :roll:
Last edited by Dines on 11 Oct 2018, 00:19, edited 1 time in total.

User avatar
budman1758
Normal user
Posts: 301
Joined: 15 Apr 2017, 05:13
Location: Riverside CA USA

Re: P141 RGB Strip Plugin

#49 Post by budman1758 » 11 Oct 2018, 00:11

+ 1 for ^. Standard 4 meg here. :mrgreen: :mrgreen:
"The glass is twice as big as it needs to be".

TD-er
Core team member
Posts: 8729
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: P141 RGB Strip Plugin

#50 Post by TD-er » 11 Oct 2018, 02:05

I added an issue for it on Github: https://github.com/letscontrolit/ESPEasy/issues/1889

Dylantje
Normal user
Posts: 255
Joined: 11 Oct 2015, 16:51

Re: P141 RGB Strip Plugin

#51 Post by Dylantje » 14 Oct 2018, 11:56

Dear all,

Is this project stil a live??
Is ther peperhaps a option this controller works with Domoticz?

i am searching for a H081 controller that i can use in Domoticz..
Or is this the wrong project?

dolittle
Normal user
Posts: 17
Joined: 14 Jan 2018, 19:39

Re: P141 RGB Strip Plugin

#52 Post by dolittle » 14 Oct 2018, 12:13

Dylantje wrote: 14 Oct 2018, 11:56 Dear all,

Is this project stil a live??
Is ther peperhaps a option this controller works with Domoticz?

i am searching for a H081 controller that i can use in Domoticz..
Or is this the wrong project?
Is it an option for you to use an MQTT server like mosquitto? It's pretty simple and you can use also other firmwares like tasmota or espurna as well.

I don't use and know Domoticz, but I suppose it has MQTT support as well.

Dylantje
Normal user
Posts: 255
Joined: 11 Oct 2015, 16:51

Re: P141 RGB Strip Plugin

#53 Post by Dylantje » 14 Oct 2018, 12:17

i have a mqtt server running in Domoticz..
I flashed a esp with espeasy
And i do have a esp with Thasmota.

Only my knowledge with mqtt is very low

dolittle
Normal user
Posts: 17
Joined: 14 Jan 2018, 19:39

Re: P141 RGB Strip Plugin

#54 Post by dolittle » 14 Oct 2018, 15:19

Dylantje wrote: 14 Oct 2018, 12:17 i have a mqtt server running in Domoticz..
I flashed a esp with espeasy
And i do have a esp with Thasmota.

Only my knowledge with mqtt is very low
I had also some doubts but love it now. It‘s pretty easy actually. The concept is just different.

Give it a try you won’t regret it.

User avatar
ManS-H
Normal user
Posts: 281
Joined: 27 Dec 2015, 11:26
Location: the Netherlands

Re: P141 RGB Strip Plugin

#55 Post by ManS-H » 21 Oct 2018, 12:16

What do i wrong with compiling _P141?
When i compile ESPEasy_mega-20181017 with Platformio no problem at all.

But when I add _P141 to the map source/src and FastLED-3.1.8 to to map source/lib
Then i add #include "<FastLED.h>" to ESPEasy.ino is see this:
F:/ESPEasy Projects/ESPEasy_mega-20181017_P141/Source/scr/ESPEASY.ino:8923: fatal error scr\<FastLED.h>: Invalid argument

When i changed it in #include <FastLED.h> to ESPEasy.ino is see this:
collect2.exe: error: ld returned 1 exit status
*** [.pioenvs\dev_ESP8266_1024\firmware.elf] Error 1

When i changed it in #include "FastLED.h" to ESPEasy.ino is see this:
collect2.exe error: ld returned 1 exit status
*** [.pioenvs\dev_ESP8266_1024\firmware.elf] Error 1

If I follow the text of the developer, he used another directory structure.
Installation :
- Add the FastLED library in the 'src/lib/' folder from https://github.com/FastLED/FastLED/tree/3.1.8
- Move this file to the 'src/' folder
- Add "#include <FastLED.h>" at the start of src/lib/ESPEasy.ino file else compiler fails

Please, can anyone tell me what i doing wrong?

TD-er
Core team member
Posts: 8729
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: P141 RGB Strip Plugin

#56 Post by TD-er » 22 Oct 2018, 10:21

For PlatformIO there is a separate lib directory at the same level as the src dir.
See directory structure here: https://github.com/letscontrolit/ESPEasy

User avatar
ManS-H
Normal user
Posts: 281
Joined: 27 Dec 2015, 11:26
Location: the Netherlands

Re: P141 RGB Strip Plugin

#57 Post by ManS-H » 23 Oct 2018, 12:35

TD-er wrote: 22 Oct 2018, 10:21 For PlatformIO there is a separate lib directory at the same level as the src dir.
See directory structure here: https://github.com/letscontrolit/ESPEasy
Hello TD-er,

I'm not a programmer, only a simple user who was interrested in the possibilities of the _P141 Plugin together with a Huacanxing H801

This is the structure of testing the plugins,
Structure.png
Structure.png (32.01 KiB) Viewed 13651 times
I started on another computer with Platformio as descriped in de Wiki. I used ESPEasy_mega-20181023 as file.
First i compiled ESPEasy_mega-20181023, no problem with the normal-test-dev_ESP8266 versions.

Then i add _P141, with the library FastLED-3.1.8 and #include <FastLED.h> to ESPEasy_mega-20181023.
Problems:
collect2.exe: error: ld returned 1 exit status
*** [.pioenvs\normal_ESP8266_1024\firmware.elf] Error 1

I started again this time with _P142 and ESPEasy_mega-20181023.
Problems:
F:/ESPEasy Projects/ESPEasy_mega-20181023_P142/Source_P142/src/_P142_RGB-Strip.ino:88:107: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
F:/ESPEasy Projects/ESPEasy_mega-20181023_P142/Source_P142/src/_P142_RGB-Strip.ino:88:107: error: too many arguments to function 'void addPinSelect(boolean, String, int)'
F:/ESPEasy Projects/ESPEasy_mega-20181023_P142/Source_P142/src/_P142_RGB-Strip.ino:90:107: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
F:/ESPEasy Projects/ESPEasy_mega-20181023_P142/Source_P142/src/_P142_RGB-Strip.ino:90:107: error: too many arguments to function 'void addPinSelect(boolean, String, int)'
F:/ESPEasy Projects/ESPEasy_mega-20181023_P142/Source_P142/src/_P142_RGB-Strip.ino:92:107: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
F:/ESPEasy Projects/ESPEasy_mega-20181023_P142/Source_P142/src/_P142_RGB-Strip.ino:92:107: error: too many arguments to function 'void addPinSelect(boolean, String, int)'
F:/ESPEasy Projects/ESPEasy_mega-20181023_P142/Source_P142/src/_P142_RGB-Strip.ino:94:107: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
F:/ESPEasy Projects/ESPEasy_mega-20181023_P142/Source_P142/src/_P142_RGB-Strip.ino:94:107: error: too many arguments to function 'void addPinSelect(boolean, String, int)'

The third try, _P150 and ESPEasy_mega-20181023.
Problems:
Environment dev_ESP8266_1024 [ERROR]
Environment dev_ESP8266_4096 [ERROR]

These are successfull:
Environment normal_ESP8266_1024 [SUCCESS]
Environment normal_ESP8266_4096 [SUCCESS]
Environment test_ESP8266_1024 [SUCCESS]
Environment test_ESP8266_4096 [SUCCESS]

Then i add _P141, with #include <FastLED.h> to ESPEasy_mega-20181023 but without the library.
Problems:
collect2.exe: error: ld returned 1 exit status
*** [.pioenvs\normal_ESP8266_1024\firmware.elf] Error 1
Aantekening.png
Aantekening.png (49.42 KiB) Viewed 13652 times
My question to you, can you maybe try to compile the _P141 Plugin to see what the results are in your environment?

Regards, Herman

raist
New user
Posts: 1
Joined: 19 Feb 2019, 09:12

Re: P141 RGB Strip Plugin

#58 Post by raist » 19 Feb 2019, 09:17

Please provide somebody a .bin file

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: P141 RGB Strip Plugin

#59 Post by enesbcs » 21 Feb 2019, 19:00

raist wrote: 19 Feb 2019, 09:17 Please provide somebody a .bin file
I've such a binary with P142 RGB-Strip, but do not know what is the difference with P141. :) 4MB version.
download/file.php?id=3594

dolittle
Normal user
Posts: 17
Joined: 14 Jan 2018, 19:39

Re: P141 RGB Strip Plugin

#60 Post by dolittle » 22 Feb 2019, 17:13

Hi,
added two bin files with P141. One for 1MB and the other for 4MB flash.

Hope that helps.

BTW. I don't use ESPEasy for LED strips anymore although I love its flexibility. Tasmota has a much better implementation for this IMHO. This plugin flickers a lot in low dimming settings and it has no fading.
Attachments
firmwares.zip
(928.92 KiB) Downloaded 424 times

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests