Beginner's Question
Posted: Fri Nov 21, 2014 2:05 pm
Hello everyone,
I have been playing with the REST API for some time now and as I'm learning to program in SWIFT I have been using this pet project as my learning canvas.
So far I have managed to connect and get all the information the current API provides which I find very useful, thumbs up for the Indigo team!
I have now created my own little custom iPhone app in place to turn devices on/off but I want to stretch a bit the goal and having the input from Matt I was wondering how "easily" can I create custom pages on the Indigo Web Server and run Indigo scripts to 'interrogate' Z-wave devices?
To be more precise, I want to begin by creating a script that takes as input the device ID and returns the energy consumption that would be awesome!
The commands in terminal are like this:
>>>>dev = indigo.devices[device_id]
>>>>dev.energyCurLevel
22.800000000000001
I can then hopefully use this script within my little iPhone app although ideally I'd like the response to be a simple XML...
Thank you very much in advance and if this has already been asked please point me to the relevant document/page and I will do the reading.
Kostas
I have been playing with the REST API for some time now and as I'm learning to program in SWIFT I have been using this pet project as my learning canvas.
So far I have managed to connect and get all the information the current API provides which I find very useful, thumbs up for the Indigo team!
I have now created my own little custom iPhone app in place to turn devices on/off but I want to stretch a bit the goal and having the input from Matt I was wondering how "easily" can I create custom pages on the Indigo Web Server and run Indigo scripts to 'interrogate' Z-wave devices?
To be more precise, I want to begin by creating a script that takes as input the device ID and returns the energy consumption that would be awesome!
The commands in terminal are like this:
>>>>dev = indigo.devices[device_id]
>>>>dev.energyCurLevel
22.800000000000001
I can then hopefully use this script within my little iPhone app although ideally I'd like the response to be a simple XML...
Thank you very much in advance and if this has already been asked please point me to the relevant document/page and I will do the reading.
Kostas