paho

Paho MQTT delivers "log: Caught exception in on_publish: 'int' object has no attribute 'topic'"

Paho MQTT delivers "log: Caught exception in on_publish: 'int' object has no attribute 'topic'" Question: I wrote following python script: import paho.mqtt.client as mqtt import Adafruit_DHT import time import ssl import logging logging.basicConfig(level=logging.DEBUG, filename=’/home/user/Dokumente/raspi.log’, encoding=’utf-8′) # Set up DHT22 sensor dht_sensor = Adafruit_DHT.DHT22 dht_pin = 4 # GPIO pin number the sensor is connected to …

Total answers: 1

Publish MQTT message in fiware via MQTT Paho library

Publish MQTT message in fiware via MQTT Paho library Question: I am working on this Fiware flow: I have used efrecon/mqtt-client as MQTT client based on mosquitto_pub so that the data can be consumed from Grafana. docker run -it –rm –name mqtt-publisher efrecon/mqtt-client pub -h 172.31.85.246 -p 31624 -m "AGV_Th|25" -t "/ul/5jggokgpepnvsb2uv4s40d59ov/agv001/attrs" In the following …

Total answers: 1

Paho MQTT client: how to ignore messages published by myself?

Paho MQTT client: how to ignore messages published by myself? Question: My Paho MQTT client does the following: Subscribe to mytopic/# Do something Publish to mytopic/# Problem: The published message in step 3 arrives at step 1. I’d like to avoid adding a sender-attribute to the payload. Is there a proper way of ignoring self-published …

Total answers: 4

Paho(MQTT) client can't connect

Paho(MQTT) client can't connect Question: I’m using this python script to implement a basic Paho(MQTT) subscriber but under certain circumstances it doesn’t invoke on_connect. I tried the following, all with exactly the same code: Running in a Raspbery pi, broker on desktop Pc (Ubuntu). Works. Running in a Pc(Ubuntu), broker on the same Pc. Doesn’t …

Total answers: 1