From 2377b3367ac16b3aa9a57b9975343d15d551b56e Mon Sep 17 00:00:00 2001 From: Andreas Wrede Date: Mon, 10 Jan 2022 15:04:21 -0500 Subject: [PATCH 1/2] run_rbc protect agains double execution --- run_hbc | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 run_hbc diff --git a/run_hbc b/run_hbc new file mode 100755 index 0000000..8f58c55 --- /dev/null +++ b/run_hbc @@ -0,0 +1,7 @@ +#!/bin/sh + +D=$(dirname $0) +pkill -f $D/hbc 2>/dev/null +sleep 1 +$D/hbc $@ + From 4e7fb6237f7513c0a3f24a55d1486e835ea2e986 Mon Sep 17 00:00:00 2001 From: Andreas Wrede Date: Mon, 10 Jan 2022 15:16:57 -0500 Subject: [PATCH 2/2] run_rbc protect agains double execution --- NOTES.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 NOTES.txt diff --git a/NOTES.txt b/NOTES.txt new file mode 100644 index 0000000..40951c9 --- /dev/null +++ b/NOTES.txt @@ -0,0 +1,22 @@ + + +to install on home assistant OS: + +- copy hbc and run_hbc to /config/bin on ha + +- add these two lines to configuration.yaml, set XXXX to name of the HA instance +shell_command: + run_hbc: /config/bin/run_hbc -n XXXXX -d hbd.wrede.ca + +- add these lines to automation.yaml +- id: '1641839711280' + alias: run hbc on boot + description: '' + trigger: + - platform: homeassistant + event: start + condition: [] + action: + - service: shell_command.run_hbc + mode: single +