jdiazbb / rfxcmd

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

Add unix time to rain sensor in CSV output format #35

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Attach rain sensor and monitor results using CSV.

What is the expected output? What do you see instead?
Missing unix time (CSV output parsed)
act:
  2014-01-17 21:59:58
  55
  02
  0D
  F4
  00
  0
  0
  9
  5

exp:
  2014-01-17 21:59:58
  1390024798                <== Unix time
  55
  02
  0D
  F4
  00
  0
  0
  9
  5

What version of the product are you using? On what operating system?
#       $Rev: 515 $
#       $Date: 2013-05-18 14:17:08 +0200 (Sat, 18 May 2013) $

On raspberry pi

Please provide any additional information below.
Change to add unix timestamp:
1969                 # CSV
1970                 if cmdarg.printout_csv == True:
1971                         
sys.stdout.write("%s;%s;%s;%s;%s;%s;%s;%s;%s;%s;%s\n" %
1972                                                         ( timestamp, 
unixtime_utc, packettype, subtype, seqnbr, id1, id2,
1973                                                         
str(int(rainrate_high,16)), str(int(raintotal1,16)),
1974                                                         str(battery), 
str(signal) ) )
1975                         sys.stdout.flush()

Original issue reported on code.google.com by cman...@gmail.com on 18 Jan 2014 at 6:06

GoogleCodeExporter commented 8 years ago
Woah...guess I'm pretty far behind...but it looks like this issue is still 
there in TopOfTree

#       $Rev: 588 $
#       $Date: 2013-12-29 05:54:49 -0800 (Sun, 29 Dec 2013) $

2158                 # CSV
2159                 if cmdarg.printout_csv == True:
2160                         sys.stdout.write("%s;%s;%s;%s;%s;%s;%s;%s;%s;%s\n" 
%
2161                                                         ( timestamp, 
packettype, subtype, seqnbr, id1, id2,
2162                                                         str(rainrate), 
str(int(raintotal1,16)),
2163                                                         str(battery), 
str(signal) ) )
2164                         sys.stdout.flush()

Original comment by cman...@gmail.com on 18 Jan 2014 at 6:15

GoogleCodeExporter commented 8 years ago
Hi,

Thank you for your feedback.

I have fixed this in the latest build and updated it to the SVN.

$ ./rfxcmd.py -x 0B5501006D000001003FDE79 -c
2014-01-18 09:55:12;1390035312;55;01;00;6D;00;1;0;9;7
$

Original comment by sebastia...@gmail.com on 18 Jan 2014 at 8:58

GoogleCodeExporter commented 8 years ago
Awesome...works great now !

thx,

Original comment by cman...@gmail.com on 19 Jan 2014 at 1:50