Wifi Candle - illuminate with ESPEasy (WS2812)

Moderators: BertB, rtenklooster, Voyager, Stuntteam, Martinus

Message
Author
User avatar
moelski
Normal user
Posts: 124
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#41 Post by moelski » 29 Dec 2016, 10:35

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?
regards
Dominik

Mariete
Normal user
Posts: 13
Joined: 05 Nov 2015, 19:16

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#42 Post by Mariete » 29 Dec 2016, 10:40

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?
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).

If you want I can send you the code to include it into your code. I will be easy for you, I guess.

User avatar
moelski
Normal user
Posts: 124
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#43 Post by moelski » 29 Dec 2016, 10:49

Ok you can send it to dominik AT logview DOT info.
I will have a look.
regards
Dominik

Mariete
Normal user
Posts: 13
Joined: 05 Nov 2015, 19:16

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#44 Post by Mariete » 29 Dec 2016, 11:01

moelski wrote:Ok you can send it to dominik AT logview DOT info.
I will have a look.
Sent!

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.

burton666
Normal user
Posts: 10
Joined: 02 Dec 2016, 19:52

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#45 Post by burton666 » 31 Dec 2016, 14:46

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?

m.lamie
Normal user
Posts: 4
Joined: 20 Mar 2016, 16:40

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#46 Post by m.lamie » 07 Jan 2017, 10:25

@Moelski, great project, i followed the setup notes and can report it is working as expected :D

Is there a way to have it included in Domoticz and control it like the MiLight?

Image

paulymorph
Normal user
Posts: 8
Joined: 13 Jun 2016, 05:24

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#47 Post by paulymorph » 09 Jan 2017, 00:29

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

paulymorph
Normal user
Posts: 8
Joined: 13 Jun 2016, 05:24

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#48 Post by paulymorph » 10 Jan 2017, 03:29

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

paulymorph
Normal user
Posts: 8
Joined: 13 Jun 2016, 05:24

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#49 Post by paulymorph » 10 Jan 2017, 18:40

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...
Screen Shot 2017-01-10 at 11.24.07 AM.png
Screen Shot 2017-01-10 at 11.24.07 AM.png (127.08 KiB) Viewed 2959 times
Screen Shot 2017-01-10 at 11.21.03 AM.png
Screen Shot 2017-01-10 at 11.21.03 AM.png (52.77 KiB) Viewed 2959 times
Screen Shot 2017-01-10 at 11.27.50 AM.png
Screen Shot 2017-01-10 at 11.27.50 AM.png (82.06 KiB) Viewed 2959 times
Screen Shot 2017-01-10 at 11.19.33 AM.png
Screen Shot 2017-01-10 at 11.19.33 AM.png (54.91 KiB) Viewed 2959 times

jjansen
Normal user
Posts: 14
Joined: 17 Oct 2016, 14:20

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#50 Post by jjansen » 10 Jan 2017, 20:03

I just saw some additional comments in the source code of the plugin about MQTT
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

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests