Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

call for help: rgbW #122

Closed
martinschki opened this issue Apr 6, 2018 · 20 comments
Closed

call for help: rgbW #122

martinschki opened this issue Apr 6, 2018 · 20 comments
Assignees

Comments

@martinschki
Copy link

Hi there!!
First of all, thank you for this amazing program. I had it running together with my MQTT server literally in minutes...

Heres my plan. I'm making a "cloud lamp" for my sons room with SK6812 which will do three things.

  1. simulate the weather forecast for the next day: I will use node-red for that and depending on the forecast light the lamp
  2. use the "W" in RGBW as a normal room lamp
  3. use the "W" as a wake up light in the morning by dimming the "W" to max over a period of time. Also for this I will use node red via MQTT and dim the lamp

As far as I understand Tobias, it is difficult to implement the fourth color into the code. So here's my question, because, everything except the "W" works:

Is there a simple way, or a "hack" how I can send brightness to the 4th LED??
I'm using the "NEO_GRBW" setting already which works perfect in RGB.

Any help on how to insert a new MQTT command which turns on all the "W"s with the sent brightness would be appreciated...
Thank you!
Martin

btw. I got the inspiration for the project here:
https://www.youtube.com/watch?v=ckxU3XCHLoU
There are already a lot of variants floating around but none would be as elegant as this one..... :)

@debsahu
Copy link
Collaborator

debsahu commented Apr 6, 2018

Please see #94

@martinschki
Copy link
Author

i did....
but not being the uber programmer, I'd need someone to point me in the right direction...please...

@toblum
Copy link
Owner

toblum commented Apr 7, 2018

@martinschki The McLighting version thats mentioned in #94 supports RGBW. You could just take this version to use your RGBW strip: https://github.com/FabLab-Luenen/McLighting

@toblum toblum self-assigned this Apr 7, 2018
@martinschki
Copy link
Author

i tried that but there are things not like in the latest master (MQTT is different, the blue led is always on?)
Is there a way to sync #94 to the latest master??

@toblum
Copy link
Owner

toblum commented Apr 7, 2018

The RGBW version has many changes in the code that would make problems for other users. That's the reason why I didn't integrate it so far. It would take a lot of rework and could break existing integrations.

@bpohvoodoo
Copy link

All changes until today from this repository have been applied.

@debsahu
Copy link
Collaborator

debsahu commented Apr 12, 2018

@bpohvoodoo NeoAnimationFX does not support RGBW as of now, so you could remove the NeoAnimationFX code. Since neither I or @toblum have this kind of light strips, support may be far away. Replacing RgbColor to RgbwColor should be able to convert most of the animations to RGBW format, maybe I will create a separate branch (no promises).

@toblum
Copy link
Owner

toblum commented Apr 13, 2018

I have one of those SKsomething strips from china lying here around, but I never got it to work (only as RGB). Maybe this was a fake product. Maybe I will buy another one in the future and give it another try.

@bpohvoodoo
Copy link

Maybe i will have a look at your Lib and convert it, too.

@martinschki
Copy link
Author

I will test with my strip (SK6812 RGBWW) later today. Thanks!!!!

@martinschki
Copy link
Author

martinschki commented Apr 14, 2018

@bpohvoodoo work in progress?
does need a couple of extra pics and now I'm stuck...
(I don't have a color sensor(?)

Arduino: 1.8.5 (Mac OS X), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 4M (1M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

Arduino/McLighting-master-2/Arduino/McLighting/McLighting.ino: In function 'void setup()':
McLighting:872: error: 'tcs' was not declared in this scope
   tcs.setConfig(MCU_LED_05, MCU_WHITE_ON);
   ^
McLighting:872: error: 'MCU_LED_05' was not declared in this scope
   tcs.setConfig(MCU_LED_05, MCU_WHITE_ON);
                 ^
McLighting:872: error: 'MCU_WHITE_ON' was not declared in this scope
   tcs.setConfig(MCU_LED_05, MCU_WHITE_ON);
                             ^
exit status 1
'tcs' was not declared in this scope

@bpohvoodoo
Copy link

bpohvoodoo commented Apr 15, 2018

replace
tcs.setConfig(MCU_LED_05, MCU_WHITE_ON);

with
#ifdef ENABLE_BUTTON_GY33
tcs.setConfig(MCU_LED_05, MCU_WHITE_ON);
#endif

comment out
#define ENABLE_BUTTON_GY33
in definitions.h
//#define ENABLE_BUTTON_GY33

or redownload repo. It is fixed now.
Please upload the \clients\web\build\index.html of my repo.

@martinschki
Copy link
Author

did!
it's now building and working!
(the repo https://github.com/FabLab-Luenen/McLighting doesn't have the changes in...)

two follow ups:

  • how do I turn off the blue LED on the board (it's not on in Tobias' version)
  • how do I control the white LED via MQTT?

Thanks!

@bpohvoodoo
Copy link

bpohvoodoo commented Apr 15, 2018

(the repo https://github.com/FabLab-Luenen/McLighting doesn't have the changes in...)

Ups, forgotten to sync repos! My fault.

two follow ups:
how do I turn off the blue LED on the board (it's not on in Tobias' version)

Are you sure? I haven't changed anything regarding the BUILTIN_LED.

how do I control the white LED via MQTT?

Haven't set up a mqtt server yet, but you should send color as
FF000000 for white
00FF0000 for red
0000FF00 for green
and
000000FF for blue

@martinschki
Copy link
Author

thanks, white is working via MQTT as you said!

as for the blue LED: its on in your fork and off in the orig...
(i have a LoLin NodeMCU V3)

@debsahu
Copy link
Collaborator

debsahu commented Apr 15, 2018

@martinschki Comment out all lines that have BUILTIN_LED to turn off LED, add // before the line. Preliminary looking at the code the RGBW fork does nothing special to BUILTIN_LED. The behavior should be the same as the master branch here. Lolinv3 has no onboard led as lolin v2 where gpio16 has a red led. But both have a blue led connected to gpio2 which is in the ESP8266-12E top right corner.

@JoJ123
Copy link

JoJ123 commented Oct 14, 2018

I adapted the McLightning adapter to support the RGBW Fork
https://github.com/JoJ123/ioBroker.mclighting/tree/feature/rgbwSupport

@ChristophA
Copy link

Are there any plans to add RGBW features to the original McLighting fork?

@JoJ123
Copy link

JoJ123 commented Oct 15, 2018

I think they said, there are too many changes and differences between the codes

@toblum
Copy link
Owner

toblum commented Dec 16, 2018

Closing issue due to inactivity.

@toblum toblum closed this as completed Dec 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants