Easy Python Libary for HomeMatic Systems
pip install git+https://github.com/Breuxi/HomematicPy.git
session_id = Homematic.login(homematic_ip, "API", "api")
print(session_id)
devices = Homematic.getDevices(homematic_ip, session_id, "BidCos-RF")
print(json.dumps(devices, sort_keys=True, indent=4))
value_set = Homematic.setValue(homematic_ip, session_id, "BidCos-RF", "NEQ0153210:1", "STATE", "boolean", "0")
if value_set:
print("Value STATE was set to 0")
else:
print("Cant set Value STATE to 0")
print(Homematic.listMethods(homematic_ip))
print(Homematic.getValue(homematic_ip, session_id, "BidCos-RF", "NEQ0153210:1", "STATE"))
logout = Homematic.logout(homematic_ip, session_id)
if logout:
print("Successfully logged out!")
else:
print("Log out failed")