google-code-export / measureit

Automatically exported from code.google.com/p/measureit
1 stars 0 forks source link

Not logging Digital Sensor Off values #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, firstly many thanks for your excellent MeasureIT utility.

What steps will reproduce the problem?
1. When using a Current Cost digital board On=500 Off=0
Have noticed that only the first Off value is logged, the graph only updates 
again when the next On reading takes place. 

What is the expected output? What do you see instead?
The graph should have equal sharp spikes but instead has long triangle shapes.

What version of the product are you using? On what operating system?
Ver 115 (with latest grabber script) with Rasp-Pi image

Please provide any additional information below.
It's as though zero values are not logged to save space but when using digital 
sensors zero is a valid value. Not sure if it's the logger or the graph 
generation.

Original issue reported on code.google.com by jdg22...@gmail.com on 2 Sep 2013 at 11:44

GoogleCodeExporter commented 9 years ago
Zero values are also logged. The logger remember the last value from a sensor 
and only if this is changing it is logging the next value.

Original comment by lalelu...@gmail.com on 2 Sep 2013 at 3:47

GoogleCodeExporter commented 9 years ago
If you have only 2 values that is not really nice :)

I change the v115 grabber that it is logging all values even it is the same 
like the last one. See attachment.

It is just a line in the code you will found in the function sensor_data_check

if sensors[sensor]['watt'] != watt:

Original comment by lalelu...@gmail.com on 2 Sep 2013 at 4:08

Attachments:

GoogleCodeExporter commented 9 years ago
Wow, many thanks for the prompt response will give it a try later.

Original comment by jdg22...@gmail.com on 2 Sep 2013 at 4:40

GoogleCodeExporter commented 9 years ago
thanks again, tested and now working as expected.

Original comment by jdg22...@gmail.com on 2 Sep 2013 at 7:24

GoogleCodeExporter commented 9 years ago
I will add a setting in the admin to enable / disable storage from the same 
values

Original comment by lalelu...@gmail.com on 19 Apr 2014 at 9:37

GoogleCodeExporter commented 9 years ago
There is another possibility: I do not know python, but you could not leave the 
logic to store the same value with a small improvement.

(last_measured_value != second_last_measured_value) OR
((last_measured_value > 0) AND (second_last_measured_value = 0))

In this way, the program does not store the values ​​equal, but the 
waveform is correct.

Original comment by fabrizio...@gmail.com on 22 Apr 2014 at 8:46

GoogleCodeExporter commented 9 years ago
As I also prefer this setting, I made the modification already in the V115.  
As I did not see in the V116 this setting you proposed in the admin to enable / 
disable storage from the same values, I made again the modification in the 
V116. 

May be I am wrong not to having seen this setting in the admin of the V116, if 
it exists. In this case, where to find it ?
If it is not implemented in V116, do you intend to add it in the next version ? 
 Thanks again.

Original comment by benjbi...@gmail.com on 6 May 2014 at 9:24

GoogleCodeExporter commented 9 years ago
There is a switch in the system settings to enable / disable logging multiple 
times

Just replace measureit.js and data-input.py and your language file with the 
latest from head.

https://code.google.com/p/measureit/source/browse/#svn%2Ftrunk

Restart grabber after save settings in admin

Original comment by lalelu...@gmail.com on 24 May 2014 at 12:14

GoogleCodeExporter commented 9 years ago

Original comment by lalelu...@gmail.com on 25 Jul 2014 at 6:45