wmbusmeters / wmbusmeters

Read the wired or wireless mbus protocol to acquire utility meter readings.
GNU General Public License v3.0
890 stars 215 forks source link

CPU Usage to high with RTL-SDR and Addon #1322

Closed Zuendapp closed 1 month ago

Zuendapp commented 1 month ago

Type of request

Question

HAOS version

2024.7.2

wmbusmeters version

1.16.1

Your message goes here

Hello :),

since three days I'm able to get a readout from my Diehl Hydrus Watermeter (Type 171) with a RTL-SDR v3 Dongle. My Setup is Home Assistant Supervised with the WMbusmeters Add-on. My CPU Usage is beetwen 18-25% all the time.

I'm using following config:

device=auto:t1 donotprobe=/dev/ttyAMA0 format=json logfile=/dev/stdout loglevel=normal logtelegrams=false shell=/wmbusmeters/mosquitto_pub.sh "wmbusmeters/$METER_NAME" "$METER_JSON"

Is it better to use a nano CUL 868 Stick instead of the RTL-SDR, or dou you have any idea to get down the CPU usage?

Thank you very much!

BR

Tpaydt commented 1 month ago

try this:

Here is an example command line that reduces the rtl_wmbus CPU usage if you only need T1/C1 telegrams. It disable S1 decoding (-p s) and trades lower cpu usage for reception performance (-a). You should always add the -f option to enable detection if rtl_sdr has stalled:

device=rtlwmbus:CMD(rtl_sdr -f 868.95M -s 1600000 - 2>/dev/null | rtl_wmbus -p s -a -f)

Zuendapp commented 1 month ago

Hi,

thank you, I tried the config change, and now the CPU Usage is about 7-8% (see Screenshot): Before it was mostly at 24%!

CPU_Usage_WMBUSMETERS

Thank you very much!

BR

My config now:

device=rtlwmbus:CMD(rtl_sdr -f 868.95M -s 1600000 - 2>/dev/null | rtl_wmbus -p s -a -f) donotprobe=/dev/ttyAMA0 format=json logfile=/dev/stdout loglevel=normal logtelegrams=false shell=/wmbusmeters/mosquitto_pub.sh "wmbusmeters/$METER_NAME" "$METER_JSON"