项目作者: bonesoul

项目描述 :
🚀⚡️✨ The complete home automation for Homer Simpson.
高级语言: C#
项目地址: git://github.com/bonesoul/homer.git
创建时间: 2020-02-05T09:28:23Z
项目社区:https://github.com/bonesoul/homer

开源协议:Other

下载


homer




The complete home automation for Homer Simpson.



Built with ❤︎ by Hüseyin Uslu.

what is homer?

homer is code-first home & office automation system allowing complex interactions between accessories.

why?

as current so called “home automation” systems are actually just “home information” system, I needed a real “home automation” system where IoT stuff can interract which each other and respond to stuff happening at your home/office. Even more homer allows you to develop complex virtual orchestrators that can command stuff together.

The problem is that with current config-first solutions, it’s hard to wire off which the main reason I decided to develop a solution with code-first (programmatic) aproach.




homer, orchestrating the office.

sample scenarios

turn on/off lights based on plex’s status

a very basic scenario that anyone can expect from an so-called home-automation system right? with homer it’s just a piece of cake;

  1. let orchestrate = async () => {
  2. // get hue bridge.
  3. let huePlatform = this._platformRepository.active['Hue.Hue'];
  4. // wait for hue bridge to expose the bulbs.
  5. let lights = await getLights(huePlatform);
  6. // start listening for plex events.
  7. this._accessoryRepository.active['Plex.Plex'].getService(Service.OccupancySensor).getCharacteristic(Characteristic.OccupancyDetected).on('change', (data) => {
  8. for(const entry of lights) { // loop through all lights.
  9. entry.lightService.getCharacteristic(Characteristic.On).setValue(!data.newValue); // if plex started streaming close them, otherwise re-open them.
  10. }
  11. });
  12. }
  13. let getLights = async (hue) => {
  14. return new Promise((resolve, reject) => {
  15. try {
  16. let lights = [];
  17. hue.accessories((accessories) => {
  18. for(const entry of accessories) {
  19. if (entry.constructor.name === 'HueAccessory' && entry.lightService) {
  20. lights.push(entry);
  21. }
  22. }
  23. return resolve(lights);
  24. });
  25. } catch (err) {
  26. return reject(err);
  27. }
  28. });
  29. }
  30. await orchestrate(); // let the magic happen!

here you can see it happening; youtube

status

still in early development stage.

  • initially working on homekit support.
  • will soon be able to pair with homekit.

voice control support?

initially will have support for apple homekit, have plans for alexa & goole asistant support too.

platforms

homer can run on a wide range of platforms including x86, x64, ARM32 and ARM64 - including Raspberry Pi or variants. Check dotnet core runtime too see all available runtimes.

operating systems

  • Windows
  • macOS
  • Linux (Redhat, Fedora, Debian, Ubuntu, Mint, openSUSE, SLES, Alphine, Rasbian..)

requirements

  1. dotnet core 3.1

building

  1. git clone https://github.com/bonesoul/homer
  2. Windows: .\build.cmd
  3. Linux: ./build.sh
  4. MacOS: ./build.sh

tests

  1. dotnet test