If you want to access the ZWaveAPI via python, but need authentification, you can use something like this:
(I'm using the requests module)
Code: Select all
r = requests.get("http://192.168.178.123/ZWaveAPI/Data/", auth=("admin", "PASSWORD"))
status_code = r.status_code # should be 200
content = r.content
parsed = r.json()
BTW: If the user/password is wrong, I don't get something like 'Failed to login' but:
I hope I will save some time for someone401 - Not logged in
