We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The addon currently uses this combination to send each line to mqtt:
/usr/local/bin/rtl_433 -F json -R $PROTOCOL -f $FREQUENCY -g $GAIN -p $OFFSET | while read line [...] echo $line | /usr/bin/mosquitto_pub [...]
This works but causes a fork/exec on every single line that comes in.
My local script is heavily hacked modified, but basically I changed the script a bit to use this methodology:
mkfifo /tmp/messages.pool
function start_tailing() { cat 0<> /tmp/messages | /usr/bin/mosquitto_pub -h $MQTT_HOST -u $MQTT_USER -P $MQTT_PASS -i RTL_433 -r -l -t $MQTT_TOPIC } start_tailing &
echo $line > /tmp/messages.pool
That way we only fork/exec the mosquitto_pub process once rather than on every single line that comes in.
What do you think about that approach?
The text was updated successfully, but these errors were encountered:
I guess one problem I should mention: The custom channels disappear and the model name and id data ends up just in the payload.
Sorry, something went wrong.
No branches or pull requests
The addon currently uses this combination to send each line to mqtt:
This works but causes a fork/exec on every single line that comes in.
My local script is heavily hacked modified, but basically I changed the script a bit to use this methodology:
For the 'cat 0<> ' see https://unix.stackexchange.com/questions/392697/reading-a-named-pipe-tail-or-cat
That way we only fork/exec the mosquitto_pub process once rather than on every single line that comes in.
What do you think about that approach?
The text was updated successfully, but these errors were encountered: