Closed GoogleCodeExporter closed 9 years ago
This is a known and already fixed bug. Will be fixed in the next version
You can use the latest version from the measure it_functions.php
https://measureit.googlecode.com/svn/trunk/measureit_public_html/php/measureit_f
unctions.php
Original comment by lalelu...@gmail.com
on 16 Sep 2013 at 3:59
[deleted comment]
Thank you Thomas. I have updated the measureit_functions.php file but the
result is the same.
I then checked every single RXX since 115 was released and found that maybe the
database had a minor modification to work with sensor zero (Issue ID 34).
I then tried to add this line:
INSERT INTO measure_data_now (sensor_id, watt, tmpr) VALUES (10, 0, 0), (20, 0,
0), (30, 0, 0);
After a few minutes I noticed that the only row that has watt and tmpr is
sensor_id 0 and the values are 52 and 14.8 which is what I see on the web page.
I'm trying hard but I need help...
Thanks
Original comment by agiang...@agwsoft.com
on 17 Sep 2013 at 2:26
Hello Thomas,
The problem is in the setting of my EnviR (as suspected) which uses Fahrenheit
instead of Celsius.
The data grabber is trying to match <tmpr> but my data stream comes in as
<tempF>.
This is the part of the data grabber that I have modified:
509 # parsing from history_output
510 # data will not be used because of the data is buggy and
not detailed enough :)
511 # but saving them is not an error. maybe we can use the
data later
512 r = re.search(r"<hist>", line)
513 if r:
514 for s in sensors:
515 r =
re.search(r"<data><sensor>"+str(s)+"</sensor>(.+?)</data>", line)
516 if r:
517 d =
re.findall(r"<(m)(\d+)>(.+?)</.+?>", r.group(1) )
518 if d:
519 for f in d:
520 history_update(s,f)
521
522 r =
re.search(r"<tmprF>(.+?)</tmprF><sensor>(\d)+</sensor>.+<ch1><watts>(\d+)<\/watt
s><\/ch1>(<ch2><watts>(\d+)
<\/watts><\/ch2>)?(<ch3><watts>(\d+)<\/watts><\/ch3>)?", line)
523 if r:
524 #print r
525 tmpr = r.group(1)
526 watt_sum = int(r.group(3))
527 # more than 1 clamp
Just two changes on line 522. However to do it right, it should be something
like:
r = re.search(r"<tmpr[F]?>(.+?)</tmpr[F]?><sensor>(\d)+</sensor>.+<ch1><watts>(\d+)<\/watts><\/ch1>(<ch2><watts>(\d+) <\/watts><\/ch2>)?(<ch3><watts>(\d+)<\/watts><\/ch3>)?", line)
So that either Celsius or Fahrenheit are accounted for. Since I don't really
know the Python syntax I leave it to you to code it correctly :)
To be totally clean, the web page should also change to reflect and "F" next to
the temperature as it now shows a "C".
Lastly, this should probably be under the general settings > Temperature , C or
F
Now it is time for beer!!!
PS: PVOUTPUT live output work fine as well
Hope this helps.
Andrea
Original comment by agiang...@agwsoft.com
on 20 Sep 2013 at 1:14
Solved in version 116 that is available to download
Original comment by lalelu...@gmail.com
on 19 Apr 2014 at 9:10
Original issue reported on code.google.com by
agiang...@agwsoft.com
on 15 Sep 2013 at 2:44