MQTT Engine gateway event script when message received


I have a project with MQTT messages sent by Automatons.
With a python script, I would like to INSERT data in my DB when a MQTT message is received.
Is it possible ?


It's definitely possible. You'll probably use either system.db.runPrepUpdate or system.db.runNamedQuery in your script.

I'm not super familiar with MQTT in Ignition, but I'd guess you'd put the script on a Gateway Tag Change Event.

1 Like

With Gateway Tag Change problem is you can specify a tag in your MQTT Engine provider.
I would like to insert a new value when coming in my MQTT Engine.