Skip to content
Homebridge TestFlight
Dafang Hacks

Dafang Hacks MQTT

homebridge-dafang-mqtt-republish · v2.3.1

VerifiedLocal

Exposes Dafang Hacks camera features such as LED, night vision and motion as HomeKit switches over MQTT.

What it says it supports

Brands

  • Dafang Hacks

Devices it names

  • Dafang camera

Shows up in Apple Home as from its README

Sensor readings in its code

What people report

Republishes Dafang Hacks camera MQTT events to HomeKit; Xiaomi Xiaofang 1S and Dafang users mainly hit camera-side MQTT motion setup problems.

  • Works1
  • Partly works1
DeviceStatusWhat they saidSource
Xiaomi Dafang camera (Dafang Hacks)WorksDocumented setup with motion detection and MQTT; recalibrate switch added
Saved copy
Prerequisites 1. Install Dafang Hacks using the official instructions. 2. Install Homebridge using the official instructions. 3. Install homebridge-camera-ffmpeg using `sudo npm install -g homebridge-camera-ffmpeg --unsafe-perm`. 4. Install homebridge-dafang-mqtt-republish using `sudo npm install -g homebridge-dafang-mqtt-republish`. 5. Install Mosquitto on your device running Homebridge using `sudo apt install mosquitto mosquitto-clients`. 6. Enable and start Mosquitto with `sudo systemctl enable mosquitto` and `sudo systemctl start mosquitto`. Camera MQTT Configuration 1. Connect to your …

Excerpt saved from GitHub on 2026-10-22.

Wiki: Configuring Dafang Hacks Cameras for Homebridge
Xiaomi Xiaofang 1S (Dafang Hacks)Partly worksWorks once MQTT motion config and camera reboot are correct; motion setup troublesome
Saved copy
… appears). { "name": "Camera FFmpeg", "mqtt": "127.0.0.1", "portmqtt": 1883, "topic": "homebridge", "cameras": [ { "name": "Entrance", "manufacturer": "Xiaomi", "model": "Xiaofang 1S", "serialNumber": "2016DP5557", "motion": true, "motionTimeout": 0, "videoConfig": { "source": "-fflags +discardcorrupt -i rtsp://192.168.1.227:8554/unicast", "stillImageSource": "-i https://root:[email protected]/cgi-bin/currentpic.cgi", "maxStreams": 2, "vcodec": "copy", "packetSize": 564, "audio": true } } ], "platform": "Camera-ffmpeg" }, { "cameras": [ { "name": "Entrance", "dafang_topic": …

Excerpt saved from GitHub on 2026-10-22.

Issue #23 · 2020-08

Gathered from the plugin’s GitHub issues, pull requests, discussions, wiki and docs, and from r/homebridge. These are individual reports, so check the linked thread and the date before you buy.

How it connects

Local

MQTT messages from Dafang Hacks

You’ll need

  • MQTT broker

Compatibility

Verified by HomebridgeYes
Homebridge versions>=1.0.0
Homebridge 2.0No
Node.js>=10
Settings in Homebridge UIYes
MatterNo
Platform namedafangMqtt
LicenseBSD-2-Clause

Community signals

Downloads a week46
Downloads a month69
GitHub stars13
Open issues0
Closed issues8
Last code push2023-03-05
Latest version2.3.1 (2021-05-02)
First published2020-07-05
Releases15

In ReReHome

Whatever this plugin publishes reaches Apple Home as a normal HomeKit accessory behind your Homebridge bridge, so ReReHome shows and controls it like any other.

Bridges get their own settings page listing the accessories behind them.

HomeKit services in its code

Found by scanning the published npm package. A plugin can register a service only for some devices.

  • LightSensor
  • Lightbulb
  • Switch