Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
2,044 Views

Is it possible to retrieve data from IoT Dashboard into a simple html website?

Jump to solution

Hi!

I'm new in the IoT world. Following some tutorials I've successfully configured my Edison and the IoT Analytics account. I can see the temperature data in the Dashboard and everything seems to work fine. But I have a problem and after searching for two days I don't know how to proceed: Is it possible to retrieve data from Intel IoT Dashboard into a simple html website? I don't want to create an Actuator for the Edison or an alert, only a way to see the data in a custom website, but I'm lost. I've found some information about the REST API but I don't know anything about web services. Is there a simpler solution? Any ideas?

Thanks in advance.

Tags (1)

Accepted Solutions
Highlighted
Valued Contributor I
30 Views

If you know Python, I would do it with Python and Flask web framework. If you don't want to use the web service, you can extract the html data using XPath. You right click inspect the element within Chrome and get the path of the html tag you want to access its data. After that you use Jinja2 included with Flask to create your webpage with the data in it.

View solution in original post

5 Replies
Highlighted
Valued Contributor I
31 Views

If you know Python, I would do it with Python and Flask web framework. If you don't want to use the web service, you can extract the html data using XPath. You right click inspect the element within Chrome and get the path of the html tag you want to access its data. After that you use Jinja2 included with Flask to create your webpage with the data in it.

View solution in original post

Highlighted
Novice
30 Views

I don't know Python but I will try, thanks for the suggestion. Any other ideas?

Highlighted
Employee
30 Views

Hi Fernando,

You can also work with the data received in the board, without using the website with the Dashboard. For this, you can use http://httpd.apache.org/ apache2 or https://nodejs.org/ NodeJS. You can install apache2 following http://alextgalileo.altervista.org/edison-package-repo-configuration-instructions.html the instructions in here. NodeJS is already available in the image.

There are a lot of examples in the Internet about this that you may find helpful:

http://docs.mongodb.org/getting-started/node/update/ Update Data with Node.js — Getting Started With MongoDB 3.0.4

http://www.no-margin-for-errors.com/blog/2010/07/26/deliver-real-time-information-to-your-users-usin... Deliver real-time information to your users using node.js

Regards,

Charlie

Highlighted
Novice
30 Views

Finally I've tried to go with Python and Flask and it seems to work with the REST API of the IoT Kit. I've been able to retrieve the information but for now only in the console, not in a website. It's a steep forward so I will continue with this approach. Thank you very much for your help.

Highlighted
Valued Contributor I
30 Views

That's great fernando!

By the way, you can look at the "requests" Python module (get it with pip). It will help you a lot with http requests and getting json data.

If you need help with Flask, I can give you some pointers.

Also, you can fork my repo on github : https://github.com/speccy88/Flask-Examples https://github.com/speccy88/Flask-Examples

They are Flask skeleton with jQuery mobile, Angular, winjs...

Good luck :)

0 Kudos