A live bird collage card for your Home Assistant dashboard.
adding informative section in "System" > "Info"
mcguirepr89cdad986a1848
diff --git a/scripts/birdnet_analysis.sh b/scripts/birdnet_analysis.shindex ebadfd44..aa04b7b0 100755--- a/scripts/birdnet_analysis.sh+++ b/scripts/birdnet_analysis.sh@@ -1,6 +1,6 @@#!/usr/bin/env bash# Runs BirdNET-Lite-set -x+#set -xsource /etc/birdnet/birdnet.conf# Document this run's birdnet.conf settings# Make a temporary file to compare the current birdnet.conf withdiff --git a/scripts/extra_info.sh b/scripts/extra_info.shnew file mode 100755index 00000000..b54fc0c2--- /dev/null+++ b/scripts/extra_info.sh@@ -0,0 +1,61 @@+#!/usr/bin/env bash+#Display network info for phpsysinfo++echo "........................................IPs....................................."+echo "LAN IP: $(hostname -I|cut -d' ' -f1)"+echo "Public IP: $(curl -s4 ifconfig.co)"+echo "..................................\`vcgencmd stats\`.............................."+sudo -upi vcgencmd get_throttled+hex=$(sudo -upi vcgencmd get_throttled|cut -d'x' -f2)+binary=$(echo "ibase=16;obase=2;$hex"|bc)+echo "Binary: $binary";+revbinary=$(echo $binary|rev)+if echo $binary | grep 1 ;then+ echo "ISSUES DETECTED"+fi+if [ ${revbinary:0:1} -eq 1 ];then+ echo "Under-voltage detected"+fi+if [ ${revbinary:1:1} -eq 1 ];then+ echo "Arm frequency capped"+fi+if [ ${revbinary:2:1} -eq 1 ];then+ echo "Currently Throttled"+fi+if [ ${revbinary:3:1} -eq 1 ];then+ echo "Soft temperatue limit active"+fi+if [ ${revbinary:16:1} -eq 1 ];then+ echo "Under-voltage has occurred"+fi+if [ ${revbinary:17:1} -eq 1 ];then+ echo "Arm frequency capping has occurred"+fi+if [ ${revbinary:18:1} -eq 1 ];then+ echo "Throttling has occurred"+fi++Bit Meaning+──── ────────────────────────────────────+ 0 Under-voltage detected+ 1 Arm frequency capped+ 2 Currently throttled+ 3 Soft temperature limit active+16 Under-voltage has occurred+17 Arm frequency capping has occurred+18 Throttling has occurred+19 Soft temperature limit has occurred+++echo "....................................Clock Speeds................................"+for i in arm core h264 isp v3d uart pwm emmc pixel vec hdmi dpi;do+ echo -e "${i}:\t$(sudo -upi vcgencmd measure_clock ${i})"+done+echo "........................................Volts..................................."+for i in core sdram_c sdram_i sdram_p;do+ echo -e "${i}:\t$(sudo -upi vcgencmd measure_volts ${i})"+done+echo ".....................................Caddyfile.................................."+cat /etc/caddy/Caddyfile+echo ".................................... Crontab...................................."+cat /etc/crontab | grep -ve '^#'diff --git a/scripts/network_info.sh b/scripts/network_info.shdeleted file mode 100755index 77b81d66..00000000--- a/scripts/network_info.sh+++ /dev/null@@ -1,9 +0,0 @@-#!/usr/bin/env bash-#Display network info for phpsysinfo--echo "LAN IP: $(hostname -I|cut -d' ' -f1)"-echo "Public IP: $(curl -s4 ifconfig.co)"-echo-echo "------------------------------"-echo ' $(ip a) '-ip adiff --git a/templates/phpsysinfo.ini b/templates/phpsysinfo.iniindex ef29419b..bdece8e2 100644--- a/templates/phpsysinfo.ini+++ b/templates/phpsysinfo.ini@@ -928,7 +928,7 @@ ACCESS="command"; - "systeminfo" systeminfo command is run everytime the block gets refreshed or build (WinNT);-COMMAND="network_info.sh"+COMMAND="extra_info.sh"#COMMAND="cat"; define COMMAND parameters (for command access)