Giter Site home page Giter Site logo

philpicton / homebridge-automation-hat Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 61 KB

Homebridge plugin to control a Pimoroni Automation HAT on a Rasberry Pi

License: MIT License

JavaScript 74.22% Python 25.78%
raspberry-pi-zero-w raspberry-pi homebridge-plugin python pimoroni iot

homebridge-automation-hat's Introduction

homebridge-automation-phat

Project to integrate a Pimoroni Automation (p)HAT on a Raspberry Pi Zero W with Apple's Homekit using Homebridge

This is the code for a basic homebridge plugin and a python server. By running both on a Raspberry Pi 0W with the Automation HAT installed you can add a relay as a switch to your Homekit and control it with Siri.

Obviously the Automation HAT is capable of much more and this project is a good start for more abitious home automation projects. Remember don't use the Automation HAT to directly switch mains electricity!

Installation

  1. You need a Raspberry Pi with Raspian installed.
  2. Install the Automation (p)HAT
  3. Install Homebridge
  4. Add homebridge as an accessory in your home app on IOS
  5. Open a terminal and clone this repository git clone https://github.com/dropletmedia/homebridge-automation-hat.git
  6. move or copy the config.json file into your home/pi/.homebridge folder.
  7. Make sure flask is installed sudo pip3 install flask
  8. use npm to install the homebridge plugin globally npm install -g ~/homebridge-automation-hat
  9. Restart homebridge
  10. start the server python ~/homebridge-automation-hat/server.py
  11. Add the switch accessory to your home app on IOS

Usage example

I have connected some Led light strips with a music sensitive controller to my automation phat's relay. I've put them up in my shed, and with an Apple homepod and iphone I've set up a siri shortcut to play a playlist and turn the lights on when I say "Hey Siri, disco shed!!'

Meta

Phil Picton โ€“ @dropletmediaUK - https://dropletmedia.co.uk

Distributed under the MIT license. See LICENSE for more information.

https://github.com/dropletmedia

Contributing

  1. Fork it (https://github.com/dropletmedia/homekit-automation-hat/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

homebridge-automation-hat's People

Contributors

dropletmedia avatar

Stargazers

Andrew Nagl avatar

Watchers

James Cloos avatar

Forkers

jdiaz11

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.