Jump to content









Photo

Subscribe to MQTT topic

MQTT Subscribe

  • Please log in to reply
5 replies to this topic

#1 mathieu

mathieu

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 18 May 2016 - 07:15 AM

Hello everyone

 

I'm trying to subscribe to a MQTT topic, but it doesn't work. I wonder if it is possible in Carrots ?

 

Thanks



#2 jpastor

jpastor

    Development leader

  • Administrators
  • 168 posts

Posted 23 May 2016 - 09:13 AM

Hi Mathieu

 

You can only subscribe to these topics:

- Topics available:
{apikey}/streams
{apikey}/status

 

 

If you are using these topics and you have problems, please give us more info.

 

Best regards!



#3 Thomas_Socomec

Thomas_Socomec

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 23 March 2017 - 03:29 PM

Hello Carriots support,

I reply to this topic because I have problem with the subscribe feature over MQTT.

It seems that the carriots's server close the connection before sending data (from the topic "stream").

Is there any timeout or anything else that can cause this type of problem ?

If I subscribe to the stream topic, do I get all data from any time or only the last one ?

Thanks,

Regards,

Thomas



#4 jpastor

jpastor

    Development leader

  • Administrators
  • 168 posts

Posted 24 March 2017 - 11:28 AM

Hi Thomas_Socomec.

 

In Carriots you can publish data for free but subcription feature is a service on demand. However, Socomec company has its own Carriots implementation. If you need more information about it, please contact us via email.

Best regards!



#5 boopathi

boopathi

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 11 January 2018 - 05:47 AM

i got approval from the carriots for creating the topic in mqtt broker and all.May i know how to subscribe the data from the cloud  there is any topic available for subscribe ??? 



#6 Yoleon

Yoleon

    Sugar Master

  • Members
  • PipPipPip
  • 33 posts

Posted 11 January 2018 - 03:46 PM

Hi boopathi,

 

To create a topic in mqttbroker.carriots.com you need to do the next steps:

 

- Go to Hierarchy > Devices

 

Attached File  screenshot_01.jpg   6.32K   5 downloads

 

 

- Select the device to edit

 

Attached File  screenshot_02.jpg   44.2K   5 downloads

 

 

- Enable mqtt feature

 

Attached File  screenshot_03.jpg   43.66K   4 downloads

 

 

- Define the username, password and topic name

 

Attached File  screenshot_04.jpg   15.23K   2 downloads

 

 

- Update it and copy the values to use for subscribe and publish

 

Attached File  screenshot_05.jpg   26.58K   2 downloads

 

 

With this steps you can create a Listener to publish the data recived in the topic previously created:

 

- Create a Listener with this code

 

Attached File  screenshot_06.jpg   25.82K   3 downloads

 

- Send streams with this structure

 

Attached File  screenshot_07.jpg   24.37K   4 downloads

 

 

I hope this help you,

 

Carriots Staff







Also tagged with one or more of these keywords: MQTT, Subscribe

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users