Sensor data on website

Simplify IoT Development.

Moderators: violet, yexiaobo, seth.welday

Post Reply
lange
Pre-kindergarten
Pre-kindergarten
Posts: 5
Joined: Wed Apr 20, 2016 8:33 pm

Sensor data on website

Post by lange » Mon May 16, 2016 3:34 am

Hello,

I want to show the output of the sensors in a website. I hope some kind of PHP-code should do this, but i didn't found any documentation.

Can someone help me with the correct code?

Thanks
Michael

sheepjms
Pre-kindergarten
Pre-kindergarten
Posts: 15
Joined: Mon May 09, 2016 5:41 pm

Re: Sensor data on website

Post by sheepjms » Mon May 16, 2016 9:49 am

That's a useful and fundamental function for iot project!In fact, you don't need to use PHP to write the website, because there are some website can implement your requirement already.You can try http://dweet.io or http://freeboard.io to send your sensor data on website with graphical vision.It's quite convenient! Hope it's useful for you! :)

lange
Pre-kindergarten
Pre-kindergarten
Posts: 5
Joined: Wed Apr 20, 2016 8:33 pm

Re: Sensor data on website

Post by lange » Tue May 17, 2016 5:22 am

Hi sheepjms,

Thanks a lot. I didn't know these services exist. I played around with freeboard and it worked very well with the Wio Link sensors.

But my question wasn't very precise. What I want to do is integrating the sensor data in my own website. That's why I was looking some kind of PHP code.

Thanks
Michael

sheepjms
Pre-kindergarten
Pre-kindergarten
Posts: 15
Joined: Mon May 09, 2016 5:41 pm

Re: Sensor data on website

Post by sheepjms » Tue May 17, 2016 11:36 am

lange wrote:Hi sheepjms,

Thanks a lot. I didn't know these services exist. I played around with freeboard and it worked very well with the Wio Link sensors.

But my question wasn't very precise. What I want to do is integrating the sensor data in my own website. That's why I was looking some kind of PHP code.

Thanks
Michael
Sorry Smilies, there is no relative document about php coding so far. You can visit the wiki of Wio link to search the resource you need: https://github.com/Seeed-Studio/Wio_Link/wiki

lange
Pre-kindergarten
Pre-kindergarten
Posts: 5
Joined: Wed Apr 20, 2016 8:33 pm

Re: Sensor data on website

Post by lange » Tue May 17, 2016 10:19 pm

Hi,

I asked some PHP Experts and they provide me with a solution.

You have to use this PHP Code:

Code: Select all

<?php
// Reading data from sensor and show it
$json = json_decode(file_get_contents("https://iot.seeed.cc/v1/node/GroveMoistureA0/moisture?access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"));
echo $json->moisture;
fclose($json);
?>
Thanks
Michael

Post Reply