seanauff / metermon

Dockerized rtlamr wrapper that outputs formatted JSON messages over mqtt
MIT License
63 stars 13 forks source link

New Merge not picking up new EndpointType #38

Closed drum7 closed 2 months ago

drum7 commented 2 months ago

Don't disagree on the consistency thing, but it's coming through as hex in the raw log stream from rtlamr. I don't think the new merge is picking it up...

{Time:2024-07-01T19:03:01.053 SCM:{ID: 992XXXX Type:12 Tamper:{Phy:01 Enc:00} Consumption:  121944 CRC:0xBC94}}
{Time:2024-07-01T19:03:04.443 SCM:{ID:5131XXXX Type:12 Tamper:{Phy:03 Enc:00} Consumption:   73396 CRC:0xC724}}
{Time:2024-07-01T19:03:07.553 SCM:{ID:4585XXXX Type: 7 Tamper:{Phy:03 Enc:00} Consumption: 6545640 CRC:0x4F90}}
{Time:2024-07-01T19:03:18.829 SCM+:{ProtocolID:0x1E EndpointType:0x6E EndpointID: 1018XXXX Consumption:  59711750 Tamper:0x4098 PacketCRC:0x0392}}

The rtlamr code returns a hex for scm+. I think the relevant lines are 130 and 143...but could be misreading it.

seanauff commented 2 months ago

Interesting! Yeah looks to be right based on the rtlamr code. Though all of the other SCM+ meter IDs in metermon.py are in dec.

How are you running this? I've only pushed a new docker image for amd64 and armv7 so far. My RPi 4 that builds the arm64 images is currently down so I haven't been able to push that arch yet.

drum7 commented 2 months ago

Built it locally with mods to the py file on my RPi4. Is that what you're asking?

seanauff commented 2 months ago

If you build it locally with the endpoint ID as hex instead of dec does it pick it up?

drum7 commented 2 months ago

If you build it locally with the endpoint ID as hex instead of dec does it pick it up?

Yep. I tested with the arm image from docker hub - which looked like it pushed yesterday and didn't see anything getting picked up. Swapped the DH image out with my local and was back to picking up the messages with metermon.

Interesting! Yeah looks to be right based on the rtlamr code. Though all of the other SCM+ meter IDs in metermon.py are in dec.

I just checked this by running rtlamr for the past few hours looking at SCM+ only traffic. None of the endpoints near me are posting anything other than a hex value - consistently 0x6E and 0x07. Admittedly it could be just a product of my local area and the meter types we're using.

seanauff commented 2 months ago

Are you sure you pulled the new image? On my end it shows 0 pulls yet.

This previous PR #20 had no issue with using dec format for SCM+ even though the rtlamr output was hex.

I also just pushed a new multiarch image (seanauff/metermon:latest). I've verified it's working with my setup and pulling in SCM+ meters.