项目作者: kdudkov

项目描述 :
Python home automation server
高级语言: Python
项目地址: git://github.com/kdudkov/tiny-home-automation.git
创建时间: 2016-06-08T09:01:13Z
项目社区:https://github.com/kdudkov/tiny-home-automation

开源协议:GNU General Public License v3.0

下载


tiny-home-automation

Small home automation system in Python, inspired by OpenHAB and Home Assistant
. It isn’t production-ready, but works fine on two my installations.

Works fine on Raspberry Pi. Works with sensors and actors via:

  • MQTT broker (like Mosquitto) (and via another my project you can use X10 and Ubiquity mFi plugs)
  • Modbus-TCP
  • direct support of Kodi (XBMC) server
  • direct support of Kankun Wifi Plug
  • HTTP update from any other system

Now uses yml-based rules.

Example of rule turning on backlight (sonoff s20 module) on pir sensor is active on esp8266 and turning it off 30 seconds
after pir is inactive, doing this night-time only and if main light is off:

  1. - name: 'night_light_on'
  2. trigger:
  3. items:
  4. - item_id: room_pir
  5. to: 'On'
  6. condition:
  7. condition_type: and
  8. conditions:
  9. - condition_type: state
  10. item_id: light_room
  11. state: 'Off'
  12. - condition_type: state
  13. item_id: home_mode
  14. state: 'night'
  15. action:
  16. - service: command
  17. item_id: s20_2
  18. value: 'On'
  19. - name: 'night_light_off'
  20. trigger:
  21. items:
  22. - item_id: room_pir
  23. to: 'Off'
  24. for:
  25. seconds: 30
  26. condition:
  27. condition_type: and
  28. conditions:
  29. - condition_type: state
  30. item_id: light_room
  31. state: 'Off'
  32. - condition_type: state
  33. item_id: home_mode
  34. state: 'night'
  35. action:
  36. - service: command
  37. item_id: s20_2
  38. value: 'Off'