Search code examples
ibm-cloudiotwatson-iot

Defining datapoints for IoT devices in IBM Bluemix


I've followed the tutorial steps for adding a new device (registered device type, added device, set up connectivity parameters on the device side, etc.), but I don't see any data posted from the device.

In device logs I see successful connection attempts, authentication is OK, but any topics posted are rejected:

Token auth succeeded: ClientID='d:0mbsfg:iot-testbed-c027:89262000001000000000000000001000', ClientIP=XXXXX Apr 12, 2017 5:31:29 PM

Closed connection from XXXX. The topic is not valid: iot-v2/evt/sensors/fmt/json The topic does not match an allowed rule   Apr 12, 2017 5:31:01 PM

When I look at my device dashboard, I see that both the Sensor Data and Recent Events sections are empty. The former also says "There are no datapoints".

In older tutorials, I've seen datapoints being defined in the context of IoT Realtime Insights, but AFAIK, that piece of software is now a part of the IoT core functionality.

So, how can I finally get some data from the device? Should I define the datapoints? If yes, where?

Any help is highly appreciated!


Solution

  • I thought the problem could be that your deviceID is too long. But looking again more closely I see it is more likely a typo in your topic string. You have: iot-v2/evt/sensors/fmt/json It should be: iot-2/evt/${event}/fmt/${fmt} so where you have iot-v2, try just iot-2 and see if that works.