Python library for controlling Casambi via Cloud API
- Request developer api key from Casambi: https://developer.casambi.com/
- Setup a site in Casambi app: http://support.casambi.com/support/solutions/articles/12000041325-how-to-create-a-site
Install this library through pip:
pip install casambi
import casambi
import time
api_key = 'REPLACEME'
email = '[email protected]'
network_password = 'REPLACEME'
user_password = 'REPLACEME'
worker = casambi.Casambi(api_key=api_key, email=email, \
user_password=user_password, network_password=network_password)
worker.create_user_session()
worker.create_network_session()
worker.ws_open()
print("Turn unit on!")
worker.turn_unit_on(unit_id=1)
time.sleep(60)
print("Turn unit off!")
worker.turn_unit_off(unit_id=1)
time.sleep(60)
units = worker.get_unit_list()
print("units: {}".format(units))
scenes = worker.get_scenes_list()
print("Scene on!")
worker.turn_scene_on(scene_id=1)
time.sleep(60)
print("Scene off!")
worker.turn_scene_off(scene_id=1)
worker.ws_close()
- https://github.com/hellqvio86/aiocasambi - Asynchronous I/O version of this library
- https://github.com/hellqvio86/home_assistant_casambi - Home Assistant Plugin for Casambi
- https://github.com/awahlig/homebridge-casambi Homebridge plugin for Casambi
- Olof Hellqvist - Initial work
This project is licensed under the MIT License - see the LICENSE.md file for details
This library is neither affiliated with nor endorsed by Casambi.