importing historical data

Posted on
Fri Mar 02, 2018 6:00 pm
bsp9493 offline
Posts: 153
Joined: Nov 30, 2017
Location: Kelowna, BC

importing historical data

Thought I had everything figured out once I switched to Postgres app for sql logger.

When in look in my indigo_history db, I see there is historical data for the item I am plotting

INDIGOplotD does not seem to want to import the historical stuff from the sql logger though:(

currently using
- postgres app - for sql logger
- updated the "postgre command string" in the plugin config to the following...

"/Applications/Postgres.app/Contents/Versions/10/bin/psql" -p5432 -d "indigo_history"

(which appears to be valid as that is what is working in the Utilities plugin -- when I query the db with Utilities plugin - I can see my historical data)


Do I have the wrong command string?

I have seen a few threads related to this but unable to find a solution.

Your help is appreciated.

Thanx

d

sql debug below

INDIGOplotD pending indigoCommands: ['ReloadSQL']
INDIGOplotD clearSqlData sqlupdates: [0, 0]
INDIGOplotD command: reLoad SQL started
INDIGOplotD setupSQLDataBatch 2 updateslist:[0, 49]
INDIGOplotD sql importfile file not created yet, resetting import parameters: /Users/david/indigo/INDIGOplotD/sql/1978589258-ambient_temperature_c
INDIGOplotD sqlID ==0, delete col:1 sql/1978589258-ambient_temperature_c
INDIGOplotD "/Applications/Postgres.app/Contents/Versions/10/bin/psql" -p5432 -d "indigo_history" -t -A -F ';' -c " SELECT id, to_char(ts,'YYYYmmddHH24MIss'), ambient_temperature_c from device_history_1978589258 WHERE ambient_temperature_c IS NOT NULL AND ID > 0 order by id LIMIT 10000000;" 2>/Users/david/indigo/INDIGOplotD/sql/1978589258-ambient_temperature_c.error | awk -F';' 'NF>2 && !/data unavailable/ {print}' > /Users/david/indigo/INDIGOplotD/sql/1978589258-ambient_temperature_c.sqlOut

/usr/bin/python2.7 '/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/INDIGOplotD.indigoPlugin/Contents/Server Plugin/fixSQLoutput.py' {"fileDir": "/Users/david/indigo/INDIGOplotD/sql/", "startID": "0", "outputFile": "1978589258-ambient_temperature_c", "logFile": "sqlFix", "inputFile": "1978589258-ambient_temperature_c.sqlout"}


INDIGOplotD sql command for col:1 name-state:nthermostat main-ambient_temperature_c starting at record: 0 added; last existing record is: no SQL file generated yet
INDIGOplotD sql commands launched sqlID anythingToupdates 0 1
INDIGOplotD sql commands launched 2018-03-02 15:51:06.667059 waiting for SQL tasks to end to read data into INDIGOplotD pid=2130
INDIGOplotD readSQLdataBatch calledfrom ...runConcurrentThread sqlHistListStatus[0, 10]
INDIGOplotD ...runConcurrentThread sqlColListStatus [0, 5]
INDIGOplotD sql file if done, now reading it 2 [0, 10]
INDIGOplotD theCol:1; updatesALL:True; sqlDynamic:batch; sqlHistListStatus:[0, 10]
INDIGOplotD Convert no records found, try later 1
INDIGOplotD Convert no records found, try later 2
INDIGOplotD clearSqlData sqlupdates: [0, 0]
INDIGOplotD SQL import 2018-03-02 15:51:07.774958 ... sqlColListStatus: [0, 0]
INDIGOplotD readSQLdataBatch calledfrom ...runConcurrentThread sqlHistListStatus[0, 10]
INDIGOplotD ...runConcurrentThread sqlColListStatus [0, 0]
INDIGOplotD sql file if done, now reading it 0 [0, 10]
INDIGOplotD theCol:1; updatesALL:True; sqlDynamic:batch; sqlHistListStatus:[0, 10]
INDIGOplotD Convert no records found, try later 1
INDIGOplotD Convert no records found, try later 2
INDIGOplotD clearSqlData sqlupdates: [0, 0]
INDIGOplotD SQL import 2018-03-02 15:51:09.962158 ... sqlColListStatus: [0, 0]
INDIGOplotD readSQLdataBatch calledfrom ...runConcurrentThread sqlHistListStatus[0, 10]
INDIGOplotD ...runConcurrentThread sqlColListStatus [0, 0]

Posted on
Fri Mar 02, 2018 10:00 pm
kw123 offline
User avatar
Posts: 8360
Joined: May 12, 2013
Location: Dallas, TX

Re: importing historical data

my psql string looks like:
Code: Select all
/Applications/Postgres.app/Contents/Versions/9.6/bin/psql  indigo_history postgres

yours:
Code: Select all
"/Applications/Postgres.app/Contents/Versions/10/bin/psql" -p5432 -d "indigo_history"

I guess:
remove the "
remove -p5432 -d
add postgres:
Code: Select all
/Applications/Postgres.app/Contents/Versions/10/bin/psql  indigo_history postgres


try that

Karl

Posted on
Sat Mar 03, 2018 2:41 pm
bsp9493 offline
Posts: 153
Joined: Nov 30, 2017
Location: Kelowna, BC

Re: importing historical data

Thanx Karl...

Update to 4.17.41 solved the problems:)

d

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest