New video: Integrating Node-RED with Gladys Assistant in MQTT!

Hello everyone!

And here’s a new YouTube video, I’m becoming too regular, it’s not good anymore :sweat_smile: A real YouTuber ^^

Since the release of v4, we have all been trying to add compatibilities to Gladys.

This is a long-term battle, as there are thousands of possible integrations, and we are all aware that for now, v4 has not yet regained the richness of v3, or other open-source home automation software: it’s normal, it will take time.

In the meantime, I see that some of you are frustrated, would like to use v4 but are sometimes blocked by one or two incompatible devices, sometimes devices that are not widely used and difficult to integrate.

This is where Node-RED comes into play: Node-RED is a platform with over 3,500 integrations, a scenario platform in « visual programming », quite easy to set up.

The idea of this tutorial is to show you that it is possible to associate Node-RED with Gladys 4 to compensate for any shortcomings:

  • Gladys provides a clear interface, a clean and streamlined software that can be used by the whole family without programming skills
  • Node-RED provides compatibilities, and can be controlled by Gladys!

The video is on YouTube :down_arrow:

PS: I noticed that comments under YouTube videos have a real impact on video ranking. If you want to support the project, don’t hesitate to ask your questions there, or just leave a small comment if you liked the video! Thanks in advance :folded_hands:

All the commands used in the tutorial are available on the blog:

Oh, if you’re referring to me regarding some frustrated people, well, you’ve hit the nail on the head :grin::rofl:. I wasn’t as blunt in my email, but I wasn’t thinking any less of it… And when you guided me with Node-RED, well, I was even more lost and I put that on hold.

I haven’t seen the video yet, but I’m already thanking you in advance.

I’ll see if I can manage with your video tutorial and I’ll come back to comment here and on YouTube.

Super :slight_smile:

Don’t worry, you’re not alone and it’s normal: there are so many devices available, and it takes time to integrate everything!

Node-RED is a good complement in the meantime!

Don’t hesitate if you have any questions

I watched that this afternoon while eating.

So I’m currently taming node-red

Simple and effective

Excellent news as I had worked on NODE-RED for my remaining tank capacity project.

I think this can help beginners like me to start developing.

The subject has already been discussed elsewhere but with gauges integrated into Gladys we will be at the top.

Super clean! And by the way, does the LIFX Node-RED integration work well? :slight_smile:

We shouldn’t hesitate to create small tutorial add-ons on the forum for certain technologies with the actual Node-RED JSON exports

That’s the goal!

After releasing the curves on the Dashboard, gauges could really be a next step

Nice, I already have quite a few workflows on Node-red, I need to watch the video but it could be great to reconnect my Yeelight to Gladys :grin:

The lib isn’t that new and it’s rather basic

I have a question (no info in the doc)
I tried the hue feature on the bulb via MQTT and it seems there’s an oversight because this feature is not manageable in the dashboard.
So I used color, what is the format? RGB, HEX?

I think it’s an unused remnant, we only use the « color » feature now.

We use a format derived from RGB, stored as an integer value

We have conversion functions to/from HEX and RGB in the Gladys utils file:

You can use this function in Node-RED to convert to/from HEX/RGB depending on what you retrieve.

Yes :+1:

I also integrated my Z-Wave (Shutter)

Super clean!! :slight_smile:

Could you do a small export + tutorial on the forum? :smiley:

Yeah, I just need to find a way to resynchronize Gladys if an external state change (like Alexa, for example)

In fact, synchronization is not manageable because either Gladys subscribes (sensor) or Gladys publishes, both are dead.
The only solution is a fake device + scene. I find it a bit of a gas plant, but in the meantime, no choice.

Hello @VonOx!!

So if I’m not mistaken, this should be possible but not from the current MQTT interface. For my part, I create my MQTT devices from my Arduinos, so you can define the has_feedback parameter that I set to True. In any case, it works for my switches/lamps on Arduino.

But is this what you are looking for?
If so, can’t you use the MQTT create publication to create from Node-red?

Yes, I think so

I will try the wild edit in the database

image

I think it must not be clear enough in the documentation / or the UI, but that is not the case!

The MQTT integration can both publish / receive regardless of the device.

The topic displayed in the UI is just a « hint » for the user to help them, but behind it is the same MQTT API for everyone:

Ok I publish on gladys/master it’s better :woozy_face:

I’m jumping on that, be careful, if you activate the « has_feedback », Gladys will no longer record the state change in the DB if you control the device from Gladys.

Not sure that’s what you want here, you just want two-way synchronization for that, use the MQTT API in the outside → Gladys direction is enough

Yes I rolled back my modification

Hello everyone,
I just started from scratch in the installation of gladys on my SD card. I installed the mosquitto server by Gladys and I installed Node REd on the same SD card. I messed up a bit during the installation, as a result Node Red does not restart and it seems to reboot continuously. I would like to reinstall it, but it’s not working at all.
With docker ps I see that the container is well launched, but the web page refuses the connection (IP:1880).
I stopped the container with docker stop node-red
then I deleted the container with docker rm node_red
I rebooted the RPI (just in case it’s useful)
I checked with docker ps (no more Node Red container).
I restarted the installation with the recommended command
`` docker run -d \

–log-opt max-size=10m \
–restart=always \
–privileged \
-u root \
–network=host \
–name node_red \
-v /var/lib/node-red:/data \
nodered/node-redbut the command output looks like this:8d3292ca4b3719a663529f7faa87da2e314dd79f372cfa6b5f7f8d14121e4199and then returns to the putty promptpi@raspberrypi:~ $``
and nothing more. Apparently what I’m doing is not right.
Can someone help me? :anguished: :anguished:
Thanks in advance