Jump to content









Photo

MQTT mosquitto_pub test

mqtt mosquitto

  • Please log in to reply
2 replies to this topic

#1 netor841

netor841

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 29 July 2015 - 09:36 AM

I tried to send data via MQTT with mosquitto_pub but do not appear on data stream list

 

This is the call:

 

> mosquitto_pub -h mqtt.carriots.com -p 1883  -u {Automatic Apikey Stream} -t {Automatic Apikey Stream }/streams -m "{'protocol': 'v1', 'device':'{D_DEVELOPER_DEVICE}', 'at': 'now', 'data': {'temp': 25}}" -d

 

I received:

 

Received CONNACK
Sending PUBLISH (d0, q0, r0, m1, '{Automatic Apikey Stream}/streams', ... (100 bytes))
 
Any Hint?
 
TKS

 



#2 dompablo

dompablo

    Master of Puppets

  • Members
  • PipPip
  • 14 posts

Posted 30 July 2015 - 08:36 AM

Hi netor841,

 

Try to use double quotes for the JSON message:

 

 -m '{"protocol": "v1", "device":"{D_DEVELOPER_DEVICE}", "at": "now", "data": {"temp": 25}}'

 

Hope it helps!



#3 netor841

netor841

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 30 July 2015 - 09:10 AM

TKS it works







Also tagged with one or more of these keywords: mqtt, mosquitto

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users