This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.
Closed

Server Status

2»

Comments

  • No problem with that here. I can call it from a browser and from an app:
    I get it but I want to embed this in my own webpage. It's not necessary to put Homey in between, just a lack of resources.
    Is it possible for you to put it in the backend of your website then. So in nodejs / php / asp. That would be my approach.
  • edited February 2016
    I'm calling a .js in my php. And this .js tries to connect with Athoms servers. Before, when the virtual Homey still was alive, it worked like this for me.
    Nut also when I began with programming this, Athoms server was not fully correct. Therefor I'm now asking them to check this for me.
  • Cool!
    That means that the servers are configured right :)!
    What headers do you use?
    I'm using:
    "async": true,
    "crossDomain": true,
    "url": AthomServerHost,
    "method": "GET",
    "Content-Type": "application/json; charset=UTF-8"
  • I made a PHP file with some pretty straight forward Curl code.
    The Curl "catches" the JSON from status.athom.com and displays it again from my "open" domain.
    That JSON and some AngularJS is use to display the server statuses. 

    With Curl I don't use modified headers.


  • I'm calling a .js in my php. And this .js tries to connect with Athoms servers. Before, when the virtual Homey still was alive, it worked like this for me.
    Nut also when I began with programming this, Athoms server was not fully correct. Therefor I'm now asking them to check this for me.
    I advice to execute API calls like this from the backend side of your page. Like @MarcoF did.
  • you can use sites like https://crossorigin.me/
  • @All, thank for your help!
    I received @MarcoF's code and got it working for me.
  • Your welcome! 
This discussion has been closed.