TUTORIAL: MotionEye Motion Detection in Apple HomeKit

REQUIRED – HAP-NodeJS installation:
REQUIRED – MotionEye installation (RasPi Camera):
REQUIRED – MotionEye installation (PSEye Camera):

Start HAP-NodeJS on boot:
QuickPi GitHub:
QuickPi Twiter:

Any Raspberry Pi running Debian Stretch works, recommended starter kit below:
Raspberry Pi 3+ kit (USA): (20% discount: JGCNZGP8)
Raspberry Pi 3+ kit (Intl):

***Support QuickPi by using this as your Amazon Bookmark***
*** USA: ***
*** INTL: ***

22 Replies to “TUTORIAL: MotionEye Motion Detection in Apple HomeKit”

  1. Dani EL

    Hi QuickPi, your videos are great and all tutorials are working perfect, is it possible to add a screenshot from the camera to the notification in my home app? I don‘t have the knowhow to get this so would you please help me?

  2. flux_capacitor

    Great tutorial. Any chance you could detail same procedure for the Python version of HAP (instead of Node.js) on a raspberry pi? Especially for Home Assistant which now proposes HomeKit compatibility thanks to the implementation of pyhap and some accessories like covers, lights and sensors, but alas, not cameras yet.

  3. C rus

    I've seen many tutorial with pi and camera… the problem is that all has low fps like max5 fps. Is there a way to use hardware accelerated via GPU with this (ffmpeg_omx)?

  4. John Mittchel

    Amazing tutorial you have created. Very easy to follow. I am experiencing an issue though and I think it is just a user error. I am able to view the camera feed that I have set up in HomeKit while on my local network (Home Network). However, when I attempt to view my camera feed when using 4G on my phone, I receive an error that reads, "No Response. This camera is not responding." I know that you have instructed others to add a Apple Tv or iPad as a Home Hub on their local network, but I have the Apple Tv acting as the current Home Hub and have other devices that respond fine while not on the local network. Is there a fix for this issue or maybe I am the one doing something wrong. Please help.

  5. Elio Hayek

    how can I remove the other 8 fake accessories? I tried to remove them from " HAP-NodeJS/accessories " but I get an error

    pi@raspi-livingroom:~/HAP-NodeJS/accessories $ rm Fan_accessory.js
    rm: remove write-protected regular file 'Fan_accessory.js'? y
    rm: cannot remove 'Fan_accessory.js': Permission denied

    thanks for your help

  6. Peter Klepsch

    Hi QuickPi, Thanks for this great tutorial. In the local network everything works for me. As soon as I leave the house, both MotionSensor and MotionCam do not work. All other devices also work on the go. What can this be?

  7. Victor Ivros

    Nice tutorial! I can see the motion sensor and it detects motion correctly but there is no live stream when I run the Core.js. The livestream only works when the CameraCore.js file is running but then the motion sensor doesn't work anymore. Can you help me?

  8. Jeremy

    Hi Quickpi. When I did the HomeKit camera installation, it worked for me just fine, but now that I’ve finished the motion sensor one, it doesn’t. First it showed me the motion sensor ONLY(not the camera feed). I tried to run the camera core.js file manually and this happened. Please help

    * WARNING * The program 'node' uses the Apple Bonjour
    compatibility layer of Avahi.
    * WARNING * Please fix your application to use the native API of Avahi!
    * WARNING * For more information see
    * WARNING * The program 'node' called 'DNSServiceRegister()' which
    is not supported (or only supported partially) in the Apple Bonjour
    compatibility layer of Avahi.
    * WARNING * Please fix your application to use the native API of Avahi!
    * WARNING * For more information see
    HAP-NodeJS starting…
    throw er; // Unhandled 'error' event

    Error: listen EADDRINUSE :::51062
    at Object.exports._errnoException (util.js:1024:11)
    at exports._exceptionWithHostPort (util.js:1047:20)
    at Server.setupListenHandle [as _listen2] (net.js:1319:14)
    at listenInCluster (net.js:1367:12)
    at Server.listen (net.js:1467:7)
    at EventedHTTPServer.listen
    at HAPServer.listen (/home/pi/HAP-NodeJS/lib/HAPServer.js:158:20)
    at Accessory.publish (/home/pi/HAP-NodeJS/lib/Accessory.js:486:16)
    at Object.<anonymous> (/home/pi/HAP-NodeJS/CameraCore.js:24:17)
    at Module._compile (module.js:569:30)

  9. Jacob Madding

    I have 2 IP Cameras in Motion Eye currently. Is it possible to expose both of the video streams and both of the motion detectors to homekit? Or do I have to use 2 different setups?

  10. Euripides Argyropoulos

    Great videos! Congrats! My new surveillance camera works great! I've just 2 questions: 1. Is it possible to enable/disable the motion sensor through Homekit, so we should be able to include it on a scene? Now says that "cannot add it, sensor is always active etc.. 2.Is it possible to update the whole system via ssh (to stay always updated on Node Bridge, MotionEye etc).

  11. Aaron Borrow

    Is the motion eye camera better than the raspberry pi camera? I have rpi3 with just a v1 rpi camera and I've adjusted the frame rate but it's still not the greatest. Or would I be better off getting the rpi v2 camera. Cheers

  12. MrPandaBehr

    At 6:10 When I go to add the motion sensor in the Apple Home app, it offers to add a Fan, Garage Door, Fake Lock, Fake Motion Sensor, Fake Outlet, Motion Sensor, Simple Light, Temperature, and Thermostat. Why is it adding all these other devices I don't have and how do I get rid of them?

  13. ديستني بالعربي | Destiny

    Thank you so much for the great videos man! i managed to follow your videos and i have now 2 setups fully working… can help out on how to add 2nd camera to the same Raspberry Pi 3 B+ sa USB? i had it setup in motion eye but in homekit could not get it to see the 2nd usb camera. Homekit only detected the pi camera. please help me on that 😉

  14. faurog

    Hi, legotheboss. I haven`t tried to use MotioneyeOS yet, so I`d like to know if it`s possible, for example, to save a 10 seconds video or a 1 minute video when movement is detected. Besides, have you noticed an improve in performance between a Pi3 B and a Pi3 B+ in this case? Thanks a lot. Nice video as always.

Leave a Reply

Your email address will not be published. Required fields are marked *