timcharper / homebridge-vivint

Integrates Vivint security system with Apple Home
Other
34 stars 34 forks source link

Issues #20

Closed JTDeel closed 4 years ago

JTDeel commented 4 years ago

New guy here to hoobs and homebridge . I have the plugin installed and connection to homekit. My issues are: 1.Door lock just shows updating regardless if locked or unlocked and if try to unlock or lock the door never responds 2.cameras how do they show up .I have 2 piv which i feel like i read somewhere it stands for person in view

  1. 2 thermostats they just show off and do not respond to commands.

again im new so fire away on what i need to provide and i will hunt for it..LOL Also thanks for the time and effort put it to make this plug in

JT

JTDeel commented 4 years ago

This is what I see in the logs: [Homebridge] [1/15/2020, 2:31:02 PM] [Vivint] Error while bootstrapping accessories [Homebridge] [1/15/2020, 2:31:02 PM] [Vivint] ReferenceError: self is not defined at promiseSetter (/home/hoobs/.hoobs/node_modules/homebridge-vivint-fixed/lib/device_set.js:720:47) at new DimmerSwitch (/home/hoobs/.hoobs/node_modules/homebridge-vivint-fixed/lib/device_set.js:746:20) at DeviceSet.bindAccessory (/home/hoobs/.hoobs/node_modules/homebridge-vivint-fixed/lib/device_set.js:50:20) at cachedAccessories.forEach (/home/hoobs/.hoobs/node_modules/homebridge-vivint-fixed/index.js:100:62) at Array.forEach (<anonymous>) at VivintPlatform.Promise.all.then (/home/hoobs/.hoobs/node_modules/homebridge-vivint-fixed/index.js:100:29) at process._tickCallback (internal/process/next_tick.js:68:7) [Homebridge] [1/15/2020, 2:31:04 PM] Error: This callback function has already been called by someone else; it can only be called one time. at /home/hoobs/.hoobs/node_modules/@hoobs/hap/lib/util/once.js:12:13 at Characteristic.characteristic.on (/home/hoobs/.hoobs/node_modules/homebridge-vivint-fixed/index.js:48:15) at Characteristic.emit (events.js:203:15) at Characteristic.getValue (/home/hoobs/.hoobs/node_modules/@hoobs/hap/lib/Characteristic.js:164:10) at Bridge.<anonymous> (/home/hoobs/.hoobs/node_modules/@hoobs/hap/lib/Accessory.js:771:20) at Array.forEach (<anonymous>) at Bridge.Accessory._handleGetCharacteristics (/home/hoobs/.hoobs/node_modules/@hoobs/hap/lib/Accessory.js:735:8) at HAPServer.emit (events.js:198:13) at HAPServer._handleCharacteristics (/home/hoobs/.hoobs/node_modules/@hoobs/hap/lib/HAPServer.js:928:10) at HAPServer.<anonymous> (/home/hoobs/.hoobs/node_modules/@hoobs/hap/lib/HAPServer.js:209:39) at IncomingMessage.emit (events.js:198:13) at endReadableNT (_stream_readable.js:1143:12) at process._tickCallback (internal/process/next_tick.js:63:19)

daymondm commented 4 years ago

Hi,

please open device_set.js and look at line 720, there is an error in the code that I haven't been able yet so submit a PR for:

need to add let self = this

    constructor(accessory) {
      super(accessory)

      let self = this
      let promiseSetter = function(fn) {
        let boundDebounced = debounce(fn.bind(self), 500, {
          leading: true
        })
        return (value, next) => {
          boundDebounced(value).then(
            (result) => {
              next()
            },
            (failure) => {
              log("failure " + failure)
              next(failure)
            }
          )
        }
      }
daymondm commented 4 years ago

For your second question - cameras aren't supported with this plugin, however the PIV are essentially motion sensors, they will activate when the cameras detect that a person is in view. I have only been able to make this work with the indoor ping cameras and the doorbell camera. If you'd like to add Vivint cameras to HomeKit, you can do so with the ffmpeg-homebridge plugin. See this thread: https://github.com/daymondm/homebridge-vivint/issues/1

JTDeel commented 4 years ago

Thank you. That worked well.