Node-Red, UIBuilder and Buttons!!

Node-Red, UIBuilder and Buttons!!

If you’ve been here before then you know I use Node-Red, if not and you don’t know what Node-Red is, you should check it out. To get a frontend UI out of Node-Red there has always been the Dashboard node for us to use and a set of Dashboard nodes to go with it. I have never been a huge fan of the Dashboard, but it was what we had and it did the job. The Dashboard nodes allowed you place UI nodes and connect them to your data and it would do the rest, no HTML code required on your behalf. But that was one of the limitations, was that you did not have control over the code. Enter UIBuilder.

The UIBuilder node is amazing. It is a Node-Red interface builder that gives you complete control, over everything. The downside (if it is one) is that you must know how to code HTML and JavaScript. UIBuilder lets you use any frontend framework you want to build your interface to Node-Red. JQuery, VueJS, MoonJS, Angular, etc.. So far I have dropped in a Bootstrap-Vue admin template and I have been going to work on that. It has taken me a minute to get used to how UIB all works, and I am not really all that great with JavaScript but I seem to be figuring things out. Hey, I have shit working.

The UIBuilder Wiki and the Github for the author have a ton of information and examples of how to get a few basic things done. Just expect most of them to be done with VueJS. It appears (at least to me, I could be wrong) that UIBuilder was originally VueJS heavy/dependent and as it matures it is more open to other frameworks. As of v3.1.3 it no longer installs Bootstrap-Vue and VueJS by default, as it had done it all prior versions. So just be aware that you can use any framework you want, but all of the examples (so far) are all written in VueJS. There is also the Node-Red forums if you get stuck, the author also happens to frequent the group.

View Post

ESP8266 and MQTT

ESP8266 and MQTT, Google that and see what happens (you most likely already did and that is how you got here). Shit is everywhere. It’s gobbin up the bandwidth of the intarwebs. And you know what? I couldn’t get any of that shit to work on my standard ESP8266-01. I have a few of them, I tried them all with all kinds of shit. I would get close but never a damn cigar (I can’t smoke it anyways). Until today for months I have been stuck on this. So if you are like me and have not been able to get the damn thing to work, for whatever reason, try this. Hope it helps.

This is the page that saved it all for me, thank these guys (I did not read or follow any guidelines on this page, I merely snagged their code):

I copied “mainIoTF.lua” and made some minor tweaks to get it working. I removed the orgID and changed the broker to my raspi IP address. Don’t forget to change the topic. I made those tweaks and uploaded it. BAM!! I was getting data send via MQTT to the Pi every 10 seconds.

This is what I was getting on Node-Reds debug window every 10 seconds (the number will change):  {"d": {"data":69}}

This is where it comes from, should be easy enough to modify:
m:publish(topic ,'{"d": {"data":'..t1..'}}', 0, 0,

I came back and edited this post because I hate it when I find a site that says they found the fix, but never posts it.. so heres the code. Like I said, its 99% the same code from the other site I linked/mentioned. But here it is for you anyways.