From 33df613807cad155934e1ff396b174b65f8e10f6 Mon Sep 17 00:00:00 2001 From: Awin Huang Date: Wed, 28 Jan 2026 23:36:39 +0800 Subject: [PATCH] Update IP --- ddns.sh | 6 ++++-- dockerfiles/dataExporter/code/awinlib/hdd.py | 2 +- dockerfiles/dataExporter/code/prometheus_data_exporter.py | 2 +- echo.sh | 4 ++++ 4 files changed, 10 insertions(+), 4 deletions(-) create mode 100755 echo.sh diff --git a/ddns.sh b/ddns.sh index 724d4bc..bbb75d1 100755 --- a/ddns.sh +++ b/ddns.sh @@ -11,7 +11,8 @@ URLS=('awin.one' 'collabora.awin.one' 'storjkh.awin.one' 'rd.awin.one' - 'photo.awin.one') + 'photo.awin.one' + 'pqa.awin.one') CF_RECORD_IDS=('d67b2a1b3d7cd520b8e8dad2cb522460' '69dcc0bd619b1a3d4a71458faff2aa50' 'bd397d9779d42c0b92c9c9c47b765769' @@ -22,7 +23,8 @@ CF_RECORD_IDS=('d67b2a1b3d7cd520b8e8dad2cb522460' 'bde4e54eb87b2d543541dea2c008f0da' '658a4587ea02f0a65debf8ee832792e7' '913254da04e8fc31d2a711edcd0cb92e' - '289dcbd1e161e4ccc97dd4b4873c1361') + '289dcbd1e161e4ccc97dd4b4873c1361' + '515df793ecfd3afc56ef20113bfd10b7') INTERNET_IP=`curl -s http://ipv4.icanhazip.com` DNS_RECORD_IP=`dig +short "${URLS[0]}" | grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}' | awk 'NR==1{print}'` diff --git a/dockerfiles/dataExporter/code/awinlib/hdd.py b/dockerfiles/dataExporter/code/awinlib/hdd.py index bbd1489..3e11ff6 100644 --- a/dockerfiles/dataExporter/code/awinlib/hdd.py +++ b/dockerfiles/dataExporter/code/awinlib/hdd.py @@ -1,6 +1,6 @@ import os -from .utilities import log, runCmd +from .utilities import runCmd def findHddIdInNt(): diff --git a/dockerfiles/dataExporter/code/prometheus_data_exporter.py b/dockerfiles/dataExporter/code/prometheus_data_exporter.py index 0ecca91..736c538 100644 --- a/dockerfiles/dataExporter/code/prometheus_data_exporter.py +++ b/dockerfiles/dataExporter/code/prometheus_data_exporter.py @@ -55,7 +55,7 @@ def main(configs): hddTempExporter = HddTempDataExporter() cpuFanTempExporter = CpuFanTempDataExporter() - powerStripLivingroomExporter = KasaPowerStripDataExporter("livingroom", "192.168.1.203") + powerStripLivingroomExporter = KasaPowerStripDataExporter("livingroom", "192.168.1.204") powerStripAtticExporter = KasaPowerStripDataExporter("attic", "192.168.1.202") t315Atticexporter = TapoT315DataExporter(secrect["ip"], secrect["username"], secrect["password"], "鐵皮屋-溫濕度感測器", "attic-sensors") gaugeDict = {} diff --git a/echo.sh b/echo.sh new file mode 100755 index 0000000..5c3debd --- /dev/null +++ b/echo.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +echo "TEST|Arg1: $1, Arg2: $2" > /home/awin/temp/test.txt +