indigo utilities discussion
Re: indigo utilities discussion
I would like to point out that the 2 systems indigo internal db and what ever you do externally can become quickly out of sync.
If a device gets deleted added renamed would require a trigger to update that dB.
I am speaking from experience. This is a lot of work to make this kind of thing work.
Why don’t you do directly to the source ie indigo ?
Sent from my iPhone using Tapatalk
If a device gets deleted added renamed would require a trigger to update that dB.
I am speaking from experience. This is a lot of work to make this kind of thing work.
Why don’t you do directly to the source ie indigo ?
Sent from my iPhone using Tapatalk
Re: indigo utilities discussion
Yes, agree would need some updating and refreshing but manageable on adhoc basis if I saw issues on the results.
I am trying to setup a dashboard for my house in Qlikview which has free personal license for single use, and is a data visualisation tool I have used for many years, and can read data from postgresql.
With a table of all device ids I can create a loop to load in each table, and with the names against them, create a more useful name for that device. I have done this manually copying out from the log the list of all devices, but a pain to update this way.
Taking it to the next step, I can then create a different sql statement per device type, ie per PIR, thermostat, light switch etc, where each type has the same columns. As I loop through the device ids, if the name ends "PIR", or "Stat" etc (I am consistent with my naming of devices) then it will load that device into the right table.
I can then create interactive charts there .
I am trying to setup a dashboard for my house in Qlikview which has free personal license for single use, and is a data visualisation tool I have used for many years, and can read data from postgresql.
With a table of all device ids I can create a loop to load in each table, and with the names against them, create a more useful name for that device. I have done this manually copying out from the log the list of all devices, but a pain to update this way.
Taking it to the next step, I can then create a different sql statement per device type, ie per PIR, thermostat, light switch etc, where each type has the same columns. As I loop through the device ids, if the name ends "PIR", or "Stat" etc (I am consistent with my naming of devices) then it will load that device into the right table.
I can then create interactive charts there .
Re: indigo utilities discussion
again the question why don't you go directly against indigo? the db is just an intermediate storage. can quick .. only read sql databases? or can you feed things directly?
Re: indigo utilities discussion
It does have a REST connector as well so guess it could query indigo directly for that information.?
Re: indigo utilities discussion
U can get states etc thru rest but don’t know if you can get a device list.
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
- Colorado4Wheeler
- Posts: 2794
- Joined: Mon Jul 20, 2009 10:48 am
- Location: Colorado
Re: indigo utilities discussion
You can get a device list via REST (assuming you are referring to Indigo's RESTful API):
Code: Select all
http://127.0.0.1:8176/devices/
http://127.0.0.1:8176/devices.json/
http://127.0.0.1:8176/devices.xml/
http://127.0.0.1:8176/devices.txt/
My Modest Contributions to Indigo:
HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy
Check Them Out Here
HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy
Check Them Out Here
- jay (support)
- Site Admin
- Posts: 19232
- Joined: Wed Mar 19, 2008 11:52 am
- Location: Austin, Texas
- Contact:
Re: indigo utilities discussion
Colorado4Wheeler wrote:You can get a device list via REST (assuming you are referring to Indigo's RESTful API):
Code: Select all
http://127.0.0.1:8176/devices/ http://127.0.0.1:8176/devices.json/ http://127.0.0.1:8176/devices.xml/ http://127.0.0.1:8176/devices.txt/
Note that those lists don't include the ID, so you'll need to iterate through the lists, get the restURL element and use that to get the device details that includes the ID.
Re: indigo utilities discussion
Thanks all. Yes realised that the device list from REST wouldn't do it without some hugely painful looping.
Think the easiest is to try and loop through the device list and get the id to name that way into a table.
Sorry Karl, seem to have hijacked your thread, this would have been better in my earlier script question thread.
Sent from my iPhone using Tapatalk
Think the easiest is to try and loop through the device list and get the id to name that way into a table.
Sorry Karl, seem to have hijacked your thread, this would have been better in my earlier script question thread.
Sent from my iPhone using Tapatalk
Re: indigo utilities discussion
to read the device states you don't need the devId, the devName is ok ..
just pay attention if the name changes .. I know thats not perfect, but it saves - in your case - a lot of programming I believe.
will give you all the states.. Actually I don't know how to use the devId to get the states through REST !? .. may be somewhere in the docu..
Karl
http://wiki.indigodomo.com/doku.php?id= ... stful_urls for the rest api
just pay attention if the name changes .. I know thats not perfect, but it saves - in your case - a lot of programming I believe.
Code: Select all
curl -u uid:pwd --digest http://192.168.1.xx:8176/devices/UniFi_sw_2_1_study.jsonKarl
http://wiki.indigodomo.com/doku.php?id= ... stful_urls for the rest api
- jay (support)
- Site Admin
- Posts: 19232
- Joined: Wed Mar 19, 2008 11:52 am
- Location: Austin, Texas
- Contact:
Re: indigo utilities discussion
I think he's using the Postgres DB directly and only needs the name to make his visualizations more readable.kw123 wrote:to read the device states you don't need the devId, the devName is ok ..
just pay attention if the name changes .. I know thats not perfect, but it saves - in your case - a lot of programming I believe.
will give you all the states.. Actually I don't know how to use the devId to get the states through REST !? .. may be somewhere in the docu..Code: Select all
curl -u uid:pwd --digest http://192.168.1.xx:8176/devices/UniFi_sw_2_1_study.json
Karl
http://wiki.indigodomo.com/doku.php?id= ... stful_urls for the rest api
The ID was added after the fact to the existing REST API - it's not used in any place other than returned with the device details so you can't get a device based in the ID. We're currently planning a pretty big revamp of the REST API as we reimplement the Indigo Web Server using the IOM (the current IWS implementation predates plugins, object IDs, and the IOM which is why it lacks features).
- Colorado4Wheeler
- Posts: 2794
- Joined: Mon Jul 20, 2009 10:48 am
- Location: Colorado
Re: indigo utilities discussion
There's a new plugin I can scrap thenjay (support) wrote:We're currently planning a pretty big revamp of the REST API as we reimplement the Indigo Web Server using the IOM
My Modest Contributions to Indigo:
HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy
Check Them Out Here
HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy
Check Them Out Here
- jay (support)
- Site Admin
- Posts: 19232
- Joined: Wed Mar 19, 2008 11:52 am
- Location: Austin, Texas
- Contact:
Re: indigo utilities discussion
Yeah, that would probably not be the best use of your time...Colorado4Wheeler wrote:There's a new plugin I can scrap thenjay (support) wrote:We're currently planning a pretty big revamp of the REST API as we reimplement the Indigo Web Server using the IOM. I was rewriting the API via a plugin.
- Colorado4Wheeler
- Posts: 2794
- Joined: Mon Jul 20, 2009 10:48 am
- Location: Colorado
Re: indigo utilities discussion
Lol, if I had a penny for each plugin that wasn't a good use of my time....jay (support) wrote:Yeah, that would probably not be the best use of your time...
My Modest Contributions to Indigo:
HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy
Check Them Out Here
HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy
Check Them Out Here
Re: indigo utilities discussion
Exactly. Any idea on a timeline for the new REST API? Think I might stick with the manual table for now and wait for the API but will investigate automating it if I run out of other indigo tasks to do.I think he's using the Postgres DB directly and only needs the name to make his visualizations more readable.
The ID was added after the fact to the existing REST API - it's not used in any place other than returned with the device details so you can't get a device based in the ID. We're currently planning a pretty big revamp of the REST API as we reimplement the Indigo Web Server using the IOM (the current IWS implementation predates plugins, object IDs, and the IOM which is why it lacks features).
Sent from my iPhone using Tapatalk
- matt (support)
- Site Admin
- Posts: 21542
- Joined: Mon Jan 27, 2003 1:17 pm
- Location: Texas
- Contact:
Re: indigo utilities discussion
We don't like to give time estimates / ETAs, but it is a high priority item.siclark wrote:Exactly. Any idea on a timeline for the new REST API? Think I might stick with the manual table for now and wait for the API but will investigate automating it if I run out of other indigo tasks to do.
