Flasforge Camera in Homebridge

One frustrating aspect with the internet of things is that everything is connected, and nothing is compatible. My 3D printer – a Flashforge Aventurer 3 – has a web-cam, but of course it is not advertised on Homekit. In fact the way it is wired inside the printer is pretty hacky, as it seems to share the USB port available in front of the printer: you can use either the USB port to read some external storage, typically a USB Key, or use the internal camera, but not both at the same time.

The Homebridge projects aims at making various devices HomeKit compatible. So I wanted to export the printer’s camera so it is accessible in Apple’s Home app. The Camera-FFMPEG plugin seemed to be the solution, but configuration is a bit tricky.

Basically I followed the instructions found here, but I discovered that the version of FFMPEG installed by default on my Synology NAS is incomplete and so you need another one. So if, like me, you run Homebridge directly on a Synology NAS you need to use another version of FFMPEG. Here are the steps to follow:

  • Make sure your Flashforge printer has a fixed IP address (in my case it’s 192.168.1.11).
  • Install the FFMPEG package.
  • Install the Camera-FFMPEG plugin.
  • Update your configuration to use the right version of ffmpeg, by adding the line "videoProcessor": "/volume1/@appstore/ffmpeg/bin/ffmpeg"
{
  "name": "Camera FFmpeg",
  "videoProcessor": "/volume1/@appstore/ffmpeg/bin/ffmpeg",
  "cameras": [
    {
    "name": "rodin-camera",
    "manufacturer": "Flashforge",
    "model": "Adventurer 3",
    "serialNumber": "1234567890AB",
    "firmwareRevision": "1.2.3",
    "unbridge": false,
    "videoConfig": {
      "source": "-f mjpeg -i http://192.168.1.11:8080/?action=stream",
      "stillImageSource": "-f mjpeg -i http://192.168.1.11:8080/?action=stream  -vframes 1 -r 1",
      "maxWidth": 0,
      "maxHeight": 0,
      "maxFPS": 0,
      "debug": false
    }
 }],
 "platform": "Camera-ffmpeg"
},

While this works, the quality is not very good, and the system is not very reliable.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.