Mqtt-check node

Goodmorning,

I created a simple flow, where I connect to an MQTT Server and read some values.

Now I want to add an indicator, where I will check the status of the server every 5 minutes
and have it visible on my screen.
I came across mqtt-check, but I can not get it to work.
Any idea on how to implement that?

Hi Dimos.

Yes, node-red can do that.

It is done with what is called the dashboard.
(There are quite a few flavours (types) but the main two are version 1 and version 2.)

Version 1 is now no longer supported.
Version 2 is now the main one to use.

You do that with the manage palette and then select install.
Then you type in the name of the dashboard you want to install and installs.

Then you use one of the nodes to display the condition.

Another option is node-red-contrib-ui-led and it gives you a virtual LED on the screen.

But I am not explaining what is in the middle.
Oh, finally:
As you are new, you are limited to how many posts you can make for a couple of days.

But for now I'd work on getting the testing and indication working to a debug node.

Welcome to the forum @Dimos

The status shown against the mqtt nodes will only show Connected when the server is ok and accessible. So you can use a Status node attached to one of the mqtt nodes to tell you whether it is ok.

Welcome to the forum.

When using MQTT, you do not request data from it. Instead you subscribe to a topic string. The MQTT server then informs you when the topic is updated by something.

There are various ways to check the status of a server using MQTT and we would need a little more information in order to guide you to the best approach.

You could, for example, be using a system monitor that has MQTT outputs - for example Telegraf. Or, you could be using a Node-RED flow that reaches out to the server somehow and if it doesn't get the expected response, sends an MQTT update. You might even be running Node-RED on the server, in which case you could just use the MQTT nodes - one to send an "Online" message at startup and then configure the MQTT connection with a "Last Will and Testament" message which will be auto-triggered by the MQTT server if Node-RED stops for any reason.