Initial commit

This commit is contained in:
polyfloyd 2025-04-06 12:47:07 +02:00
commit 0a36fb9729
15 changed files with 88 additions and 0 deletions

10
armed.d/10_log Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
PROM="$1"
CODE="$2"
DESCR="$3"
SIA_CODE_STR="$4"
SIA_CODE_DESCR="$5"
DATE=`date`
echo "$DATE: Alarm event: $PROM $CODE: $DESCR -- $SIA_CODE_STR: $SIA_CODE_DESCR" >> "/var/log/alarm.log"

3
armed.d/10_mqtt Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
/usr/local/bin/mqtt-simple -r -h mqtt.bitlair.nl -p 'bitlair/alarm' -m "armed $2"

4
armed.d/20_entrance_logos_off Executable file
View file

@ -0,0 +1,4 @@
#!/bin/bash
mqtt-simple -h mqtt.bitlair.nl -p bitlair/power/shelly/02/command/switch:0 -m off
mqtt-simple -h mqtt.bitlair.nl -p bitlair/power/shelly/04/command/switch:0 -m off

3
armed.d/20_statefile Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
echo -n 0 > /tmp/alarmdisarmed

View file

@ -0,0 +1,3 @@
#!/bin/bash
mqtt-simple -h mqtt.bitlair.nl -p "bitlair/power/trapleds/cmnd/Power1" -m "OFF"

6
armed.d/24_bar_off Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
# will not work yet due to SSH key not being on there
#ssh -o ConnectTimeout=1 root@bank-pi.bitlair.nl shutdown -h now
#sleep 10
mqtt-simple -h mqtt.bitlair.nl -p bitlair/power/shelly/01/command/switch:0 -m off

3
armed.d/25_switch_off Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
# 48p switch with all outlets on it
apc-switch 24 off