email SQLite tables?

Posted on
Wed Feb 08, 2017 7:54 pm
Professor Falken offline
User avatar
Posts: 289
Joined: Mar 29, 2015

email SQLite tables?

Can anyone point me in the a direction to learn to use this plugin (or perhaps the SQLite more generally)? I have read the plugin wiki entry, but I think I may need to move to something more general perhaps to working with SQL databases.

I would like to create a way to receive an email of a sort of "system report" on all monitored devices/variables.

For example, if an alarm event happened, I would get an email with tables of all the zones (perhaps last 5 changes or something), as well as the keypad device's last 5 states (or both LCD lines or whatever).

Once a month, I'd like to have Indigo send an email containing tables of perhaps the last 10 state changes of all devices and variables.

Maybe this is beyond the scope of indigo/SQLite/this plugin, but I figured I'd throw this out to the superusers on the forum.

Thanks

Posted on
Wed Feb 08, 2017 11:00 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: email SQLite tables?

The plugin only saves data to the database . Nothing else.

If you want to get data out you need to write your own sql statements.

try the indigoutilities plugin. It has a feature to create reports of device/states.
It does not do exactly what you want but you can use the code as a starting point.


Sent from my iPhone using Tapatalk

Posted on
Thu Feb 09, 2017 9:32 am
Professor Falken offline
User avatar
Posts: 289
Joined: Mar 29, 2015

Re: email SQLite tables?

Thanks, I'll check that out.

I did have some luck using the Better Email plugin, but at least on first pass I was only able to generate an email current states for monitored devices/variable, not a sort-of historical record as I was aiming to do. My guess is that by using the "insert timestamp" function in indigo and a bunch of variables for each monitored entity, I might be able to do it. But that would probably get very unwieldy very quickly.

Unfortunately I am not a developer, and have done no significant coding (outside of some AppleScripts for Indigo) since high school. I really need to just hunker down and learn Python I guess.

Posted on
Thu Feb 09, 2017 10:35 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: email SQLite tables?

starting with SQL queries might be a steep learning curve for a beginner

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests

cron