Page 1 of 1

Sensor data on website

Posted: Mon May 16, 2016 3:34 am
by lange
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

Re: Sensor data on website

Posted: Mon May 16, 2016 9:49 am
by sheepjms
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! :)

Re: Sensor data on website

Posted: Tue May 17, 2016 5:22 am
by lange
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

Re: Sensor data on website

Posted: Tue May 17, 2016 11:36 am
by sheepjms
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

Re: Sensor data on website

Posted: Tue May 17, 2016 10:19 pm
by lange
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