Page 1 of 1

Utilities (and IndigoPlot) can't find Postgres database

PostPosted: Mon May 07, 2018 6:57 am
by johnpolasek
After updating from SQLite to PostGres, I noticed that my IndigoPlot plots were blank; no data bing plotted. After I reconfirmed all the plot parameters in IndigoPlot, the "Event" variables returned, but the "average" variables did not. After fiddling with it for a while, I went to the Utilities plugin and asked for data records from the database and got "Key XXXXXXXXXXXXX Not found' for everything I tried. I went to SQL Logger and turned on debugging to confirm that records were being written to the database, so I assumed that I have something wrong with the command string I am using in the plugins to access the database. So I went back to utilities and tried a number of variations on the command string without success... Any suggestions on how to make sure I am setting the correct psql, user, and password info in the command string ? I figure that once I can get Utilities to give me the data, it will likely come back in plot using the same command string.

Re: Utilities (and IndigoPlot) can't find Postgres database

PostPosted: Mon May 07, 2018 8:06 am
by kw123
Please post the command you used.


Sent from my iPhone using Tapatalk

Re: Utilities (and IndigoPlot) can't find Postgres database

PostPosted: Mon May 07, 2018 8:14 am
by johnpolasek
As soon as I get home this evening...

Re: Utilities (and IndigoPlot) can't find Postgres database

PostPosted: Mon May 07, 2018 10:52 am
by kw123
these are my postgres string (s) .. both seem to work for me .. (have postgres app and also regular postgres installed , but indigo is using postgres app):
Code: Select all
/Applications/Postgres.app/Contents/Versions/9.6/bin/psql indigo_history -U postgres

Code: Select all
/Library/PostgreSQL/bin/psql indigo_history postgres

Karl

Re: Utilities (and IndigoPlot) can't find Postgres database

PostPosted: Tue May 08, 2018 3:46 pm
by johnpolasek
What I started with was your default
Code: Select all
/Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history -U postgres


then tried replacing the -U (User?) with
Code: Select all
/Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history -U indigo
since that is the login my brother set in the database config.

When that didn't work, I did a lookup on the psql application and tried that path:

Code: Select all
/Users/jeff/PostgreSQL/pg10/bin/psql indigo_history -U postgres
/Users/jeff/PostgreSQL/pg10/bin/psql indigo_history -U indigo
[/code]

However, jeff also set a password on the database, and I wasn't certain how to add that to the command string... is that the problem?

Re: Utilities (and IndigoPlot) can't find Postgres database

PostPosted: Tue May 08, 2018 5:53 pm
by kw123
Could open a terminal
psql
Ctrlq to exit
Check what’s happening.



Sent from my iPhone using Tapatalk

Utilities (and IndigoPlot) can't find Postgres database

PostPosted: Tue May 08, 2018 5:54 pm
by kw123
And how did you setup Postgres?


I am out right now. Will check password later.

But indigo works fine? Did you enter uid password there?

Sent from my iPhone using Tapatalk

Re: Utilities (and IndigoPlot) can't find Postgres database

PostPosted: Tue May 08, 2018 8:56 pm
by kw123
try this one:
Code: Select all
PGPASSWORD=YOUR_PASSwORD ;  /Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history -U postgres
naturally replace YOUR_PASSwORD and postgres with your password and userid

you likely can drop the ; after password

Karl

Re: Utilities (and IndigoPlot) can't find Postgres database

PostPosted: Wed May 09, 2018 5:00 am
by johnpolasek
kw123 wrote:
And how did you setup Postgres?


I am out right now. Will check password later.

But indigo works fine? Did you enter uid password there?

Sent from my iPhone using Tapatalk


My brother (an IT manager at TAMU) set up postgres. I assume the Indigo is working because when I turn on debugging in SQLLogger plugin, I get a bunch of green insert commands showing up in the log, but no red lines.. I got called out to help a friend with horses yesterday after I posted, and didn't get back to the computers till I got to work this morning so I'll check it when I get home.

Re: Utilities (and IndigoPlot) can't find Postgres database

PostPosted: Sat May 12, 2018 6:59 am
by kw123
did the suggested password addition work?

Re: Utilities (and IndigoPlot) can't find Postgres database

PostPosted: Sun May 13, 2018 12:21 pm
by johnpolasek
Just finishing up playing with it; The suggestion to put the password ahead of \applications didn't work, but removing the password from postgres did... for Utilities. However, IndigoPlot was still not getting anything from the database; I checked the version and found I was running 4.17.41, while the latest download appeared to be 4.18.46. When I downloaded that, most of the data came back, but a few of the datasources were missing... when I tried to put them back in, the dialog hung attempting to save the new sources. A quick check of the task manager showed the Indigo plugin manager was running one core flat out. Disabling plugins one by one, I found the offender had nothing to do with anything of yours or postgres; there's something badly wrong with bert's security camera plugin, and since that's been orphaned, I'm going to have to find another way to pare down my Ubiquiti G3 image sizes. But now that I've got THAT disabled, I've just got to get the rest of the data sources put back and re added to the plots, but I've got most of them done and everything seems to be working now. Thanks.

Re: Utilities (and IndigoPlot) can't find Postgres database

PostPosted: Sun May 13, 2018 12:41 pm
by kw123
You can reload all default with the restore option. It has snapshots for the last 2 months

It has all data source refs and plot sets


Sent from my iPhone using Tapatalk

Utilities (and IndigoPlot) can't find Postgres database

PostPosted: Sun May 13, 2018 12:42 pm
by kw123
On the UniFi cams you can check out the UniFi nvr app. Supported by the UniFi plugin.


Sent from my iPhone using Tapatalk