new2
This commit is contained in:
3
defaults.inc
Normal file → Executable file
3
defaults.inc
Normal file → Executable file
@@ -0,0 +1,3 @@
|
||||
|
||||
declare -A SENSOR_MQTTID
|
||||
SENSOR_MQTTID['serverroom']='44179315F3C7'
|
||||
|
||||
23
powerwall.sh
23
powerwall.sh
@@ -13,26 +13,21 @@ source /opt/idssys/defaults/default.inc
|
||||
|
||||
#ssh root@10.5.10.35 '/vmfs/volumes/NFS_ESXi-Vault/esxi-shutdown.sh > /dev/null 2>&1' & > /dev/null 2>&1
|
||||
|
||||
GETTEMP(){
|
||||
mqtt_message=$(`mosquitto_sub -h 10.10.1.180 -t tasmota/discovery/${1}/sensors -u homeassistant -P 12home34assistant56`)
|
||||
echo $payload | cut -d':' -f 7 | cut -d',' -f 1 | read temp_c
|
||||
temp_f=`echo "scale=2; $temp*1.8 + 32" | bc`
|
||||
|
||||
return temp_f
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if [ ${action-x} ]; then
|
||||
case $action in
|
||||
gettemp) NEWCERT ${2};;
|
||||
certrenew) CERTRENEW;;
|
||||
delssl) DEL-SSL ${2};;
|
||||
listcerts) LISTCERTS;;
|
||||
checkcerts) CHECK-CERTS ${2};;
|
||||
nightlyrenew) NIGHTLYRENEW;;
|
||||
delsite) DELSITE ${2} ${3} ${4} ${5};;
|
||||
delsites) DELSITES;;
|
||||
newsite) NEWSITE ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9} ${10} ${11} ${12} ${13} ${14} ${15};;
|
||||
update) ;;
|
||||
update-nodes) NODEUPDATE ${2};;
|
||||
update-dyndns) UPDATE_DYNDNS ${2};;
|
||||
backup) BACKUP;;
|
||||
|
||||
gettemp) echo GETTEMP ${2};;
|
||||
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user