Skip to content

Python API to control the smart space equipments at CDI.

Notifications You must be signed in to change notification settings

tongji-cdi/cdi.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cdi.py

Python API to control the smart space equipments at CDI.

Installation

pip install git+https://github.com/tongji-cdi/cdi.py.git

Usage

from cdipy import CDI

# Login as a user with priviledge
cdi = CDI('API_ADDRESS', 'USERNAME', 'PASSWORD')

# cdi.spaces contains all available spaces at the lab.
for space in cdi.spaces:
  print(space.name)

# Set light level
cdi.spaces_by_name['SPACE_NAME'].set_lights(100, selection='all')

# Open door
cdi.spaces_by_name['SPACE_NAME'].open_door()

# Set AC temperature
cdi.spaces_by_name['SPACE_NAME'].set_temperature(26)

About

Python API to control the smart space equipments at CDI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages