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?
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.
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.