min/max/ average plugin discussion

Posted on
Mon Aug 15, 2016 8:11 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: min/max/ average plugin discussion

Ok got it. Will check if a % will screw it up.


Sent from my iPhone using Tapatalk

Posted on
Mon Aug 15, 2016 8:18 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: min/max/ average plugin discussion

yes
float("12%")
creates an error.. in case of error it will set result to 0.

will fix.

Posted on
Mon Aug 15, 2016 9:35 am
mortenkols offline
Posts: 198
Joined: Oct 29, 2014
Location: Norway

Re: min/max/ average plugin discussion

This came up in the log after upgrading the plugin.. it seems like it not working

Code: Select all
15. aug. 2016, 17.30.17
  Indigo Cocoa client connected
  Stopping plugin minMax (pid 444)
  minMax                          stopConcurrentThread called 1
  minMax                          stopConcurrentThread called 2
  Stopped plugin minMax
  Upgrading plugin minMax to newer version 0.4.9 (previous version moved to trash)
  Loading plugin "minMax 0.4.9"
  Starting plugin "minMax 0.4.9" (pid 70430)
  Started plugin "minMax 0.4.9"
  minMax                          minMax plugin v 0.4.9 starting
  minMax                          Configuration: Dev-Name    DevID            State       ignoreLess   ignoreGreater tracking
  minMax                          WStemp              ; 1897874033;           value      -9876543210      9876543210 thisDay_Max  thisDay_Min 
  minMax                          Temperatur bad      ; 1694508583;     sensorValue      -9876543210      9876543210 thisDay_Max  thisDay_Min 
  minMax                          WStrykk             ; 734999929 ;           value      -9876543210      9876543210 thisDay_Max  thisDay_Min 
  minMax                          WSbatteri           ; 1302159896;           value      -9876543210      9876543210 thisDay_Max  thisDay_Min 
  minMax                          Termostat kjeller   ; 91673998  ; temperatureInput1      -9876543210      9876543210 thisDay_Max  thisDay_Min 
  minMax                          TempStue            ; 771245244 ;           value                3      9876543210 thisDay_Max  thisDay_Min 
  minMax                          TempUte             ; 1243658944;           value      -9876543210      9876543210 lastMonth_Max  lastMonth_Min  thisMonth_Max  thisMonth_Min  thisDay_Max  thisDay_Min  thisWeek_Max  thisWeek_Min 
  minMax                          WSdugg              ; 1376864708;           value      -9876543210      9876543210 thisDay_Max  thisDay_Min 
  minMax                          Tempsensor gang 1.etg; 164175316 ;     sensorValue      -9876543210      9876543210 thisDay_Max  thisDay_Min 
  minMax                          WSluftfuktighet     ; 386320416 ;           value      -9876543210      9876543210 thisDay_Max  thisDay_Min 
  minMax                          WSvind              ; 588887444 ;           value      -9876543210      9876543210 lastMonth_Max  lastMonth_Min  thisMonth_Max  thisMonth_Min  thisDay_Max  thisDay_Min  thisWeek_Max  thisWeek_Min 
  minMax                          error in  Line '574' ;  error='unsupported operand type(s) for +=: 'float' and 'str''
  minMax                          ('x', '2016-08-12-22:39:07')
  minMax                          x
  minMax                          error in  Line '574' ;  error='unsupported operand type(s) for +=: 'float' and 'str''
  minMax                          ('x', '2016-08-12-22:39:07')
  minMax                          x
  minMax                          error in  Line '574' ;  error='unsupported operand type(s) for +=: 'float' and 'str''
  minMax                          ('x', '2016-08-12-23:15:07')
  minMax                          x
  minMax                          error in  Line '574' ;  error='unsupported operand type(s) for +=: 'float' and 'str''
  minMax                          ('x', '2016-08-12-23:15:07')
  minMax                          x
  minMax                          error in  Line '574' ;  error='unsupported operand type(s) for +=: 'float' and 'str''
  minMax                          ('x', '2016-08-12-23:58:00')
  minMax                          x
  minMax                          error in  Line '574' ;  error='unsupported operand type(s) for +=: 'float' and 'str''
  minMax                          ('x', '2016-08-12-23:58:00')
  minMax                          x
  minMax                          error in  Line '574' ;  error='unsupported operand type(s) for +=: 'float' and 'str''
  minMax                          ('x', '2016-08-12-23:58:00')
  minMax                          x
  minMax                          error in  Line '574' ;  error='unsupported operand type(s) for +=: 'float' and 'str''
  minMax                          ('x', '2016-08-12-23:58:00')
  minMax                          x
  minMax                          error in  Line '574' ;  error='unsupported operand type(s) for +=: 'float' and 'str''
  minMax                          ('x', '2016-08-12-23:58:00')
  minMax                          x
  minMax                          error in  Line '574' ;  error='unsupported operand type(s) for +=: 'float' and 'str''
  minMax                          ('x', '2016-08-12-23:58:00')
  minMax                          x
  minMax                          error in  Line '574' ;  error='unsupported operand type(s) for +=: 'float' and 'str''
  minMax                          ('x', '2016-08-12-23:58:00')
  minMax                          x
  minMax                          error in  Line '574' ;  error='unsupported operand type(s) for +=: 'float' and 'str''
  minMax                          ('x', '2016-08-12-23:58:00')
  minMax                          x
  minMax                          error in  Line '574' ;  error='unsupported operand type(s) for +=: 'float' and 'str''
  minMax                          ('x', '2016-08-12-23:58:00')
  minMax                          x
  minMax                          error in  Line '574' ;  error='unsupported operand type(s) for +=: 'float' and 'str''
  minMax                          ('x', '2016-08-12-23:58:00')
  minMax                          x
  minMax                          error in  Line '574' ;  error='unsupported operand type(s) for +=: 'float' and 'str''
  minMax                          ('x', '2016-08-12-23:58:00')
  minMax                          x
  minMax                          error in  Line '574' ;  error='unsupported operand type(s) for +=: 'float' and 'str''
  minMax                          ('x', '2016-08-12-23:58:00')
  minMax                          x
  minMax                          error in  Line '574' ;  error='unsupported operand type(s) for +=: 'float' and 'str''
  minMax                          ('x', '2016-08-12-23:58:00')
  minMax                          x
  minMax                          error in  Line '574' ;  error='unsupported operand type(s) for +=: 'float' and 'str''
  minMax                          ('x', '2016-08-12-23:58:00')
  minMax                          x
  minMax                          error in  Line '574' ;  error='unsupported operand type(s) for +=: 'float' and 'str''
  minMax                          ('x', '2016-08-12-23:58:00')
  minMax                          x
  minMax                          error in  Line '574' ;  error='unsupported operand type(s) for +=: 'float' and 'str''
  minMax                          ('x', '2016-08-12-23:58:00')
  minMax                          x
  minMax                          error in  Line '574' ;  error='unsupported operand type(s) for +=: 'float' and 'str''
  minMax                          ('x', '2016-08-12-23:58:00')
  minMax                          x
  minMax                          error in  Line '574' ;  error='unsupported operand type(s) for +=: 'float' and 'str''
  minMax                          ('x', '2016-08-12-23:58:00')
  minMax                          x
  minMax                          error in  Line '574' ;  error='unsupported operand type(s) for +=: 'float' and 'str''
  minMax                          ('x', '2016-08-12-23:58:00')
  minMax                          x
  minMax                          error in  Line '574' ;  error='unsupported operand type(s) for +=: 'float' and 'str''
  minMax                          ('x', '2016-08-12-23:58:00')
  minMax                          x

Posted on
Mon Aug 15, 2016 10:20 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: min/max/ average plugin discussion

I guess I need to spend a little bit more time on it.


Sent from my iPhone using Tapatalk

Posted on
Mon Aug 15, 2016 12:40 pm
mortenkols offline
Posts: 198
Joined: Oct 29, 2014
Location: Norway

Re: min/max/ average plugin discussion

Works now, thanks :)

Posted on
Sat Dec 03, 2016 3:13 pm
mortenkols offline
Posts: 198
Joined: Oct 29, 2014
Location: Norway

Re: min/max/ average plugin discussion

Hello Karl.

after updating to Indigo 7 i got a problems with the plugin. The configuration has been deleted two times. Now it has been deleted again.
Do you know why this is happening and can load the configuration again? is the config file saved on my mac?

Reloading plugin "minMax 0.4.10"
Stopping plugin "minMax 0.4.10" (pid 436)
minMax stopConcurrentThread called 1
minMax stopConcurrentThread called 2
Z-Wave received "Bad - Lys" power load to 0.0 W
Stopped plugin "minMax 0.4.10"
Starting plugin "minMax 0.4.10" (pid 90479)
Started plugin "minMax 0.4.10"
minMax minMax plugin v 0.4.10 starting
minMax Configuration: Dev-Name DevID State ignoreLess ignoreGreater tracking

Posted on
Sat Dec 03, 2016 5:42 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: min/max/ average plugin discussion

any error messages, or does the config just disappear? - and which DB are you using?

Posted on
Sun Dec 04, 2016 6:48 am
mortenkols offline
Posts: 198
Joined: Oct 29, 2014
Location: Norway

Re: min/max/ average plugin discussion

Im using Sqlite database.

On friday there was several error msg in the log regarding many plugins. check the dropbox link, i have copied the log.

2016-12-02 08:38:16.085 minMax error; device with indigoID = 627232334 does not exist, removing from tracking... and so on

https://www.dropbox.com/s/jpimza6fxn981 ... x.rtf?dl=0

Posted on
Sun Dec 04, 2016 9:01 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: min/max/ average plugin discussion

These error messages device does not exist come from timeouts when indigo is busy with other things i.e. AppleScript.
Do you have AppleScripts running?
If not, you might have some other issues Could you check the system log for error at that time. ?

I have added checks on timeout in most other plugins. Will add that here too. I


Sent from my iPhone using Tapatalk

Posted on
Sun Dec 04, 2016 9:49 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: min/max/ average plugin discussion

getting faster at the indigo time-out protection.. posted v 7-5-2, should fix the removal of tracking when indigo times out. It is looking at the returned error in detail and just skips everything if it runs into a timeout

Posted on
Sun Dec 04, 2016 10:12 am
mortenkols offline
Posts: 198
Joined: Oct 29, 2014
Location: Norway

Re: min/max/ average plugin discussion

how do i check if AppleScript is running and how do i check the system log?

is it possible to load the config file?

Posted on
Sun Dec 04, 2016 11:05 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

min/max/ average plugin discussion

AppleScript => indigo scripts any actions triggers .. that use applescript, eg get public IP number ..
System log=> open console: in spotlight type console
The old config is likely lost. ==> it is stored in indigo preferences and that gets updated once something gets changed.. you could try Time Machine backup but then we would have to deconstruct the plugin preference file and , extract the old config and inject it into the existing preference file. it is xml code, not simple..

Sent from my iPhone using Tapatalk

Posted on
Tue Dec 06, 2016 2:17 pm
mortenkols offline
Posts: 198
Joined: Oct 29, 2014
Location: Norway

Re: min/max/ average plugin discussion

Thanks.

Posted on
Wed Feb 15, 2017 11:09 am
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

Re: min/max/ average plugin discussion

Hi

Just installed this plugin

Can anyone share an insight as to what is or is not happening here?

I have SQL Lite plugin up and running

Set minimal to watch two temperature sensors and one power usage.

A variable folder has been created minMax but no variables visible in it.

Not entirely sure what to expect but I am unable to detect anything except for the log entries on degug set to all

Code: Select all
-17:01:19;0.3541
2017-02-08-17:04:46;
2017-02-08-17:04:48;
2017-02-08-17:05:07;
2017-02-08-17:06:22;
2017-02-08-17:11:22;0.364
2017-02-08-17:11:22;
2017-02-08-17
   minMax                         
   minMax                          ['2017-02-08-16:31:02', '0.3414']
   minMax                          variName Power_Monitor_Freezer_accumEnergyTotal
   minMax                          /usr/bin/sqlite3  -separator ";" '/Library/Application Support/Perceptive Automation/Indigo 7/logs/indigo_history.sqlite' "select strftime('%Y-%m-%d-%H:%M:%S',ts,'localtime'), curEnergyLevel from device_history_503227130  where ts > '2015-11-00 00:00:00';"
   minMax                          2017-02-08-16:31:02;1.1
2017-02-08-16:31:14;
2017-02-08-16:41:15;
2017-02-08-16:41:15;1.2
2017-02-08-16:51:17;
2017-02-08-17:01:19;
2017-02-08-17:04:46;400.3
2017-02-08-17:04:48;90.0
2017-02-08-17:05:07;99.2
2017-02-08-17:06:22;88.7
2017-02-08-17:11:22;
2017-02-08-17:11:22;86.3
2017-02-08-17:21:24;

   minMax                         
   minMax                          ['2017-02-08-16:31:02', '1.1']
   minMax                          variName Power_Monitor_Freezer_curEnergyLevel
   minMax                          /usr/bin/sqlite3  -separator ";" '/Library/Application Support/Perceptive Automation/Indigo 7/logs/indigo_history.sqlite' "select strftime('%Y-%m-%d-%H:%M:%S',ts,'localtime'), sensorValue from device_history_84216111  where ts > '2015-11-00 00:00:00';"
   minMax                          2017-02-13-20:56:12;
2017-02-13-21:37:53;0
2017-02-13-21:37:53;19.7
2017-02-13-21:41:54;19.6
2017-02-13-21:54:54;19.5
2017-02-13-22:10:30;19.4
2017-02-13-22:11:09;19.5
2017-02-13-22:14:24;19.4
2017-02-13-22:46:54;19.5
2017-02-13-22:47:33;19.4
2017-02-13-22:48:12;19.5
2017-02-13-22:50:09;19.4
2017-02
   minMax                         
   minMax                          ['2017-02-13-20:56:12', '']
   minMax                          variName Master_Bedroom_Temp_Sensor_sensorValue
   minMax                          /usr/bin/sqlite3  -separator ";" '/Library/Application Support/Perceptive Automation/Indigo 7/logs/indigo_history.sqlite' "select strftime('%Y-%m-%d-%H:%M:%S',ts,'localtime'), sensorValue from device_history_1758125628  where ts > '2015-11-00 00:00:00';"
   minMax                          2017-02-08-16:31:01;-23.5
2017-02-08-16:31:15;-23.6
2017-02-08-16:32:51;-23.7
2017-02-08-16:34:27;-23.6
2017-02-08-16:36:51;-23.5
2017-02-08-16:37:39;-23.4
2017-02-08-16:39:15;-23.3
2017-02-08-16:40:03;-23.2
2017-02-08-16:40:51;-23.1
2017-02-08-16:41:39;-23.0
2017-02-08-16:42:27;-22.9
2017-02-08-16:
   minMax                         
   minMax                          ['2017-02-08-16:31:01', '-23.5']
   minMax                          variName Kitchen_Freezer_-_Temp_Sensor_1_-_Corrected_sensorValue

Posted on
Wed Feb 15, 2017 11:13 am
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

Re: min/max/ average plugin discussion

This is captured from the startup of minMax

Code: Select all
   Starting plugin "minMax 7.5.2" (pid 89769)
   Started plugin "minMax 7.5.2"
   minMax                          minMax plugin v 7.5.2 starting
   minMax                          Configuration: Dev-Name    DevID            State       ignoreLess   ignoreGreater tracking
   minMax                          Master Bedroom Temp Sensor; 84216111  ;     sensorValue      -9876543210      9876543210
   minMax                          Power Monitor Freezer; 503227130 ; accumEnergyTotal      -9876543210      9876543210
   minMax                          Power Monitor Freezer; 503227130 ;  curEnergyLevel      -9876543210      9876543210
   minMax                          Kitchen Freezer - Temp Sensor 1 - Corrected; 1758125628;     sensorValue      -9876543210      9876543210
   Schedule                        Update Greenwave Power Status

Who is online

Users browsing this forum: No registered users and 1 guest