Perry The Cynic wrote:What is the typeval column in the eventlog_history?
That is an enum of one of the following:
Code: Select all
kMessageType_Application = 0,
kMessageType_Error = 1,
kMessageType_Debug = 3,
kMessageType_Custom = 5,
kMessageType_ReceviedX10 = 6,
kMessageType_ReceviedRF,
kMessageType_ReceviedINSTEON,
kMessageType_SentOffline,
kMessageType_SentX10,
kMessageType_SentINSTEON,
kMessageType_Email_Deleted,
kMessageType_Email_Scanned,
kMessageType_Email_Sent,
kMessageType_PowerFailure,
kMessageType_InterfaceFailure,
kMessageType_TriggerAction,
kMessageType_TimeDateAction,
kMessageType_ActionGroup,
kMessageType_Script,
kMessageType_Updated
Perry The Cynic wrote:Does the logger write any device configuration to the database? I.e. is the state of the Indigo device database reflected there? Any data that lets me translate id numbers to device names?
Device states are written to the device specific tables whenever there is a state change (and sometimes probably a bit more frequently than is needed). Additionally, on plugin launch it writes all devices to their tables to provide an accurate "base."
Perry The Cynic wrote:Any way to just get some device state logs, instead of all or none?
Not currently.
Perry The Cynic wrote:Any way to put all the device states into one table (or at least all devices of the same type)? Giving each temperature sensor its own table makes it rather unpleasant to write a query for all temperatures in the house.
You could create a plugin that maintains a temperature collection device type, then query on it.
Perry The Cynic wrote:Any way for my plugin to use your plugin's connection to write its own data to the database? Any way for my plugin to query the database?
You can query it (SQLite or PostgreSQL) , but if I remember correctly Indigo has the database locked for writing so you won't be able to write to it. You can write to it indirectly of course using the temperature collection device idea above.
Perry The Cynic wrote:Is there a supported way to use the SQL module (short of ripping a copy out of your plugin and sticking it into mine)?
No, but the bpgsql.py file we didn't write (it has a MIT/BSD style license) and you have our permission to use the indigosql.py file in your plugins if you would like.