Tellstick Duo+Doorbell+Script event
Posted: Fri Mar 17, 2023 9:45 am
I've setup a Doorbell in my tellstick.config with an ID of 6, and when I push the doorbell a script runs in deviceevent/doorbell.sh
Everything works great! Except that the script are triggered twice Is it the doorbell that sends the signal twice that it has been pushed? The doorbell is a Nexa LMLT-711.
Can I prevent the script from execute two times and make sure it only executes once?
This is the script both "echo" are logged twice and my lamp in homeautomation is turned on and then off.
Everything works great! Except that the script are triggered twice Is it the doorbell that sends the signal twice that it has been pushed? The doorbell is a Nexa LMLT-711.
Can I prevent the script from execute two times and make sure it only executes once?
This is the script both "echo" are logged twice and my lamp in homeautomation is turned on and then off.
Code: Select all
#!/bin/bash
echo "Deviceevent activated with ID: ${DEVICEID}" >> /tmp/tdlog.log
if [ "${DEVICEID}" = "6" ]; then
echo "Doorbell was pushed! ${DEVICEID}" >> /tmp/tdlog.log
url="http://192.168.1.101/ha/api.php?do=devices/toggle&deviceid=1&status=-1"
wget -qO- "${url}" >> /tmp/tdlog.log
fi