Skip to main content
1-Visitor
September 21, 2021
Question

MQTT Client not receiving data

  • September 21, 2021
  • 1 reply
  • 1106 views

Hi there, I managed to connect to the mosquitto broker using SSL, but I am not getting any values and it looks that it's not scanning.

I try to send values from mosquitto in two ways:

 

  • mosquitto_pub -h ip -p port --cafile x --cert x --key x -u "x" -P "x" -t sensor/PM25 -m "{ \"timestamp\": \"2021\", \"values\": [{\"id\": \"MQTT-Ubuntu.Device1.Senzor PM25\", \"v\": \"20\" }] }"

 

  • mosquitto_pub -h ip -p port --cafile x --cert x --key x -u "x" -P "x" -t sensor -m "{ \"PM25\": \"20\" }" --repeat 60 --repeat-delay 1

 

I get an error from IoT Gateway that it can't deserialize the data, also in the MQTT Client OPC Quick Client there is nothing in the Value tag. The MQTT tag address is like this: /sensor+PM25

Any help would be appreciated. Thankyou!

1 reply

BSUN_RO1-VisitorAuthor
1-Visitor
September 21, 2021

In the second example, the problem is "-t sensor" , it should be " -t /sensor".