collect outside temperature
This commit is contained in:
+3
-3
@@ -94,15 +94,15 @@ def send_response(box_url: str, username: str, challenge_response: str) -> str:
|
||||
return xml.find("SID").text
|
||||
|
||||
def main():
|
||||
url = "http://192.168.22.4"
|
||||
host = "http://192.168.22.4"
|
||||
username = "fritz6632"
|
||||
password = "body9517"
|
||||
sid = get_sid(url, username, password)
|
||||
sid = get_sid(host, username, password)
|
||||
print(f"Successful login for user: {username}")
|
||||
print(f"sid: {sid}")
|
||||
ain = 116570135300
|
||||
cmd = "gettemperature"
|
||||
with urllib.request.urlopen(f"{url}/webservices/homeautoswitch.lua?ain={ain}&switchcmd={cmd}&sid={sid}") as f:
|
||||
with urllib.request.urlopen(f"{host}/webservices/homeautoswitch.lua?ain={ain}&switchcmd={cmd}&sid={sid}") as f:
|
||||
value = float(f.read().decode())/10
|
||||
print(f"{cmd}: {value} °C")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user