Wifi Candle - illuminate with ESPEasy (WS2812)
Moderators: grovkillen, Stuntteam, TD-er
Wifi Candle - illuminate with ESPEasy (WS2812)
Hi @all,
this evening I finished my Wifi Candle based on ESPEasy. This was a long term project of mine but I never had the time to get it done.
But now I think it´s mostly finished. Have to build the hardware into the housing but the coding part is ready
The lampe based on the adafruit Neopixel lib. The code is at some parts inspired by some web templates.
The hardware is only a NodeMCU with 20 WS2812 Pixels in a 4*5 Matrix. Take a look at the picture ...
And I use some paper for a light diffusor.
The rest is some coding (~700 lines of Code) and the great work of the ESPEasy devs
To make this working I had to tweak the ESPEasy code a little bit. Default there is only a 100ms timer but that is way to slow to drive the candle smoothly.
So i added another timer with 25ms cycle time. This give great results.
I added a first video to my webspace:
http://www.logview.info/Temp/WifiCandle.mp4
You can find the Code in the ESPEasy Playground:
https://github.com/ESP8266nu/ESPEasyPluginPlayground
And I have written some Setup notes for the candle:
http://www.logview.info/Temp/CandleNotes.pdf
this evening I finished my Wifi Candle based on ESPEasy. This was a long term project of mine but I never had the time to get it done.
But now I think it´s mostly finished. Have to build the hardware into the housing but the coding part is ready
The lampe based on the adafruit Neopixel lib. The code is at some parts inspired by some web templates.
The hardware is only a NodeMCU with 20 WS2812 Pixels in a 4*5 Matrix. Take a look at the picture ...
And I use some paper for a light diffusor.
The rest is some coding (~700 lines of Code) and the great work of the ESPEasy devs
To make this working I had to tweak the ESPEasy code a little bit. Default there is only a 100ms timer but that is way to slow to drive the candle smoothly.
So i added another timer with 25ms cycle time. This give great results.
I added a first video to my webspace:
http://www.logview.info/Temp/WifiCandle.mp4
You can find the Code in the ESPEasy Playground:
https://github.com/ESP8266nu/ESPEasyPluginPlayground
And I have written some Setup notes for the candle:
http://www.logview.info/Temp/CandleNotes.pdf
- Attachments
-
- Hardware for the wick ...
- WifiCandle.jpg (37.18 KiB) Viewed 96328 times
Last edited by moelski on 29 Dec 2016, 08:03, edited 1 time in total.
regards
Dominik
Dominik
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Great works!! Defnitely 'll use your plugin if you will be so kind to share...
Just a question: is it possible to control the parameters via MQTT or HTTP command, or just via the task interface?
Just a question: is it possible to control the parameters via MQTT or HTTP command, or just via the task interface?
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
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
- where can i find a link to the ino?
How do you wired the strips?
Can i use the ino for a ring of 16led?
Thank you in anticipation!
How do you wired the strips?
Can i use the ino for a ring of 16led?
Thank you in anticipation!
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Hi !
I will code that now ...
So maybe you need a little bit of tweeking
Each side of my candle has 5 Leds and the starting is at the bottom.
So you need some basic math to address the correct LEDs. Not really a big deal ...
thxGreat works!!
I will share it. Just have to finish the "remote control" part ...will be so kind to share
Yes. That is really important for the WAF (woman acceptance factor)is it possible to control the parameters via MQTT or HTTP command, or just via the task interface?
I will code that now ...
I will place it at the playground asapwhere can i find a link to the ino?
For sure. But some parts are written for a 4*5 matrix of LEDs.Can i use the ino for a ring of 16led?
So maybe you need a little bit of tweeking
They are wired in one lineHow do you wired the strips?
Each side of my candle has 5 Leds and the starting is at the bottom.
So you need some basic math to address the correct LEDs. Not really a big deal ...
regards
Dominik
Dominik
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
I guess you read my mindmoelski wrote:Yes. That is really important for the WAF (woman acceptance factor)is it possible to control the parameters via MQTT or HTTP command, or just via the task interface?
I will code that now ...
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
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Great your my man with this !!!
Waiting for your code asap !
As you use neopixel lib, maybe you can add fire2000 effect who make feel a real candel.
Sadly Domoticz can't send rgb value from dummy for now, this maybe need to create a new hardware just for your plugin.
Waiting for your code asap !
As you use neopixel lib, maybe you can add fire2000 effect who make feel a real candel.
Sadly Domoticz can't send rgb value from dummy for now, this maybe need to create a new hardware just for your plugin.
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Hi !
Where can I find that sample?maybe you can add fire2000 effect who make feel a real candel.
regards
Dominik
Dominik
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Sorry was espfire2012 for ESP8266 (github link)
Off course this need more led but this is really a great "romantic" simulation lol
Off course this need more led but this is really a great "romantic" simulation lol
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Hi @all,
I just placed the source code on github in the Playground. Hope it gets merged, soon
@timsson:
The code is for fastled - I´m using Adafruit Neopixels.
Anyway. The Fire simulation seems to be convertable. I will check that
I just placed the source code on github in the Playground. Hope it gets merged, soon
@timsson:
The code is for fastled - I´m using Adafruit Neopixels.
Anyway. The Fire simulation seems to be convertable. I will check that
regards
Dominik
Dominik
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Hi @moelski
Thank you for terrific work. I got it up in a very short time and it works very well.
There is one thing in the github version that I had to add to make it compile and run and this was to define the variable "timer25ms" using:
This is placed next to where the "timer100ms" is defined. Was this a bad addition?
For my Wifi candles I aim to use a single strong RGB LED in the place of the flame, as "traditional" electronic candles. I have verified your code using the APA106 LEDs which use protocol similar to WS2012B, bought here: http://www.ebay.co.uk/itm/APA106-F5-F8- ... 4RraqCbhyw
These work very well with your implementation with one exception; The order of the red and green values. Thus I had to go through your entire code and flip the order for every "setPixelColor" instance in the code. There are probably nicer ways to implement this so that one can change the order in a variable. I will think about this and come with a suggestion later.
I have also ordered some WS2811 "compatible" RGBW strips (SK6812) that I will try to implement using your code. This may require one additional value (white) to be sent in the "setPixelColor" string and that will definitely require some significant further modifications.
Thanks' again for all the great work @moelski!
Thank you for terrific work. I got it up in a very short time and it works very well.
There is one thing in the github version that I had to add to make it compile and run and this was to define the variable "timer25ms" using:
Code: Select all
unsigned long timer25ms;
For my Wifi candles I aim to use a single strong RGB LED in the place of the flame, as "traditional" electronic candles. I have verified your code using the APA106 LEDs which use protocol similar to WS2012B, bought here: http://www.ebay.co.uk/itm/APA106-F5-F8- ... 4RraqCbhyw
These work very well with your implementation with one exception; The order of the red and green values. Thus I had to go through your entire code and flip the order for every "setPixelColor" instance in the code. There are probably nicer ways to implement this so that one can change the order in a variable. I will think about this and come with a suggestion later.
I have also ordered some WS2811 "compatible" RGBW strips (SK6812) that I will try to implement using your code. This may require one additional value (white) to be sent in the "setPixelColor" string and that will definitely require some significant further modifications.
Thanks' again for all the great work @moelski!
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Would it be much work to extend it to 4*8 leds?
I saw this module:
http://www.ebay.de/itm/WS2812-5050-RGB- ... SwgQ9VwYc9
Maybe you could make the amount of leds configurable?
Is the code available jet?
I saw this module:
http://www.ebay.de/itm/WS2812-5050-RGB- ... SwgQ9VwYc9
Maybe you could make the amount of leds configurable?
Is the code available jet?
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
does anyone know is there a way to handle single rgb led (eg. WS2818) by EASYEsp?
I would like to set few colours:
red for heating
blue for airconditioning
...
regards,
Maciek
I would like to set few colours:
red for heating
blue for airconditioning
...
regards,
Maciek
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Something else. for integration into domotic'z now the color and brightness are transferred i think but also the type like "police" would be greate.
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
@vobo70
This is exactly what I have achieved with the APA106 leds. These work great at 3.3V even though they are rated for 5V.
See my reply above.
This is exactly what I have achieved with the APA106 leds. These work great at 3.3V even though they are rated for 5V.
See my reply above.
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
@ThomasB
Thanks,
I will try it asap I buy those APA106 leds.
Thanks,
I will try it asap I buy those APA106 leds.
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
I uploaded my basic test plugin for neopixel in the playground:vobo70 wrote:does anyone know is there a way to handle single rgb led (eg. WS2818) by EASYEsp?
I would like to set few colours:
red for heating
blue for airconditioning
...
regards,
Maciek
https://github.com/ESP8266nu/ESPEasyPlu ... oPixel.ino
Use rules commands to control single WS2812 leds into any color:
neoPixel <led nr>,<red>,<green>,<blue>
Just a demo rules set for a single LED:
Code: Select all
on System#Boot do
timerSet 1,10
endon
on Rules#Timer=1 do
neopixel,1,50,0,0 // red
delay 100
neopixel,1,0,50,0 // green
delay 100
neopixel,1,0,0,50 // blue
delay 100
neopixel,1,25,25,25 // white
timerSet 1,5
endon
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Hello,
thank you very much, great work moelski!!!
I tested it, is works stabil!
Martinus your plugin is also fine - 123 rules and voala "strandtest"
https://youtu.be/Sir6EZxYMpc
Thanks
thank you very much, great work moelski!!!
I tested it, is works stabil!
Martinus your plugin is also fine - 123 rules and voala "strandtest"
https://youtu.be/Sir6EZxYMpc
Thanks
Last edited by timsson on 30 Oct 2016, 18:48, edited 1 time in total.
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Hi !
https://github.com/ESP8266nu/ESPEasyPlu ... Candle.ino
@timsson:
Thx for that video and the flowers
I will correct that on github. Thx for the hintThere is one thing in the github version that I had to add to make it compile and run and this was to define the variable "timer25ms" using:
Why did you need an additional value?This may require one additional value (white) to be sent
Not so much but you have to test the simulation with the enhanced (or reduced) set of LEDs.Would it be much work to extend it to 4*8 leds?
For sure. But at the moment I´m implement the candle into my FHEM setup. So no time for code changes.Maybe you could make the amount of leds configurable?
Yes. On Github:Is the code available jet?
https://github.com/ESP8266nu/ESPEasyPlu ... Candle.ino
Type is implemented in the Github codefor integration into domotic'z now the color and brightness are transferred i think but also the type like "police" would be greate.
@timsson:
Thx for that video and the flowers
regards
Dominik
Dominik
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
I'm just testing it.Martinus wrote: I uploaded my basic test plugin for neopixel in the playground:
Great! Exactly what I was searching for, because I'm just modifying a Chinese LED light bulb by adding an ESP and some WS2812, and I want to use it as a universal status indicator for my home automation. Like, pulsing red when there's something wrong with the oven, or blue when it's freezing outside, and such.
It's working great so far, it only eats much of the rules space, so I think I'll add some effects to the plugin itself.
Anyways, many thanks for your code.
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Who can change the code to use it with mqtt?Martinus wrote: I uploaded my basic test plugin for neopixel in the playground:
https://github.com/ESP8266nu/ESPEasyPlu ... oPixel.ino
Use rules commands to control single WS2812 leds into any color:
neoPixel <led nr>,<red>,<green>,<blue>
its too strong coding for me, maybe i can follow the steps after change..?
regards
Tim
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Hi,
@Martinus:
Wouldn´t it be better to open a new topic for your neopixel plugin?
It get´s a little bit offtopic here
@Martinus:
Wouldn´t it be better to open a new topic for your neopixel plugin?
It get´s a little bit offtopic here
regards
Dominik
Dominik
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Did you try to send MQTT command to the topic "/<%sysname%>/cmd"; it shoudl work...timsson wrote:Who can change the code to use it with mqtt?Martinus wrote: I uploaded my basic test plugin for neopixel in the playground:
https://github.com/ESP8266nu/ESPEasyPlu ... oPixel.ino
Use rules commands to control single WS2812 leds into any color:
neoPixel <led nr>,<red>,<green>,<blue>
its too strong coding for me, maybe i can follow the steps after change..?
regards
Tim
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
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
On my side that a total fail.
Tweaking r141 core 2.3.0
using a ws2812b led strip (11 pixel)
nodemcu esp12e and wemos mini
tweaking candle.ino to match to 11 pixel in 1 raw
reading this topic again and again
No way to make ws2812b bright (separate power for esp and led, use the same pin port as the video, led stay off.
What i'hve miss ? can you share a .bin working conf ?
I test the same hardware with ESP Fire 2012 all is find.
Tweaking r141 core 2.3.0
using a ws2812b led strip (11 pixel)
nodemcu esp12e and wemos mini
tweaking candle.ino to match to 11 pixel in 1 raw
reading this topic again and again
No way to make ws2812b bright (separate power for esp and led, use the same pin port as the video, led stay off.
What i'hve miss ? can you share a .bin working conf ?
I test the same hardware with ESP Fire 2012 all is find.
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Hi !
Maybe you missed this one:
If you can´t get it working just send me a private message with your mail address. I will contact you and you can send me your code for review ...
Maybe you missed this one:
I have fixed that in the Github text ...There is one thing in the github version that I had to add to make it compile and run and this was to define the variable "timer25ms" using:
This is placed next to where the "timer100ms" is defined.Code: Select all
unsigned long timer25ms;
Hope you tweaked your ESPEasy code. Just copy the candle.ino wouldn´t work here.What i'hve miss ?
If you can´t get it working just send me a private message with your mail address. I will contact you and you can send me your code for review ...
regards
Dominik
Dominik
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
It's possible to use FastLED library instead of Adafruit_NeoPixel in your sketch?
FastLED supports basically all types of LED controllers, including NeoPixel ws28121B
FastLED supports basically all types of LED controllers, including NeoPixel ws28121B
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Hi @moelski
This works really well but I'm struggling with one thing and this is how to control the Wifi candle over mqtt. Could you (or someone else more enlightened than me) please provide the mqtt messages required to control Color, Brightness and Type?
Thank you for all the help
This works really well but I'm struggling with one thing and this is how to control the Wifi candle over mqtt. Could you (or someone else more enlightened than me) please provide the mqtt messages required to control Color, Brightness and Type?
Thank you for all the help
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
@devs...moelski wrote:I have fixed that in the Github text ...There is one thing in the github version that I had to add to make it compile and run and this was to define the variable "timer25ms" using:
This is placed next to where the "timer100ms" is defined.Code: Select all
unsigned long timer25ms;
can this go into the mainline source, so any version update wont break ?
would be great ... long waited for LED integration to espeasy (not only sensors...)
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Martinus wrote: I uploaded my basic test plugin for neopixel in the playground:
https://github.com/ESP8266nu/ESPEasyPlu ... oPixel.ino
Use rules commands to control single WS2812 leds into any color:
neoPixel <led nr>,<red>,<green>,<blue>
Just a demo rules set for a single LED:
Code: Select all
on System#Boot do timerSet 1,10 endon on Rules#Timer=1 do neopixel,1,50,0,0 // red delay 100 neopixel,1,0,50,0 // green delay 100 neopixel,1,0,0,50 // blue delay 100 neopixel,1,25,25,25 // white timerSet 1,5 endon
can the demo-rules go into the header of the playground plugin?
its hard to keep track on this details, to get started.
the plugins are mostly bare code, so its really a challence to try them ...
little help in the header would be helpful for testing...
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
snow wrote:It's possible to use FastLED library instead of Adafruit_NeoPixel in your sketch?
FastLED supports basically all types of LED controllers, including NeoPixel ws28121B
hi dominik,
consider to use fastled lib (to play with?) as an alternative.
i found color-palettes very playful. you can change colors without chaning code for animation...
may have a look here and in the demo
https://github.com/FastLED/FastLED/wiki ... r-palettes
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
you got me starting again with espeasy and leds....
an actual finding, mabye of interest
+1
https://github.com/jasoncoon/esp8266-fastled-webserver
an actual finding, mabye of interest
+1
https://github.com/jasoncoon/esp8266-fastled-webserver
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Hello @moelski
Thank you very much for sharing your work.
I had it running in almost no time (5 minutes?) following your instructions.
Do you have plans to implement the Fire2012 algorithm? Or maybe some other person already did (being it integrated in Wifi Candle or just as a separate plugin)?
It would bee good to be able to adjust the strip's number of pixels.
I have plans to convert two old Ikea Kyoto lamps to WS2812 led strip and this effect is just what I need.
I already looked at the code but it's too complex for me to try to include the Fire2012.
Thank you very much for sharing your work.
I had it running in almost no time (5 minutes?) following your instructions.
Do you have plans to implement the Fire2012 algorithm? Or maybe some other person already did (being it integrated in Wifi Candle or just as a separate plugin)?
It would bee good to be able to adjust the strip's number of pixels.
I have plans to convert two old Ikea Kyoto lamps to WS2812 led strip and this effect is just what I need.
I already looked at the code but it's too complex for me to try to include the Fire2012.
DIY CO2 monitor with ESP Easy at https://emariete.com/medidor-casero-co2/
ESP Easy related info at my blog: https://emariete.com/tag/espeasy/
ESP Easy related info at my blog: https://emariete.com/tag/espeasy/
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Hi @all,
I had some busy days in the last weeks so I was not really able to follow all questions here ...
But it seems that there are some guys which have problems getting the candle up und running
So i think it would be the best to write a new tutorial with all steps explained in detail.
Hopefully my english skills will stand this adventure
@Mariete
And the code is not so easy ... Maybe I give it a try ...
Ok guys ... Let me write the tutorial ... And hopefully all problems are solved ...
I had some busy days in the last weeks so I was not really able to follow all questions here ...
But it seems that there are some guys which have problems getting the candle up und running
So i think it would be the best to write a new tutorial with all steps explained in detail.
Hopefully my english skills will stand this adventure
@Mariete
Will see ... Maybe in December. The main problem is that the Fire Simulation needs a lot more speed for running.Fire2012 algorithm
And the code is not so easy ... Maybe I give it a try ...
That would be a good extension ... But again ... I can do it in december. no time before ...It would bee good to be able to adjust the strip's number of pixels.
I can check that ....consider to use fastled lib (to play with?) as an alternative.
Ok guys ... Let me write the tutorial ... And hopefully all problems are solved ...
regards
Dominik
Dominik
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Hi Moelski,
We all have our favorite animation, and mine is disco
Would it be a sugestion to implement artnet as protocol for the ws2812/neopix ?
https://github.com/rstephan/ArtnetWifi/ ... oPixel.ino
Artnet is a protocol that is like dmx and there is many free software out there that does Fire, animated gifs, videos, or any other led candy, music controlled or even ambilight.
http://www.solderlab.de/index.php/software/glediator
http://www.live-leds.de/
Yes, i did try to make a plugin myself based on martinus his neopixel plugin, but failed hard. Some how i do understand, and can identify the blocks of code in general. But changing the neopixel plugin to the artnet code is just to much for my head.
We all have our favorite animation, and mine is disco
Would it be a sugestion to implement artnet as protocol for the ws2812/neopix ?
https://github.com/rstephan/ArtnetWifi/ ... oPixel.ino
Artnet is a protocol that is like dmx and there is many free software out there that does Fire, animated gifs, videos, or any other led candy, music controlled or even ambilight.
http://www.solderlab.de/index.php/software/glediator
http://www.live-leds.de/
Yes, i did try to make a plugin myself based on martinus his neopixel plugin, but failed hard. Some how i do understand, and can identify the blocks of code in general. But changing the neopixel plugin to the artnet code is just to much for my head.
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
How do i controll this with Domoticz?
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
I am having some troubles getting this to work. The steps I have taken:
1: download ESP Easy 147 firmware.
2: Edit all files as the info says in the sketch
3: copy _P121_Candle.ino to ..\Source\ESPEasy -folder
3: Flash to ESP8266
4: use <IP>/upload the jscolor.min.js...
5: Neopixel is already installed if I understand correctly? In 147 there is already a folder called neopixel in libraries.
But I get no option to select candle/wifi candle under devices.
1: download ESP Easy 147 firmware.
2: Edit all files as the info says in the sketch
3: copy _P121_Candle.ino to ..\Source\ESPEasy -folder
3: Flash to ESP8266
4: use <IP>/upload the jscolor.min.js...
5: Neopixel is already installed if I understand correctly? In 147 there is already a folder called neopixel in libraries.
But I get no option to select candle/wifi candle under devices.
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Hi burton666,
will check it today. I´m actually working on embedding the candle into my FHEM homeautomatisation system.
I will compile it with 147 and see if there are any problems left ...
will check it today. I´m actually working on embedding the candle into my FHEM homeautomatisation system.
I will compile it with 147 and see if there are any problems left ...
regards
Dominik
Dominik
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Hi @all,
have done some work to enhance the documentation:
http://www.logview.info/Temp/CandleNotes.pdf
I will update the doc with information how to Setup FHEM and how to use MQTT.
have done some work to enhance the documentation:
http://www.logview.info/Temp/CandleNotes.pdf
I will update the doc with information how to Setup FHEM and how to use MQTT.
regards
Dominik
Dominik
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
I implemented the Fire2012 algorithm and it's working now.
I don't like the effect very much at the moment. May be it has something to do with the color mapping, not sure.
Give me some time to see if I can fix the color mapping issue and clean the code and I'll upload it to the playground (or just live the code here if it doesn't deserves a plugin).
You can see the effect here: https://youtu.be/KVLsspIZyyk
I don't like the effect very much at the moment. May be it has something to do with the color mapping, not sure.
Give me some time to see if I can fix the color mapping issue and clean the code and I'll upload it to the playground (or just live the code here if it doesn't deserves a plugin).
You can see the effect here: https://youtu.be/KVLsspIZyyk
DIY CO2 monitor with ESP Easy at https://emariete.com/medidor-casero-co2/
ESP Easy related info at my blog: https://emariete.com/tag/espeasy/
ESP Easy related info at my blog: https://emariete.com/tag/espeasy/
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Hi Mariete,
looks nice, but I think the main problem is that it´s a fire simulation.
And at y candle you don´t have this huge flame nor such sparkles flying around...
Did you include it into my code?
looks nice, but I think the main problem is that it´s a fire simulation.
And at y candle you don´t have this huge flame nor such sparkles flying around...
Did you include it into my code?
regards
Dominik
Dominik
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
I tried at first to include it into your code but I found it to be more difficult so I started from scratch (with the Martinu's WS2812 plugin).moelski wrote:Hi Mariete,
looks nice, but I think the main problem is that it´s a fire simulation.
And at y candle you don´t have this huge flame nor such sparkles flying around...
Did you include it into my code?
If you want I can send you the code to include it into your code. I will be easy for you, I guess.
DIY CO2 monitor with ESP Easy at https://emariete.com/medidor-casero-co2/
ESP Easy related info at my blog: https://emariete.com/tag/espeasy/
ESP Easy related info at my blog: https://emariete.com/tag/espeasy/
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Ok you can send it to dominik AT logview DOT info.
I will have a look.
I will have a look.
regards
Dominik
Dominik
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Sent!moelski wrote:Ok you can send it to dominik AT logview DOT info.
I will have a look.
I added (for a smother effect) a PLUGIN_SIXTY_PER_SECOND.
I sent to you also the latest ESPEasy.ino and __Plugin.ino I used to compile it, just in case I modified something more I don't remember.
DIY CO2 monitor with ESP Easy at https://emariete.com/medidor-casero-co2/
ESP Easy related info at my blog: https://emariete.com/tag/espeasy/
ESP Easy related info at my blog: https://emariete.com/tag/espeasy/
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
I am going to try again with the candle, but before I start again was it possible to specify how many leds that are used ? or do I need a specific number of leds?
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
@Moelski, great project, i followed the setup notes and can report it is working as expected
Is there a way to have it included in Domoticz and control it like the MiLight?
Is there a way to have it included in Domoticz and control it like the MiLight?
-
- New user
- Posts: 8
- Joined: 13 Jun 2016, 05:24
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
I have followed the instructions very carefully and I am getting the following compile error. I've tried it on a PC and on Mac and on Arduino 1.6.5 (i believe) and now on 1.8. PLEASE HELP. I've been beating my head against the wall for 3 hours trying to get this to work.
D:\Users\ESPEasy_R120 wplugin\Source\ESPEasy\WebServer.ino: In function 'void WebServerInit()':
WebServer:19: error: 'handle_upload_post' was not declared in this scope
WebServer.on("/upload", HTTP_POST, handle_upload_post, handleFileUpload);
^
exit status 1
'handle_upload_post' was not declared in this scope
D:\Users\ESPEasy_R120 wplugin\Source\ESPEasy\WebServer.ino: In function 'void WebServerInit()':
WebServer:19: error: 'handle_upload_post' was not declared in this scope
WebServer.on("/upload", HTTP_POST, handle_upload_post, handleFileUpload);
^
exit status 1
'handle_upload_post' was not declared in this scope
-
- New user
- Posts: 8
- Joined: 13 Jun 2016, 05:24
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
ok, so i found the other threads (here and here) on problems with compiling with SPIFFS set to true. Like others, by disabling SPIFFS I was able to compile and get it loaded and working on my esp8266 but I would like to solve the mystery of why it won't compile.
Additionally and (for me), more important, is that I'm trying to figure out how control the color and brightness via MQTT commands but I can not figure out the right format to publish so that the device will respond. In the advanced menu (under Tools), you see that the subscribe template is /%sysname%/#. Someone mentioned that this format would work ("/<%sysname%>/cmd"), but i've not been able to get it to work. I've published numerous ways with no result.
/sysname/Brightness
/sysname/candle/Brightness
/sysname/cmd/Brightness
all with a value of between 1 and 255 but nothing is working. If anyone knows, can you please send exactly what you're using?
Thanks
Additionally and (for me), more important, is that I'm trying to figure out how control the color and brightness via MQTT commands but I can not figure out the right format to publish so that the device will respond. In the advanced menu (under Tools), you see that the subscribe template is /%sysname%/#. Someone mentioned that this format would work ("/<%sysname%>/cmd"), but i've not been able to get it to work. I've published numerous ways with no result.
/sysname/Brightness
/sysname/candle/Brightness
/sysname/cmd/Brightness
all with a value of between 1 and 255 but nothing is working. If anyone knows, can you please send exactly what you're using?
Thanks
-
- New user
- Posts: 8
- Joined: 13 Jun 2016, 05:24
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
Another update on my progress. I've successfully complied and enabled SPIFFS by following Moelski's updated instructions here. The primary difference is that I had to use build 147 versus 120 but i'm fine with that.
Next, MQTT... I also compiled and loaded the MQTT Import plugin (and Extra Utilities) which appear to have successfully installed. Now, i'm trying to figure out how to publish (externally) to an MQTT topic such as /node2/candle/Brightness and have WiFi Candle brightness be adjusted accordingly without having to go through the UI of the ESP.
My goal is to create a Dashboard in Node-Red with buttons that will publish MQTT messages to the topics the ESP is subscribed to and to have the payload change the values on the Wifi Candle. I feel like i'm very close and am wondering if I need to use a combination of the MQTT_Import feature as well as a Rule on the device to change the value of the Candle Brightness based on the MQTT Import message. Here are some screen shots of what I have so far. You can see that on my MQTT Import item, It is reading the 'Brightness' value that I published out of MQTT Spy...
Next, MQTT... I also compiled and loaded the MQTT Import plugin (and Extra Utilities) which appear to have successfully installed. Now, i'm trying to figure out how to publish (externally) to an MQTT topic such as /node2/candle/Brightness and have WiFi Candle brightness be adjusted accordingly without having to go through the UI of the ESP.
My goal is to create a Dashboard in Node-Red with buttons that will publish MQTT messages to the topics the ESP is subscribed to and to have the payload change the values on the Wifi Candle. I feel like i'm very close and am wondering if I need to use a combination of the MQTT_Import feature as well as a Rule on the device to change the value of the Candle Brightness based on the MQTT Import message. Here are some screen shots of what I have so far. You can see that on my MQTT Import item, It is reading the 'Brightness' value that I published out of MQTT Spy...
Re: Wifi Candle - illuminate with ESPEasy (WS2812)
I just saw some additional comments in the source code of the plugin about MQTT
Starting at line 454
Might be useful for you?
Starting at line 454
Might be useful for you?
Code: Select all
// Test
// MQTT : mosquitto_pub -d -t sensors/espeasy/ESP_Candle/cmd -m "CANDLE_OFF"
// HTTP : http://192.168.30.183/tools?cmd=CANDLE%3A5%3AFF0000%3A200
// http://192.168.30.183/tools?cmd=CANDLE:4:FF0000:200
// SERIAL : CANDLE:4:FF0000:200<CR><LF>
// Commands
// CANDLE:<FlameType>:<Color>:<Brightness>
// <FlameType> : 1 Static Light, 2 Simple Candle, 3 Advanced Candle, 4 Police, 5 Blink, 6 Strobe, 7 Color Fader
// <Color> : n.def. Use the default color
// RRGGBB Use color in RRGGBB style (red, green blue) as HEX
// <Brightness> : 0-255
// Samples: CANDLE:2::100 Simple Candle with Default color and Brigthness at 100
// CANDLE:5:FF0000:200 Blink with RED Color and Brigthness at 200
// CANDLE:0:: Candle OFF
// CANDLE:1::255 Candle ON - White and full brigthness
Who is online
Users browsing this forum: No registered users and 1 guest