Jump to content









Photo

Subscribe to MQTT topic

MQTT Subscribe

  • Please log in to reply
4 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 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



#3 jpastor

jpastor

    Development leader

  • Administrators
  • 176 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!



#4 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 ??? 



#5 Yoleon

Yoleon

    Sugar Master

  • Members
  • PipPipPip
  • 34 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   12 downloads

 

 

- Select the device to edit

 

Attached File  screenshot_02.jpg   44.2K   14 downloads

 

 

- Enable mqtt feature

 

Attached File  screenshot_03.jpg   43.66K   24 downloads

 

 

- Define the username, password and topic name

 

Attached File  screenshot_04.jpg   15.23K   38 downloads

 

 

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

 

Attached File  screenshot_05.jpg   26.58K   51 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   51 downloads

 

- Send streams with this structure

 

Attached File  screenshot_07.jpg   24.37K   40 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