API Help

Hi,

I would like to create a web interface to control many Arylic systems around my property.
The problem is that calling the systems from javascript on a webpage fails. For example:
const response = await fetch(‘http://10.35.3.168/httpapi.asp?command=getStatusEx’);

This will give a CORS error because I’m trying to call something from a different domain.

So the next thing to try is:
const response = await fetch(‘http://10.35.3.168/httpapi.asp?command=getStatusEx’,{mode: ‘no-cors’})

But this hides the response a security precaution built into browsers.

So then I tried using iframes, object tags and the like. These will successfully make the call but then one cannot access the response.

The best solution would be if the web server on Arylic devices included “Access-Control-Allow-Origin” in the header with a * to allow browsers to communicate with the devices.

Is there a way to configure this? Or request that in a future update?

Allowing DIY projects to leverage web browsers would be amazing!

Thank you,

-greg

2 Likes

Hi @Greg would like to get into this at some point. Have you seen this post ?