Hi,
I am an intermediate DIY user, so please bear with me ;D
I am trying to develop a simple HTML dashboard and control page for my vera. One that I could display on in-wall tablets in my home.
I know, there are apps out there, but none is perfect…actually, some are very good, but they aren’t compatible with both iOS and Android tablets.
I am doing things in a very “primitive manner”: pure text editing (TextWrangler Mac), and integrated Mac OS server function.
Works all good (see attachment, for a very primitive test page):
I have my webpage, I can control devices (javascript HTTP get requests to my Vera)…
Now I am trying to get the status of the devices.
I have no problem getting the “sdata” JSON status file (Luup Requests - MiOS), so far, i get it ;D
PROBLEM:
On a Mac (safari, firefox)… I can parse the JSON and display the status of the devices on my web page.
BUT
- on mobile devices (iPhone, iPad and even the experimental browser on an Amazon Kindle), the JSON refuses to load from the Vera
- if I manually load the .json file in the root of my sever, and point my HTML page to it, then it works…on ALL devices above + desktops
My conclusion is, after much online research, that mobile browsers refuse to interrogate external servers via javascript. Obviously my Vera and my test server have different local IPs, so iDevices and Kindles refuse to retrieve the Json for security reasons.
Do any of you experts have a tip?
One option would be: instead of dynamically reading the JSON with Javascript on the client side, I could maybe use PHP to retrieve the JSON file from the Vera, save it on my home server, and then all devices will accept reading it (JSON file on same server as web page).
But I played with PHP as a kid…I must admit I was keen on keeping things pure HTML and javascript 8)
Any tip is welcome, many thanks!