From 2f00345db953c429b5afb5576dd3a98e278ceecc Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 11 Feb 2026 08:14:16 +0000 Subject: [PATCH] avm_sid.py aktualisiert --- avm_sid.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/avm_sid.py b/avm_sid.py index 2fbaa25..d7e5701 100644 --- a/avm_sid.py +++ b/avm_sid.py @@ -18,9 +18,15 @@ LOGIN_SID_ROUTE = "/login_sid.lua?version=2" global login_user global login_pw +login_user = 'euer_fritz_user' +login_pw = 'euer_fritz_pw' -login_user = "fritzuser" -login_pw = "fritzpw" + +# AINs ggfs. auslesen, indem dieses skript als "main" ausgeführt wird -> gibt eine XML aus mit den devices & ain +global ain_light +ain_light = 'eure-AIN' +global ain_coffee +ain_coffee = 'eure-andere-ain' class LoginState: def __init__(self, challenge: str, blocktime: int): @@ -111,7 +117,7 @@ def lights_on(): print(f"Successful login for user: {username}") print(f"sid: {sid}") fritzurl = 'http://192.168.178.1/webservices/homeautoswitch.lua' - ain = 'eureAINgeraet' + ain = ain_light #payload_get_switch_list = {'switchcmd': 'getdevicelistinfos', 'sid': sid} payload_on = {'ain': ain, 'switchcmd': 'setswitchon', 'sid': sid} @@ -126,7 +132,7 @@ def lights_off(): print(f"Successful login for user: {username}") print(f"sid: {sid}") fritzurl = 'http://192.168.178.1/webservices/homeautoswitch.lua' - ain = 'eureAINgeraet' + ain = ain_light #payload_get_switch_list = {'switchcmd': 'getdevicelistinfos', 'sid': sid} payload_on = {'ain': ain, 'switchcmd': 'setswitchon', 'sid': sid} @@ -141,7 +147,7 @@ def coffee_on(): print(f"Successful login for user: {username}") print(f"sid: {sid}") fritzurl = 'http://192.168.178.1/webservices/homeautoswitch.lua' - ain = 'eureAINgeraet' + ain = ain_coffee #payload_get_switch_list = {'switchcmd': 'getdevicelistinfos', 'sid': sid} payload_on = {'ain': ain, 'switchcmd': 'setswitchon', 'sid': sid} @@ -156,7 +162,7 @@ def coffee_off(): print(f"Successful login for user: {username}") print(f"sid: {sid}") fritzurl = 'http://192.168.178.1/webservices/homeautoswitch.lua' - ain = 'eureAINgeraet' + ain = ain_coffee #payload_get_switch_list = {'switchcmd': 'getdevicelistinfos', 'sid': sid} payload_on = {'ain': ain, 'switchcmd': 'setswitchon', 'sid': sid}