Page 1 of 1

email SQLite tables?

PostPosted: Wed Feb 08, 2017 7:54 pm
by Professor Falken
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

Re: email SQLite tables?

PostPosted: Wed Feb 08, 2017 11:00 pm
by kw123
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

Re: email SQLite tables?

PostPosted: Thu Feb 09, 2017 9:32 am
by Professor Falken
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.

Re: email SQLite tables?

PostPosted: Thu Feb 09, 2017 10:35 am
by kw123
starting with SQL queries might be a steep learning curve for a beginner