Commit graph

257 commits

Author SHA1 Message Date
Jeff Epler
77a2c1361b add an option to receive both scm+idm
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
2015-12-07 21:56:08 -06:00
bemasher
40470d4488 Wait for a message from each meter given in -filterid when combined with -single. Closes #38 2015-11-08 00:05:24 -07:00
bemasher
1e03a514f8 Clarify Pack description. 2015-11-05 23:06:17 -07:00
bemasher
c45fdef076 Remove old travis-ci badge. 2015-07-12 22:31:21 -06:00
bemasher
1364a85f48 Remove flag debug print. 2015-07-12 04:47:11 -06:00
bemasher
5555d22393 Fix travis-ci badge. 2015-07-12 04:46:50 -06:00
bemasher
d453c86711 Remove filter chain debug print. 2015-07-12 02:47:39 -06:00
bemasher
42b1b3d07f Merge branch 'msghandler' 2015-07-12 02:40:18 -06:00
bemasher
6b376a3c26 Write plain text encoder. 2015-07-12 02:37:44 -06:00
bemasher
f8797da412 Update travis-ci config to use new infrastructure. 2015-07-12 02:09:58 -06:00
bemasher
938607e052 Oops, Filter is the method, MessageFilter is the interface. 2015-07-12 02:07:45 -06:00
bemasher
7314e7a38b Simplify filter flag handling. Rename Filter interface. 2015-07-12 02:06:39 -06:00
bemasher
548dac1a11 Refactor message filtering. 2015-07-11 03:45:27 -06:00
bemasher
767fea762f Remove -fastmag from usage. 2015-07-11 01:37:36 -06:00
bemasher
42ceb2cce7 Remove FastMag
Simulation shows that FastMag is of roughly equivalent sensitivity to
MagLUT while not providing much better performance.
2015-07-11 01:36:07 -06:00
bemasher
30ee13eec9 Remove unnecessary benchmark. 2015-07-11 01:11:47 -06:00
bemasher
de00b1d77c Update usage and unique flag description. 2015-07-08 23:29:40 -06:00
bemasher
c4340c3263 Fix symbol index for checksum copy. 2015-07-08 22:23:11 -06:00
bemasher
34b9eb6bb3 Refactor to check against checksum for uniqueness. 2015-07-08 22:23:11 -06:00
John
dbdbcae476 minor fixes
code review feedback
2015-07-08 22:23:11 -06:00
John
b9240f925b add -unique
Add option to suppress duplicate meter readings
2015-07-08 22:23:11 -06:00
bemasher
ae0364d9a0 Merge branch 'decimation' 2015-06-16 19:58:34 -06:00
bemasher
07607af197 Refactor message unpacking in SCM and IDM. 2015-06-14 04:35:58 -06:00
bemasher
7f05214d2b Add decimation factor checking. Clarify warning. 2015-06-07 01:38:21 -06:00
bemasher
8f3cb5205e Apply gofmt to everything. 2015-06-07 01:24:38 -06:00
bemasher
04d73e42a7 Update logging to include decimated configuration. 2015-06-07 00:53:12 -06:00
bemasher
de4bffe446 Fix csum length. 2015-06-07 00:15:48 -06:00
bemasher
953f371bb6 Move R900 message statement. 2015-05-31 04:21:05 -06:00
bemasher
22906a5949 Update link in README to point to gh-pages documentation. 2015-05-28 23:18:51 -06:00
bemasher
3bd0a4e558 Update flags in README. 2015-05-28 23:16:49 -06:00
bemasher
efea18916c Implement decimation in AlphaMaxBetaMinLUT. 2015-05-28 21:55:18 -06:00
bemasher
3a29e9b7ff Implement decimation in R900 decoder. 2015-05-28 21:44:59 -06:00
bemasher
586359c74a Move decimation to demodulator, only MagLUT for now. 2015-05-25 02:21:33 -06:00
bemasher
1373ceb5d7 Fix block read, reads might span writes to the pipe. 2015-05-25 01:43:20 -06:00
bemasher
588ef5220c Read whole blocks from server concurrently with io.Pipe(). 2015-05-24 02:24:13 -06:00
bemasher
f7828796bf Remove config debugging statements. 2015-05-24 02:18:06 -06:00
bemasher
c2855e7ded Implement decimation, except in R900 decoder. 2015-05-24 02:05:44 -06:00
bemasher
f3d51f2331 Update compatible meter table location. 2015-03-18 22:29:55 -06:00
bemasher
3249c73543 Move compatible meter table to csv format. 2015-03-18 22:27:12 -06:00
Douglas Hall
e1d9b04354 Merge pull request #27 from sandeen/master
r900: decode leak, fraud, and backflow status flags
2015-03-15 16:28:09 -06:00
Eric Sandeen
233608205f r900: decode leak, fraud, and backflow status flags
TL;DR - this patch decodes the unknown2 and unknown4 fields into leak,
fraud, and backflow status information.

Pretty output now shows:

NoUse:$BIN BackFlow:$FLAG ... Leak:$BIN LeakNow:$FLAG

Where BackFlow is 0, 1, or 2 for no, low, or high backflow in past 35d;
LeakNow is 0, 1, or 2 for no, low, or high leak in the past 24h;
NoUse and Leak is a number from 0 through 6 representing the number of
days in the past 35 days for which either no use or a leak has occurred,
according to this table:

bucket  days
------  ----
0       0
1       1-2
2       3-7
3       8-14
4       15-21
5       22-34
6       35+

I sorted this out using public documentation such as
https://www.neptunetg.com/About/Case-Studies/Water/Westbank-Irrigation-District,-BC
which indicates that the utility can gather stats on days of no use and
days of leak in the past 35 days, and that it is divided into buckets as
shown in the table above.

Using this public information, intentionally triggering the leak flag in
my home, and listening to many meters over time led me to this decoding
of the unknown2 and unknown4 fields.
 
The 8 unknown2 bits seem to show days of no use and backflow information,
like this (? is still unknown, but this patch lumps it in with the bucket
number):
 
???BBBHL

BBB: bucket # for days of no use in past 35 days
H: high backflow in past 35 days
L: low backflow in past 35 days

Backflow seems to require some minimum frequency of occurrence before it
will set the flag.

Similarly, the 6 unknown4 bits look like this:

?BBBHL

BBB: bucket # for days of leak in past 35 days
H: continuous leak in past 24 hours
L: intermittent leak in past 24 hours

Intermittent leaks are described by Neptune in other public docs as:

"Intermittent leak indicates that water has been used for at
least 50 of the 96 15-minute intervals during a 24-hour period"

and a continuous leak indicates use in every 15-minute period over
the past 24h.
2015-03-15 10:19:52 -05:00
bemasher
9be534c2d0 Add use cases. 2015-03-11 22:19:35 -06:00
bemasher
d4afba8974 Add 100GDLAN, update commodity type list. 2015-03-11 21:40:06 -06:00
bemasher
15e1d1dc69 Optimize execute loop for magnitude demodulators. 2015-02-22 04:12:02 -07:00
bemasher
169c5300c6 Switch to bytes.Equal in preamble search. Simplify calculations for slice allocation. 2015-02-21 06:47:22 -07:00
bemasher
0f08d69aa1 Add user-submitted meters. 2015-02-01 04:10:38 -07:00
bemasher
eb2b055444 Fix galois field package path. 2015-01-23 02:10:15 -07:00
bemasher
a88bbf1bc8 Simplify symbol decoding process. 2015-01-23 01:54:25 -07:00
bemasher
57e1be9ab6 Add gf package license. 2015-01-22 02:35:48 -07:00
bemasher
6f3d973f18 Integrate R900 decoder.
Update license information.
Add R900 decoder.
Update usage and information.
Remove CRC logging.
2015-01-22 02:28:06 -07:00