In fact, you should see Node-RED as a bridge between Gladys and Zigbee2MQTT. It will retrieve data from Gladys, for example the comfort command, and send it to your module. In short, it will read the information on the MQTT broker (Gladys) and forward the info to another MQTT broker (zigbee2mqtt).
First, install Node-RED and configure the MQTT broker. I put the video below directly at the broker MQTT config part. https://youtu.be/bpmHzR8_S5g?t=1132
Then, I think your module is already paired with zigbee2mqtt? If not, do that.
Configure the broker used by zigbee2mqtt in Node-RED.
How to retrieve the connection info:
Connect to your Gladys machine via ssh and run the command:
In the Connection tab enter the IP of your MQTT broker in server; if it’s the one created by Gladys then it’s the same IP, otherwise enter your IP.
Also enter your port if different from 1884.
Configure “virtual” MQTT devices in Gladys. On this part, you have already integrated 2 elements. I will give you an example of how to set up the exchanges once the first 3 points are configured.
for point 2 this is where it gets stuck: my device was recognized as two different devices, one that collects everything related to energy and the other unknown to Gladys
however in Zigbee2mqtt it is present as a single component
Gladys will send the state of the buttons for the commands to Node-RED, and Node-RED will take care of forwarding the information to your module via the MQTT broker of zigbee2mqtt.
Then you’ll just need to create scenes in Gladys to control the different commands according to your needs.
I’ll also explain how to create the buttons in Gladys and I’ll give you the Node-RED flow that you’ll need to adapt for your module. Normally after my explanation you’ll be able to manage your electric radiator in Gladys.
I’ll send another message this evening with all the details.
Okay the feature is almost ready so I’m going to move on to the implementation stage for all my sensors
But before that, do you have a rule for naming your sensors and do you name them in gladys at discovery or in zigbee2mqtt? I would like this to be as clean as possible
I recommend using names in Zigbe2mqtt, in lowercase with « _ » between words, for example: « interrupteur_salon_gauche », « capteur_temperature_jardin », etc..
Initially that’s what I was going to recommend, but have you noticed any issues on your end related to accents / spaces?
For my part I chose to use standard names « Outdoor water valve » and everything works fine… And above all it saves me from renaming things in Gladys! #lazy
That should work! I prefer to use « _ » and no accents, because I think that in Zigbee2mqtt the device name is used in the MQTT topic name, and I’d be afraid it would break in case of an MQTT version change, that kind of thing But really, if it works, it must not be that serious right now
If you ever want a pure CalDAV calendar for this kind of thing, I had already used Fruux (https://fruux.com/) for Gladys demos in the past and it works great. For setting up a heating schedule that’s an excellent idea! Plus, it gives you a calendar that’s truly dedicated to that.
If, however, it’s more for syncing your personal calendar, it depends on what you use