Am I using the right program/hardware?

Hello all!
I'll get right to it. I am trying to wirelessly control under cabinet LED strips for a kitchen. There is a white strip, and a blue strip. The kitchen is separated in 2 sections so I cant wire them all to the same outlet. I have purchased 3 NODEMCU 12-E boards and have tinkered with arduino and the basics. I was successful in making a LED turn on and off with the browser and wifi. I am trying to step it up for the kitchen LED project to have one of the nodemcu boards be the master in a small, standalone package with a dimmer control, and be able to toggle between the blue and white colors. The other 2 nodemcu boards would be the slaves to carry out the commands to the 2 separate pairs of LED strips simultaneously. I have been sending feelers out to IOT blogs and I have had 1 response to the effect of what I am trying to accomplish can be done with node-red and mosquitto. I have both of these up and running but do not know how to proceed.
Can anyone help?
Thank you,
Kyle

If you can do that, you can for sure do it with Node-RED as well. Even better if you can do it with MQTT. In anyway, Node-RED can do it

Have you thought about using a ESP opensource firmware like tasmota, or ESPEasy?

I'm using ESPEasy for several years now.together with the Homie convention for mqtt standardized communication over mqtt together with Node-Red.

connecting a RGB LED is then a very easy step.
image

1 Like

Sorry I forgot the second part. If you are into DIY hardware or hacking of the shelf devices the esp8266 is definitely a good choice in my opinion. I use 100% diy build devices and of the shelf’s devices like from sonof for my applications. Any if the esp8266 is not powerful enough you can easily transfer to the esp32. But for all my projects the esp8266 was always sufficient.

Probably off-topic...

This Homie convention has definitely caught my interest (first read about it in your other thread). It's well thought-out and is providing a good level of abstraction.

I am currently using the pre-compiled ESP_Easy_mega-20190830_normal_ESP8266_4M.bin on all of my nodes.

Is your Homie Controller for ESPEasy part of the "normal" plug-in set? I haven't found it in the controller list. Or do I have to create a custom build for this?

The plugins C014 Homie Controller and P086 Homie reciever are only available in development builds. Either build it using platform-io or it is already included in the latest development builds available (not checked). I had success flashing a custom build on 1M devices (ie. RGBW bulb from ai-tinker) with space left to do the 2 step OTA Updates.
I’m preparing a pull request with a lot of updates but it will take me another two week I think. The first version of the Homie node you only can find on my github (soon on npm) Here still work in progressive.

1 Like

Cool, thanks for the info. :sunglasses:

I was going to setup a Platform-IO environment anyway to get ESPEasy running on my ESP32 devices. (I wasn't successful with the pre-built images, I think the partition layout is different or missing the bootloader...)

I have some spare ESP8266 for testing, so I will try your plug-ins and the node as soon as I have the time. But first, I've got some hardware stuff and soldering planned for the holiday tomorrow. :nerd_face:

I always have problems with the prebuilds ... platform-io & vscode is great choose the esp8266 dev 4k build (look inside the platformio.ini for details) and it should not be too difficult to compile and upload.

to elaborate, i was successful in turning the led on and off thru the browser using an arduino sketch that i copied and pasted from the net. i still havent been able to figure out how to get node red to communicate with my nodemcu boards

What you're trying to do, controlling lights, sounds very similar to my current development (well, part of it anyway). My overall system will be looking after lights, heating, security, media and communications, mostly based on ESP8266's, Rasp-Pi's, Node-RED and MQTT / Mosquitto.

Have a look at @knolleary's "PubSubClient" library (GitHub - knolleary/pubsubclient: A client library for the Arduino Ethernet Shield that provides support for MQTT.) which you should be able to incorporate into your NodeMCU system, and use it to send and receive MQTT messages. The Node-RED MQTT nodes handle all the subscribing and publishing bits, so it's simple to send and receive messages.

I'm currently putting together a framework to be used in all my sensor and device nodes, but it's not nearly ready for letting out in public yet. However, the basics are pretty straightforward, and PubSubClient is really easy to use.

Hi

I guess another silly question. I'm running ESP_Easy_mega-20190903_normal_core_241_ESP8266_4M1M, but like @kuema I'm also not seeing C014, and P086. I assume what I'm running is not a development build. Where do I get that?

As Christian described, these Plugins are not in the pre-built version you can download from Github (zip file). To use these, you need to compile a custom build with these plugins enabled.

Unfortunately, I haven't had the time to do so, yet.

Thanks @Kuema. To confirm, I'll have to follow the steps as described in https://www.letscontrolit.com/wiki/index.php?title=Tutorial_building_and_uploading_with_platformio.

Yes, but tomorrow I can produce a build for you. The ZIP you downloaded should have a dev build too. Normally a 4MB which work on wemos and other 4MB ESP8266 boards
I‘m traveling at the moment so I can’t check.

Thanks Christian, I’ll appreciate that

Regards

Deon du Preez

+27833068561

Hi,
as promised I uploaded my private build of ESPEasy on github. It is ahead of the current official builds as far as my own plugins C014 and P086 goes but (far) behind the official repository. I have this installed on many wemos and sonoff devices (POV) controling Relais, i2c port expanders, i2c sensors, 1wire temp sensors, LCD displays, Neopixel (SK6812 rgbw) and AI-Thinker LED RGBW Bulbs

Goto the folder ESPEasy/firmware. I moved my plugins form the dev config to the normal config to get a smaller firmware size. Hope this work for you.

Don`t forget to config you MQTT broker to store retained messages even when there are send with QOS=0! It is easy possible when you use mosquitto. You find infos in the mosquitto folder

Thanks Christian,

I’ll try it out and revert. I like the smaller size, because once I get it working, I want to also move it to some sonoff’s (1M)

Regards

Deon du Preez

+27833068561

I uploaded some extra builds (1MBs are not tested)(. 1MB devices are still possible. This might change because ESPEasy is getting bigger all the time. The OTA version only includes the HWL8012 RGBW plugin for my AI-Thinker light bulbs. If you need something else I can do it.

Will upgrade my only sonof socket soon so I will do a custom firmware for this too. Using OTA on 1MB devices you need to perform a 2 stage upgrade (first flash a little helper firmware and then upgrade to a new firmware). I only done this for the bulbs because it is so complicated to solder little wires on the small pads of the pcb and the HWL8012 plugin needed some debugging.

The one 1MB modules are obsolete. I only deal with them when I have a device in a nice package like the sonoff sockets or the light bulbs.
Have fun.
Chris

Hi Christian

I managed to get the 4MB loaded onto my NodeMCU, works like a charm, I can even do OTA with it! Now battling to get the node going. I see the device, but not the node or property in the basic configuration. If I look at the mQTT messages, there are many messages, which seems to suggest all good on the ESPEasy side, it is the NodeRed side that I'm battling with. DO you perhaps have some sample flows of what to configure?

Great!

It depends on the sensor / actor you are planning to use. For a bme280 for example the configuration could look like this:

  1. configure the broker config note. you only need ip address and port.
    image

please note that the ui could sometimes be a little bit buggy (still have to fix some issues). If so, close the configuration and open it again or restart your flow.

you should see your homie tree (homie data in your global store, similar t what you see in mqtt explorer:

they you should receive a msg with every update

image

or connect a simple text note like this:

and choose your configuration

image

and you will get this

image

Thought it is quite comprehensively described in the docs :grinning:

image
you have to adapt your settings:

[{"id":"a83a2a4.90993d8","type":"homie-convention-device","z":"833d7b75.5dd878","broker":"e6a23911.f60378","name":"","deviceID":"Bewaesserung-3","nodeID":"BME280","propertyID":"Temperature","topic":"Bewaesserung-3/BME280/Temperature","infoAttributes":true,"infoTiming":true,"infoError":true,"addLabel":"mame","labelTopic":false,"labelPayload":false,"labelName":"Custom Label","uiPlaceName":"Select Valve","uiNode":"uiText","uiControlDropdown":true,"uiControlMinMax":false,"uiColor1":"#000000","uiBgColor1":"#000000","uiColorON":"#000000","uiColorOFF":"#000000","uiColorPredicted":"#000000","uiUseColorPredicted":false,"uiColorPredictedOff":"#000000","uiUseColorPredictedOff":false,"uiFormat":true,"uiTooltip":"","uiIcon1":"","uiIconON":"","uiIconOFF":"","uiSwitchPredicted":false,"uiSwitchColorPredictedON":"#000000","uiSwitchColorPredictedOFF":"#000000","uiSwitchIconPredictedON":"","uiSwitchIconPredictedOFF":"","settable":false,"x":228,"y":833,"wires":[["554b2339.dac8fc","8f16b001.58fb"],["b9501903.8a5e98"]]},{"id":"554b2339.dac8fc","type":"debug","z":"833d7b75.5dd878","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":510,"y":840,"wires":[]},{"id":"8f16b001.58fb","type":"ui_text","z":"833d7b75.5dd878","group":"61b56b5f.f16754","order":0,"width":0,"height":0,"name":"","label":"{{msg.label}}","format":"{{msg.payload}}","layout":"row-spread","x":509,"y":799,"wires":[]},{"id":"b9501903.8a5e98","type":"debug","z":"833d7b75.5dd878","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":509,"y":884,"wires":[]},{"id":"e6a23911.f60378","type":"homie-convention-broker-config","z":"","mqtt-host":"127.0.0.1","mqtt-port":"1883","name":"localhost@hp-spectre-360","homieName":"Node-RED","homieRoot":"homie","storeGlobal":true},{"id":"61b56b5f.f16754","type":"ui_group","z":"","name":"debug","tab":"571ba74f.fd87f8","disp":true,"width":"6","collapse":false},{"id":"571ba74f.fd87f8","type":"ui_tab","z":"","name":"Homie debug","icon":"dashboard","disabled":false,"hidden":false}]