Digital Developer Conference: a FREE half-day online conference focused on AI & Cloud – North America: Nov 2 – India: Nov 9 – Europe: Nov 14 – Asia Nov 23 Register now

Close outline
  • United States
IBM?
  • Site map
IBM?
  • Marketplace

  • Close
    Search
  • Sign in
    • Sign in
    • Register
  • IBM Navigation
IBM Developer Answers
  • Spaces
    • Blockchain
    • IBM Cloud platform
    • Internet of Things
    • Predictive Analytics
    • Watson
    • See all spaces
  • Tags
  • Users
  • Badges
  • FAQ
  • Help
Close

Name

Community

  • Learn
  • Develop
  • Connect

Discover IBM

  • ConnectMarketplace
  • Products
  • Services
  • Industries
  • Careers
  • Partners
  • Support
10.190.13.195

Refine your search by using the following advanced search options.

Criteria Usage
Questions with keyword1 or keyword2 keyword1 keyword2
Questions with a mandatory word, e.g. keyword2 keyword1 +keyword2
Questions excluding a word, e.g. keyword2 keyword1 -keyword2
Questions with keyword(s) and a specific tag keyword1 [tag1]
Questions with keyword(s) and either of two or more specific tags keyword1 [tag1] [tag2]
To search for all posts by a user or all posts with a specific tag, start typing and choose from the suggestion list. Do not use a plus or minus sign with a tag, e.g., +[tag1].
  • Ask a question

iot cloud overwrite my event id hence I can not identify which even at application layer.

27000780F6 gravatar image
Question by noriando  (11) | Aug 11, 2014 at 09:53 PM apiiotnode-redibmcloud

My environment is like this ... <ti sensortag="" (registerd)=""> -> <raspberry pi="" (="" node-red="" )=""> -> <iot cloud=""> -> < node-red store mongoDB (bluemix)>

When I receive event message from sensortag, i put event identification from sensortag on Topics and put parameters in payload and dispatch to iot cloud as follows.

iot-2/evt/temperature/fmt/json (Object) { "topic": "iot-2/evt/temperature/fmt/json", "payload": "{"d":{"myName":"sensortag","object":"21.5","ambient":"26.0\"}}" }

However when I receive event message through node-Red, topic looks like overwrite with the name of "status". and all the event message is just "status" as below.

iot-2/type/iotsample-ti-bbst/id/bc6a29ac6536/evt/status/fmt/json

When I retrieve event message from IBM IoT cloud, "Topic" id of my "iot cloud node red" is like below.

iot-2/type/iotsample-ti-bbst/id/bc6a29ac6536/evt/+/fmt/json

Anything wrong with me? or any issue on IBM IoT Cloud side?

People who like this

  0
Comment
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster

7 answers

  • Sort: 
1100008SJH gravatar image

Answer by David-Parker (148) | Aug 12, 2014 at 05:01 AM

It's definitely possible to use any eventID, the samples we provide use an eventID of "status" unless they have been modified, what code are you using to publish your event on the "iot-2/evt/temperature/fmt/json" topic?

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
270006MYKW gravatar image

Answer by B Alton (638) | Aug 12, 2014 at 05:53 AM

Good day,

Thanks for the question.

I just had a quick play and I could not reproduce the problem using the IoT Service alone.

I made up a device that published to:
iot-2/evt/temperature/fmt/json
-Payload: {"d":{"name":"value"}}

The application key I had was able to subscribe and received a message on topic:
iot-2/type/iotsample-ti-bbst/id/TestTag/evt/temperature/fmt/json
-Payload: {"d":{"name":"value"}}

Then, just to be doubly sure, I looked up the last event in the web UI and it gave showed the payload (from the historian feature) as:
{"evt_type":"temperature","timestamp":{},"evt":{"name":"value"}}

That being said, I'm going to guess the problem is in the Node-Red side of things. However, just to be extra sure, what does your historian feature say?
(from the devices view, check the Last Event column)

We may need to find a Node-Red expert to check their side of things as well, but it would help if you inform us of what Last Event gives as the 'Event' of your custom message.

-Ben

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
27000780F6 gravatar image

Answer by noriando (11) | Aug 12, 2014 at 11:46 PM

Thanks for your response.

My understanding is that I can see only payload data at 'Event' @ dashboard, not Topic. Is there any way to check the contents of topic @ dashboard of registered device?

Comment

People who like this

  0   Show 1   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
270006MYKW gravatar image B Alton (638)   Aug 13, 2014 at 07:03 AM 0
Share

Good day,

If your device publishes to 'iot-2/evt/WHATEVER/fmt/json', you will be able to see an event of 'WHATEVER' in the portal.

Just to be clear that we're attacking this from the right angle:
From the main site (internetofthings.ibmcloud):
Log in.
Go to the devices tab.
In the 'Last Event' column for the relevant device, click 'More'.
In the panel that appears you should have a table of Event Type, Event and Timestamp.
The Event Type will be 'Message published'. The Event will be 'WHATEVER' in this case (it will be whatever your device published to after the 'evt' sub-topic).
If you click on the row, you will get a pop-up where you can view the payload. For me, is was:
{"evt_type":"WHATEVER","timestamp":{},"evt":{"name":"value"}}

The payload data is there, but it gives you the event details as well - one of which can be used to figure out the topic that you published to.

Alternatively, if you want me to check it out for you, you'll need to get your device sending messages again (it doesn't look like there's any recent activity for your device).

The next thing we may need to check is the application that receives this event - what application are you using to do this? Any configuration you think may be useful to help us?

-Ben

27000780F6 gravatar image

Answer by noriando (11) | Aug 17, 2014 at 10:45 AM

alt text I do not think I can check Topic information at portal. Please see below screen shhot.

PS:My Raspberry Pi crushed few days back ... took some time to recover .. sorry for late reply.

Comment

People who like this

  0   Show 1   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
270006MYKW gravatar image B Alton (638)   Aug 17, 2014 at 03:52 PM 0
Share

Interesting... in so many ways...
Firstly, my screen is different from yours in that the payload content is different (sadly, I seem to be having trouble with the historian feature right now and can't provide a screenshot).
Secondly, your screenshot seems to suggest that the message was actually published as 'status' - or the device published it under 'iot-2/evt/status/fmt/json' (which is doubly interesting as the sample source code says it should be 'sample').
The problem may exist between your device and our messaging infrastructure - but I really want historian up and running before I can be sure.
So, just saying thanks for the heads up, I'm scratching my head and I'll look into it more tomorrow (or at least try to).
-Ben

27000780F6 gravatar image

Answer by noriando (11) | Aug 17, 2014 at 07:45 PM

alt text Here is my Node-RED console when it send message to IOT Cloud. This is FYI and for tomorrow!!

Comment

People who like this

  0   Show 1   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
270006MYKW gravatar image B Alton (638)   Aug 20, 2014 at 11:02 AM 0
Share

I'm still not getting too far on this.
Can I ask, do you still have this problem with the latest version of our code?
Can you show how you are using Node-RED?

270006MYKW gravatar image

Answer by B Alton (638) | Aug 18, 2014 at 05:54 AM

Here's what my screen shows (when I get my Fake Tag to publish to 'iot-2/evt/whatever/fmt/json'):
(I've highlighted the parts where it shows my 'whatever' sub-topic)

alt text

I'll investigate this further, but for some amazing reason we've got different views in our web browsers (I tried both Firefox and Chrome and got similar info).

-Ben

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
27000780F6 gravatar image

Answer by noriando (11) | Aug 25, 2014 at 10:36 AM

Sorry for late response. My pi was broken .. and bought new one. Also Sensortag scan is not stable .. getting support from Sandeep for noble.

Well,looks like Iot Cloud recognize event ... alt text

However, when it comes to node-red through bluemix .. value of topic has been changed ... I mean event id become status.

alt text

and payload is like this ...

alt text

Here is my node-red @ Pi and Bluemix ...

alt text alt text

I can think only IOT cloud overwrite my event id .... alt text

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster

Follow this question

No one has followed this question yet.

Answers

Answers & comments

Related questions

how to send custom event from raspberry pi 1 Answer

My application wont start after trying to enable security 2 Answers

how to change the default broker used by iot-app Node in Node-RED? 1 Answer

Device connecting and disconnecting alternatively. 2 Answers

Can't get a JSON object in node red to flow from HTTP request to a Cloudant database in Bluemix 1 Answer

  • Contact
  • Privacy
  • IBM Developer Terms of use
  • Accessibility
  • Report Abuse
  • Cookie Preferences

Powered by AnswerHub

Authentication check. Please ignore.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • API Connect
  • Analytic Hybrid Cloud Core
  • Application Performance Management
  • Appsecdev
  • BPM
  • Blockchain
  • Business Transaction Intelligence
  • CAPI
  • CAPI SNAP
  • CICS
  • Cloud Analytics
  • Cloud Automation
  • Cloud Object Storage
  • Cloud marketplace
  • Collaboration
  • Content Services (ECM)
  • Continuous Testing
  • Courses
  • Customer Experience Analytics
  • DB2 LUW
  • Data and AI
  • DataPower
  • Decision Optimization
  • DevOps Build
  • DevOps Services
  • Developers IBM MX
  • Digital Commerce
  • Digital Experience
  • Finance
  • Global Entrepreneur Program
  • Hadoop
  • Hybrid Cloud Core
  • Hyper Protect
  • IBM Cloud platform
  • IBM Design
  • IBM Forms Experience Builder
  • IBM Maximo Developer
  • IBM StoredIQ
  • IBM StoredIQ-Cartridges
  • IIDR
  • ITOA
  • InformationServer
  • Integration Bus
  • Internet of Things
  • Kenexa
  • Linux on Power
  • LinuxONE
  • MDM
  • Mainframe
  • Messaging
  • Node.js
  • ODM
  • Open
  • PartnerWorld Developer Support
  • PowerAI
  • PowerVC
  • Predictive Analytics
  • Product Insights
  • PureData for Analytics
  • Push
  • QRadar App Development
  • Run Book Automation
  • Search Insights
  • Security Core
  • Storage
  • Storage Core
  • Streamsdev
  • Supply Chain Business Network
  • Supply Chain Insights
  • Swift
  • UBX Capture
  • Universal Behavior Exchange
  • UrbanCode
  • WASdev
  • WSRR
  • Watson
  • Watson Campaign Automation
  • Watson Content Hub
  • Watson Marketing Insights
  • dW Answers Help
  • dW Premium
  • developerWorks Sandbox
  • developerWorks Team
  • Watson Health
  • More
  • Tags
  • Questions
  • Users
  • Badges