Fix ip of KasaPowerStrip in livingroom
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,2 +1,5 @@
|
||||
__pycache__
|
||||
.venv
|
||||
.secrect
|
||||
uv.lock
|
||||
dockerfiles/dataExporter/code
|
||||
|
||||
1
.python-version
Normal file
1
.python-version
Normal file
@@ -0,0 +1 @@
|
||||
3.13
|
||||
@@ -3,6 +3,7 @@ from kasa.exceptions import KasaException
|
||||
|
||||
from . import KasaSmartPowerStrip
|
||||
from .utilities import log as log
|
||||
from .utilities import logE
|
||||
|
||||
|
||||
class KasaPowerStrip:
|
||||
@@ -11,8 +12,10 @@ class KasaPowerStrip:
|
||||
self.ip = ip
|
||||
try:
|
||||
self.powerStrip = KasaSmartPowerStrip.SmartPowerStrip(ip)
|
||||
log(f'KasaPowerStrip connected({areaName}, {ip}).')
|
||||
except:
|
||||
self.powerStrip = None
|
||||
logE(f'KasaPowerStrip connect fail({areaName}, {ip}).')
|
||||
|
||||
def collectData(self):
|
||||
dataDict = {}
|
||||
|
||||
@@ -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 = {}
|
||||
|
||||
12
pyproject.toml
Normal file
12
pyproject.toml
Normal file
@@ -0,0 +1,12 @@
|
||||
[project]
|
||||
name = "linux-script"
|
||||
version = "0.1.0"
|
||||
description = "Add your description here"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.13"
|
||||
dependencies = [
|
||||
"prometheus-client>=0.21.1",
|
||||
"python-kasa>=0.10.2",
|
||||
"rich>=14.0.0",
|
||||
"schedule>=1.2.2",
|
||||
]
|
||||
Reference in New Issue
Block a user