Hi all,
I'm a fairly experienced Indigo user & longtime forum lurker. Thanks guys for making a great product!
I'm trying to create a simple tablet-oriented jquery / static HTML front-end for Indigo, using the RESTful API. I've got it working but am having one issue with the AJAX calls I'm making.
I have Indigo behind a reverse proxy at http://home.example.com/indigo/, and the jquery site at http://home.example.com/lights.html, which shows an icon for each light. Tapping on a light makes a call (via jquery $.get()) to "home.example.com/indigo/devices/<light_name>?toggle=1&_method=put", which works as intended - the light toggles. However, as defined in the documentation, indigo then responds with a redirect to the device resource. The problem is that indigo doesn't know about the /indigo/ RP URL, thus it responds with a redirect to home.example.com/devices/<light_name>. This causes the .get() function to error - which prevents me from making followup function calls (e.g. showing a success message).
I tried updating IndigoWebServer.conf with the app_root_path set to /indigo/, but this doesn't work as I'd hoped - now Indigo wants me to query home.example.com/indigo/indigo/devices/<light_name>.
Is it possible to configure the REST API such that it returns a redirect to the correct URL (/indigo/devices/<device_name>.xml), or doesn't return a redirect at all?
Cheers,