I’m trying to use the Cirrus-Link mqtt modules to publish to a topic from a raspberry pi. I have paho mqtt installed on the raspberry pi. I have a user setup in distributor as user: rpi and password: raspberry. Next, I setup a custom namespace of rpi/# using the json payload option. I’m using a python script on the pi to attempt to publish to a topic in distributor to have it exposed as a tag in ignition:
import paho.mqtt.client as mqtt broker_url = 'Igntion's ip address here' broker_port = 1883 print ('connecting to broker...') client = mqtt.Client() client.username_pw_set(username='rpi',password='raspberry') client.connect(broker_url,broker_port) print ('publishing to topic...') client.publish(topic='rpi/TestingTopic',payload='TestPayload', qos=1, retain=False) print ('publish successful')
I don’t see any tags after publishing to the topic. any ideas? PS, I used another python script to verify that the connection is successful, it is connecting to the Cirrus-Link Distributor, I’m just not seeing any publish results.