cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

MQTT Client not receiving data

BSUN_RO
12-Amethyst

MQTT Client not receiving data

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 1
BSUN_RO
12-Amethyst
(To:BSUN_RO)

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

Announcements


Top Tags