Skip to content

Br3uxi/HomematicPy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HomematicPython

Easy Python Libary for HomeMatic Systems

Installing

pip install git+https://github.com/Breuxi/HomematicPy.git

Examples (examples/example.py)

Login

session_id = Homematic.login(homematic_ip, "API", "api")
print(session_id)

Get Devices

devices = Homematic.getDevices(homematic_ip, session_id, "BidCos-RF")
print(json.dumps(devices, sort_keys=True, indent=4))

Set Value

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")

List Methods

print(Homematic.listMethods(homematic_ip))
print(Homematic.getValue(homematic_ip, session_id, "BidCos-RF", "NEQ0153210:1", "STATE"))

Log out

logout = Homematic.logout(homematic_ip, session_id)
if logout:
    print("Successfully logged out!")
else:
    print("Log out failed")