plots not up dating

Posted on
Mon Oct 10, 2016 2:33 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

plots not up dating

the dots showing up if .....
fixed with version .4: http://forums.indigodomo.com/viewtopic.php?f=165&t=15884

as for the plot sometimes not complete.. that is the (part of) the timing I was talking about.
The SQL jobs run and I need to sync the plotting to when they are finished. As these are independent for MATPlot(*). It sometimes can happen that the sql job is just running while MATPLOT is trying to plot and read the SQL output.


Karl

as matplot requires python 2.7 and for indigo 6 only python 2.6 works, the matplot process needs to be running outside indigo. This is done with something like "python2.7 matplotprogram.py" from within the plugin, Then the matplotlib job is left alone and does its thing until restart .. . It will need to check if SQL job is finished before reading the sql output.. That is what I am working on.

Posted on
Tue Oct 11, 2016 10:46 am
ELWOOD offline
Posts: 225
Joined: Feb 11, 2007
Location: Ramsey, NJ

Re: plots not up dating

Karl
The update fixed the dots at the 0 line. However now I only get two lines on the plot.

Would it make life simpler if I changed to GNUplot, and when indigo 7 is released that might fix the
old python version problems?

Thanks again for all your time and effort
Elwood
Attachments
plot missing lines.jpg
plot missing lines.jpg (417.18 KiB) Viewed 4391 times

Posted on
Tue Oct 11, 2016 11:36 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: plots not up dating

only 2 lines: is that consistently ?

could you dropbox;
~/Documents/INDIGOplotD/matplot/matplot.log

Karl

Posted on
Tue Oct 11, 2016 1:42 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: plots not up dating

I tried my INSTEON motion sensor.
The only events I get are "OFF/ false", no ON/true ==> that gives only 0 as event data
to plot that do
in define line set offset =1. then you see the events in the plot

Posted on
Tue Oct 11, 2016 2:27 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: plots not up dating

for the right scale text you can use the tick mark field to enter text. the syntax is:
"text"pos,"text"pos,"text"pos
Screen Shot 2016-10-11 at 15.21.16.png
Screen Shot 2016-10-11 at 15.21.16.png (41.17 KiB) Viewed 4357 times

see example
Screen Shot 2016-10-11 at 15.21.05.png
Screen Shot 2016-10-11 at 15.21.05.png (65.27 KiB) Viewed 4357 times

Posted on
Tue Oct 11, 2016 4:39 pm
ELWOOD offline
Posts: 225
Joined: Feb 11, 2007
Location: Ramsey, NJ

Re: plots not up dating

Karl
I have tried different settings for the offset, all did bring back the missing lines with no dots on the 0 line.

Found -0.01 worked best at keeping the dots on the chart background lines and all lines showing up.

Just a little more info on my setup, hope this does not cause you more trouble. As I said before I have used the plugin since you first released it.
Making temperature charts were never a problem but I tried to do a chart with the motion detectors and had trouble. All my motion and door contacts
I do through the AD2USB plugin. Your plugin gives me three states when define sources on/off, clear, and faulted. With on/off got no errors but would
not generate the chart. With fault/clear got a continuos errors in the log (see drop box for logs) until deleting the source.

Got things working by using the meta device plugin and a bunch of triggers. When a motion faults that sets a trigger to change the state of its meta device
to turn on and than off after a minute. That works to generate the charts I wanted. When you added events to the plugin I decided to see if that would
make them work without the triggers. . Was also a good excuse to add more devices to my motion chart. But still had the same problem with no charts with AD2USB motion
on/off and errors with fault. so I kept using the meta devices and worked except the no charts updating which you seem to have fixed.

Thanks again
Elwood

whew are the logs in drop box

https://dl.dropboxusercontent.com/u/329 ... source.rtf

https://dl.dropboxusercontent.com/u/329 ... tplot1.log

Posted on
Tue Oct 11, 2016 4:53 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: plots not up dating

ok there was a bug in the exception handling : had a "self. sendToLog" should have been just "sendToLog". It is in the smoothing section. No error if no smooth and no error if smoothing works

should be fixed by tomorrow, want to do some more testing

I am working on some tuning..
have the missing sql data fixed I believe :
will check if file exists, if not wait 4 secs and try again,.. 3 times in a row, then give up. Currently if it does not exist: give up.
That should cover the time when the sql output files are being generated. Each of them is unavailable for <1-3 secs. The MATPLOT. py program reads them in all at once (only for the events data).


Karl

Posted on
Tue Oct 11, 2016 5:12 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: plots not up dating

could you use utilities and print the data for fault/clear I believe it is :
device: Wireless Motion OFFICE z090
state: zoneState faulted
Screen Shot 2016-10-11 at 18.10.10.png
Screen Shot 2016-10-11 at 18.10.10.png (19.72 KiB) Viewed 4312 times


need just some data eg 100 values or so to check if there is any weird data in there .


Karl

Posted on
Tue Oct 11, 2016 5:59 pm
ELWOOD offline
Posts: 225
Joined: Feb 11, 2007
Location: Ramsey, NJ

Re: plots not up dating


Posted on
Tue Oct 11, 2016 6:24 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: plots not up dating

Yes.
I guess it's the fault vs clear it does not like
It currently handles numbers , on/off ,true/ false. Up/down.

Will add for next release.




Sent from my iPhone using Tapatalk

Posted on
Tue Oct 11, 2016 9:16 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: plots not up dating

here the complete list of acceptable values (besides numbers) in indigoplotD
the following text is converted to 0/1, if not in this list it is ignored
Code: Select all
                val = str(val).upper()
                if ( val== "TRUE"   or
                     val== "T"      or
                     val =="ON"     or
                     val== "YES"    or
                     val== "UP"     or
                     val== "ENABLED"or
                     val== "CLEAR"   ):  return 1.0      # true/on/....   --> 1
                if ( val== "FALSE"  or
                     val== "F"      or
                     val== "OFF"    or
                     val== "NO"     or
                     val== "DOWN"   or
                     val== "FAULTED"or
                     val== "FAULT"  or
                     val== "EXPIRED"):  return 0.0      # false/off/... --> 0

added Fault(ed) ,enabled, clear
any other values?

Karl

Posted on
Thu Oct 13, 2016 1:37 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: plots not up dating

added the requested device/state values to be converted in numbers (eg fault ==> 0, enabled==> 1)(*)

see version 4-16-6 download


Karl


you can only plot numbers not text, hence these states have to be converted or reject as numbers

Posted on
Thu Oct 13, 2016 3:56 pm
ELWOOD offline
Posts: 225
Joined: Feb 11, 2007
Location: Ramsey, NJ

Re: plots not up dating

Karl
Updated to 4.16.6 with a new bug. Can't add a new line. Under step 3 selecting add new line: clicking data source A for line brings up list for sources,
can select source but it does not show up after clicking, clicking on data for source A a second time now only shows "None"

Elwood

Posted on
Thu Oct 13, 2016 4:03 pm
ELWOOD offline
Posts: 225
Joined: Feb 11, 2007
Location: Ramsey, NJ

Re: plots not up dating

Karl

A little more info. Now getting the following error

Oct 13, 2016, 5:58:26 PM
INDIGOplotD --------------------------------------------------------------
INDIGOplotD restarting SQL import, it seems to hang. If this happens several times reload INDIGOplotD :
INDIGOplotD --------------------------------------------------------------

Did the reload with the following


Oct 13, 2016, 5:59:13 PM
Reloading plugin "INDIGOplotD 4.16.6"
Stopping plugin "INDIGOplotD 4.16.6" (pid 33423)
INDIGOplotD main loop stopped
Error plugin "INDIGOplotD 4.16.6" (pid 33423) unexpectedly stopped -- restarting in 5 seconds
Stopped plugin "INDIGOplotD 4.16.6"
Starting plugin "INDIGOplotD 4.16.6" (pid 40219)
Started plugin "INDIGOplotD 4.16.6"
INDIGOplotD initializing ... 4-16-6; debuglevel=0
INDIGOplotD indigo version found: 6
INDIGOplotD number of days per bin category are: [8, 38, 390] for [days, hours, minutes] data
INDIGOplotD using '/usr/bin/python2.7' for utily programs
INDIGOplotD SQLMode: batch2Days; GNUPLOT/MATPLOT: mat; GNUplotVersion= 4.6; PLOT-Directory= /Users/MINI/Documents/INDIGOplotD/
INDIGOplotD command: reLoad data from SQL for last 2 days started
INDIGOplotD sql logger active: 2995.73[secs]
INDIGOplotD checking py-restore files
INDIGOplotD initializing ...2
INDIGOplotD Converted 0:00:00.010056 iMeter-curEnergyLevel-eConsumption-day 2/ 2/ 2/ 42-rejec: 0/ 0/ 0/ 0/ 0/ 19
INDIGOplotD Converted 0:00:00.012820 synchrolinc-onOffState-max 2/ 1/ 2/ 42-rejec: 0/ 0/ 0/ 2/ 0/ 20
INDIGOplotD Converted 0:00:00.019472 iMeter-accumEnergyTotal-eConsumption-day 2/ 2/ 2/ 48-rejec: 0/ 0/ 0/ 0/ 0/ 18
INDIGOplotD Converted 0:00:00.021501 META DELIVERY RECEIVED-onOffState-event 16/ 2/ 16/ 343-rejec: 0/ 0/ 0/ 14/ 0/ 15
INDIGOplotD Converted 0:00:00.024336 META ARM AWAY-onOffState-max 23/ 6/ 23/ 497-rejec: 0/ 0/ 0/ 17/ 0/ 23
INDIGOplotD Converted 0:00:00.027200 META ARM STAY-onOffState-max 28/ 9/ 28/ 607-rejec: 0/ 0/ 0/ 19/ 0/ 24
INDIGOplotD Converted 0:00:00.029229 META FRONT DOOR MOTION-onOffState-event 36/ 4/ 36/ 783-rejec: 0/ 0/ 0/ 32/ 0/ 10
INDIGOplotD Converted 0:00:00.031421 META DECK MOTION-onOffState-event 110/ 8/ 110/ 2422-rejec: 0/ 0/ 0/ 102/ 0/ 12
INDIGOplotD Converted 0:00:00.033921 META DRIVEWAY MOTION-onOffState-event 151/ 24/ 152/ 3366-rejec: 0/ 0/ 0/ 127/ 0/ 11
INDIGOplotD Converted 0:00:00.038454 META OFFICE MOTIONS-onOffState-event 513/ 94/ 514/ 11691-rejec: 0/ 0/ 0/ 419/ 0/ 13
INDIGOplotD Converted 0:00:00.046720 HVAC HALL STAT INSTEON-hvacCoolerIsOn-average 870/ 195/ 870/ 19902-rejec: 0/ 0/ 0/ 675/ 0/ 3
INDIGOplotD Converted 0:00:00.054360 HVAC HALL STAT INSTEON-hvacHeaterIsOn-max 870/ 195/ 870/ 19902-rejec: 0/ 0/ 0/ 675/ 0/ 5
INDIGOplotD Converted 0:00:00.060947 HVAC HALL STAT INSTEON-humidityInput1-average 870/ 195/ 870/ 20772-rejec: 0/ 0/ 0/ 675/ 0/ 2
INDIGOplotD Converted 0:00:00.067429 HVAC HALL STAT INSTEON-setpointCool-average 870/ 195/ 870/ 20772-rejec: 0/ 0/ 0/ 675/ 0/ 6
INDIGOplotD Converted 0:00:00.074041 HVAC HALL STAT INSTEON-setpointHeat-average 870/ 195/ 870/ 20772-rejec: 0/ 0/ 0/ 675/ 0/ 7
INDIGOplotD Converted 0:00:00.080740 HVAC HALL STAT INSTEON-temperatureInput1-average 870/ 195/ 870/ 20772-rejec: 0/ 0/ 0/ 675/ 0/ 8
INDIGOplotD Converted 0:00:00.087174 DIGI TEMP DECK-temperature-average 937/ 148/ 937/ 22380-rejec: 0/ 0/ 0/ 789/ 0/ 22
INDIGOplotD Converted 0:00:00.092991 META DEN MOTIONS-onOffState-event 1170/ 144/ 1172/ 26976-rejec: 0/ 0/ 0/ 1026/ 0/ 14
INDIGOplotD Converted 0:00:00.101828 HVAC HALL STAT INSTEON-hvacFanIsOn-max 1740/ 390/ 870/ 39804-rejec: 0/ 0/ 0/ 1350/ 0/ 4
INDIGOplotD Converted 0:00:00.106726 HVAC HALL STAT INSTEON-hvacFanIsOn-max 1740/ 390/ 0/ 39804-rejec: 0/ 0/ 0/ 0/ 0/ 9
INDIGOplotD Converted 0:00:00.119023 DIGI TEMP BUD-temperature-average 2545/ 364/ 2545/ 64717-rejec: 0/ 0/ 0/ 2181/ 0/ 17
INDIGOplotD Converted 0:00:00.131381 DIGI TEMP GROW-temperature-average 2643/ 400/ 2643/ 67354-rejec: 0/ 0/ 0/ 2243/ 0/ 16
INDIGOplotD Converted 0:00:00.147480 DIGI TEMP BACK BED ROOM-temperature-average 4576/ 682/ 2288/ 116246-rejec: 0/ 0/ 0/ 3894/ 0/ 1
INDIGOplotD Converted 0:00:00.154090 DIGI TEMP BACK BED ROOM-temperature-average 4576/ 682/ 0/ 116246-rejec: 0/ 0/ 0/ 0/ 0/ 21

Posted on
Thu Oct 13, 2016 5:12 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: plots not up dating

could you set debug on for sql and general ? and drop box the log file. (posting here we lose the formatting)

Who is online

Users browsing this forum: No registered users and 4 guests

cron