From cb31d567fe1d2240aac7c17df65850ff0d6c1189 Mon Sep 17 00:00:00 2001 From: Pete C Date: Sun, 1 Jun 2025 13:26:41 +0100 Subject: [PATCH] Copy (not cat) initial rtl_433.conf.template An empty file was being written by cat to: /config/rtl_433/rtl_433.conf.template When using cp the contents is present. Hopefully more multi-arch/futureproof. Observed in latest: io.hass.base.image: alpine:3.21 io.hass.base.arch: amd64 io.hass.base.version: 2025.05.0 --- rtl_433/Dockerfile | 2 +- rtl_433/rtl_433.conf.template | 54 +++++++++++++++++++++++++++++++++ rtl_433/run.sh | 56 +---------------------------------- 3 files changed, 56 insertions(+), 56 deletions(-) create mode 100755 rtl_433/rtl_433.conf.template diff --git a/rtl_433/Dockerfile b/rtl_433/Dockerfile index a902f471..3d827ba3 100644 --- a/rtl_433/Dockerfile +++ b/rtl_433/Dockerfile @@ -61,7 +61,7 @@ RUN mkdir -p /usr/local/lib/SoapySDR/modules0.8/ COPY --from=soapy_hackrf_builder /usr/local/lib/SoapySDR/modules0.8/libHackRFSupport.so /usr/local/lib/SoapySDR/modules0.8/ # Run script -COPY run.sh / +COPY run.sh rtl_433.conf.template / RUN chmod a+x /run.sh CMD [ "/run.sh" ] diff --git a/rtl_433/rtl_433.conf.template b/rtl_433/rtl_433.conf.template new file mode 100755 index 00000000..5e4de99a --- /dev/null +++ b/rtl_433/rtl_433.conf.template @@ -0,0 +1,54 @@ +# This is an empty template for configuring rtl_433. mqtt information will be +# automatically added. Create multiple files ending in '.conf.template' to +# manage multiple rtl_433 radios, being sure to set the 'device' setting. The +# device must be set before mqtt output lines. +# https://github.com/merbanan/rtl_433/blob/master/conf/rtl_433.example.conf + +output mqtt://${host}:${port},user=${username},pass=${password},retain=${retain} +report_meta time:iso:usec:tz + +# To keep the same topics when switching between the normal and edge versions, +# use this output line instead. +# output mqtt://${host}:${port},user=${username},pass=${password},retain=${retain},devices=rtl_433/9b13b3f4-rtl433/devices[/type][/model][/subtype][/channel][/id],events=rtl_433/9b13b3f4-rtl433/events,states=rtl_433/9b13b3f4-rtl433/states + +# Uncomment the following line to also enable the default "table" output to the +# addon logs. +# output kv + +# Disable TPMS sensors by default. These can cause an overwhelming number of +# devices and entities to show up in Home Assistant. +# This list is generated by running: +# rtl_433 -R help 2>&1 | grep -i tpms | sd '.*\[(\d+)\].*' 'protocol -\$1' +# [59] Steelmate TPMS +# [60] Schrader TPMS +# [82] Citroen TPMS +# [88] Toyota TPMS +# [89] Ford TPMS +# [90] Renault TPMS +# [95] Schrader TPMS EG53MA4, PA66GF35 +# [110] PMV-107J (Toyota) TPMS +# [123]* Jansite TPMS Model TY02S +# [140] Elantra2012 TPMS +# [156] Abarth 124 Spider TPMS +# [168] Schrader TPMS SMD3MA4 (Subaru) +# [180] Jansite TPMS Model Solar +# [186] Hyundai TPMS (VDO) +# [201] Unbranded SolarTPMS for trucks +# [203] Porsche Boxster/Cayman TPMS +protocol -59 +protocol -60 +protocol -82 +protocol -88 +protocol -89 +protocol -90 +protocol -95 +protocol -110 +protocol -123 +protocol -140 +protocol -156 +protocol -168 +protocol -180 +protocol -186 +protocol -201 +protocol -203 + diff --git a/rtl_433/run.sh b/rtl_433/run.sh index 3395c1cf..57bd149c 100755 --- a/rtl_433/run.sh +++ b/rtl_433/run.sh @@ -39,61 +39,7 @@ fi # Create a reasonable default configuration in /config/rtl_433. if [ ! "$(ls -A $conf_directory)" ] then - cat > $conf_directory/rtl_433.conf.template <&1 | grep -i tpms | sd '.*\[(\d+)\].*' 'protocol -$1' -# [59] Steelmate TPMS -# [60] Schrader TPMS -# [82] Citroen TPMS -# [88] Toyota TPMS -# [89] Ford TPMS -# [90] Renault TPMS -# [95] Schrader TPMS EG53MA4, PA66GF35 -# [110] PMV-107J (Toyota) TPMS -# [123]* Jansite TPMS Model TY02S -# [140] Elantra2012 TPMS -# [156] Abarth 124 Spider TPMS -# [168] Schrader TPMS SMD3MA4 (Subaru) -# [180] Jansite TPMS Model Solar -# [186] Hyundai TPMS (VDO) -# [201] Unbranded SolarTPMS for trucks -# [203] Porsche Boxster/Cayman TPMS -protocol -59 -protocol -60 -protocol -82 -protocol -88 -protocol -89 -protocol -90 -protocol -95 -protocol -110 -protocol -123 -protocol -140 -protocol -156 -protocol -168 -protocol -180 -protocol -186 -protocol -201 -protocol -203 -EOD + cp /rtl_433.conf.template $conf_directory fi # Remove all rendered configuration files.