I am trying to generate some mqtt json data that I publish to a mosquitto server, and mango gives me this error.
MY python code:
import paho.mqtt.client as mqtt
import json
broker = "192.168.111.51"
topic = "/BrokerID/Support/Broker"
d = {}
d["Format"] = "RegisterBroker"
d["BrokerID"] = "AABBCCDDEEFF"
d["Version"] = "1.0.5"
data_out = json.dumps(d, ensure_ascii=False)
print(data_out)
mqttc = mqtt.Client()
mqttc.username_pw_set("xxx", password="************")
mqttc.connect(broker, port=1883, keepalive=60)
mqttc.publish(topic, data_out)
Mango error:
ERROR 2018-03-03T19:55:39,388 (com.infiniteautomation.m2m2.mqtt.client.MqttClientDataSourceRT.messageArrived:371) - Error during read topic: "/BrokerID/Support/Broker" datapoint: "MyPi - Register Broker" payload: "{"Format": "RegisterBroker", "BrokerID": "AABBCCDDEEFF", "Version": "1.0.5"}" exception: "Invalid input: JSON Pointer expression must start with '/': ":""
THanks, hope somebody can put some light on this.
Christoff