diff --git a/follow_log b/follow_log new file mode 100755 index 0000000..401a0f4 --- /dev/null +++ b/follow_log @@ -0,0 +1,5 @@ +#!/bin/bash + +source $(dirname $0)/shelly.conf + +tail -n+0 -f $LOGFILE |egrep -i 'POOL|script' diff --git a/shelly.conf.example b/shelly.conf.example index b112e21..8957652 100644 --- a/shelly.conf.example +++ b/shelly.conf.example @@ -12,6 +12,9 @@ SCRIPT_NAME="pool" SCRIPT_FILENAME="pool.js" SCRIPT_ID=1 +# debug log file +LOGFILE=$ROOT_DIR/$SHELLY_HOST.log + # UDP port on which listen for debug messages # (to be configured on your shelly device) UDP_LOG_PORT=6901 diff --git a/shelly_log b/shelly_log index cd2815a..eb9efaa 100755 --- a/shelly_log +++ b/shelly_log @@ -2,8 +2,6 @@ source $(dirname $0)/shelly.conf -LOGFILE=$SHELLY_HOST.log - while true; do echo -e "\n======================================================================\n" | tee -a ${LOGFILE} nc -u -k -l $UDP_LOG_PORT | tee -a ${LOGFILE}