bemasher / rtlamr-collect

Data aggregation for rtlamr.
GNU Affero General Public License v3.0
171 stars 29 forks source link

rtlamr-collect doesn't seem to like output coming from my rtlamr #5

Closed boozedog closed 6 years ago

boozedog commented 6 years ago

i'm getting output that looks like this from rtlamr: {Time:2018-02-19T10:54:34.607 SCM:{ID:XXXXXXXX Type:12 Tamper:{Phy:01 Enc:00} Consumption: 32348 CRC:0xXXXX}}

rtlamr-collect doesn't seem to like it: 12:09:34.634599 main.go:187: invalid character 'T' looking for beginning of object key string

jreiners commented 6 years ago

rtlamr -msgtype=idm -format=json | rtlamr-collect should work.

Or, you can also set these with env variables in the readme, I've had this setup working like a champ for 2 months.

boozedog commented 6 years ago

Thanks @jreiners ... I'm trying that now, but I don't think my devices are sending any idm messages. My hunch is that the output in the OP above is some other kind of message.

jreiners commented 6 years ago

@boozedog My Electric meter was IDM, I could not see my water meter. YMMV. The power meter should transmit two message types. I've got a setup under my github called metermaid that uses rtlamr, mysql and grafana to display. Might want to check it out as well. It can handle different message types with a little tweaking. RTLAMR is still a wonderful bit of code.

from the readme:

At a minimum rtlamr must have the following environment variables defined:

RTLAMR_MSGTYPE=idm Currently only idm packets are supported.
RTLAMR_FORMAT=json rtlamr-collect input must be json.
RTLAMR_FILTERID=000000000 List your meter id's here separated by commas. This is not strictly necessary, but it is highly recommended because listening to all the meters in a given area is likely to have high series cardinality and will negatively impact InfluxDB's performance.
rtlamr-collect should take its input directly from the output of an rtlamr instance through a pipe.
boozedog commented 6 years ago

ahhh "Currently only idm packets are supported"

there we go

thank u @jreiners

closing this issue