Hi there.
I would like to know how I can reduce CPU usage for my instance of rtl_433 running on my Raspberry Pi.
I have been using rtl_433 for a year or so, listening to my Efergy energy monitor as well as a couple of generic 433 remotes.
I recently reinstalled my home automation system on my Raspberry Pi 4 using docker and a rtl_433 container built on debian:buster-slim (Dockerfile at bottom), which works well, but with high CPU usage.
My command is like:
rtl_433 -f 433818000 -s 960000 -R 30 -R 36 -R 86 -F mqtt://mosquitto...
(I'm no expert, but this frequency and sample rate catch both the energy monitor and the remotes.)
When I run htop, rtl_433 is almost always the most CPU-intensive... it's at the top!
So, is there any way I can reduce this and still have the system work as expected?
Thank you very much!
Dockerfile:
FROM debian:buster-slim
ENV MQTT_ADDRESS mosquitto
ENV MQTT_PORT 1883
ENV MQTT_USER ""
ENV MQTT_PASSWORD ""
ENV MQTT_TOPIC RTL_433
ENV RTL_PARAMS "-C si"
RUN apt-get update && apt-get install -y git libtool libusb-1.0.0-dev librtlsdr-dev rtl-sdr cmake automake && \
cd /tmp/rtl_433/ && \
mkdir build && \
cd build && \
cmake ../ && \
make && \
make install
CMD ["sh", "-c", "rtl_433 ${RTL_PARAMS} -F mqtt://${MQTT_ADDRESS}:${MQTT_PORT},events=${MQTT_TOPIC},user=${MQTT_USER},pass=${MQTT_PASSWORD}"]