eu-evops / homebridge-hikvision

28 stars 21 forks source link

Almost there! snapshots working but not streams #13

Open snapstr opened 3 years ago

snapstr commented 3 years ago

First off, @sponte thank you so much for this plugin and continued involvement

I have successful NVR auth and initialization with each camera updating nice still frames through a Hoobs homebridge but streams are throwing an FFMPEG error 1 upon load:

12/30/2020, 12:13:17 PM [Hikvision] [Camera 01] Starting video stream: 1280 x 720, 30 fps, 299 kbps
12/30/2020, 12:13:17 PM [Hikvision] [Camera 01] FFmpeg exited with code: 1 and signal: null (Error)
12/30/2020, 12:13:17 PM [Hikvision] [Camera 01] Stopped video stream.

can I enable a FFmpeg debug mode through your platform json?

My naive guess is that something might be hardcoded for default homebridge plugin location and my Hoobs shell has a different directory path.

I have a DS-9632NI-I8 upgraded to latest firmware V4.40.015 with 17 cameras coming through a PoE switch. I read that's not your testing environment but others seem to be getting PoE switch method to work. I can access each camera stream with FFmpeg direct IP in homebridge and outside the NVR & HIKConnect first party app are operational otherwise.

12/30/2020, 12:10:14 PM [Hikvision] Connected to NVR system: {
  DeviceInfo: {
    '$': { version: '2.0', xmlns: 'http://www.isapi.org/ver20/XMLSchema' },
    deviceName: 'Network Video Recorder',
    deviceID: '[...]',
    model: 'DS-9632NI-I8',
    serialNumber: 'DS-9632NI-I8[...]',
    macAddress: '[...]',
    firmwareVersion: 'V4.40.015',
    firmwareReleasedDate: 'build 200616',
    encoderVersion: 'V5.0',
    encoderReleasedDate: 'build 200616',
    deviceType: 'NVR',
    telecontrolID: '255'

the basic platform json:

{
    "host": "192.168.1.215",
    "password": "[...]",
    "port": 80,
    "platform": "Hikvision",
    "username": "admin"
}
snapstr commented 3 years ago

another snippet worth mentioning from my log - each camera accessory is reporting a switched name change and yet some of the to and from names appear identical (leading to my guess that it might be a directory path). And at the end of the camera list I'm getting a MaxListenersExceededWarning. From what I could tell this may be an ignorable warning but possibly something addressed in an increased limit.

12/30/2020, 12:10:13 PM When searching for the associated plugin of the accessory 'Garage drive' it seems like the plugin name changed from 'evops/homebridge-hikvision' to 'evops/homebridge-hikvision'. Plugin association is now being transformed!
12/30/2020, 12:10:13 PM [Hikvision] Configuring accessory Garage drive
12/30/2020, 12:10:13 PM [Hikvision] [HikvisionCamera] Configuring accessory:  Garage drive
12/30/2020, 12:10:13 PM [Hikvision] Re-creating motion sensor
12/30/2020, 12:10:13 PM When searching for the associated plugin of the accessory 'Front Entry' it seems like the plugin name changed from 'homebridge-plugin-hikvision' to 'evops/homebridge-hikvision'. Plugin association is now being transformed!
12/30/2020, 12:10:13 PM [Hikvision] Configuring accessory Front Entry
12/30/2020, 12:10:13 PM [Hikvision] [HikvisionCamera] Configuring accessory:  Front Entry
12/30/2020, 12:10:13 PM [Hikvision] Re-creating motion sensor
12/30/2020, 12:10:13 PM (node:26243) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 shutdown listeners added to [HomebridgeAPI]. Use emitter.setMaxListeners() to increase limit
12/30/2020, 12:10:14 PM Bridge is running on port 51826.