0
votes

I try to do the POC on IBM Watson IoT platform. I have followed the document in this link for creating the device simulator. https://console.ng.bluemix.net/docs/services/IoT/nodereddevice_sample.html#devices

It can connect and send the MQTT message event to IoT platform but when I try to get the historical data from REST API, it always returns empty. https://os9c6l.internetofthings.ibmcloud.com/api/v0002/historian

Not sure what when wrong.

2
Have you turned the historian on (it is off by default)?balmy
When I just tried this for my own test environment using Firefox Poster and an api key/token generated in IoTP dashboard access section for user/pass, I got 401 unauthorized, which at least indicates something might be the. Do you get the same 401?balmy
I did not get the 401 from my test. Anyway after having a discussion with IBM guy. They told me that they are going to have a option to use CloudantDB for keeping the historical data. So it should be fine for me then. Thank you very much Barny.Anakin
I got it working (part of solution was switching away from Poster) have some historical data today - see idan's answer below.balmy

2 Answers

2
votes

Go to the IoT Watson IoT Platform dashboard connected to your BlueMix app, go to settings and there is a setting for Time Series DB which defaults to Off. When you turn it on you also get to choose the storage duration.

0
votes

if the Time Series DB was off and the device was added, you might not be able to see it even if you set the historian on on. Try and re-add the device.