This object is in archive! 

Get value from device on web server (json)

Magnus Wingqvist shared this question 7 years ago
Need Answer

Hello,


Can I get a value from a device from a web server? I can get it locally (when I'm logged in), but can't seem to get it when fetching from a web server. I'll guess it's because the web server is "not logged in". Can this be done?


php code:


$json = file_get_contents("https://my.zipato.com/zipato-web/v2/attributes/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx/value");

$obj = json_decode($json, true);

$temp= $obj->value;


(this is a temperature device which gives this locally, se below)


{

"value" : "21.0",

"timestamp" : "2016-12-28T20:53:51Z"

}

Regards

Magnus

Replies (2)

photo
1

You can call the API, after proper authentication.

Browse the API here https://my.zipato.com/zipato-web/api/ (after you've logged in using the same browser to the UI).

photo
2

Ok. Is there no chance of fetching data from the server-side? I wan't to built my own customized UI for my devices. Is this possible?

Leave a Comment
 
Attach a file