Page 3 of 4
Re: Cannot remove device from tracing
Posted:
Fri Jan 15, 2021 2:35 pm
by kw123
disable and enable sqllogger in indigo.
you should see:
- Code: Select all
Jan 15, 2021 at 14:33:56
Disabling plugin "SQL Logger 7.5.0"
Stopping plugin "SQL Logger 7.5.0" (pid 37564)
SQL Logger closing SQL connection
Stopped plugin "SQL Logger 7.5.0"
Enabling plugin "SQL Logger 7.5.0"
Starting plugin "SQL Logger 7.5.0" (pid 38860)
Started plugin "SQL Logger 7.5.0"
SQL Logger connected to indigo_history as postgres on 127.0.0.1
SQL Logger searching for unused device and variable tables
SQL Logger search complete (none found)
SQL Logger updating all device tables
SQL Logger updating all variable tables
it might take awhile when your DB is bigger
Karl
Re: Cannot remove device from tracing
Posted:
Fri Jan 15, 2021 3:27 pm
by bjmouton
Stopped & restarted both SQL Logger and min/Max plugins, still not getting data.
Disabling plugin "SQL Logger 7.5.0"
Stopping plugin "SQL Logger 7.5.0" (pid 8415)
SQL Logger closing SQL connection
Stopped plugin "SQL Logger 7.5.0"
Enabling plugin "SQL Logger 7.5.0"
Starting plugin "SQL Logger 7.5.0" (pid 8419)
Started plugin "SQL Logger 7.5.0"
SQL Logger connected to indigo_history as postgres on 127.0.0.1
Disabling plugin "minMax 7.12.16"
Stopping plugin "minMax 7.12.16" (pid 7911)
Stopped plugin "minMax 7.12.16"
Enabling plugin "minMax 7.12.16"
Starting plugin "minMax 7.12.16" (pid 8460)
minMax initializing ...
minMax path To files: =================
minMax indigo /Library/Application Support/Perceptive Automation/
minMax installFolder /Library/Application Support/Perceptive Automation/Indigo 7.5/
minMax plugin.py /Library/Application Support/Perceptive Automation/Indigo 7.5/Plugins/minMax.indigoPlugin/Contents/Server Plugin/
minMax Plugin params /Library/Application Support/Perceptive Automation/Indigo 7.5/Preferences/Plugins/com.karlwachs.minMax/
minMax logger enabled for INFO
minMax Warning logger enabled for WARNING
minMax Error logger enabled for ERROR
minMax Error logger enabled for CRITICAL
minMax check /Library/Application Support/Perceptive Automation/Indigo 7.5/Logs/com.karlwachs.minMax/plugin.log <<<< for detailed logging
minMax Plugin short Name minMax
minMax my PID 8460
Started plugin "minMax 7.12.16"
minMax testing if variable enableTimeTracking_minMax is == on/off/print-option to enable/end/print time tracking of all functions and methods (option:'',calls,cumtime,pcalls,time)
minMax myLogSet setting parameters -- logFileActive= indigo; logFile= /Library/Application Support/Perceptive Automation/Indigo 7.5/Logs/com.karlwachs.minMax/plugin.log; debugLevel= []
minMax Configuration: ... date format: %Y-%m-%d-%H:%M:%S ==> 2021-01-15-15:22:09
minMax Dev/Var-Name----- ID State ignoreLess ignoreGreater format tracking measures: -------
minMax Deck Door Sensor 364274916 onOffState -9876543210 9876543210 '%.1f' lastDay- Count1
thisDay- Count1
minMax Aeotec_Temperature 1774580169 value -9876543210 9876543210 '%.1f' thisHour- Min Max Ave
lastHour- Min Max Ave
lastDay- DateMax Min Max DateMin Ave
thisDay- Min Max Ave
minMax Front Door Sensor 18622376 onOffState -9876543210 9876543210 '%.1f' lastDay- Count1
thisDay- Count1
minMax AmbientTemperature 729752752 value -9876543210 9876543210 '%.1f' thisHour- Min Max Ave
lastHour- Min Max Ave
minMax Patio Door Sensor 61344331 onOffState -9876543210 9876543210 '%.1f' lastDay- Count1
thisDay- Count1
Re: Cannot remove device from tracing
Posted:
Fri Jan 15, 2021 10:36 pm
by kw123
and are you using:
/Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history postgres
?
do you have eg a thermometer you could use to test if you get any data.
Hold the thermometer in your hand to make the temp go
Then check min/max this hour measure - that should change the variables
and switch on config / debug sql
you should see something like this:
15 22:34:47 /Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history postgres -t -A -F ';' -c "SELECT to_char(ts,'YYYY-mm-dd-HH24:MI:ss'), Temperature from device_history_582422074 where to_char(ts,'YYYY-mm-dd-HH24:MI:ss') > '2020-11-30-00:34:45' ORDER by id ;"
15 22:34:47 data-out: 2021-01-15-14:31:53;21.7
2021-01-15-14:32:14;21.7
2021-01-15-14:32:33;
2021-01-15-14:33:33;21.8
2021-01-15-14:34:10;21.8
2021-01-15-14:34:34;
2021-01-15-14:35:39;21.9
2021-01-15-14:36:42;22
2021-01-15-14:37:44;22.1
2021-01-15-14:38:47;
2021-01-15-14:39:53;
2021-01-15-14:40:53;
2021-01-15-14:41:54;
that is a thermometer reading
and here a logical device:
15 22:34:47 err-out:
15 22:34:47 /Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history postgres -t -A -F ';' -c "SELECT to_char(ts,'YYYY-mm-dd-HH24:MI:ss'), onOffState from device_history_28906680 where to_char(ts,'YYYY-mm-dd-HH24:MI:ss') > '2020-11-30-00:34:45' ORDER by id ;"
15 22:34:47 data-out: 2021-01-15-14:31:58;f
2021-01-15-14:32:16;f
2021-01-15-14:34:12;f
2021-01-15-14:40:09;t
2021-01-15-14:40:16;f
2021-01-15-19:24:19;t
2021-01-15-19:24:20;f
Karl
Re: Cannot remove device from tracing
Posted:
Fri Jan 15, 2021 11:03 pm
by bjmouton
Yes, That is the path I have in the config, but there is an error in the log (see below). Also, there is no file in that path's bin directory named "psql indigo_history postgres", the closest is just "psql".
15 22:52:30 logger enabled for THREADDEBUG
15 22:52:30 logger enabled for DEBUG
22:52:30 logger enabled for INFO
22:52:30 logger enabled for WARNING
2021-01-15 22:52:30.717 ERROR Plugin.__init__ logger enabled for ERROR
2021-01-15 22:52:30.717 CRITICAL Plugin.__init__ logger enabled for CRITICAL
22:52:30 -myLogSet setting parameters -- logFileActive= indigo; logFile= /Library/Application Support/Perceptive Automation/Indigo 7.5/Logs/com.karlwachs.minMax/plugin.log; debugLevel= [u'Sql', u'Setup']
22:52:30 Configuration: ... date format: %Y-%m-%d-%H:%M:%S ==> 2021-01-15-22:52:30
22:52:30 Dev/Var-Name----- ID State ignoreLess ignoreGreater format tracking measures: -------
22:52:30 Deck Door Sensor 364274916 onOffState -9876543210 9876543210 '%.1f' lastDay- Count1
thisDay- Count1
22:52:30 Aeotec_Temperature 1774580169 value -9876543210 9876543210 '%.1f' thisHour- Min Max Ave
lastHour- Min Max Ave
lastDay- DateMax Min Max DateMin Ave
thisDay- Min Max Ave
22:52:30 Front Door Sensor 18622376 onOffState -9876543210 9876543210 '%.1f' lastDay- Count1
thisDay- Count1
22:52:30 AmbientTemperature 729752752 value -9876543210 9876543210 '%.1f' thisHour- Min Max Ave
lastHour- Min Max Ave
22:52:30 Patio Door Sensor 61344331 onOffState -9876543210 9876543210 '%.1f' lastDay- Count1
thisDay- Count1
15 22:52:30 /Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history postgre -t -A -F ';' -c "SELECT to_char(ts,'YYYY-mm-dd-HH24:MI:ss'), onOffState from device_history_364274916 where to_char(ts,'YYYY-mm-dd-HH24:MI:ss') > '2020-11-30-00:52:30' ORDER by id ;"
15 22:52:30 data-out:
15 22:52:30 err-out: psql: error: FATAL: role "postgre" does not exist
15 22:52:30 /Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history postgre -t -A -F ';' -c "SELECT to_char(ts,'YYYY-mm-dd-HH24:MI:ss'), value from variable_history_1774580169 where to_char(ts,'YYYY-mm-dd-HH24:MI:ss') > '2020-11-30-00:52:30' ORDER by id ;"
15 22:52:30 data-out:
15 22:52:30 err-out: psql: error: FATAL: role "postgre" does not exist
15 22:52:31 /Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history postgre -t -A -F ';' -c "SELECT to_char(ts,'YYYY-mm-dd-HH24:MI:ss'), onOffState from device_history_18622376 where to_char(ts,'YYYY-mm-dd-HH24:MI:ss') > '2020-11-30-00:52:30' ORDER by id ;"
15 22:52:31 data-out:
15 22:52:31 err-out: psql: error: FATAL: role "postgre" does not exist
15 22:52:31 /Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history postgre -t -A -F ';' -c "SELECT to_char(ts,'YYYY-mm-dd-HH24:MI:ss'), value from variable_history_729752752 where to_char(ts,'YYYY-mm-dd-HH24:MI:ss') > '2020-11-30-00:52:30' ORDER by id ;"
15 22:52:31 data-out:
15 22:52:31 err-out: psql: error: FATAL: role "postgre" does not exist
15 22:52:31 /Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history postgre -t -A -F ';' -c "SELECT to_char(ts,'YYYY-mm-dd-HH24:MI:ss'), onOffState from device_history_61344331 where to_char(ts,'YYYY-mm-dd-HH24:MI:ss') > '2020-11-30-00:52:30' ORDER by id ;"
15 22:52:31 data-out:
15 22:52:31 err-out: psql: error: FATAL: role "postgre" does not exist
22:52:51 subscribing to device changes
22:52:51 subscribing to variable changes
Re: Cannot remove device from tracing
Posted:
Fri Jan 15, 2021 11:06 pm
by kw123
postgre should be postgres
in config
/Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history postgres
Re: Cannot remove device from tracing
Posted:
Fri Jan 15, 2021 11:20 pm
by bjmouton
It is, this is pasted from the contents of config box (postgres command string) in min/Max plugin: /Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history postgres
Don't know why the "s" is getting dropped in the log...
15 23:15:36 /Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history postgre -t -A -F
Re: Cannot remove device from tracing
Posted:
Fri Jan 15, 2021 11:29 pm
by kw123
have no clue if this works .. could you add a blank after postgres ?
should look like this:
- Screen Shot 2021-01-15 at 23.27.56.png (17.74 KiB) Viewed 3694 times
Re: Cannot remove device from tracing
Posted:
Fri Jan 15, 2021 11:35 pm
by bjmouton
The blank at the end did not fix it. Do the example boxes require anything? They are blank.
Re: Cannot remove device from tracing
Posted:
Fri Jan 15, 2021 11:47 pm
by kw123
The example boxes are just examples.
Will make a version with more debug statements tomorrow.
Gn
Sent from my iPhone using Tapatalk
Re: Cannot remove device from tracing
Posted:
Sat Jan 16, 2021 8:03 am
by bjmouton
Weird observation, as a test I changed last character of path string to different ones, seems to write correct spelling except for "postgres"
1) Last word in string: postgres
07:49:54 -myLogSet setting parameters -- logFileActive= indigo; logFile= /Library/Application Support/Perceptive Automation/Indigo 7.5/Logs/com.karlwachs.minMax/plugin.log; debugLevel= [u'Sql', u'Setup']
16 07:49:55 /Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history postgre -t -A -F ';' -c "SELECT to_char(ts,'YYYY-mm-dd-HH24:MI:ss'), onOffState from device_history_364274916 where to_char(ts,'YYYY-mm-dd-HH24:MI:ss') > '2020-11-30-00:49:55' ORDER by id ;"
16 07:49:55 data-out:
16 07:49:55 err-out: psql: error: FATAL: role "postgre" does not exist
2) Last word in string: postgress
07:57:15 -myLogSet setting parameters -- logFileActive= indigo; logFile= /Library/Application Support/Perceptive Automation/Indigo 7.5/Logs/com.karlwachs.minMax/plugin.log; debugLevel= [u'Sql', u'Setup']
16 07:57:16 /Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history postgress -t -A -F ';' -c "SELECT to_char(ts,'YYYY-mm-dd-HH24:MI:ss'), onOffState from device_history_364274916 where to_char(ts,'YYYY-mm-dd-HH24:MI:ss') > '2020-11-30-00:57:16' ORDER by id ;"
16 07:57:16 data-out:
16 07:57:16 err-out: psql: error: FATAL: role "postgress" does not exist
3) Last word in string: postgresd
07:59:23 -myLogSet setting parameters -- logFileActive= indigo; logFile= /Library/Application Support/Perceptive Automation/Indigo 7.5/Logs/com.karlwachs.minMax/plugin.log; debugLevel= [u'Sql', u'Setup']
16 07:59:24 /Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history postgresd -t -A -F ';' -c "SELECT to_char(ts,'YYYY-mm-dd-HH24:MI:ss'), onOffState from device_history_364274916 where to_char(ts,'YYYY-mm-dd-HH24:MI:ss') > '2020-11-30-00:59:23' ORDER by id ;"
16 07:59:24 data-out:
16 07:59:24 err-out: psql: error: FATAL: role "postgresd" does not exist
4) Last word in string: postgresa
08:02:58 -myLogSet setting parameters -- logFileActive= indigo; logFile= /Library/Application Support/Perceptive Automation/Indigo 7.5/Logs/com.karlwachs.minMax/plugin.log; debugLevel= [u'Sql', u'Setup']
16 08:02:58 /Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history postgresa -t -A -F ';' -c "SELECT to_char(ts,'YYYY-mm-dd-HH24:MI:ss'), onOffState from device_history_364274916 where to_char(ts,'YYYY-mm-dd-HH24:MI:ss') > '2020-11-30-00:02:58' ORDER by id ;"
16 08:02:58 data-out:
16 08:02:58 err-out: psql: error: FATAL: role "postgresa" does not exist
Billy
Re: Cannot remove device from tracing
Posted:
Sat Jan 16, 2021 8:35 am
by kw123
please try v ...17
check if you have a non ascii characters in your string (eg new line ...)
when you start or edit config you should see:
- Code: Select all
minMax config parameters foldername >minMax<
minMax config parameters refreshRate >120.0<
minMax config parameters liteOrPsql >psql<
minMax config parameters refreshRate >120.0<[secs]
minMax config parameters liteOrPsql >psql<
minMax config parameters liteOrPsqlString >/Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history postgres <
minMax config parameters postgresPassword ><
minMax config parameters timeFormatDisplay >%Y-%m-%d %H:%M:%S<
the > < are there to show when the string starts and ends to make sure you don't have extra characters ..
Karl
Re: Cannot remove device from tracing
Posted:
Sat Jan 16, 2021 8:53 am
by bjmouton
installed, here is the log, same issue as before.
08:51:08 -myLogSet setting parameters -- logFileActive= indigo; logFile= /Library/Application Support/Perceptive Automation/Indigo 7.5/Logs/com.karlwachs.minMax/plugin.log; debugLevel= [u'Sql', u'Setup']
08:51:08 Configuration:
08:51:08 Dev/Var-Name----- ID State ignoreLess ignoreGreater format tracking measures: -------
08:51:08 Deck Door Sensor 364274916 onOffState -9876543210 9876543210 '%.1f' lastDay- Count1
thisDay- Count1
08:51:08 Aeotec_Temperature 1774580169 value -9876543210 9876543210 '%.1f' thisHour- Min Max Ave
lastHour- Min Max Ave
lastDay- DateMax Min Max DateMin Ave
thisDay- Min Max Ave
08:51:08 Front Door Sensor 18622376 onOffState -9876543210 9876543210 '%.1f' lastDay- Count1
thisDay- Count1
08:51:08 AmbientTemperature 729752752 value -9876543210 9876543210 '%.1f' thisHour- Min Max Ave
lastHour- Min Max Ave
08:51:08 Patio Door Sensor 61344331 onOffState -9876543210 9876543210 '%.1f' lastDay- Count1
thisDay- Count1
08:51:08 config parameters foldername >minMax<
08:51:08 config parameters refreshRate >180.0<
08:51:08 config parameters liteOrPsql >psql<
08:51:08 config parameters refreshRate >180.0<[secs]
08:51:08 config parameters liteOrPsql >psql<
08:51:08 config parameters liteOrPsqlString >/Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history postgres<
08:51:08 config parameters postgresPassword ><
08:51:08 config parameters timeFormatDisplay >%Y-%m-%d-%H:%M:%S<
16 08:51:09 /Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history postgre -t -A -F ';' -c "SELECT to_char(ts,'YYYY-mm-dd-HH24:MI:ss'), onOffState from device_history_364274916 where to_char(ts,'YYYY-mm-dd-HH24:MI:ss') > '2020-11-30-00:51:08' ORDER by id ;"
16 08:51:09 data-out:
16 08:51:09 err-out: psql: error: FATAL: role "postgre" does not exist
16 08:51:09 /Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history postgre -t -A -F ';' -c "SELECT to_char(ts,'YYYY-mm-dd-HH24:MI:ss'), value from variable_history_1774580169 where to_char(ts,'YYYY-mm-dd-HH24:MI:ss') > '2020-11-30-00:51:08' ORDER by id ;"
16 08:51:09 data-out:
16 08:51:09 err-out: psql: error: FATAL: role "postgre" does not exist
16 08:51:09 /Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history postgre -t -A -F ';' -c "SELECT to_char(ts,'YYYY-mm-dd-HH24:MI:ss'), onOffState from device_history_18622376 where to_char(ts,'YYYY-mm-dd-HH24:MI:ss') > '2020-11-30-00:51:08' ORDER by id ;"
16 08:51:09 data-out:
16 08:51:09 err-out: psql: error: FATAL: role "postgre" does not exist
16 08:51:09 /Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history postgre -t -A -F ';' -c "SELECT to_char(ts,'YYYY-mm-dd-HH24:MI:ss'), value from variable_history_729752752 where to_char(ts,'YYYY-mm-dd-HH24:MI:ss') > '2020-11-30-00:51:08' ORDER by id ;"
16 08:51:09 data-out:
16 08:51:09 err-out: psql: error: FATAL: role "postgre" does not exist
16 08:51:09 /Applications/Postgres.app/Contents/Versions/latest/bin/psql indigo_history postgre -t -A -F ';' -c "SELECT to_char(ts,'YYYY-mm-dd-HH24:MI:ss'), onOffState from device_history_61344331 where to_char(ts,'YYYY-mm-dd-HH24:MI:ss') > '2020-11-30-00:51:08' ORDER by id ;"
16 08:51:09 data-out:
16 08:51:09 err-out: psql: error: FATAL: role "postgre" does not exist
Re: Cannot remove device from tracing
Posted:
Sat Jan 16, 2021 9:31 am
by kw123
looking at the first posts:
you have set your postgres userid to >postgre< that will replace postgres with postgre
set it to empty = delete it no blanks
used only when you have a special setup ie postgres userid is not prostgres and have password etc..
that should do it
Karl
Re: Cannot remove device from tracing
Posted:
Sat Jan 16, 2021 4:28 pm
by kw123
? Working ?
Sent from my iPhone using Tapatalk
Re: Cannot remove device from tracing
Posted:
Sat Jan 16, 2021 4:36 pm
by bjmouton
Yes! It's amazing how easy it is to overlook something. Hopefully switching to postgres will resolve the erroneous numbers that were coming in.
Thank you very much for your time and diligence, it is greatly appreciated!
Best regards,
Billy