kw123 wrote:yes Time Machine is no good for sql backups.
fix has worked in 30% of the cases.
looks like your db is toast. need to start from scratch.
I would start with postgres app . Very easy to install and mine has had no probs for 18 months and the db is now at 25GB
use the backup facility!!
Karl
Jan 8, 2018 at 10:27:17 AM
utilities Error Error in plugin execution UiAction:
Traceback (most recent call last):
TypeError: pickDeviceCALLBACK() takes at most 3 arguments (4 given)
Colorado4Wheeler wrote:I was just about to write an SQL query manager plugin
/usr/bin/sqlite3 -header -column '/Library/Application Support/Perceptive Automation/Indigo 7/logs/indigo_history.sqlite' "SELECT id, strftime('%Y-%m-%d-%H:%M:%S',ts,'localtime'),temperature from device_history_375541516 WHERE ID > 0 ORDER by id LIMIT 5;"
$/usr/bin/sqlite3 -header -column '/Library/Application Support/Perceptive Automation/Indigo 7/logs/indigo_history.sqlite' "SELECT id, strftime('%Y-%m-%d-%H:%M:%S',ts,'localtime'),temperature from device_history_375541516 WHERE ID > 0 ORDER by id LIMIT 5;"
id strftime('%Y-%m-%d-%H:%M:%S',ts,'localtime') temperature
---------- -------------------------------------------- -----------
2 2014-06-28-11:45:32
3 2014-06-28-11:45:48 0
4 2014-06-28-11:45:58 0
5 2014-06-28-11:46:12 0
6 2014-06-28-11:46:40 0
$ /usr/bin/sqlite3 -header -column '/Library/Application Support/Perceptive Automation/Indigo 7/logs/indigo_history.sqlite' "SELECT id, strftime('%Y-%m-%d-%H:%M:%S',ts),temperature from device_history_375541516 WHERE ID > 0 ORDER by id LIMIT 5;"
id strftime('%Y-%m-%d-%H:%M:%S',ts) temperature
---------- -------------------------------- -----------
2 2014-06-28-16:45:32
3 2014-06-28-16:45:48 0
4 2014-06-28-16:45:58 0
5 2014-06-28-16:46:12 0
6 2014-06-28-16:46:40 0
HOUSE:Logs administrator$ /usr/bin/sqlite3 -header -column '/Library/Application Support/Perceptive Automation/Indigo 7/logs/indigo_history.sqlite' "SELECT id, strftime('%Y-%m-%d-%H:%M:%S',ts,'localtime'), * from device_history_135129331 WHERE ID > 0 ORDER by id LIMIT 5;"
id strftime('%Y-%m-%d-%H:%M:%S',ts,'localtime') id ts sensorvalue sensorvalue_ui
---------- -------------------------------------------- ---------- ------------------- ----------- --------------
1 2018-01-08-09:16:30 1 2018-01-08 16:16:30 18.0 18.0 °C
2 2018-01-08-09:17:11 2 2018-01-08 16:17:11 18.0 18.0 °C
3 2018-01-08-11:30:47 3 2018-01-08 18:30:47 18.7 18.7 °C
HOUSE:Logs administrator$
HOUSE:Logs administrator$ /usr/bin/sqlite3 -header -column '/Library/Application Support/Perceptive Automation/Indigo 7/logs/indigo_history.sqlite' "SELECT id, strftime('%Y-%m-%d-%H:%M:%S',ts,'localtime') AS 'local_ts', * from device_history_135129331 WHERE ID > 0 ORDER by id LIMIT 5;"
id local_ts id ts sensorvalue sensorvalue_ui
---------- ------------------- ---------- ------------------- ----------- --------------
1 2018-01-08-09:16:30 1 2018-01-08 16:16:30 18.0 18.0 °C
2 2018-01-08-09:17:11 2 2018-01-08 16:17:11 18.0 18.0 °C
3 2018-01-08-11:30:47 3 2018-01-08 18:30:47 18.7 18.7 °C
SQL-OUTPUT:
id strftime('%Y-%m-%d-%H:%M:%S',ts,'localtime') sensorvalue
---------- -------------------------------------------- -----------
1 2018-01-08-09:16:30 335.0
2 2018-01-08-09:17:11 335.0
3 2018-01-08-11:13:08 18.0
4 2018-01-08-11:13:31 376.0
5 2018-01-08-11:17:34 15.0
6 2018-01-08-11:18:03 371.0
7 2018-01-08-11:30:01 25.0
8 2018-01-08-11:30:31 362.0
9 2018-01-08-12:33:42 29.0
Users browsing this forum: No registered users and 3 guests