Tag Quality for MQTT Engine

Hi

I am sending sensor value to Ignition MQTT Engine. The interval is set as 5 sec inside the sensor.

I want that Ignition declares the Tag Quality as “Bad” when no data came to MQTT Engine for more than 1 minute.

When I power off the sensor, Ignition still counts the Tag Quality as “Good” and showing it’s last value and overlay is not being shown which is misleading.

Can someone please help me achieving my goal?

Regards

Maqsud

How do you send the value? Code, or of the shelf sensor? If code, post it here

I am sending via code using ESP8266. There is nothing wrong with the code. Ignition is receiving the data well. Below is the link to my project:

http://103.123.8.25:8088/data/perspective/client/Smart_Tank/

Hmm. If there is nothing wrong with you code then you might consider using sparkplug.

Are you sure you have set last will message?
Just an example:
http://www.steves-internet-guide.com/mqtt-last-will-example/

I am using Ignition as MQTT broker and used default settings:

https://docs.chariot.io/display/CLD80/MD%3A+Configuration

Didn’t configure any “Last Will Message”. Not sure how to link it with tag quality too in Ignition. Any idea?

It’s not about ignition. It’s about any mqtt broker. You need to tell the broker what will happen when your connection dies.

That said, I am not sure if ignition will respond in terms of ignition tag quality on that. But atleast that is the first step

What language are you programming in?

I am using MQTT distributor module of Ignition as MQTT Broker. Didn’t find such configuration.

The most important thing here is to link with tag quality.

I have used Arduino to program my sensor.

Try linking you client to the topic in the broker first. This is done by defining a last will message. When the connection dies you will have to set the specific topic to bad. This you do in your Last Will testament.

Then worry about ignition later.

If you can use SPARKPLUG B as your protocol, I think all of this would happen automatically!

1 Like

Indeed. If @maqsudbd takes the time to import the c libraries into the arduino environment. (Which is a bit of a hassle as I remember it.) Then it’s all magic. You don’t have to subscribe to anything. Just power up nultiple ESPs with exactly the same code and you are done done. (if you generate node name based on serial fex)