Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » How to make sure that Kura's publishing data already sent
How to make sure that Kura's publishing data already sent [message #1760879] Wed, 03 May 2017 21:17 Go to next message
iqbal elfaita is currently offline iqbal elfaitaFriend
Messages: 26
Registered: March 2017
Junior Member
Hello,

I am newly implementing Kura and I try the "Heater" demo example for publishing application. Now, I wanna make sure that Kura, with Heater demo publish apps, succeeded to sent the data to the broker and it's ready to be subscribed. i used mqtt://iot.eclipse.org:1883 for broker url in Kura web mqtt data transport configuration.

once i used mosquitto_sub ( mosquitto_sub -h iot.eclipse.org -t data ) for trying subscribe data, but the data from Kura won't showed.

i tried to check from publisher side use wireshark and the result like this [1]. this is looks like the data was sent from publisher, so maybe the problem is the way I subscribe.

So can anyone here help me to tell how to subscribe the data sent from kura ?? is it different from subscrabing in common way ?? or maybe somone here tried subscribe service in Kura itself so there is two client as Pubs and Subs are both using Kura ??

Thanks

[Updated on: Wed, 03 May 2017 21:20]

Report message to a moderator

Re: How to make sure that Kura's publishing data already sent [message #1760902 is a reply to message #1760879] Thu, 04 May 2017 07:59 Go to previous messageGo to next message
Pierantonio Merlino is currently offline Pierantonio MerlinoFriend
Messages: 39
Registered: March 2016
Member
Hi,

the Heater demo bundle publishes mqtt messages under the <account-name>/<client-id>/heater/data topic.
On mosquitto you should subscribe on this full topic, not only "data".

Best,
Pier
Re: How to make sure that Kura's publishing data already sent [message #1760986 is a reply to message #1760902] Thu, 04 May 2017 23:56 Go to previous messageGo to next message
iqbal elfaita is currently offline iqbal elfaitaFriend
Messages: 26
Registered: March 2017
Junior Member
Hello,

Thanks Pier for your helping, its really help me and I got the data that sent from my Kura. but i get the new problem now for data what i get.

the data I got showed like this [1], can you tell me what kind of that data i get from broker ?

Thanks
Iqbal
Re: How to make sure that Kura's publishing data already sent [message #1761370 is a reply to message #1760986] Wed, 10 May 2017 09:31 Go to previous messageGo to next message
Pierantonio Merlino is currently offline Pierantonio MerlinoFriend
Messages: 39
Registered: March 2016
Member
Hi,

indeed the results is not so readable Smile
The messages Kura sends to the broker are encoded in a ProtoBuffer, so when you subscribe to a specific topic, you get a binary data.

BTW, in Kura 3.0.0 (coming soon), you will be able to encode the data in Kura messages also in a (more readable) json format.
Re: How to make sure that Kura's publishing data already sent [message #1761432 is a reply to message #1761370] Thu, 11 May 2017 06:12 Go to previous messageGo to next message
iqbal elfaita is currently offline iqbal elfaitaFriend
Messages: 26
Registered: March 2017
Junior Member
Hello Pier,

Thanks a lot for replying and answer my issue.

So in your answer, you meant that I have to decode the massage sent by kura from its ProtoBuffer in my subscriber, so that I can read the decoded message well. is it right ?

is that ProtoBuffer encoding is the only way the massage sent by Kura, or maybe there is some tricks to modify message to simplifying the transmission ??

Thanks,
Iqbal
Re: How to make sure that Kura's publishing data already sent [message #1763309 is a reply to message #1761432] Fri, 12 May 2017 14:00 Go to previous messageGo to next message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hello Iqbal,

All messages sent through the CloudService will be encoded using Google Protobuf. In this case, yes, you would need to decode the message on the receiving client. You can instead use the DataService directly to send messages, in which case the messages will not be encoded. There are advantages to using the CloudService, so I would encourage you to review the differences between the two services [1][2].

[1] http://download.eclipse.org/kura/docs/api/2.1.0/apidocs/org/eclipse/kura/cloud/CloudService.html
[2] http://download.eclipse.org/kura/docs/api/2.1.0/apidocs/org/eclipse/kura/data/DataService.html

Thanks,
--Dave
Re: How to make sure that Kura's publishing data already sent [message #1763389 is a reply to message #1763309] Mon, 15 May 2017 07:29 Go to previous messageGo to next message
iqbal elfaita is currently offline iqbal elfaitaFriend
Messages: 26
Registered: March 2017
Junior Member
Hello David,

Thanks a lot for replying. I'll try your advise for trying DataService for sending message in Kura. And i'll report soon the result when i'm done.

Thanks
Iqbal
Re: How to make sure that Kura's publishing data already sent [message #1763391 is a reply to message #1763309] Mon, 15 May 2017 07:41 Go to previous message
iqbal elfaita is currently offline iqbal elfaitaFriend
Messages: 26
Registered: March 2017
Junior Member
Hallo David,

Thanks for your replying. I'll try your advise for using DataService to send data from Kura. And soon I'll report for the result when I'm done.

Thanks
Iqbal
Previous Topic:Kura's data that sent to broker Problem
Next Topic:Kura Data Service Dependencies
Goto Forum:
  


Current Time: Thu Apr 25 14:03:35 GMT 2024

Powered by FUDForum. Page generated in 0.03718 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top