Receive Picture Notifications When People Approach Your House With HomeKit

13,175

99

6

Introduction: Receive Picture Notifications When People Approach Your House With HomeKit

About: Creator of multiple Apple HomeKit devices using homebridge in an attempt to increase the WAF score of my home automation attempts.

In this instructable I will walk you thru recycling an unused Android phone into a remotely accessible video camera via HomeKit, and using a motion sensor to trigger rich picture notifications on your IOS device.

Step 1: Parts List

Parts List

1 - A running homebridge instance. There are a lot of other guides for this, so I won't repeat this here. I'm using a RaspberryPI 2 for mine.

2 - Apple TV4 or iPad running as homekit hub for remote access to the camera and motion sensor.

3 - A homekit motion sensor. For mine I'm using a X-10 MS14A Motion Sensor that I have had for a long time. This is connected to HomeKit via the homebridge-heyu plugin.

4 - An small bird house that you can repurpose for installing a motion sensor.

5 - An unused Android smartphone. In my case we had a Samsung S4 Mini that wasn't being used anymore.

6 - A charger for the cell phone.

7 - A suction cup cell phone holder. I bought one for $12 from Pacific Mall.

Step 2: Setting Up the Camera

On the phone, install the app 'IP Webcam'

In the app, select the following options:

1 - Video Preferences

- Video Resolution - Set to a maximum of 1920x1080 - make note of this value for later

- Phone Resolution - Set to a maximum of 1920x1080

- Main Camera - Primary Camera

2 - Effects

- Enable text overlay

- Overlay format %x %X

3 - Disable notification

4 - Stream on device boot

5 - Start Server

- Make note of url for phone on bottom of screen i.e. http://192.168.1.237:8080 This will be needed later

Step 3: Install the Camera

Pick a location to install your phone where it can see the location you want to monitor, and you can plug the phone changer. In my case I installed this in the front window behind the curtains.

Use the suction cup phone holder to hold the phone in the window, and plugin the phone.

On your computer, go to the url you recorded on the previous step. You should see the IP Webcam website. From here you can check and see if your phone is pointing the right direction and mirror/flip the display if needed.

Step 4: Configure Your Camera in Homebridge

On your computer running homebridge, install and configure the plugin homebridge-camera-ffmpeg-omx. For instructions on installing the plugin, please look here https://github.com/legotheboss/homebridge-camera-...

For your config.json, please use this as the settings for the camera, where X.X.X.X is the ip address of your phone/camera. For maxWidth and maxHeight please use the values from earlier.

{
"name": "Front Porch Camera",

"videoConfig": {

"source": "-f mjpeg -i http://X.X.X.X:8080/video",

"stillImageSource": "-i http://X.X.X.X:8080/shot.jpg",

"maxStreams": 2,

"maxWidth": 1920,

"maxHeight": 1080,

"maxFPS": 30

}

},

After restarting homebridge, and adding the camera in the Home app you should now be able to see the camera and watch video.

Step 5: Install and Setup Your HomeKit Motion Sensor

In my house I have on older X-10 system with a couple of their motion sensors I wasn't using. And I needed to install this in a location where it could watch the front walkway without being too obvious, so I picked a spot in the front garden, and installed it into a bird house I had lying around. It is a little obvious but not too much. It received an okay WAF score. Also my X-10 system was fully integrated into HomeKit with the homebridge-heyu plugin.

To configure the motion sensor into HomeKet it won't go into detail on this, as each sensor will have their own instructions, but the motion sensor and the camera both need to be in the same room on the Home app for rich notifications to work.

Step 6: Done

You should now start to receive notifications on you IOS device with a picture whenever the motion sensor is triggered. And if you swipe left on the notification you should be given the opportunity to view a larger picture.

Be the First to Share

    Recommendations

    • Microcontroller Contest

      Microcontroller Contest
    • Automation Contest

      Automation Contest
    • Make it Glow Contest

      Make it Glow Contest

    6 Comments

    0
    jonkdugan
    jonkdugan

    3 months ago

    I got this all setup, but I’m not getting any notifications. I read that this had gotten killed in ios13, is that still true?

    0
    NorthernM
    NorthernM

    Reply 2 months ago

    And a PS before I get started. Instructables is awful for managing issues, if you use GitHub I see the comment almost immediately versus here where days go by.

    Yes the original pattern was killed with iOS 13, but I worked with the homebridge developers on a workaround with almost the same functionality. The plugin behind this now exposes a dummy switch to trigger the motion sensor,

    0
    geoffreykh
    geoffreykh

    Question 1 year ago on Introduction

    Hi NorthernM followed your steps and got a homebridge run on a Raspberry Pi 2 all running ok and added to to Home app as well as the Camera but I can't get the video to come through any where i can go to get help

    0
    Darzen
    Darzen

    4 years ago

    I have some nosey neighbors who like to see what caused the latest explosion, so I'll try to do this. Thanks for the Instructable and keep up the good work!

    0
    DIY Hacks and How Tos

    Nice. I always wanted one of these on my front door so that I would know when people stop by.