sahilchaddha / homebridge-dafang

Homebridge Plugin for Xiaomi Dafang / Wyze Cam IP Camera => Hey Siri, Start Video Recording
MIT License
204 stars 34 forks source link

Update to reflect changes in EliasKotlyar / Xiaomi-Dafang-Hacks #53

Open sedony23 opened 4 years ago

sedony23 commented 4 years ago

Elias updated his Xiaomi-Dafang-Hacks using different MQTT topics.

See: "move mqtt snapshot to a different topic. Fix #1300" (https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks/commit/daf6de21485d044af6f399f2cc2fe8f316ec5f81)

Motion Detection is not working anymore... Please update your homebridge plugin :)

mkormendy commented 4 years ago

@sedony23 did you make the changes on your setup, and can you create a pull request for this?

machineglow commented 4 years ago

I ran into this issue when I had no recordings from today (I have homekit automations that turn on recording based on these motion sensors). I had updated my Dafang FW last night so I figured something broke. Plus my homebridge log was missing all the lovely dafang mqtt messages. This lead me to this post.

I'm just a git beginner and haven't gotten git setup on my system but here's the fix in motionSensor.js:

 configureMqtt() {
    this.subscribeToMQTT('/motion')
  }

to

 configureMqtt() {
    this.subscribeToMQTT('/motion/snapshot')
  }

I just implemented the fix and restarted homebridge and recordings are live again.

machineglow commented 4 years ago

I tried making a branch and creating a PR but I don't have permission to do either things on this repo. oh well. Hopefully someone can make use of the info above.

NoTrace-Kai commented 4 years ago

motionSensor.js:

Hi there ...

where can i find this File? I searched so much, but i did not find it.

CU Kai

jlg89 commented 3 years ago

node_modules/homebridge-dafang/src/accessories/motionSensor.js

Line 32