Wifi Candle - illuminate with ESPEasy (WS2812)

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
uhrheber
Normal user
Posts: 22
Joined: 26 Sep 2016, 14:03

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#21 Post by uhrheber » 26 Oct 2016, 21:15

Martinus wrote: I uploaded my basic test plugin for neopixel in the playground:
I'm just testing it.
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.

timsson
Normal user
Posts: 77
Joined: 25 Mar 2016, 22:00

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#22 Post by timsson » 27 Oct 2016, 11:13

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>
Who can change the code to use it with mqtt?
its too strong coding for me, maybe i can follow the steps after change..?
regards
Tim

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

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#23 Post by moelski » 27 Oct 2016, 11:28

Hi,

@Martinus:
Wouldn´t it be better to open a new topic for your neopixel plugin?
It get´s a little bit offtopic here :oops:
regards
Dominik

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

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#24 Post by papperone » 27 Oct 2016, 11:34

timsson wrote:
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>
Who can change the code to use it with mqtt?
its too strong coding for me, maybe i can follow the steps after change..?
regards
Tim
Did you try to send MQTT command to the topic "/<%sysname%>/cmd"; it shoudl work...
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

Deennoo
Normal user
Posts: 158
Joined: 07 Sep 2015, 13:03

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#25 Post by Deennoo » 27 Oct 2016, 11:58

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.

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

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#26 Post by moelski » 27 Oct 2016, 12:36

Hi !

Maybe you missed this one:
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;
This is placed next to where the "timer100ms" is defined.
I have fixed that in the Github text ...
What i'hve miss ?
Hope you tweaked your ESPEasy code. Just copy the candle.ino wouldn´t work here.

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

snow
New user
Posts: 2
Joined: 20 Oct 2016, 09:11

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#27 Post by snow » 29 Oct 2016, 00:43

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

TomasB
New user
Posts: 3
Joined: 25 Oct 2016, 23:16

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#28 Post by TomasB » 29 Oct 2016, 19:17

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

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#29 Post by tozett » 31 Oct 2016, 09:27

moelski wrote:
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;
This is placed next to where the "timer100ms" is defined.
I have fixed that in the Github text ...
@devs...
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...)
;-)

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#30 Post by tozett » 31 Oct 2016, 11:00

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

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#31 Post by tozett » 31 Oct 2016, 14:25

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

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#32 Post by tozett » 01 Nov 2016, 18:52

you got me starting again with espeasy and leds....

an actual finding, mabye of interest

+1

https://github.com/jasoncoon/esp8266-fastled-webserver

Mariete
Normal user
Posts: 21
Joined: 05 Nov 2015, 19:16
Location: Madrid, Spain
Contact:

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#33 Post by Mariete » 23 Nov 2016, 09:25

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.
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/

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

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#34 Post by moelski » 24 Nov 2016, 19:19

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 :o

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 :D

@Mariete
Fire2012 algorithm
Will see ... Maybe in December. The main problem is that the Fire Simulation needs a lot more speed for running.
And the code is not so easy ... Maybe I give it a try ...
It would bee good to be able to adjust the strip's number of pixels.
That would be a good extension ... But again ... I can do it in december. no time before ...
consider to use fastled lib (to play with?) as an alternative.
I can check that ....

Ok guys ... Let me write the tutorial ... And hopefully all problems are solved ... :ugeek:
regards
Dominik

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

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#35 Post by r_255 » 27 Nov 2016, 09:05

Hi Moelski,

We all have our favorite animation, and mine is disco :D
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.

TMS
New user
Posts: 1
Joined: 30 Nov 2016, 18:29

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#36 Post by TMS » 30 Nov 2016, 18:31

How do i controll this with Domoticz?

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

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#37 Post by burton666 » 22 Dec 2016, 16:19

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.

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

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#38 Post by moelski » 29 Dec 2016, 06:05

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

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

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#39 Post by moelski » 29 Dec 2016, 08:04

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

Mariete
Normal user
Posts: 21
Joined: 05 Nov 2015, 19:16
Location: Madrid, Spain
Contact:

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

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

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
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/

User avatar
moelski
Normal user
Posts: 161
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: 21
Joined: 05 Nov 2015, 19:16
Location: Madrid, Spain
Contact:

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.
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/

User avatar
moelski
Normal user
Posts: 161
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: 21
Joined: 05 Nov 2015, 19:16
Location: Madrid, Spain
Contact:

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.
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/

burton666
Normal user
Posts: 11
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
New 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
New 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
New 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
New 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 78915 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 78915 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 78915 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 78915 times

jjansen
Normal user
Posts: 21
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

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

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#51 Post by paulymorph » 11 Jan 2017, 00:54

Thank you very much jjansen. This is definitely progress. Already have a quick success using the HTTP method. Now i'll play with the MQTT examples to see if I can get the syntax right.
jjansen wrote:I just saw some additional comments in the source code of the plugin about MQTT
Starting at line 454

Might be useful for you?

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

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#52 Post by paulymorph » 11 Jan 2017, 08:02

SUCCESS!!! I was able to get it all working except for one small thing. I created a Dashboard in Node-Red that can control all the attributes of the Wifi Candle all by sending formatted MQTT messages when I press the button on the dashboard after i have all the settings that I like.

The format for the MQTT message is the following

Topic:
/node2/candle/cmd Node2=device name, candle=The name i gave the Wifi Candle (called "Device" in ESP Easy), cmd= the operator that Moelski wrote into the code.

Message:
COLOR:2:8E3EFF:120 COLOR=static : 2 (Flame Type) : 8E3EFF (Hex color) : 120 (Brightness value 1-255)

1 Static Light, 2 Simple Candle, 3 Advanced Candle, 4 Police, 5 Blink, 6 Strobe, 7 Color Fader

The only thing i couldn't get to work is mode 7 (Color fader). It doesn't seem to work if I try that mode.

I'm glad to share the actual JSON of the flow if anyone is interested.
Screen Shot 2017-01-11 at 12.50.30 AM.png
Screen Shot 2017-01-11 at 12.50.30 AM.png (79.06 KiB) Viewed 51802 times
Screen Shot 2017-01-11 at 12.57.01 AM.png
Screen Shot 2017-01-11 at 12.57.01 AM.png (101.64 KiB) Viewed 51802 times

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

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#53 Post by moelski » 11 Jan 2017, 08:32

Great work Paul.

I think there is one command missing for using default colors or not.
But that is missing in the sources ... I have to add that in the next days.

Anyway ... Your solution looks great.
Personally I use FHEM and I will update my manual for FHEM usage, too.
regards
Dominik

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

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#54 Post by paulymorph » 11 Jan 2017, 21:43

Thanks moelski! I actually have a solution for the default colors... if I send the MQTT payload with nothing in the space for color, it reverts to the default color. Example "COLOR:2::100".

BTW! Do you have an idea why mode 7 doesn't appear to work? It works if I manually change it from the ESP EASY interface (I think). I know it was working on R120 at least.

Thanks

nygma
Normal user
Posts: 25
Joined: 26 Nov 2016, 11:16

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#55 Post by nygma » 18 Jan 2017, 20:41

On a different topic I was asking if a fade function can be made available for the PWM output. Can this candle logic be adapted output the values to 3 GPIOs using PWM instead of neopixel?

medline2c
New user
Posts: 4
Joined: 17 Jan 2017, 00:47

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#56 Post by medline2c » 23 Jan 2017, 13:58

Bonjour !
Félicitations pour ce beau projet... profil bas...
Je suis sur Jeedom avec plugIn EspEasy et je voulais savoir du coup, ayant lu plein de choses sur les ws8212 suite à cet article :
Les librairies ws8212 seraient peu compatibles avec les communications séries (I2C...) : qu'en est-il avec ce programme ? peut-on quand même piloter un afficher LED/OLED ou un lecteur RFID en I2C ou c'est mort...
Autre question : vous me confirmez bien qu'avec la première bibliothèque, je peux néanmoins piloter individuellement des néopixels mais du coup dans la limite de 12 maxi (limitation espeasy sur nombre de devices) ?...
Merci ... je suis ce post avec gourmandise !... bonne continuation !
Christophe

Google traduction :
Hello !
Congratulations for this beautiful project ...
I am on Jeedom with plugIn EspEasy and I wanted to know of the coup, having read many things about the ws8212 following this article:
The libraries ws8212 would be poorly compatible with the serial communications (I2C ...): what is with this program? Can you still drive an LED / OLED display or an RFID reader in I2C or it isn't possible ...
Another question: you confirm to me that with the first library, I can nevertheless drive neopixels but within the limit of 12 maxi (limitation of espeasy on many devices)?
Thank you ... I am this post with gluttony! ... good continuation!
Christophe

Barb232
Normal user
Posts: 40
Joined: 12 Mar 2016, 16:40
Location: Earth
Contact:

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#57 Post by Barb232 » 23 Jan 2017, 14:27

Hi Dominik,

can you send me a link from your manual?
i cant get it working the MQTT and the Candle (using MEGA EasyESP)

groovy
Normal user
Posts: 39
Joined: 14 Oct 2016, 11:32
Location: Chemnitz, Germany

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#58 Post by groovy » 23 Jan 2017, 19:07

I built this candle and it works fine, thanks for sharing!
However, I want to use it with a PIR to enable/disable it when movement is detected.
The whole background and questions can be found on my original post, but maybe here is a better place to ask.
In summary, I want to switch the candle on, when movement is detected and switch it off after a period of time.
Any suggestions?

medline2c
New user
Posts: 4
Joined: 17 Jan 2017, 00:47

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#59 Post by medline2c » 24 Jan 2017, 00:26

Bonsoir !
Je suis en train de tester avec un NodeMCUV1.0.
Cela fonctionne à priori, sauf que lorsque le Node envoie une trame en HTTP à Jeedom, cela stoppe l'animation puis cela repart ensuite.. est-ce normal ? (communication série = interruption ?)
Ensuite, je ne parviens pas à trouver comment piloter via Jeedom la WifiCandle ?... Pouvez-vous m'indiquer la requête HTTP à exécuter ?..
Pour terminer, j'aimerais tester le pilotage d'un NeoPixel en HTTP, comment faire depuis Jeedom étant donné que l'on n'a pas l'option "Send data" quand on choisi ce type de device ?
Merci pour votre aide.
Christophe

Good evening!
I'm trying to test with a NodeMCUV1.0. It seem work good, except when the Node sends an HTTP frame to Jeedom : animation stop and then it starts again .. is this normal? (Serial communication = interruption?)
Then, I can not find how to drive via Jeedom the WifiCandle ... Can you tell me the HTTP request to run ? I've only "info" data send to jeedom but how do the same to the WifiCandle ? I don't understand...
Finally, I would like to test the control of only one NeoPixel with an HTTP command (with NeoPixel Basic installed), how to do withJeedom : I don't find the option "Send data" when choosing this type of device?
Thank you for your help.
Christophe

medline2c
New user
Posts: 4
Joined: 17 Jan 2017, 00:47

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#60 Post by medline2c » 25 Jan 2017, 18:08

Bonsoir,
Je me réponds partiellement à moi même (avis aux débutants tout petit niveau comme moi...) :
J'ai passé plusieurs heures à essayer de comprendre comme tout ça fonctionnait et j'ai réussi par Jeedom à commander la WifiCandle. Il suffit d'inclure dans le plugIn EspEasy la WifiCandle puis d'ajouter dans l'onglet COMMANDES, une commande d'action avec dans la zone "Task et variable" une ligne du style "CANDLE:2::100" pour activer le mode bougie simple avec une luminosité de 100... cela va faire apparaître des boutons pour changer le mode... je n'ai pas trouvé comment faire un curseur pour la couleur mais je cherche...

La question que je me pose toutefois est la suivante :
Etant donné qu'on ne peut gérer d'interruptions, on utilise la fonction millis() ... mais que ce passe-t-il au bout de plusieurs jours d'utilisation, quand la valeur de millis() va revenir à zéro... je n'ai rien vu qui prévoit le cas... :

Code: Select all

Candle_Update = millis() + 150;
(~ligne 402)
J'ai raté quelque chose ?...

Christophe

Good evening,
I respond partially to myself (notice to beginners a little level like me ...):
I spent several hours trying to figure out how it all worked and I managed by Jeedom to order the WifiCandle. It is enough to include in the plugin EspEasy the WifiCandle then to add an action command in the "Task and variable" section of the "CANDLE: 2" :: 100 "to activate the simple candle mode with a brightness of 100 ... this will bring up buttons to change the mode ... I have not found how to make a slider for color but I'm looking for ...

The question I ask myself, however, is this:
Since we can not handle interrupts, we use the function millis () ... but it happens after several days d Use, when the value of millis () will return to zero ... I have not seen anything that provides the case ...:

Code: Select all

 Candle_Update = millis () + 150; 
(~ line 402)
Did I miss something ?...

Christophe

groovy
Normal user
Posts: 39
Joined: 14 Oct 2016, 11:32
Location: Chemnitz, Germany

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#61 Post by groovy » 31 Jan 2017, 08:09

Is it possible to disable saving the settings to flash every time anything is changed?
I'm asking this, because my candle switches on and off many times, so I'm afraid killing the flash really soon.
Can I simply remove these two lines from the code at around line 530?

Code: Select all

SaveTaskSettings(event->TaskIndex);
SaveSettings();
Does this have any other impact? Or should I only remove the second line and leave the first? I'm unsure, so can someone point me at the right direction?

marko67
New user
Posts: 7
Joined: 20 Jan 2017, 06:40

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#62 Post by marko67 » 10 Apr 2017, 17:29

Hello I need your help.
I am using R147 with the extension _p121 candle. A WS2812B strip with 30 neopixel. Is controlled by FHEM.

my question:
How can I control 1-10 led in red 11-20 led in blue and 21-30 led in white control. Is this only with _P122_NeoPixel.ino and if so how?

many thanks for your help

Marko

passie
Normal user
Posts: 20
Joined: 18 Mar 2017, 07:27

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#63 Post by passie » 13 Apr 2017, 13:12

Got the candle working via de esp web gui.
Which command's should be send in order to control the light via mqqt from ex pimatic or any other home automation software ?

I would like to control the led's with an if statement.
So for example:

If temp is > 20 celcius then make the leds red / flash.

-- passie

rolfz
New user
Posts: 3
Joined: 19 Feb 2017, 09:54
Location: Switzerland
Contact:

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#64 Post by rolfz » 25 Apr 2017, 23:44

Just realised that my question was answered on m Post #54.

Hi Paul, great work,

Would it be possible to post the node-red (JSON) code for your solution ? I did not yet get the details about how to setup the message COLOR:2:8E3EFF:120

//Rolf

passie
Normal user
Posts: 20
Joined: 18 Mar 2017, 07:27

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#65 Post by passie » 27 Apr 2017, 09:01

What is the complete mqtt message which has to be send in order to ex. change color ?
Currently i'm able to send mqtt pub to easpeasy like so:

mosquitto_pub -d -h 127.0.0.1 -t mosquitto_pub -h 127.0.0.1 -t /home/candle/Color/cmd -m 'FF0000'
mosquitto_pub -d -h 127.0.0.1 -t mosquitto_pub -h 127.0.0.1 -t /home/candle/Brightness/cmd -m '11'
mosquitto_pub -d -h 127.0.0.1 -t mosquitto_pub -h 127.0.0.1 -t /home/candle/Type/cmd -m '2'

This is working for individual mqtt messages.
But how could i send the complete string to the espeasy so it changes color or do something else ?


Any help would be appreciated.

-- passie

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

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#66 Post by Dylantje » 27 Apr 2017, 09:56

Is this option available in the normal EspEasy flash?

passie
Normal user
Posts: 20
Joined: 18 Mar 2017, 07:27

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#67 Post by passie » 29 Apr 2017, 08:52

Dylantje wrote: 27 Apr 2017, 09:56 Is this option available in the normal EspEasy flash?
No it isn't.

passie
Normal user
Posts: 20
Joined: 18 Mar 2017, 07:27

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#68 Post by passie » 29 Apr 2017, 08:57

I'm trying different pub's but i'm unable to get it working via mqtt

Code: Select all

mosquitto_pub -h 127.0.0.1 -t /home/candle/ -m "cmd=CANDLE:1:00FF00:100"
Via a curl I can control the neopixel.

Code: Select all

set_candle_above: 'curl --data "cmd=CANDLE:3:FF0000:200" http://192.168.0.3/control'
Any clue points here ?

artic1980
New user
Posts: 4
Joined: 09 Apr 2017, 17:57

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#69 Post by artic1980 » 30 Apr 2017, 09:35

You can check it through domoticz

passie
Normal user
Posts: 20
Joined: 18 Mar 2017, 07:27

Re: Wifi Candle - illuminate with ESPEasy (WS2812)

#70 Post by passie » 30 Apr 2017, 11:08

artic1980 wrote: 30 Apr 2017, 09:35 You can check it through domoticz
I'm trying to send the mqtt pub message not the integration with domoticz!?

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests