Skip to content

iOS 13 and Photo Notifications

Northern Man edited this page Oct 31, 2019 · 7 revisions

With iOS 13 the ability to create Photo Notifications by placing a contact, or motion sensor in the same room as a camera went away. And as the feature scored very high on the WAF scale, I created the workaround based on the new requirement to have a motion sensor as part of the camera accessory.

With the workaround, a dummy switch and motion sensor are created as part of the camera. And by turning on the switch, it will trigger the dummy motion sensor, which will then send a Photo Notification to your iPhone/iPad. To turn on the switch, you can create an automation from your real motion sensor, and have it turn on the dummy switch attached to the camera.

Setup Instructions

To enable the work around, add the option "motion": true to your homebridge-camera-ffmpeg configuration, then in the home app, enable notifications in the setup screen for your camera, then create the automation.

1. Sample config.json with the motion option

{
  "bridge": {
    "name": "Test Homebridge",
    "username": "AA:BB:CC:DD:DD:FF",
    "port": 51826,
    "pin": "031-45-154"
  },

  "description": "HomeBridge Test Instance",

  "plugins": [
    "homebridge-camera-ffmpeg"
  ],

  "platforms": [{
    "platform": "Camera-ffmpeg",
    "cameras": [{
      "name": "Test",
      "motion": true,
      "videoConfig": {
       "source": "-f mjpeg -i http://test:8080/video",
        "stillImageSource": "-i http://test:8080/shot.jpg",
        "maxStreams": 2,
        "maxWidth": 1920,
        "maxHeight": 1080,
        "maxFPS": 15,
        "debug": true
      }
    }, {
      "name": "TestDW",
      "motion": true,
      "videoConfig": {
       "source": "-f mjpeg -i http://TestDW:8080/video",
        "stillImageSource": "-i http://TestDW:8080/shot.jpg",
        "maxStreams": 2,
        "maxWidth": 1920,
        "maxHeight": 1080,
        "maxFPS": 15,
        "debug": true
      }
    }]
  }],

  "accessories": []
}

2. Create the automation

In the home app on your phone, create an automation triggered when your Motion Sensor detects motion that turns on the switch created by your camera.

FYI

One side effect of the change is that each iOS device now sends an individual snapshot request when motion is detected, and this caused a mini DDOS attack on my camera. During my last round of testing I counted 4 snapshot requests at once to my camera, where previously it was a single request.

Just a heads up, as you may now encounter resource constraints on your homebridge instance or camera, if you have a lot of iOS devices.

Clone this wiki locally