symbiotic
1.0.0
共生使您能夠創建一個智能環境,使您可以完全控制物聯網設備。傳感器可以與設備和服務配對以創建複雜的操作和計劃。
一些主要功能是
使用PIP安裝和更新
pip install symbiotic[yaml]
from symbiotic import Symbiotic
from symbiotic . schedule import Schedule
app = Symbiotic ()
app . config . from_yaml ( 'config.yaml' )
ifttt = app . services . IFTTT () # <-- the service to control your device
light_bulb = app . devices . light_bulb ( 'bedroom' , service = ifttt )
# create custom schedules
weekdays_morning = Schedule (). weekdays (). at ( '08:00' )
every_evening = Schedule (). every_day (). at ( '19:00' )
# tell the app how to use your schedules
with app . scheduler ( weekdays_morning ) as scheduler :
scheduler . add ( light_bulb . on , brightness = 80 , transition_duration = '30m' )
with app . scheduler ( every_evening ) as scheduler :
scheduler . add (
light_bulb . on ,
brightness = 50 ,
color = 'red' ,
transition_duration = '60m'
)
app . run () * The application is running... (Press CTRL+C to terminate)
請參閱示例。
要了解如何配置IFTTT小程序,請閱讀文檔。配置小程序後,請確保在config.yaml中添加配置參數。
歡迎捐款!請釋放叉子,並打開拉動請求。