Closed JiriTywoniak closed 4 years ago
I apologize, putting simple options is easy. It is enough to modify the CMD in Dockerfile in rtl_433 service (~/IOTstack/services/rtl_433/Dockerfile) and run ./scripts/update.sh script in ~/IOTstack/. Like CMD ["sh", "-c", "rtl_433 -R 4 -R 14 -R 141 -F mqtt://${MQTT_ADDRESS}:${MQTT_PORT},events=${MQTT_TOPIC},user=${MQTT_USER},pass=${MQTT_PASSWORD}"]
Nevertheless, my attempt to add custom decoder ends up with: CMD ["sh", "-c", "rtl_433 -R 4 -R 14 -R 141 -X 'n=EV1527-Remote,m=OOK_PWM,s=369,l=1072,g=1400,r=12840,bits>=24,repeats>=3,invert,match={20}0x97F21,get=@0:{20}:code:[0x97F21:ATREA],get=@20:{4}:button:[1:A 2:B 3:AB 4:C 5:AC 6:BC 7:ABC 8:D 9:AD 10:BD 11:ABD 12:CD 13:ACD 14:BCD 15:ALL],unique' -F mqtt://${MQTT_ADDRESS}:${MQTT_PORT},events=${MQTT_TOPIC},user=${MQTT_USER},pass=${MQTT_PASSWORD}"]
Yes, it works, but I failed with my idea to make it more readable and maintainable using environment variable.
It coveres both my points 1 and 2. Now I have resigned on point 3. Jiri
I wish if rtl_433 (when running in Docker) would have customisable options. E.g. using additional ENV variable, like RTL_433_OPTIONS, that would be used in CMD, like CMD ["sh", "-c", "rtl_433 ${RTL_433_OPTIONS} -F ..."]
Three reasons:
Many thanks in advance Jiri