Coder Social home page Coder Social logo

sahilchaddha / homebridge-dafang Goto Github PK

View Code? Open in Web Editor NEW
203.0 19.0 34.0 91.88 MB

Homebridge Plugin for Xiaomi Dafang / Wyze Cam IP Camera => Hey Siri, Start Video Recording

License: MIT License

JavaScript 100.00%
homebridge homebridge-plugin homebridge-mqtt mqtt xiaomi xiaomi-smart-home ip-camera dafang ffmpeg homebridge-camera

homebridge-dafang's Introduction

homebridge-dafang

NPM

npm npm CircleCI

Homebridge Plugin for Xiaomi Dafang / Wyze Camera

Installation

  1. Install ffmpeg on your device
    $ brew install ffmpeg --with-openh264 --with-fdk-aac
  1. Install the plugin using:
    $ npm install -g --unsafe-perm homebridge
    $ npm install -g --unsafe-perm homebridge-dafang
  1. Install CFW on camera and set up MQTT. Refer to Setup Readme
  2. Edit config.json and add the plugin. Refer to config-sample.json in repository.
  3. Run Homebridge
  4. Add extra camera accessories in Home app. The setup code is the same as in homebridge.You can go into -> + -> Add New Accessory -> Add Manually -> Add Homebridge Pin -> Select Camera -> Add

Supported Cameras :

Name Picture
Xiaomi Dafang Dafang
Xiaomi Xiaofang 1S XiaoFang
Wyzecam Pan Dafang
Wyzecam V2 XiaoFang
Sannce I21AG, MixSight HX-I2110T2, WanScam HW0036, Escam G02, Digoo BB-M2 XiaoFang
Any other Device with Ingenic T10/T20 Device T20

Todo :

  • Timelapse Switch
  • Intercom 2 Way Audio **

Accessories :

Accessory Type Description Config
Motion Sensor motionSensor Alerts if Motion is Detected threshold(optional) => In ms.
Rich Motion Sensor richMotionSensor Alerts if Motion is Detected (Rich Notifications) threshold(optional) => In ms.
Night Vision Sensor nightVisionSensor Alerts if Night Mode is Detected threshold(optional) => In ms.
Night Vision Switch nightVisionSwitch Toggles Night Mode on Camera => IR_LED ON IR_CUT OFF None
Brightness Lux Sensor brightness Brightness Lux Sensor None
Automatic Night Mode Toggle Switch autoNightVisionSwitch Toggles Automatic Night Mode on Camera None
Automatic Motion Tracking Switch autoMotionTrackingSwitch Toggles Automatic Motion Tracking on Dafang None
Move/Rotate Camera Motor moveCamera Moves Dafang Camera Horizontal/Vertical right/left up/down Motor axis(required) => horizontal/vertical, direction(required) => left/right for horizontal and up/down for vertical
Record Video+Audio recordVideo Records Video + Audio Toggle Switch. Video(mp4) files are saved in local machine running homebridge None
Record Audio Only recordAudio Records Audio Toggle Switch. Audio(aac) files are saved in local machine running homebridge None
Capture Image captureImage Captures Image from Camera and saves to configured folder None
Recorded Media Storage Sensor storageSensor Alerts when recorded media folder storage is full on the system due to recordings. You can set custom disk space in MB in config None
Clear Storage Switch clearStorage Clears All Recordings None
Reset FFMEPG Switch resetFFMPEG Kills all FFMPEG Zombie Scripts. Audio/Video Recordings will restart recording. None
Motion Detection Switch motionDetection Enables/Disable Motion Detection. Turning off this switch will stop sending motion detection alerts. None
RTSP Server Switch rtspSwitch Debug Switch to turn on/off RTSP H264 Stream Server. None
MJPEG Server Switch mjpegSwitch Debug Switch to turn on/off MJPEG Server None
Recalibrate Motor Switch recalibrateSwitch Debug Switch to Re-Calibrate Camera Motor. None
Restart Camera Switch restartSwitch Debug Switch to restart Camera. None
Re-Mount SD Card RW Switch remountSwitch Debug Switch to re mount sd card with RW permission. It prevents SD Card Failures like stuck RTSP Stream. None

Threshold => Lesser Threshold, More Accuracy. Dafang Motion detection is sensitive, and it toggles very quickly, to keep the state of sensor more stable little threshold will delay frequent alerts

Demo :

Sorry for crappy quality. Tested on Rpi + Slow Network

Advanced Demo :

Advanced Demo

Simple Demo :

Simple Demo

Rich Notifications :

Plugin Config :

Config Type Description Config
mqtt.hostBroker bool Set true to host MQTT Locally, set false to connect to external MQTT Broker. Required
cameras Array (Object) Can add Multiple Cameras Required

Camera Config :

Config Type Description Config
cameraRTSPStreamUrl string RTSP Stream Url e.g. rtsp://192.168.1.2:8554/unicast Required
disableStream bool Set true to stream camera, set false to disable camera view Optional
mqttTopic string Each Dafang Device must have a unique topic. Topic should match for each corresponding camera accessory Required
folder string Absolute path of directory where recordings/images will be saved Required
segmentLength number Length of each video file. (in seconds). Each recording will be saved in segmented videos. Default : 60 (1 minute) Optional
maxDirSize number Max Size of folder (in mb) where recordings will be saved. Default : 2048 (2GB) Optional
checkStorageSizeInterval number Time in seconds to re check recording folder size for storageSensor. Default : 300 (5 min) Optional
recordingDirectoryPathFormat string DateTime format for Recordings Directory Path. Default : MMM-Do-YY Optional
recordingFilenameFormat string DateTime format for Recordings Filename. Default : YYYY-M-D-h-mm-ss Optional

Refer to https://momentjscom.readthedocs.io/en/latest/moment/04-displaying/01-format/ for custom DirectoryPath/FileName formats for recordings..

{
    "platforms": [
        {
            "platform": "Dafang",
            "mqtt": {
                "hostBroker": true,
                "port": 1883,
                "host": "localhost",
                "debug": true,
                "mongoUrl": "mongodb://localhost:27017/mqtt"
            },
            "cameras": [{
                "cameraName": "My Dafang",
                "cameraRTSPStreamUrl": "rtsp://192.168.1.12:8554/unicast",
                "mqttTopic": "myhome/dafang/#",
                "folder": "/Users/sahilchaddha/Sahil/Recordings/",
                "accessories": [
                                    {
                                        "name": "Living Room Motion Sensor",
                                        "type": "richMotionSensor",
                                        "threshold": 300000
                                    },
                                    {
                                        "name": "Living Room Auto Motion Tracking Switch",
                                        "type": "autoMotionTrackingSwitch"
                                    },
                                    {
                                        "name": "Living Room Night Vision Sensor",
                                        "type": "nightVisionSensor",
                                        "threshold": 0
                                    },
                                    {
                                        "name": "Living Room Night Vision Switch",
                                        "type": "nightVisionSwitch"
                                    },
                                    {
                                        "name": "Living Room Auto Night Vision Switch",
                                        "type": "autoNightVisionSwitch"
                                    },
                                    {
                                        "name": "Horizontal Left",
                                        "type": "moveCamera",
                                        "axis": "horizontal",
                                        "direction": "left"
                                    },
                                    {
                                        "name": "Horizontal Right",
                                        "type": "moveCamera",
                                        "axis": "horizontal",
                                        "direction": "right"
                                    },
                                    {
                                        "name": "Vertical Up",
                                        "type": "moveCamera",
                                        "axis": "vertical",
                                        "direction": "up"
                                    },
                                    {
                                        "name": "Vertical Down",
                                        "type": "moveCamera",
                                        "axis": "vertical",
                                        "direction": "down"
                                    },
                                    {
                                        "name": "Record Video",
                                        "type": "recordVideo"
                                    },
                                    {
                                        "name": "Record Audio",
                                        "type": "recordAudio"
                                    },
                                    {
                                        "name": "Capture Image",
                                        "type": "captureImage"
                                    },
                                    {
                                        "name": "RPi Storage Sensor",
                                        "type": "storageSensor"
                                    },
                                    {
                                        "name": "Clear Storage Switch",
                                        "type": "clearStorage"
                                    },
                                    {
                                        "name": "Reset Streaming",
                                        "type": "resetFFMPEG"
                                    },
                                    {
                                        "name": "Camera Brightness",
                                        "type": "brightness"
                                    }
                    ]
            }]
        }
    ]
}

Lint

    $ npm run lint

Need Help ?

Get Slack Invite => https://slackin-znyruquwmv.now.sh/

Slack Channel => https://homebridgeteam.slack.com/messages/homebridge-dafang

Slack User => @sahilchaddha

Author

Sahil Chaddha

[email protected]

homebridge-dafang's People

Contributors

mkormendy avatar sahilchaddha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebridge-dafang's Issues

Turn off MQTT events in log

Is your feature request related to a problem? Please describe.
My homebridge log file fills up with MQTT messages.

Describe the solution you'd like
I'd like to know what the options are to reduce the messages for this plugin in the log.

Describe alternatives you've considered
I have already tried to use "debug": false in the mqtt section of the config file, but this doesn't seem to work.

[BUG] - Record video

If the wrong path to the folder is specified or the rights to access the folder are missing, then recording audio / video / photo causes Homebridge to stop!

Error: EACCES: permission denied, mkdir 'home/pi/DRIVE/share/Hall/Dafang Hall/Jan-3rd-19' at Object.mkdirSync (fs.js:775:3) homebridge.service: Main process exited, code=exited, status=1/FAILURE homebridge.service: Unit entered failed state. homebridge.service: Failed with result 'exit-code'. pam_unix(sudo:session): session closed for user root homebridge.service: Service hold-off time over, scheduling restart. Stopped Node.js HomeKit Server. Started Node.js HomeKit Server.

[BUG] - recordVideo produces corrupted files

Describe the bug
When trying to initiate recordVideo, the resulting video is corrupted. The top part of the stream (where the OSD is) is fine but the rest is corrupted/empty artifacts.

Expected behavior
Expecting an uncorrupted frame/video

Config
{
"platform": "Dafang",
"mqtt": {
"hostBroker": true,
"port": 1883,
"host": "homebridgeIP",
"debug": true,
"mongoUrl": "mongodb://homebridgeIP:27017/mqtt"
},
"cameras": [{
"cameraName": "PanCam",
"cameraRTSPStreamUrl": "rtsp://IP:8554/unicast",
"mqttTopic": "home/pancam/#",
"folder": "/tmp/",
"segmentLength": 60,
"maxDirSize": 32768,
"checkStorageSizeInterval": 14400,
"recordingDirectoryPathFormat": "YYYYMMDD",
"recordingFilenameFormat": "YYYYMMDD-hhmmss",
"accessories": [
{
"name": "Motion Sensor",
"type": "richMotionSensor",
"threshold": 300000
},
{
"name": "Auto Motion Tracking Switch",
"type": "autoMotionTrackingSwitch"
},
{
"name": "Night Vision Sensor",
"type": "nightVisionSensor",
"threshold": 0
},
{
"name": "Night Vision Switch",
"type": "nightVisionSwitch"
},
{
"name": "Auto Night Vision Switch",
"type": "autoNightVisionSwitch"
},
{
"name": "Horizontal Left",
"type": "moveCamera",
"axis": "horizontal",
"direction": "left"
},
{
"name": "Horizontal Right",
"type": "moveCamera",
"axis": "horizontal",
"direction": "right"
},
{
"name": "Vertical Up",
"type": "moveCamera",
"axis": "vertical",
"direction": "up"
},
{
"name": "Vertical Down",
"type": "moveCamera",
"axis": "vertical",
"direction": "down"
},
{
"name": "Record Video",
"type": "recordVideo"
},
{
"name": "Record Audio",
"type": "recordAudio"
},
{
"name": "Capture Image",
"type": "captureImage"
},
{
"name": "RPi Storage Sensor",
"type": "storageSensor"
},
{
"name": "Reset Streaming",
"type": "resetFFMPEG"
},
{
"name": "Motion Detection Switch",
"type": "motionDetection"
},
{
"name": "Restart Switch",
"type": "restartSwitch"
},
{
"name": "Recalibrate Switch",
"type": "recalibrateSwitch"
},
{
"name": "Camera Brightness",
"type": "brightness"
}
],
"videoConfig": {
"source": "-rtsp_transport tcp -i rtsp://IP:8554/unicast",
"stillImageSource": "-rtsp_transport tcp -i rtsp://IP:8554/unicast -vframes 1 -r 1",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 25,
"maxBitrate": 128,
"packetSize": 188,
"debug": true

Logs
N/A

Screenshots
N/A

Desktop (please complete the following information):

  • OS: ubuntu 4.13.0-46-generic #51-Ubuntu SMP Tue Jun 12 12:36:29 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  • Node Version 11.6

Additional context
I actually figured out what the issue is.

when recordVideo calls:

ffmpeg -i rtsp://IP:8554/unicast -acodec copy -vcodec copy [file]

It should add -rtsp_transport tcp argument to the command line.

ffmpeg -rtsp_transport tcp -i -i rtsp://IP:8554/unicast -acodec copy -vcodec copy [file]

I can reproduce the corrupted video with the first line but the second command does not produce a corrupted video.

Thanks!

Camera GPIO? For usage as doorbell

Hi,

has the camera some kind of gpio? I have the idea to use it as a doorbell.
If possible connect a doorbell button to gpio of the camera to know if someone presses the doorbell. if pressed send out picture with telegram and maybe a message... "someone ringed the door bell".
Now you check the Frontdoor picture with your smartphone, if you like the person write open to your telegram chat. the word open triggers a script on the cam that send a door open command to the frontdoor.

Maybe it's also possible to use the usb port for this?

Regards X23

[BUG] - Errors during install

The hack is working, but when installing the homebridge plugin a get several errors. When accessing the camera using homekit, the video is not working.

Any ideas? sorry for the long logfile

npm WARN deprecated [email protected]: Please upgrade to 2.2.19 or higher
npm WARN deprecated [email protected]: Use uuid module instead
npm WARN deprecated [email protected]: no longer maintained

> [email protected] install /usr/local/lib/node_modules/homebridge-dafang/node_modules/kerberos
> (node-gyp rebuild) || (exit 0)

make: Entering directory '/usr/local/lib/node_modules/homebridge-dafang/node_modules/kerberos/build'
  CXX(target) Release/obj.target/kerberos/lib/kerberos.o
In file included from ../lib/kerberos.cc:1:0:
../lib/kerberos.h:5:27: fatal error: gssapi/gssapi.h: No such file or directory
 #include <gssapi/gssapi.h>
                           ^
compilation terminated.
kerberos.target.mk:103: recipe for target 'Release/obj.target/kerberos/lib/kerberos.o' failed
make: *** [Release/obj.target/kerberos/lib/kerberos.o] Error 1
make: Leaving directory '/usr/local/lib/node_modules/homebridge-dafang/node_modules/kerberos/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Linux 4.14.79-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge-dafang/node_modules/kerberos
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 

> [email protected] install /usr/local/lib/node_modules/homebridge-dafang/node_modules/fs-ext
> node-gyp configure build

make: Entering directory '/usr/local/lib/node_modules/homebridge-dafang/node_modules/fs-ext/build'
  CXX(target) Release/obj.target/fs-ext/fs-ext.o
In file included from ../../nan/nan.h:190:0,
                 from ../fs-ext.cc:27:
../../nan/nan_maybe_43_inl.h: In function 'Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)':
../../nan/nan_maybe_43_inl.h:88:15: error: 'class v8::Object' has no member named 'ForceSet'
   return obj->ForceSet(GetCurrentContext(), key, value, attribs);
               ^~~~~~~~
In file included from ../fs-ext.cc:27:0:
../../nan/nan.h: In function 'v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)':
../../nan/nan.h:817:60: warning: 'v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
         v8::Isolate::GetCurrent(), target, func, argc, argv);
                                                            ^
In file included from ../fs-ext.cc:20:0:
/root/.node-gyp/10.15.0/include/node/node.h:177:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/root/.node-gyp/10.15.0/include/node/node.h:91:42: note: in definition of macro 'NODE_DEPRECATED'
     __attribute__((deprecated(message))) declarator
                                          ^~~~~~~~~~
In file included from ../fs-ext.cc:27:0:
../../nan/nan.h: In function 'v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)':
../../nan/nan.h:831:62: warning: 'v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
         v8::Isolate::GetCurrent(), target, symbol, argc, argv);
                                                              ^
In file included from ../fs-ext.cc:20:0:
/root/.node-gyp/10.15.0/include/node/node.h:170:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/root/.node-gyp/10.15.0/include/node/node.h:91:42: note: in definition of macro 'NODE_DEPRECATED'
     __attribute__((deprecated(message))) declarator
                                          ^~~~~~~~~~
In file included from ../fs-ext.cc:27:0:
../../nan/nan.h: In function 'v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)':
../../nan/nan.h:845:62: warning: 'v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
         v8::Isolate::GetCurrent(), target, method, argc, argv);
                                                              ^
In file included from ../fs-ext.cc:20:0:
/root/.node-gyp/10.15.0/include/node/node.h:163:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/root/.node-gyp/10.15.0/include/node/node.h:91:42: note: in definition of macro 'NODE_DEPRECATED'
     __attribute__((deprecated(message))) declarator
                                          ^~~~~~~~~~
In file included from ../fs-ext.cc:27:0:
../../nan/nan.h: In member function 'v8::Local<v8::Value> Nan::Callback::Call_(v8::Isolate*, v8::Local<v8::Object>, int, v8::Local<v8::Value>*) const':
../../nan/nan.h:1463:5: warning: 'v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
     ));
     ^
In file included from ../fs-ext.cc:20:0:
/root/.node-gyp/10.15.0/include/node/node.h:177:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/root/.node-gyp/10.15.0/include/node/node.h:91:42: note: in definition of macro 'NODE_DEPRECATED'
     __attribute__((deprecated(message))) declarator
                                          ^~~~~~~~~~
../fs-ext.cc: In function 'void EIO_After(uv_work_t*)':
../fs-ext.cc:108:20: warning: 'v8::Local<v8::Value> Nan::NanErrnoException(int, const char*, const char*, const char*)' is deprecated [-Wdeprecated-declarations]
     argv[0] = Nan::NanErrnoException(store_data->error);
                    ^~~~~~~~~~~~~~~~~
In file included from ../fs-ext.cc:27:0:
../../nan/nan.h:862:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> NanErrnoException(
                                              ^~~~~~~~~~~~~~~~~
../fs-ext.cc:108:55: warning: 'v8::Local<v8::Value> Nan::NanErrnoException(int, const char*, const char*, const char*)' is deprecated [-Wdeprecated-declarations]
     argv[0] = Nan::NanErrnoException(store_data->error);
                                                       ^
In file included from ../fs-ext.cc:27:0:
../../nan/nan.h:862:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> NanErrnoException(
                                              ^~~~~~~~~~~~~~~~~
../fs-ext.cc: In function 'Nan::NAN_METHOD_RETURN_TYPE Flock(Nan::NAN_METHOD_ARGS_TYPE)':
../fs-ext.cc:281:40: warning: 'int32_t v8::Value::Int32Value() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
   flock_data->fd = info[0]->Int32Value();
                                        ^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../fs-ext.cc:20:
/root/.node-gyp/10.15.0/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../fs-ext.cc:282:42: warning: 'int32_t v8::Value::Int32Value() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
   flock_data->oper = info[1]->Int32Value();
                                          ^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../fs-ext.cc:20:
/root/.node-gyp/10.15.0/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../fs-ext.cc:297:45: warning: 'v8::Local<v8::Value> Nan::NanErrnoException(int, const char*, const char*, const char*)' is deprecated [-Wdeprecated-declarations]
     if (i != 0) return Nan::ThrowError(Nan::NanErrnoException(errno));
                                             ^~~~~~~~~~~~~~~~~
In file included from ../fs-ext.cc:27:0:
../../nan/nan.h:862:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> NanErrnoException(
                                              ^~~~~~~~~~~~~~~~~
../fs-ext.cc:297:68: warning: 'v8::Local<v8::Value> Nan::NanErrnoException(int, const char*, const char*, const char*)' is deprecated [-Wdeprecated-declarations]
     if (i != 0) return Nan::ThrowError(Nan::NanErrnoException(errno));
                                                                    ^
In file included from ../fs-ext.cc:27:0:
../../nan/nan.h:862:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> NanErrnoException(
                                              ^~~~~~~~~~~~~~~~~
../fs-ext.cc: In function 'Nan::NAN_METHOD_RETURN_TYPE Seek(Nan::NAN_METHOD_ARGS_TYPE)':
../fs-ext.cc:332:32: warning: 'int32_t v8::Value::Int32Value() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
   int fd = info[0]->Int32Value();
                                ^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../fs-ext.cc:20:
/root/.node-gyp/10.15.0/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../fs-ext.cc:317:74: warning: 'double v8::Value::NumberValue() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
   if (!(a)->IsUndefined() && !(a)->IsNull() && !IsInt64((a)->NumberValue())) { \
                                                                          ^
../fs-ext.cc:333:3: note: in expansion of macro 'ASSERT_OFFSET'
   ASSERT_OFFSET(info[1]);
   ^~~~~~~~~~~~~
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../fs-ext.cc:20:
/root/.node-gyp/10.15.0/include/node/v8.h:2475:45: note: declared here
   V8_DEPRECATED("Use maybe version", double NumberValue() const);
                                             ^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../fs-ext.cc:320:60: warning: 'int64_t v8::Value::IntegerValue() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
 #define GET_OFFSET(a) ((a)->IsNumber() ? (a)->IntegerValue() : -1)
                                                            ^
../fs-ext.cc:334:16: note: in expansion of macro 'GET_OFFSET'
   off_t offs = GET_OFFSET(info[1]);
                ^~~~~~~~~~
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../fs-ext.cc:20:
/root/.node-gyp/10.15.0/include/node/v8.h:2476:46: note: declared here
   V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const);
                                              ^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../fs-ext.cc:335:36: warning: 'int32_t v8::Value::Int32Value() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
   int whence = info[2]->Int32Value();
                                    ^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../fs-ext.cc:20:
/root/.node-gyp/10.15.0/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../fs-ext.cc:339:56: warning: 'v8::Local<v8::Value> Nan::NanErrnoException(int, const char*, const char*, const char*)' is deprecated [-Wdeprecated-declarations]
     if (offs_result == -1) return Nan::ThrowError(Nan::NanErrnoException(errno));
                                                        ^~~~~~~~~~~~~~~~~
In file included from ../fs-ext.cc:27:0:
../../nan/nan.h:862:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> NanErrnoException(
                                              ^~~~~~~~~~~~~~~~~
../fs-ext.cc:339:79: warning: 'v8::Local<v8::Value> Nan::NanErrnoException(int, const char*, const char*, const char*)' is deprecated [-Wdeprecated-declarations]
     if (offs_result == -1) return Nan::ThrowError(Nan::NanErrnoException(errno));
                                                                               ^
In file included from ../fs-ext.cc:27:0:
../../nan/nan.h:862:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> NanErrnoException(
                                              ^~~~~~~~~~~~~~~~~
../fs-ext.cc: In function 'Nan::NAN_METHOD_RETURN_TYPE Fcntl(Nan::NAN_METHOD_ARGS_TYPE)':
../fs-ext.cc:369:32: warning: 'int32_t v8::Value::Int32Value() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
   int fd = info[0]->Int32Value();
                                ^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../fs-ext.cc:20:
/root/.node-gyp/10.15.0/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../fs-ext.cc:370:33: warning: 'int32_t v8::Value::Int32Value() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
   int cmd = info[1]->Int32Value();
                                 ^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../fs-ext.cc:20:
/root/.node-gyp/10.15.0/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../fs-ext.cc:371:33: warning: 'int32_t v8::Value::Int32Value() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
   int arg = info[2]->Int32Value();
                                 ^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../fs-ext.cc:20:
/root/.node-gyp/10.15.0/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../fs-ext.cc:375:51: warning: 'v8::Local<v8::Value> Nan::NanErrnoException(int, const char*, const char*, const char*)' is deprecated [-Wdeprecated-declarations]
     if (result == -1) return Nan::ThrowError(Nan::NanErrnoException(errno));
                                                   ^~~~~~~~~~~~~~~~~
In file included from ../fs-ext.cc:27:0:
../../nan/nan.h:862:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> NanErrnoException(
                                              ^~~~~~~~~~~~~~~~~
../fs-ext.cc:375:74: warning: 'v8::Local<v8::Value> Nan::NanErrnoException(int, const char*, const char*, const char*)' is deprecated [-Wdeprecated-declarations]
     if (result == -1) return Nan::ThrowError(Nan::NanErrnoException(errno));
                                                                          ^
In file included from ../fs-ext.cc:27:0:
../../nan/nan.h:862:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> NanErrnoException(
                                              ^~~~~~~~~~~~~~~~~
../fs-ext.cc: In function 'Nan::NAN_METHOD_RETURN_TYPE UTime(Nan::NAN_METHOD_ARGS_TYPE)':
../fs-ext.cc:423:45: warning: 'v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)' is deprecated: Use Isolate version [-Wdeprecated-declarations]
   String::Utf8Value path(info[0]->ToString());
                                             ^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../fs-ext.cc:20:
/root/.node-gyp/10.15.0/include/node/v8.h:2892:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../fs-ext.cc:424:40: warning: 'int64_t v8::Value::IntegerValue() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
   time_t atime = info[1]->IntegerValue();
                                        ^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../fs-ext.cc:20:
/root/.node-gyp/10.15.0/include/node/v8.h:2476:46: note: declared here
   V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const);
                                              ^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../fs-ext.cc:425:40: warning: 'int64_t v8::Value::IntegerValue() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
   time_t mtime = info[2]->IntegerValue();
                                        ^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../fs-ext.cc:20:
/root/.node-gyp/10.15.0/include/node/v8.h:2476:46: note: declared here
   V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const);
                                              ^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../fs-ext.cc:433:47: warning: 'v8::Local<v8::Value> Nan::NanErrnoException(int, const char*, const char*, const char*)' is deprecated [-Wdeprecated-declarations]
     if (ret != 0) return Nan::ThrowError(Nan::NanErrnoException(errno, "utime", "", *path));
                                               ^~~~~~~~~~~~~~~~~
In file included from ../fs-ext.cc:27:0:
../../nan/nan.h:862:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> NanErrnoException(
                                              ^~~~~~~~~~~~~~~~~
../fs-ext.cc:433:90: warning: 'v8::Local<v8::Value> Nan::NanErrnoException(int, const char*, const char*, const char*)' is deprecated [-Wdeprecated-declarations]
     if (ret != 0) return Nan::ThrowError(Nan::NanErrnoException(errno, "utime", "", *path));
                                                                                          ^
In file included from ../fs-ext.cc:27:0:
../../nan/nan.h:862:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> NanErrnoException(
                                              ^~~~~~~~~~~~~~~~~
../fs-ext.cc: In function 'Nan::NAN_METHOD_RETURN_TYPE StatVFS(Nan::NAN_METHOD_ARGS_TYPE)':
../fs-ext.cc:462:45: warning: 'v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)' is deprecated: Use Isolate version [-Wdeprecated-declarations]
   String::Utf8Value path(info[0]->ToString());
                                             ^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../fs-ext.cc:20:
/root/.node-gyp/10.15.0/include/node/v8.h:2892:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../fs-ext.cc:469:47: warning: 'v8::Local<v8::Value> Nan::NanErrnoException(int, const char*, const char*, const char*)' is deprecated [-Wdeprecated-declarations]
     if (ret != 0) return Nan::ThrowError(Nan::NanErrnoException(errno, "statvfs", "", *path));
                                               ^~~~~~~~~~~~~~~~~
In file included from ../fs-ext.cc:27:0:
../../nan/nan.h:862:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> NanErrnoException(
                                              ^~~~~~~~~~~~~~~~~
../fs-ext.cc:469:92: warning: 'v8::Local<v8::Value> Nan::NanErrnoException(int, const char*, const char*, const char*)' is deprecated [-Wdeprecated-declarations]
     if (ret != 0) return Nan::ThrowError(Nan::NanErrnoException(errno, "statvfs", "", *path));
                                                                                            ^
In file included from ../fs-ext.cc:27:0:
../../nan/nan.h:862:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> NanErrnoException(
                                              ^~~~~~~~~~~~~~~~~
fs-ext.target.mk:99: recipe for target 'Release/obj.target/fs-ext/fs-ext.o' failed
make: *** [Release/obj.target/fs-ext/fs-ext.o] Error 1
make: Leaving directory '/usr/local/lib/node_modules/homebridge-dafang/node_modules/fs-ext/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Linux 4.14.79-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge-dafang/node_modules/fs-ext
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 

> [email protected] install /usr/local/lib/node_modules/homebridge-dafang/node_modules/snappy
> node-gyp rebuild

make: Entering directory '/usr/local/lib/node_modules/homebridge-dafang/node_modules/snappy/build'
  CXX(target) Release/obj.target/snappy/deps/snappy/snappy-1.1.2/snappy-sinksource.o
  CXX(target) Release/obj.target/snappy/deps/snappy/snappy-1.1.2/snappy-stubs-internal.o
  CXX(target) Release/obj.target/snappy/deps/snappy/snappy-1.1.2/snappy.o
  AR(target) Release/obj.target/deps/snappy/snappy.a
  COPY Release/snappy.a
  CXX(target) Release/obj.target/binding/src/binding.o
In file included from ../../nan/nan.h:190:0,
                 from ../src/./binding.h:6,
                 from ../src/binding.cc:1:
../../nan/nan_maybe_43_inl.h: In function 'Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)':
../../nan/nan_maybe_43_inl.h:88:15: error: 'class v8::Object' has no member named 'ForceSet'
   return obj->ForceSet(GetCurrentContext(), key, value, attribs);
               ^~~~~~~~
In file included from ../src/./binding.h:6:0,
                 from ../src/binding.cc:1:
../../nan/nan.h: In function 'v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)':
../../nan/nan.h:817:60: warning: 'v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
         v8::Isolate::GetCurrent(), target, func, argc, argv);
                                                            ^
In file included from ../src/./binding.h:3:0,
                 from ../src/binding.cc:1:
/root/.node-gyp/10.15.0/include/node/node.h:177:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/root/.node-gyp/10.15.0/include/node/node.h:91:42: note: in definition of macro 'NODE_DEPRECATED'
     __attribute__((deprecated(message))) declarator
                                          ^~~~~~~~~~
In file included from ../src/./binding.h:6:0,
                 from ../src/binding.cc:1:
../../nan/nan.h: In function 'v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)':
../../nan/nan.h:831:62: warning: 'v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
         v8::Isolate::GetCurrent(), target, symbol, argc, argv);
                                                              ^
In file included from ../src/./binding.h:3:0,
                 from ../src/binding.cc:1:
/root/.node-gyp/10.15.0/include/node/node.h:170:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/root/.node-gyp/10.15.0/include/node/node.h:91:42: note: in definition of macro 'NODE_DEPRECATED'
     __attribute__((deprecated(message))) declarator
                                          ^~~~~~~~~~
In file included from ../src/./binding.h:6:0,
                 from ../src/binding.cc:1:
../../nan/nan.h: In function 'v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)':
../../nan/nan.h:845:62: warning: 'v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
         v8::Isolate::GetCurrent(), target, method, argc, argv);
                                                              ^
In file included from ../src/./binding.h:3:0,
                 from ../src/binding.cc:1:
/root/.node-gyp/10.15.0/include/node/node.h:163:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/root/.node-gyp/10.15.0/include/node/node.h:91:42: note: in definition of macro 'NODE_DEPRECATED'
     __attribute__((deprecated(message))) declarator
                                          ^~~~~~~~~~
In file included from ../src/./binding.h:6:0,
                 from ../src/binding.cc:1:
../../nan/nan.h: In member function 'v8::Local<v8::Value> Nan::Callback::Call_(v8::Isolate*, v8::Local<v8::Object>, int, v8::Local<v8::Value>*) const':
../../nan/nan.h:1463:5: warning: 'v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
     ));
     ^
In file included from ../src/./binding.h:3:0,
                 from ../src/binding.cc:1:
/root/.node-gyp/10.15.0/include/node/node.h:177:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/root/.node-gyp/10.15.0/include/node/node.h:91:42: note: in definition of macro 'NODE_DEPRECATED'
     __attribute__((deprecated(message))) declarator
                                          ^~~~~~~~~~
../src/binding.cc: In function 'Nan::NAN_METHOD_RETURN_TYPE nodesnappy::Compress(Nan::NAN_METHOD_ARGS_TYPE)':
../src/binding.cc:115:51: warning: 'v8::Local<v8::Object> v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
   if (node::Buffer::HasInstance(info[0]->ToObject())) {
                                                   ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/./binding.h:3,
                 from ../src/binding.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
../src/binding.cc:116:54: warning: 'v8::Local<v8::Object> v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
     v8::Local<v8::Object> object = info[0]->ToObject();
                                                      ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/./binding.h:3,
                 from ../src/binding.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
../src/binding.cc:121:53: warning: 'v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)' is deprecated: Use Isolate version [-Wdeprecated-declarations]
     v8::String::Utf8Value param1(info[0]->ToString());
                                                     ^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../src/./binding.h:3,
                 from ../src/binding.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:2892:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/binding.cc: In function 'Nan::NAN_METHOD_RETURN_TYPE nodesnappy::CompressSync(Nan::NAN_METHOD_ARGS_TYPE)':
../src/binding.cc:142:51: warning: 'v8::Local<v8::Object> v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
   if (node::Buffer::HasInstance(info[0]->ToObject())) {
                                                   ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/./binding.h:3,
                 from ../src/binding.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
../src/binding.cc:143:54: warning: 'v8::Local<v8::Object> v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
     v8::Local<v8::Object> object = info[0]->ToObject();
                                                      ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/./binding.h:3,
                 from ../src/binding.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
../src/binding.cc:148:53: warning: 'v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)' is deprecated: Use Isolate version [-Wdeprecated-declarations]
     v8::String::Utf8Value param1(info[0]->ToString());
                                                     ^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../src/./binding.h:3,
                 from ../src/binding.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:2892:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/binding.cc: In function 'Nan::NAN_METHOD_RETURN_TYPE nodesnappy::IsValidCompressed(Nan::NAN_METHOD_ARGS_TYPE)':
../src/binding.cc:161:52: warning: 'v8::Local<v8::Object> v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
   v8::Local<v8::Object> object = info[0]->ToObject();
                                                    ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/./binding.h:3,
                 from ../src/binding.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
../src/binding.cc: In function 'Nan::NAN_METHOD_RETURN_TYPE nodesnappy::IsValidCompressedSync(Nan::NAN_METHOD_ARGS_TYPE)':
../src/binding.cc:181:52: warning: 'v8::Local<v8::Object> v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
   v8::Local<v8::Object> object = info[0]->ToObject();
                                                    ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/./binding.h:3,
                 from ../src/binding.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
../src/binding.cc: In function 'Nan::NAN_METHOD_RETURN_TYPE nodesnappy::UncompressSync(Nan::NAN_METHOD_ARGS_TYPE)':
../src/binding.cc:218:52: warning: 'v8::Local<v8::Object> v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
   v8::Local<v8::Object> object = info[0]->ToObject();
                                                    ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/./binding.h:3,
                 from ../src/binding.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
binding.target.mk:104: recipe for target 'Release/obj.target/binding/src/binding.o' failed
make: *** [Release/obj.target/binding/src/binding.o] Error 1
make: Leaving directory '/usr/local/lib/node_modules/homebridge-dafang/node_modules/snappy/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Linux 4.14.79-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge-dafang/node_modules/snappy
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 

> [email protected] install /usr/local/lib/node_modules/homebridge-dafang/node_modules/leveldown
> prebuild --install

prebuild info begin Prebuild version 4.5.0
prebuild info looking for local prebuild @ prebuilds/leveldown-v1.4.6-node-v64-linux-arm.tar.gz
prebuild info looking for cached prebuild @ /root/.npm/_prebuilds/https-github.com-level-leveldown-releases-download-v1.4.6-leveldown-v1.4.6-node-v64-linux-arm.tar.gz
prebuild http request GET https://github.com/level/leveldown/releases/download/v1.4.6/leveldown-v1.4.6-node-v64-linux-arm.tar.gz
prebuild http 404 https://github.com/level/leveldown/releases/download/v1.4.6/leveldown-v1.4.6-node-v64-linux-arm.tar.gz
prebuild WARN install No prebuilt binaries found (target=v10.15.0 arch=arm platform=linux)
prebuild info install We will now try to compile from source.
prebuild verb starting node-gyp process 
prebuild verb execute node-gyp with `node index.js rebuild --target=v10.15.0 --target_arch=arm` 
gyp verb command rebuild []
prebuild verb ok 
gyp verb command clean []
gyp verb clean removing "build" directory
prebuild verb ok 
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` succeeded python2 /usr/bin/python2
gyp verb check python version `/usr/bin/python2 -c "import platform; print(platform.python_version());"` returned: "2.7.13\n"
gyp verb get node dir no --target version specified, falling back to host node version: 10.15.0
gyp verb command install [ '10.15.0' ]
gyp verb install input version string "10.15.0"
gyp verb install installing version: 10.15.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 10.15.0
gyp verb build dir attempting to create "build" dir: /usr/local/lib/node_modules/homebridge-dafang/node_modules/leveldown/build
gyp verb build dir "build" dir needed to be created? /usr/local/lib/node_modules/homebridge-dafang/node_modules/leveldown/build
gyp verb build/config.gypi creating config file
gyp sill build/config.gypi { target_defaults:
gyp sill build/config.gypi    { cflags: [],
gyp sill build/config.gypi      default_configuration: 'Release',
gyp sill build/config.gypi      defines: [],
gyp sill build/config.gypi      include_dirs: [],
gyp sill build/config.gypi      libraries: [] },
gyp sill build/config.gypi   variables:
gyp sill build/config.gypi    { arm_float_abi: 'hard',
gyp sill build/config.gypi      arm_fpu: 'vfpv3',
gyp sill build/config.gypi      arm_thumb: 0,
gyp sill build/config.gypi      arm_version: '7',
gyp sill build/config.gypi      asan: 0,
gyp sill build/config.gypi      build_v8_with_gn: false,
gyp sill build/config.gypi      coverage: false,
gyp sill build/config.gypi      debug_nghttp2: false,
gyp sill build/config.gypi      enable_lto: false,
gyp sill build/config.gypi      enable_pgo_generate: false,
gyp sill build/config.gypi      enable_pgo_use: false,
gyp sill build/config.gypi      force_dynamic_crt: 0,
gyp sill build/config.gypi      gas_version: '2.28',
gyp sill build/config.gypi      host_arch: 'ia32',
gyp sill build/config.gypi      icu_data_in: '../../deps/icu-small/source/data/in/icudt62l.dat',
gyp sill build/config.gypi      icu_endianness: 'l',
gyp sill build/config.gypi      icu_gyp_path: 'tools/icu/icu-generic.gyp',
gyp sill build/config.gypi      icu_locales: 'en,root',
gyp sill build/config.gypi      icu_path: 'deps/icu-small',
gyp sill build/config.gypi      icu_small: true,
gyp sill build/config.gypi      icu_ver_major: '62',
gyp sill build/config.gypi      llvm_version: 0,
gyp sill build/config.gypi      node_byteorder: 'little',
gyp sill build/config.gypi      node_debug_lib: false,
gyp sill build/config.gypi      node_enable_d8: false,
gyp sill build/config.gypi      node_enable_v8_vtunejit: false,
gyp sill build/config.gypi      node_install_npm: true,
gyp sill build/config.gypi      node_module_version: 64,
gyp sill build/config.gypi      node_no_browser_globals: false,
gyp sill build/config.gypi      node_prefix: '/',
gyp sill build/config.gypi      node_release_urlbase: 'https://nodejs.org/download/release/',
gyp sill build/config.gypi      node_shared: false,
gyp sill build/config.gypi      node_shared_cares: false,
gyp sill build/config.gypi      node_shared_http_parser: false,
gyp sill build/config.gypi      node_shared_libuv: false,
gyp sill build/config.gypi      node_shared_nghttp2: false,
gyp sill build/config.gypi      node_shared_openssl: false,
gyp sill build/config.gypi      node_shared_zlib: false,
gyp sill build/config.gypi      node_tag: '',
gyp sill build/config.gypi      node_target_type: 'executable',
gyp sill build/config.gypi      node_use_bundled_v8: true,
gyp sill build/config.gypi      node_use_dtrace: false,
gyp sill build/config.gypi      node_use_etw: false,
gyp sill build/config.gypi      node_use_large_pages: false,
gyp sill build/config.gypi      node_use_openssl: true,
gyp sill build/config.gypi      node_use_pch: false,
gyp sill build/config.gypi      node_use_perfctr: false,
gyp sill build/config.gypi      node_use_v8_platform: true,
gyp sill build/config.gypi      node_with_ltcg: false,
gyp sill build/config.gypi      node_without_node_options: false,
gyp sill build/config.gypi      openssl_fips: '',
gyp sill build/config.gypi      openssl_no_asm: 0,
gyp sill build/config.gypi      shlib_suffix: 'so.64',
gyp sill build/config.gypi      target_arch: 'arm',
gyp sill build/config.gypi      v8_enable_gdbjit: 0,
gyp sill build/config.gypi      v8_enable_i18n_support: 1,
gyp sill build/config.gypi      v8_enable_inspector: 1,
gyp sill build/config.gypi      v8_no_strict_aliasing: 1,
gyp sill build/config.gypi      v8_optimized_debug: 0,
gyp sill build/config.gypi      v8_promise_internal_field_count: 1,
gyp sill build/config.gypi      v8_random_seed: 0,
gyp sill build/config.gypi      v8_trace_maps: 0,
gyp sill build/config.gypi      v8_typed_array_max_size_in_heap: 0,
gyp sill build/config.gypi      v8_use_snapshot: true,
gyp sill build/config.gypi      want_separate_host_toolset: 1,
gyp sill build/config.gypi      nodedir: '/root/.node-gyp/10.15.0',
gyp sill build/config.gypi      copy_dev_lib: true,
gyp sill build/config.gypi      standalone_static_library: 1,
gyp sill build/config.gypi      target: 'v10.15.0',
gyp sill build/config.gypi      cache_lock_stale: '60000',
gyp sill build/config.gypi      ham_it_up: '',
gyp sill build/config.gypi      legacy_bundling: '',
gyp sill build/config.gypi      sign_git_tag: '',
gyp sill build/config.gypi      user_agent: 'npm/6.6.0 node/v10.15.0 linux arm',
gyp sill build/config.gypi      always_auth: '',
gyp sill build/config.gypi      bin_links: 'true',
gyp sill build/config.gypi      key: '',
gyp sill build/config.gypi      allow_same_version: '',
gyp sill build/config.gypi      description: 'true',
gyp sill build/config.gypi      fetch_retries: '2',
gyp sill build/config.gypi      heading: 'npm',
gyp sill build/config.gypi      if_present: '',
gyp sill build/config.gypi      init_version: '1.0.0',
gyp sill build/config.gypi      user: 'nobody',
gyp sill build/config.gypi      prefer_online: '',
gyp sill build/config.gypi      noproxy: '',
gyp sill build/config.gypi      force: '',
gyp sill build/config.gypi      only: '',
gyp sill build/config.gypi      read_only: '',
gyp sill build/config.gypi      cache_min: '10',
gyp sill build/config.gypi      init_license: 'ISC',
gyp sill build/config.gypi      editor: 'vi',
gyp sill build/config.gypi      rollback: 'true',
gyp sill build/config.gypi      tag_version_prefix: 'v',
gyp sill build/config.gypi      cache_max: 'Infinity',
gyp sill build/config.gypi      timing: '',
gyp sill build/config.gypi      userconfig: '/root/.npmrc',
gyp sill build/config.gypi      engine_strict: '',
gyp sill build/config.gypi      init_author_name: '',
gyp sill build/config.gypi      init_author_url: '',
gyp sill build/config.gypi      preid: '',
gyp sill build/config.gypi      tmp: '/tmp',
gyp sill build/config.gypi      depth: 'Infinity',
gyp sill build/config.gypi      package_lock_only: '',
gyp sill build/config.gypi      save_dev: '',
gyp sill build/config.gypi      usage: '',
gyp sill build/config.gypi      metrics_registry: 'https://registry.npmjs.org/',
gyp sill build/config.gypi      otp: '',
gyp sill build/config.gypi      package_lock: 'true',
gyp sill build/config.gypi      progress: 'true',
gyp sill build/config.gypi      https_proxy: '',
gyp sill build/config.gypi      save_prod: '',
gyp sill build/config.gypi      audit: 'true',
gyp sill build/config.gypi      cidr: '',
gyp sill build/config.gypi      onload_script: '',
gyp sill build/config.gypi      sso_type: 'oauth',
gyp sill build/config.gypi      rebuild_bundle: 'true',
gyp sill build/config.gypi      save_bundle: '',
gyp sill build/config.gypi      shell: '/bin/bash',
gyp sill build/config.gypi      dry_run: '',
gyp sill build/config.gypi      prefix: '/usr/local',
gyp sill build/config.gypi      scope: '',
gyp sill build/config.gypi      browser: '',
gyp sill build/config.gypi      cache_lock_wait: '10000',
gyp sill build/config.gypi      ignore_prepublish: '',
gyp sill build/config.gypi      registry: 'https://registry.npmjs.org/',
gyp sill build/config.gypi      save_optional: '',
gyp sill build/config.gypi      searchopts: '',
gyp sill build/config.gypi      versions: '',
gyp sill build/config.gypi      cache: '/root/.npm',
gyp sill build/config.gypi      send_metrics: '',
gyp sill build/config.gypi      global_style: '',
gyp sill build/config.gypi      ignore_scripts: '',
gyp sill build/config.gypi      version: '',
gyp sill build/config.gypi      local_address: '',
gyp sill build/config.gypi      viewer: 'man',
gyp sill build/config.gypi      node_gyp:
gyp sill build/config.gypi       '/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js',
gyp sill build/config.gypi      audit_level: 'low',
gyp sill build/config.gypi      prefer_offline: '',
gyp sill build/config.gypi      color: 'true',
gyp sill build/config.gypi      sign_git_commit: '',
gyp sill build/config.gypi      fetch_retry_mintimeout: '10000',
gyp sill build/config.gypi      maxsockets: '50',
gyp sill build/config.gypi      offline: '',
gyp sill build/config.gypi      sso_poll_frequency: '500',
gyp sill build/config.gypi      umask: '0022',
gyp sill build/config.gypi      fetch_retry_maxtimeout: '60000',
gyp sill build/config.gypi      logs_max: '10',
gyp sill build/config.gypi      message: '%s',
gyp sill build/config.gypi      global: 'true',
gyp sill build/config.gypi      ca: '',
gyp sill build/config.gypi      cert: '',
gyp sill build/config.gypi      link: '',
gyp sill build/config.gypi      access: '',
gyp sill build/config.gypi      also: '',
gyp sill build/config.gypi      save: 'true',
gyp sill build/config.gypi      unicode: 'true',
gyp sill build/config.gypi      unsafe_perm: 'true',
gyp sill build/config.gypi      long: '',
gyp sill build/config.gypi      production: '',
gyp sill build/config.gypi      searchlimit: '20',
gyp sill build/config.gypi      update_notifier: 'true',
gyp sill build/config.gypi      auth_type: 'legacy',
gyp sill build/config.gypi      node_version: '10.15.0',
gyp sill build/config.gypi      tag: 'latest',
gyp sill build/config.gypi      git_tag_version: 'true',
gyp sill build/config.gypi      commit_hooks: 'true',
gyp sill build/config.gypi      script_shell: '',
gyp sill build/config.gypi      shrinkwrap: 'true',
gyp sill build/config.gypi      fetch_retry_factor: '10',
gyp sill build/config.gypi      save_exact: '',
gyp sill build/config.gypi      strict_ssl: 'true',
gyp sill build/config.gypi      dev: '',
gyp sill build/config.gypi      globalconfig: '/usr/local/etc/npmrc',
gyp sill build/config.gypi      init_module: '/root/.npm-init.js',
gyp sill build/config.gypi      parseable: '',
gyp sill build/config.gypi      globalignorefile: '/usr/local/etc/npmignore',
gyp sill build/config.gypi      cache_lock_retries: '10',
gyp sill build/config.gypi      searchstaleness: '900',
gyp sill build/config.gypi      node_options: '',
gyp sill build/config.gypi      save_prefix: '^',
gyp sill build/config.gypi      scripts_prepend_node_path: 'warn-only',
gyp sill build/config.gypi      group: '1000',
gyp sill build/config.gypi      init_author_email: '',
gyp sill build/config.gypi      searchexclude: '',
gyp sill build/config.gypi      git: 'git',
gyp sill build/config.gypi      optional: 'true',
gyp sill build/config.gypi      json: '' } }
gyp verb build/config.gypi writing out config file: /usr/local/lib/node_modules/homebridge-dafang/node_modules/leveldown/build/config.gypi
gyp verb config.gypi checking for gypi file: /usr/local/lib/node_modules/homebridge-dafang/node_modules/leveldown/config.gypi
gyp verb common.gypi checking for gypi file: /usr/local/lib/node_modules/homebridge-dafang/node_modules/leveldown/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/usr/local/lib/node_modules/homebridge-dafang/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/homebridge-dafang/node_modules/leveldown/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/homebridge-dafang/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.node-gyp/10.15.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/root/.node-gyp/10.15.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/homebridge-dafang/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=node.lib',
gyp info spawn args   '-Dmodule_root_dir=/usr/local/lib/node_modules/homebridge-dafang/node_modules/leveldown',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
prebuild verb ok 
gyp verb command build []
gyp verb build type Release
gyp verb architecture arm
gyp verb node dev dir /root/.node-gyp/10.15.0
gyp verb `which` succeeded for `make` /usr/bin/make
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/usr/local/lib/node_modules/homebridge-dafang/node_modules/leveldown/build'
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/db/builder.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/db/db_impl.o
In file included from /usr/include/c++/6/algorithm:62:0,
                 from ../deps/leveldb/leveldb-1.18.0/db/db_impl.cc:7:
/usr/include/c++/6/bits/stl_algo.h: In function 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
/usr/include/c++/6/bits/stl_algo.h:1837:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >' will change in GCC 7.1
     __insertion_sort(_RandomAccessIterator __first,
     ^~~~~~~~~~~~~~~~
/usr/include/c++/6/bits/stl_algo.h:1837:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >' will change in GCC 7.1
/usr/include/c++/6/bits/stl_algo.h:1837:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >' will change in GCC 7.1
In file included from /usr/include/c++/6/bits/stl_algo.h:61:0,
                 from /usr/include/c++/6/algorithm:62,
                 from ../deps/leveldb/leveldb-1.18.0/db/db_impl.cc:7:
/usr/include/c++/6/bits/stl_heap.h: In function 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >; _Distance = int; _Tp = long long unsigned int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
/usr/include/c++/6/bits/stl_heap.h:209:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >' will change in GCC 7.1
     __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
     ^~~~~~~~~~~~~
In file included from /usr/include/c++/6/algorithm:62:0,
                 from ../deps/leveldb/leveldb-1.18.0/db/db_impl.cc:7:
/usr/include/c++/6/bits/stl_algo.h: In function 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
/usr/include/c++/6/bits/stl_algo.h:1937:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >' will change in GCC 7.1
     __introsort_loop(_RandomAccessIterator __first,
     ^~~~~~~~~~~~~~~~
/usr/include/c++/6/bits/stl_algo.h:1937:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >' will change in GCC 7.1
/usr/include/c++/6/bits/stl_algo.h:1951:4: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >' will change in GCC 7.1
    std::__introsort_loop(__cut, __last, __depth_limit, __comp);
    ^~~
/usr/include/c++/6/bits/stl_algo.h: In member function 'leveldb::Status leveldb::DBImpl::Recover(leveldb::VersionEdit*)':
/usr/include/c++/6/bits/stl_algo.h:1965:4: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >' will change in GCC 7.1
    std::__introsort_loop(__first, __last,
    ^~~
/usr/include/c++/6/bits/stl_algo.h:1882:4: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >' will change in GCC 7.1
    std::__insertion_sort(__first, __first + int(_S_threshold), __comp);
    ^~~
/usr/include/c++/6/bits/stl_algo.h:1887:2: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >' will change in GCC 7.1
  std::__insertion_sort(__first, __last, __comp);
  ^~~
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/db/db_iter.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/db/filename.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/db/dbformat.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/db/leveldb_main.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/db/log_reader.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/db/log_writer.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/db/memtable.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/db/repair.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/db/table_cache.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/db/version_edit.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/db/version_set.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/db/write_batch.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/helpers/memenv/memenv.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/table/block.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/table/block_builder.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/table/filter_block.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/table/format.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/table/iterator.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/table/merger.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/table/table.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/table/table_builder.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/table/two_level_iterator.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/util/arena.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/util/bloom.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/util/cache.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/util/coding.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/util/comparator.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/util/crc32c.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/util/env.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/util/filter_policy.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/util/hash.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/util/logging.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/util/options.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/util/status.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/port/port_posix.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.18.0/util/env_posix.o
  AR(target) Release/obj.target/deps/leveldb/leveldb.a
  COPY Release/leveldb.a
  CXX(target) Release/obj.target/snappy/deps/snappy/snappy-1.1.1/snappy-sinksource.o
  CXX(target) Release/obj.target/snappy/deps/snappy/snappy-1.1.1/snappy-stubs-internal.o
  CXX(target) Release/obj.target/snappy/deps/snappy/snappy-1.1.1/snappy.o
  AR(target) Release/obj.target/deps/snappy/snappy.a
  COPY Release/snappy.a
  CXX(target) Release/obj.target/leveldown/src/batch.o
In file included from ../../nan/nan.h:190:0,
                 from ../src/batch.cc:3:
../../nan/nan_maybe_43_inl.h: In function 'Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)':
../../nan/nan_maybe_43_inl.h:88:15: error: 'class v8::Object' has no member named 'ForceSet'
   return obj->ForceSet(GetCurrentContext(), key, value, attribs);
               ^~~~~~~~
In file included from ../src/batch.cc:3:0:
../../nan/nan.h: In function 'v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)':
../../nan/nan.h:817:60: warning: 'v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
         v8::Isolate::GetCurrent(), target, func, argc, argv);
                                                            ^
In file included from ../src/batch.cc:1:0:
/root/.node-gyp/10.15.0/include/node/node.h:177:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/root/.node-gyp/10.15.0/include/node/node.h:91:42: note: in definition of macro 'NODE_DEPRECATED'
     __attribute__((deprecated(message))) declarator
                                          ^~~~~~~~~~
In file included from ../src/batch.cc:3:0:
../../nan/nan.h: In function 'v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)':
../../nan/nan.h:831:62: warning: 'v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
         v8::Isolate::GetCurrent(), target, symbol, argc, argv);
                                                              ^
In file included from ../src/batch.cc:1:0:
/root/.node-gyp/10.15.0/include/node/node.h:170:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/root/.node-gyp/10.15.0/include/node/node.h:91:42: note: in definition of macro 'NODE_DEPRECATED'
     __attribute__((deprecated(message))) declarator
                                          ^~~~~~~~~~
In file included from ../src/batch.cc:3:0:
../../nan/nan.h: In function 'v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)':
../../nan/nan.h:845:62: warning: 'v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
         v8::Isolate::GetCurrent(), target, method, argc, argv);
                                                              ^
In file included from ../src/batch.cc:1:0:
/root/.node-gyp/10.15.0/include/node/node.h:163:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/root/.node-gyp/10.15.0/include/node/node.h:91:42: note: in definition of macro 'NODE_DEPRECATED'
     __attribute__((deprecated(message))) declarator
                                          ^~~~~~~~~~
In file included from ../src/batch.cc:3:0:
../../nan/nan.h: In member function 'v8::Local<v8::Value> Nan::Callback::Call_(v8::Isolate*, v8::Local<v8::Object>, int, v8::Local<v8::Value>*) const':
../../nan/nan.h:1463:5: warning: 'v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
     ));
     ^
In file included from ../src/batch.cc:1:0:
/root/.node-gyp/10.15.0/include/node/node.h:177:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/root/.node-gyp/10.15.0/include/node/node.h:91:42: note: in definition of macro 'NODE_DEPRECATED'
     __attribute__((deprecated(message))) declarator
                                          ^~~~~~~~~~
In file included from ../src/database.h:18:0,
                 from ../src/batch.cc:5:
../src/leveldown.h: In function 'size_t StringOrBufferLength(v8::Local<v8::Value>)':
../src/leveldown.h:16:26: warning: 'v8::Local<v8::Object> v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
   return (!obj->ToObject().IsEmpty()
                          ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/batch.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
In file included from ../src/database.h:18:0,
                 from ../src/batch.cc:5:
../src/leveldown.h:17:48: warning: 'v8::Local<v8::Object> v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
     && node::Buffer::HasInstance(obj->ToObject()))
                                                ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/batch.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
In file included from ../src/database.h:18:0,
                 from ../src/batch.cc:5:
../src/leveldown.h:18:42: warning: 'v8::Local<v8::Object> v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
     ? node::Buffer::Length(obj->ToObject())
                                          ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/batch.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
In file included from ../src/batch.cc:8:0:
../src/common.h: In function 'uint32_t leveldown::UInt32OptionValue(v8::Local<v8::Object>, const char*, uint32_t)':
../src/common.h:32:38: warning: 'uint32_t v8::Value::Uint32Value() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
     ? options->Get(key)->Uint32Value()
                                      ^
In file included from /root/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../src/batch.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:2477:47: note: declared here
   V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);
                                               ^
/root/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/batch.cc: In static member function 'static Nan::NAN_METHOD_RETURN_TYPE leveldown::Batch::New(Nan::NAN_METHOD_ARGS_TYPE)':
../src/batch.cc:42:76: warning: 'v8::Local<v8::Object> v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
   Database* database = Nan::ObjectWrap::Unwrap<Database>(info[0]->ToObject());
                                                                            ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/batch.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
../src/batch.cc: In static member function 'static v8::Local<v8::Value> leveldown::Batch::NewInstance(v8::Local<v8::Object>, v8::Local<v8::Object>)':
../src/batch.cc:71:69: error: no matching function for call to 'v8::Function::NewInstance(int, v8::Local<v8::Value> [1])'
     instance = constructorHandle->GetFunction()->NewInstance(1, argv);
                                                                     ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/batch.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:3993:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^~~~~~~~~~~
/root/.node-gyp/10.15.0/include/node/v8.h:3993:44: note:   candidate expects 3 arguments, 2 provided
/root/.node-gyp/10.15.0/include/node/v8.h:3996:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^~~~~~~~~~~
/root/.node-gyp/10.15.0/include/node/v8.h:3996:44: note:   candidate expects 1 argument, 2 provided
../src/batch.cc:74:69: error: no matching function for call to 'v8::Function::NewInstance(int, v8::Local<v8::Value> [2])'
     instance = constructorHandle->GetFunction()->NewInstance(2, argv);
                                                                     ^
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/batch.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:3993:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^~~~~~~~~~~
/root/.node-gyp/10.15.0/include/node/v8.h:3993:44: note:   candidate expects 3 arguments, 2 provided
/root/.node-gyp/10.15.0/include/node/v8.h:3996:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^~~~~~~~~~~
/root/.node-gyp/10.15.0/include/node/v8.h:3996:44: note:   candidate expects 1 argument, 2 provided
In file included from ../src/database.h:18:0,
                 from ../src/batch.cc:5:
../src/batch.cc: In static member function 'static Nan::NAN_METHOD_RETURN_TYPE leveldown::Batch::Put(Nan::NAN_METHOD_ARGS_TYPE)':
../src/leveldown.h:53:30: warning: 'v8::Local<v8::Object> v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
   } else if (!from->ToObject().IsEmpty()                                       \
                              ^
../src/batch.cc:86:3: note: in expansion of macro 'LD_STRING_OR_BUFFER_TO_SLICE'
   LD_STRING_OR_BUFFER_TO_SLICE(key, keyBuffer, key)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/batch.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
In file included from ../src/database.h:18:0,
                 from ../src/batch.cc:5:
../src/leveldown.h:54:51: warning: 'v8::Local<v8::Object> v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
       && node::Buffer::HasInstance(from->ToObject())) {                        \
                                                   ^
../src/batch.cc:86:3: note: in expansion of macro 'LD_STRING_OR_BUFFER_TO_SLICE'
   LD_STRING_OR_BUFFER_TO_SLICE(key, keyBuffer, key)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/batch.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
In file included from ../src/database.h:18:0,
                 from ../src/batch.cc:5:
../src/leveldown.h:55:53: warning: 'v8::Local<v8::Object> v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
     to ## Sz_ = node::Buffer::Length(from->ToObject());                        \
                                                     ^
../src/batch.cc:86:3: note: in expansion of macro 'LD_STRING_OR_BUFFER_TO_SLICE'
   LD_STRING_OR_BUFFER_TO_SLICE(key, keyBuffer, key)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/batch.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
In file included from ../src/database.h:18:0,
                 from ../src/batch.cc:5:
../src/leveldown.h:56:51: warning: 'v8::Local<v8::Object> v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
     to ## Ch_ = node::Buffer::Data(from->ToObject());                          \
                                                   ^
../src/batch.cc:86:3: note: in expansion of macro 'LD_STRING_OR_BUFFER_TO_SLICE'
   LD_STRING_OR_BUFFER_TO_SLICE(key, keyBuffer, key)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/batch.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
In file included from ../src/database.h:18:0,
                 from ../src/batch.cc:5:
../src/leveldown.h:53:30: warning: 'v8::Local<v8::Object> v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
   } else if (!from->ToObject().IsEmpty()                                       \
                              ^
../src/batch.cc:87:3: note: in expansion of macro 'LD_STRING_OR_BUFFER_TO_SLICE'
   LD_STRING_OR_BUFFER_TO_SLICE(value, valueBuffer, value)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/batch.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
In file included from ../src/database.h:18:0,
                 from ../src/batch.cc:5:
../src/leveldown.h:54:51: warning: 'v8::Local<v8::Object> v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
       && node::Buffer::HasInstance(from->ToObject())) {                        \
                                                   ^
../src/batch.cc:87:3: note: in expansion of macro 'LD_STRING_OR_BUFFER_TO_SLICE'
   LD_STRING_OR_BUFFER_TO_SLICE(value, valueBuffer, value)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/batch.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
In file included from ../src/database.h:18:0,
                 from ../src/batch.cc:5:
../src/leveldown.h:55:53: warning: 'v8::Local<v8::Object> v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
     to ## Sz_ = node::Buffer::Length(from->ToObject());                        \
                                                     ^
../src/batch.cc:87:3: note: in expansion of macro 'LD_STRING_OR_BUFFER_TO_SLICE'
   LD_STRING_OR_BUFFER_TO_SLICE(value, valueBuffer, value)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/batch.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
In file included from ../src/database.h:18:0,
                 from ../src/batch.cc:5:
../src/leveldown.h:56:51: warning: 'v8::Local<v8::Object> v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
     to ## Ch_ = node::Buffer::Data(from->ToObject());                          \
                                                   ^
../src/batch.cc:87:3: note: in expansion of macro 'LD_STRING_OR_BUFFER_TO_SLICE'
   LD_STRING_OR_BUFFER_TO_SLICE(value, valueBuffer, value)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/batch.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
In file included from ../src/database.h:18:0,
                 from ../src/batch.cc:5:
../src/batch.cc: In static member function 'static Nan::NAN_METHOD_RETURN_TYPE leveldown::Batch::Del(Nan::NAN_METHOD_ARGS_TYPE)':
../src/leveldown.h:53:30: warning: 'v8::Local<v8::Object> v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
   } else if (!from->ToObject().IsEmpty()                                       \
                              ^
../src/batch.cc:105:3: note: in expansion of macro 'LD_STRING_OR_BUFFER_TO_SLICE'
   LD_STRING_OR_BUFFER_TO_SLICE(key, keyBuffer, key)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/batch.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
In file included from ../src/database.h:18:0,
                 from ../src/batch.cc:5:
../src/leveldown.h:54:51: warning: 'v8::Local<v8::Object> v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
       && node::Buffer::HasInstance(from->ToObject())) {                        \
                                                   ^
../src/batch.cc:105:3: note: in expansion of macro 'LD_STRING_OR_BUFFER_TO_SLICE'
   LD_STRING_OR_BUFFER_TO_SLICE(key, keyBuffer, key)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/batch.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
In file included from ../src/database.h:18:0,
                 from ../src/batch.cc:5:
../src/leveldown.h:55:53: warning: 'v8::Local<v8::Object> v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
     to ## Sz_ = node::Buffer::Length(from->ToObject());                        \
                                                     ^
../src/batch.cc:105:3: note: in expansion of macro 'LD_STRING_OR_BUFFER_TO_SLICE'
   LD_STRING_OR_BUFFER_TO_SLICE(key, keyBuffer, key)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/batch.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
In file included from ../src/database.h:18:0,
                 from ../src/batch.cc:5:
../src/leveldown.h:56:51: warning: 'v8::Local<v8::Object> v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
     to ## Ch_ = node::Buffer::Data(from->ToObject());                          \
                                                   ^
../src/batch.cc:105:3: note: in expansion of macro 'LD_STRING_OR_BUFFER_TO_SLICE'
   LD_STRING_OR_BUFFER_TO_SLICE(key, keyBuffer, key)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/batch.cc:1:
/root/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
leveldown.target.mk:111: recipe for target 'Release/obj.target/leveldown/src/batch.o' failed
make: *** [Release/obj.target/leveldown/src/batch.o] Error 1
make: Leaving directory '/usr/local/lib/node_modules/homebridge-dafang/node_modules/leveldown/build'
prebuild ERR! build error 
prebuild ERR! stack Error: `make` failed with exit code: 2
prebuild ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/homebridge-dafang/node_modules/node-gyp/lib/build.js:276:23)
prebuild ERR! stack     at ChildProcess.emit (events.js:182:13)
prebuild ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
prebuild ERR! not ok 
prebuild ERR! build Error: `make` failed with exit code: 2
prebuild ERR! build     at ChildProcess.onExit (/usr/local/lib/node_modules/homebridge-dafang/node_modules/node-gyp/lib/build.js:276:23)
prebuild ERR! build     at ChildProcess.emit (events.js:182:13)
prebuild ERR! build     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)

> [email protected] install /usr/local/lib/node_modules/homebridge-dafang/node_modules/zmq
> node-gyp rebuild

make: Entering directory '/usr/local/lib/node_modules/homebridge-dafang/node_modules/zmq/build'
  CXX(target) Release/obj.target/zmq/binding.o
../binding.cc:28:17: fatal error: zmq.h: No such file or directory
 #include <zmq.h>
                 ^
compilation terminated.
zmq.target.mk:99: recipe for target 'Release/obj.target/zmq/binding.o' failed
make: *** [Release/obj.target/zmq/binding.o] Error 1
make: Leaving directory '/usr/local/lib/node_modules/homebridge-dafang/node_modules/zmq/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Linux 4.14.79-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge-dafang/node_modules/zmq
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/homebridge-dafang/node_modules/fs-ext):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp configure build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/homebridge-dafang/node_modules/snappy):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/homebridge-dafang/node_modules/leveldown):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `prebuild --install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 2
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/homebridge-dafang/node_modules/zmq):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

Homekit Switches not working

The HomeKit switches do not seem to work. I have set up the "Capture Image, Night Vision, Restart Cam, Record Video, Horizontal Left, etc" switches in my configuration but they don't seem to work.

This is my config:

{
"cameraName": "Front Entrance Cam",
"cameraRTSPStreamUrl": "rtsp://192.168.1.24:8554/unicast",
"mqttTopic": "myhome/WyzecamPanEntrance/#",
"disableStream": true,
"segmentLength": 120,
"maxDirSize": 28672,
"recordingFilenameFormat": "HH-mm-ss-D-M-YYYY",
"checkStorageSizeInterval": 300,
"folder": "/Users/Lay/Movies/Cameras",
"accessories": [
{
"name": "Front Entrance Motion",
"type": "richMotionSensor",
"threshold": 82000
},
{
"name": "Night Vision Switch Front Entrance",
"type": "nightVisionSwitch"
},
{
"name": "Record Video Front Entrance",
"type": "recordVideo"
},
{
"name": "Capture Image Front Entrance",
"type": "captureImage"
},
{
"name": "Restart Front Entrance Camera",
"type": "restartSwitch"
},
{
"name": "Motion Tracking Front Entrance Camera",
"type": "autoMotionTrackingSwitch"
},
{
"name": "Horizontal Left",
"type": "moveCamera",
"axis": "horizontal",
"direction": "left"
},
{
"name": "Horizontal Right",
"type": "moveCamera",
"axis": "horizontal",
"direction": "right"
},
{
"name": "Vertical Up",
"type": "moveCamera",
"axis": "vertical",
"direction": "up"
},
{
"name": "Vertical Down",
"type": "moveCamera",
"axis": "vertical",
"direction": "down"
},
{
"name": "Recalibrate Motor",
"type": "recalibrateSwitch"
}
]
}

When I press either of the switches in the home app, the MQTT server does register the request but nothing happens. The below screenshot shows this
Screenshot 2019-05-08 at 6 54 14 PM

Kindly help

[BUG] - Rich Notifications Don't Work On iOS 13

Describe the bug

Since upgrading to the iOS 13 betas, motion sensor notifications no longer include still images from the camera in a room as a rich notification. This has persisted from beta 1-6.

Home hubs are Apple TV HD / Apple TV 4k, both running tvOS13 Beta 6.

Expected behavior

On iOS 12.x, when notifications were enabled for motion sensors, it would include a still image from the camera in the room as a rich notification.

Config

{
"platform": "Dafang",
"mqtt": {
"hostBroker": true,
"port": 1883,
"host": "localhost",
"debug": false,
"mongoUrl": "mongodb://localhost:27017/mqtt"
},
"cameras": [
{
"cameraName": "Kitchen Camera",
"cameraRTSPStreamUrl": "rtsp://address/unicast",
"mqttTopic": "Name/KitchenCamera/#",
"folder": "/Users/name/Documents/Camera/Recordings",
"accessories": [
{
"name": "Kitchen Motion Sensor",
"type": "richMotionSensor",
"threshold": 200000
},
{
"name": "Kitchen Auto Motion Tracking Switch",
"type": "autoMotionTrackingSwitch"
},
{
"name": "Kitchen Night Vision Sensor",
"type": "nightVisionSensor",
"threshold": 0
},
{
"name": "Kitchen Night Vision Switch",
"type": "nightVisionSwitch"
},
{
"name": "Kitchen Auto Night Vision Switch",
"type": "autoNightVisionSwitch"
},
{
"name": "Kitchen Record Video",
"type": "recordVideo"
},
{
"name": "Kitchen Record Audio",
"type": "recordAudio"
},
{
"name": "Kitchen Capture Image",
"type": "captureImage"
},
{
"name": "Kitchen Reset Streaming",
"type": "resetFFMPEG"
},
{
"name": "Kitchen Camera Brightness",
"type": "brightness"
}
],
"videoConfig": {
"source": "-rtsp_transport tcp -i rtsp://address/unicast",
"stillImageSource": "-rtsp_transport tcp -i rtsp://address/unicast -vframes 1 -r 1",
"maxStreams": 5,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 25,
"vcodec": "h264",
"packetSize": 752,
"maxBitrate": 512,
"debug": true,
"audio": false,
"additionalCommandline": "-x264-params "intra-refresh=1:bframes=0""
}
},

Logs

I didn't enabled debugging, as it appears this issue is on the iOS side of things. My Mac mini currently running 10.14.6 still receives images in motion sensor notifications, as well as my wife's iPhone running iOS 12.4.

Desktop (please complete the following information):

  • macOS 10.14.6
  • Node Version 6.9.0

[BUG] - Motion Détection don't work

Good morning everyone, congratulations on your work, fantastic!
I installed the hack on the cam and the plug in and it seems to work well: the video and the accessories to record audio and video. Motion Detection and Motion Detection with notification do not work for me.

[7/4/2020, 14:59:11] [Dafang] MQTT Server Publish : $SYS/pbpaEzd/new/clients : mosqpub|6434-Ingresso
[7/4/2020, 14:59:11] [Dafang] MQTT Server Publish : MyHouse/CameraIngresso/rtsp_h264_server : ON
[7/4/2020, 14:59:11] [Dafang] MQTT Server Publish : $SYS/pbpaEzd/disconnect/clients : mosqpub|6434-Ingresso

[BUG] - Install on macOS - sub-dependency nan "ForceSet"

When installing on macOS Mojave I get errors for a couple of the sub-dependencies:

../../nan/nan_maybe_43_inl.h:88:15: error: no member named 'ForceSet' in 'v8::Object'

It appears that this is related to using Node 11, and these sub-dependencies requiring too old a version of nan.

MQTT Help

I have my camera all setup and working with homebridge-camera-ffmpeg but want to move over to this plugin so that I can use the motion detection.

The bit I'm stuck on is MQTT, I don't have a broker and it seems that the plugin hosts one for you? I'm just confused by the mongodb bit, what do I need to setup within the database in order for it to work?

Mark

FFmpeg issues and windows directory.

Hi all,

Currently trying to transition my setup of my hacked Xiaofang from using homebridge-ffmpeg to this as it allows for much better control of the camera, but I've run into a few issues.

At the moment whenever I try and stream from the camera the console will always spit out a FFmpeg exited with code 1 and the stream will fail to load. I haven't had this issue with homebridge-ffmpeg, so I'm not too sure where I've gone wrong. I've attached the config down below.

Here is the full error:

[2018-12-6 23:38:24] [Dafang] Start streaming video from XiaoFang with 1280x720@200kBit
ffmpeg -rtsp_transport tcp -i rtsp://root:[email protected]:8554/unicast -map 0:0 -vcodec h264 -pix_fmt yuv420p -r 15 -f rawvideo -tune zerolatency -vf scale=1280:720 -b:v 200k -bufsize 200k -maxrate 200k -payload_type 99 -ssrc 12344156 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params 1bhz+/cqXSwvd8nTZWupdlhND+LxQfeH0T9pQmQ6 srtp://192.168.0.126:54996?rtcpport=54996&localrtcpport=54996&pkt_size=752 -map 0:1 -acodec libfdk_aac -profile:a aac_eld -flags +global_header -f null -ar 16k -b:a 24k -bufsize 24k -ac 1 -payload_type 110 -ssrc 1269516 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params tF+nWT3bzXj/vLFy/qW8ThfKd6mSemN4Z5bwNvyi srtp://192.168.0.126:64875?rtcpport=64875&localrtcpport=64875&pkt_size=752
[2018-12-6 23:38:26] [Dafang] ERROR: FFmpeg exited with code 1

Another issue is that I'm not too sure how to translate a windows directory to absolute path to save the recordings. Currently I've just glossed over it and had something random but obviously I can't save anything.

My homebridge setup is currently running on our media PC which runs on windows 10, so any help would be greatly appreciated!

{
	"bridge": {
		"name": "Homebridge",
		"username": "CC:22:3D:E3:CE:30",
		"port": 51826,
		"pin": "222-22-222"
	},

	"description": "This is an example configuration file with one fake accessory and one fake platform. You can use this as a template for creating your own configuration file containing devices you actually own.",

	"platforms": [{
			"platform": "AqaraPlatform",
			"sid": ["34ce008be6d5"],
			"password": ["qb5mefe7d5tssmy1"],
			"fakeLightBulbForLightSwitch": true
		},
		{

			"platform": "Dafang",

			"mqtt": {
				"hostBroker": true,
				"port": 1883,
				"host": "localhost",
				"debug": true,
				"mongoUrl": "mongodb://localhost:27017/mqtt"
			},
			"cameras": [{
					"cameraName": "XiaoFang",
					"cameraRTSPStreamUrl": "rtsp://192.168.0.143:8554/unicast",
					"mqttTopic": "myhome/dafang/#",
					"folder": "test/recordings",
					"accessories": [{
							"name": "Motion Sensor",
							"type": "richMotionSensor",
							"threshold": 300000
						},
						{
							"name": "Auto Motion Tracking Switch",
							"type": "autoMotionTrackingSwitch"
						},
						{
							"name": "Night Vision Sensor",
							"type": "nightVisionSensor",
							"threshold": 0
						},
						{
							"name": "Night Vision Switch",
							"type": "nightVisionSwitch"
						},
						{
							"name": "Auto Night Vision Switch",
							"type": "autoNightVisionSwitch"
						},
						{
							"name": "Record Video",
							"type": "recordVideo"
						},
						{
							"name": "Record Audio",
							"type": "recordAudio"

						},
						{
							"name": "Capture Image",
							"type": "captureImage"
						},
						{
							"name": "Clear Storage Switch",
							"type": "clearStorage"
						},
						{
							"name": "Reset Streaming",
							"type": "resetFFMPEG"
						},
						{
							"name": "Camera Brightness",
							"type": "brightness"
						}

					],
					"videoConfig": {

						"source": "-rtsp_transport tcp -i rtsp://root:[email protected]:8554/unicast",
						"stillImageSource": "-rtsp_transport tcp -i rtsp://root:[email protected]:8554/unicast -vframes 1 -r 1",
						"maxStreams": 5,
						"maxWidth": 1280,
						"maxHeight": 720,
						"maxFPS": 15,
						"vcodec": "h264",
						"packetSize": 752,
						"maxBitrate": 200,
						"debug": true
					}

				}]
			}

		]


	}

[BUG] - ffmpeg exited with code 1

FFmpeg errors out when trying to view the stream. I am able to view the stream with the same camera using homebridge-camera-ffmpeg. I compared the how both are starting the stream and the only difference seems to be "-vf scale=1280:720" while using dafang plugin.

homebridge-dafang
ffmpeg -i rtsp://192.168.1.110:8554/unicast -map 0:0 -vcodec copy -pix_fmt yuv420p -r 15 -f rawvideo -fflags +genpts+discardcorrupt -vf scale=1280:720 -b:v 299k -bufsize 299k -maxrate 299k -payload_type 99 -ssrc 8856484 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params w9Dkt+stdHMs8zvNkhl8izPxN93YgJzefq+Ot+bS srtp://192.168.1.120:55571?rtcpport=55571&localrtcpport=55571&pkt_size=1316

homebridge-camera-ffmpeg
ffmpeg -i rtsp://192.168.1.110:8554/unicast -map 0:0 -vcodec copy -pix_fmt yuv420p -r 15 -f rawvideo -fflags +genpts+discardcorrupt -b:v 299k -bufsize 299k -maxrate 299k -payload_type 99 -ssrc 1222423 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params MXrm3B4GnA+FA4nY6j2YixqPu96AZaQvRVfDX6Jx srtp://192.168.1.120:54565?rtcpport=54565&localrtcpport=54565&pkt_size=1316 -loglevel debug

I've attached my config.json
config.txt

[BUG] - MQTT client disconnects

Describe the bug
Looking at the scrolling log of Homebridge, I see a message about client disconnects
$SYS/9F6k1ya/disconnect/clients

Expected behavior
I'm not sure if this is normal behavior or not

Config

"platform": "Dafang",
"mqtt":{
"hostBroker": true,
"port": 1883,
"host": "localhost",
"debug": true,
"mongoUrl": "mongodb://localhost:27017/mqtt"
},
"cameras": [{
"cameraName": "Family",
"cameraRTSPStreamUrl": "rtsp://192.168.1.239:8554/unicast",
"mqqtTopic": "Inside/Family/#",
"disableStream": false,
"accessories": [
{
"name": "Family Motion Sensor",
"type": "richMotionSensor",
"threshold": 300000
},
{
"name": "Family Auto Motion Tracking Switch",
"type": "autoMotionTrackingSwitch"
},
{
"name": "Horizontal Left",
"type": "moveCamera",
"axis": "horizontal",
"direction": "left"
},
{
"name": "Horizontal Right",
"type": "moveCamera",
"axis": "horizontal",
"direction": "right"
},
{
"name": "Vertical Up",
"type": "moveCamera",
"axis": "vertical",
"direction": "up"
},
{
"name": "Vertical Down",
"type": "moveCamera",
"axis": "vertical",
"direction": "down"
},
{
"name": "Motion Detection Switch",
"type": "motionDetection"
},
{
"name": "Recalibrate Switch",
"type": "recalibrateSwitch"
},
{
"name": "Restart Switch",
"type": "restartSwitch"
}
],
"videoConfig": {
"source": "-rtsp_transport tcp -i rtsp://192.168.1.239:8554/unicast",
"stillImageSource": "-rtsp_transport tcp -i rtsp://192.168.1.239:8554/unicast -vframes 1 -r 1",
"maxStreams": 5,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 25,
"vcodec": "h264",
"debug": true,
"audio": false
}
},
{
"cameraName": "Garage Cam",
"cameraRTSPStreamUrl": "rtsp://192.168.1.23:8554/unicast",
"mqttTopic": "Outside/Garage/#",
"disableStream": false,
"accessories": [
{
"name": "Garage Cam Motion Sensor",
"type": "richMotionSensor",
"threshold": 300000
},
{
"name": "Garage Motion Detection",
"type": "motionDetection"
},
{
"name": "Restart Camera",
"type": "restartSwitch"
}
],
"videoconfig": {
"source": "-rtsp_transport tcp -i rtsp://192.168.1.23:8554/unicode",
"stillImageSource": "-rtsp_transport tcp -i rtsp://192.168.1.23:8554/unicast -vframes 1 -r 1",
"maxStreams": 5,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 25,
"vcodec": "h264",
"debug": true,
"audio": false

Logs

[2019-1-22 16:17:43] [Dafang] MQTT Server Publish : $SYS/jKMkHtC/disconnect/clients : mosqpub|24533-Garage
[2019-1-22 16:17:43] [Dafang] MQTT Server Publish : $SYS/jKMkHtC/new/clients : mosqpub|24538-Garage
[2019-1-22 16:17:43] [Dafang] MQTT Server Publish : Outside/Garage/motion/send_mail :
[2019-1-22 16:17:43] [Dafang] MQTT Server Publish : $SYS/jKMkHtC/disconnect/clients : mosqpub|24538-Garage
[2019-1-22 16:17:43] [Dafang] MQTT Server Publish : $SYS/jKMkHtC/new/clients : mosqpub|24543-Garage
[2019-1-22 16:17:43] [Dafang] MQTT Server Publish : Outside/Garage/motion/send_telegram : OFF
[2019-1-22 16:17:43] [Dafang] MQTT Server Publish : $SYS/jKMkHtC/disconnect/clients : mosqpub|24543-Garage
[2019-1-22 16:17:43] [Dafang] MQTT Server Publish : $SYS/jKMkHtC/new/clients : mosqpub|24546-Garage
[2019-1-22 16:17:43] [Dafang] MQTT Server Publish : Outside/Garage/motion/tracking : OFF
[2019-1-22 16:17:43] [Dafang] MQTT Server Publish : $SYS/jKMkHtC/disconnect/clients : mosqpub|24546-Garage
[2019-1-22 16:17:43] [Dafang] MQTT Server Publish : $SYS/jKMkHtC/new/clients : mosqpub|24553-Garage
[2019-1-22 16:17:43] [Dafang] MQTT Server Publish : Outside/Garage/motors/vertical : 0
[2019-1-22 16:17:43] [Dafang] MQTT Server Publish : $SYS/jKMkHtC/disconnect/clients : mosqpub|24553-Garage
[2019-1-22 16:17:43] [Dafang] MQTT Server Publish : $SYS/jKMkHtC/new/clients : mosqpub|24560-Garage
[2019-1-22 16:17:43] [Dafang] MQTT Server Publish : Outside/Garage/motors/horizontal : 0
[2019-1-22 16:17:43] [Dafang] MQTT Server Publish : $SYS/jKMkHtC/disconnect/clients : mosqpub|24560-Garage
[2019-1-22 16:17:43] [Dafang] MQTT Server Publish : $SYS/jKMkHtC/new/clients : mosqpub|24592-Garage
[2019-1-22 16:17:43] [Dafang] MQTT Server Publish : $SYS/jKMkHtC/disconnect/clients : mosqpub|24592-Garage
[2019-1-22 16:17:43] [Dafang] MQTT Server Publish : Outside/Garage : {"uptime":" 04:17:43 up 10:50, 0 users, load average: 2.16, 2.05, 2.05", "ssid":"Finchbyrd", "bitrate":"72.2 Mb/s", "signal_level":"94%", "link_quality":"89%", "noise_level":"0%" }
[2019-1-22 16:17:48] [Dafang] MQTT Server Publish : $SYS/jKMkHtC/new/clients : mosqpub|20973-Family
[2019-1-22 16:17:48] [Dafang] MQTT Server Publish : Inside/Family/leds/blue : ON
[2019-1-22 16:17:48] [Dafang] MQTT Server Publish : $SYS/jKMkHtC/disconnect/clients : mosqpub|20973-Family
[2019-1-22 16:17:48] [Dafang] MQTT Server Publish : $SYS/jKMkHtC/new/clients : mosqpub|20977-Family
[2019-1-22 16:17:48] [Dafang] MQTT Server Publish : Inside/Family/leds/yellow : OFF
[2019-1-22 16:17:48] [Dafang] MQTT Server Publish : $SYS/jKMkHtC/disconnect/clients : mosqpub|20977-Family
[2019-1-22 16:17:48] [Dafang] MQTT Server Publish : $SYS/jKMkHtC/new/clients : mosqpub|20981-Family
[2019-1-22 16:17:48] [Dafang] MQTT Server Publish : Inside/Family/leds/ir : OFF
[2019-1-22 16:17:48] [Dafang] MQTT Server Publish : $SYS/jKMkHtC/disconnect/clients : mosqpub|20981-Family
[2019-1-22 16:17:48] [Dafang] MQTT Server Publish : $SYS/jKMkHtC/new/clients : mosqpub|20984-Family
[2019-1-22 16:17:48] [Dafang] MQTT Server Publish : Inside/Family/ir_cut : ON
[2019-1-22 16:17:48] [Dafang] MQTT Server Publish : $SYS/jKMkHtC/disconnect/clients : mosqpub|20984-Family

Family is the name of the camera

Desktop (please complete the following information):

  • OS: Raspbian Stretch
  • Node Version: 8.15.0

Additional context
When this occurs the video cannot be streamed until the client reconnects, which requires that you leave the camera, and return to it later

Camera stops streaming in Home App after a few seconds.

Hey all, so here is the issue i am having.

I have 2 cameras, each set up and ready to go. they both work nearly perfectly outside of the issue where the cameras both stop streaming after a few seconds. ill go over the hardware/software

2 Wyze Cam V2 cameras running the latest DAFANG HACKS firmware,

Plug in is 1.5.1

HB is latest running on macOS Mojave 10.14.6

here is my config:
"platform": "Dafang",
"mqtt": {
"hostBroker": true,
"port": 1883,
"debug": false,
"mongoUrl": "mongodb://localhost:27017/homebridge-dafang"
},
"cameras": [
{
"cameraName": "Family Room Dafang",
"cameraRTSPStreamUrl": "rtsp://NOTFORU/unicast",
"mqttTopic": "Family Room/Family Room Dafang/#",
"folder": "SUPERSECRET",
"accessories": [
{
"name": "Motion Sensor",
"type": "richMotionSensor",
"threshold": 10000
},
{
"name": "Motion Detection Switch",
"type": "motionDetection"
},
{
"name": "Night Vision Switch",
"type": "nightVisionSwitch"
},
{
"name": "FR Auto Night Vision Switch",
"type": "autoNightVisionSwitch"
},
{
"name": "Record Video",
"type": "recordVideo"
},
{
"name": "Capture Image",
"type": "captureImage"
},
{
"name": "Reset Streaming",
"type": "resetFFMPEG"
}
],
"videoConfig": {
"source": "-rtsp_transport tcp -i rtsp://NOPEEKINunicast",
"stillImageSource": "-i rtsp://ISAIDNOPEEKIN/unicast -vframes 1 -r 1",
"maxStreams": 5,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 15,
"maxBitrate": 300,
"packetSize": 1128,
"debug": true,
"audio": true
}
},
{
"cameraName": "Office Camera Dafang",
"cameraRTSPStreamUrl": "rtsp://NOU/unicast",
"mqttTopic": "Office/Office Camera Dafang/#",
"folder": "AGAINNOTFORU",
"accessories": [
{
"name": "Office Dafang Motion",
"type": "richMotionSensor",
"threshold": 10000
},
{
"name": "OF Motion Detection Switch",
"type": "motionDetection"
},
{
"name": "OF Night Vision Switch",
"type": "nightVisionSwitch"
},
{
"name": "OF Auto Night Vision Switch",
"type": "autoNightVisionSwitch"
},
{
"name": "OF Record Video",
"type": "recordVideo"
},
{
"name": "OF Capture Image",
"type": "captureImage"
}
],
"videoConfig": {
"source": "-rtsp_transport tcp -i rtsp://NOU/unicast",
"stillImageSource": "-i rtsp://YUDODIS/unicast -vframes 1 -r 1",
"maxStreams": 5,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 15,
"maxBitrate": 300,
"packetSize": 1128,
"debug": true,
"audio": true
}
}
]

if needs be, you can reference the issue in this video i uploaded
https://share.icloud.com/photos/0sSFiKXEWJBxQxJY71PFD4Q6Q

it should more accurately illustrate the issue i am having. there doesnt seem to be any information found in the FFMPEG debug option in Homebridge-dafang, so i wont be posting that.

recording video produced corrupted video

Hi,

I recently updated my homebridge-dafang package and everything seemed to be running great but it was only when I checked out my saved videos that I noticed something was wrong. I have a HomeKit automation to trigger a 2 minute record video when the motion sensor is triggered.

All the videos were corrupted with the first 10-20 lines is fine (OSD) but the rest of the frame is garbled.

image

I tried running ffmpeg to capture the stream to a file manually and it actually works fine. Also viewing the stream in the home app is also fine.

I haven't changed anything in my config.json but I've tried changing various settings in the videoconfig section to no avail.

Any ideas?

Thanks!!!

MQTT user authentication not supported

The MQTT client doesn't support user authentication. It's mentioned in the camera configuration that if your MQTT Broker requires user/pass authentication, you can set it up on the camera, which I did and verified the camera can connect. But the homebridge plugin doesn't currently support authentication.

I edited client.js to pass the info through to the client URL, but did so in a crude way that probably wouldn't stand up to the rigors of general consumption. It'd be awesome to get in properly supported!

Rich Motion Sensor not working

Hi there,

I can't get the rich motion sensor to work. Motion is detected, I get a notification however without the preview image...

On the Dafang I have the following enabled:

MQTT Status Server
MQTT Control Server
Motion - Snapshots
Motion Detection
Motion - MQTT Message
Motion - MQTT Snapshot

The MQTT part for everything else is working fine. I also get a Snapshot image saved to the SD card (which is probably necessary).

Is there anything else I am missing? Do I need your firmware mod version (I am currently running the most recent one from EliasKotlyar/Xiaomi-Dafang-Hacks)? Any suggestions?

Thanks for this awesome hombridge integration!

Support Secure Video (iOS 13.2)

Description

Start a conversation on adding the support of secure video that was introduced in iOS 13.2 to Xiamoni Dafang Hacks.

IMG_1655

Record video

I istalled this plugin and I get my dafang in homebridge. But I experienced some problems. I don't get audio (if I turn cameraaudio on in homebridge I get ffmpeg exitcode 1). I also want tohave a option to record video. This is the relevant piece of my json:

{
"platform": "Dafang",
"mqtt": {
"hostBroker": false,
"port": 1883,
"host": false,
"debug": true
},
"cameras": [
{
"cameraName": "Garagecam",
"cameraRTSPStreamUrl": "rtsp://xx.x.x.xx:8554/unicast",
"mqttTopic": "schoenmakersloot/dafang/#",
"folder": "/home/pi/dafang/recordings/",
"accessories": [
{
"name": "Record Video",
"type": "recordVideo"
}

The camera appears in homekit but no recordbutton. I also get an error in homebridge:

[5/1/2020, 16:55:18] Loading 2 platforms...
[5/1/2020, 16:55:18] [Config] Initializing config platform...
[5/1/2020, 16:55:18] [Config] Running in Service Mode
[5/1/2020, 16:55:18] [Dafang] Initializing Dafang platform...
[5/1/2020, 16:55:18] [Dafang] MQTT Client connecting to localhost : 1883
[5/1/2020, 16:55:18] [Dafang] MQTT Service Initialised
[5/1/2020, 16:55:18] [Dafang] Subscribing to Channel schoenmakersloot/dafang/#
[5/1/2020, 16:55:18] [Dafang] Configuring Dafang Accessory : Record Video Switch
[5/1/2020, 16:55:18] One of your plugins incorrectly registered an external accessory using the platform name (Dafang) and not the plugin identifier. Please report this to the developer!
[5/1/2020, 16:55:18] Garagecam is running on port 33645.
[5/1/2020, 16:55:18] Please add [Garagecam] manually in Home app. Setup Code: xxx-xx-xxx
[5/1/2020, 16:55:18] Initializing platform accessory 'Record Video'...

I do get a recordswitch in Homebridge Config UI X and it records when I activate it but no switch in homekit (no audio). How can I solve this error and how do I add audio to my camera? My camera is a Xiaomi Xiaofang 1S. I already delete persist and accessoiresfolder in homebridge.

[BUG] - Volume Control in Video Stream doenst work.

If i start the video stream in HomeApp. I can see the live video and get the audio sound. But the volume control i see below the stream doesnt work or change the volume. Any solution for this?
Thats my alst problem. all other works now fine.

Thanks
best regards rene

synology path error

Which path can I set to record video or image? The path is valid and "public"!

errno: -2,
code: 'ENOENT',
syscall: 'lstat',
path: '/volume1/public/Dafang'

[Dafang] Checking Recordings Folder Size : /volume1/public/Dafang/
[Dafang] Error Occured
[Dafang] [Error: ENOENT: no such file or directory, lstat '/volume1/public/Dafang']

Thnx, Mitcho

Network folder

Please add the ability to record audio / video in a network folder

Error: Connection refused: Not authorized

Hello,

I am getting stuck with error message as follows:

Error: Connection refused: Not authorized
at MqttClient._handleConnack (/usr/lib/node_modules/mqtt/lib/client.js:920:15)
at MqttClient._handlePacket (/usr/lib/node_modules/mqtt/lib/client.js:350:12)
at work (/usr/lib/node_modules/mqtt/lib/client.js:292:12)
at Writable.writable._write (/usr/lib/node_modules/mqtt/lib/client.js:302:5)
at doWrite (/usr/lib/node_modules/readable-stream/lib/_stream_writable.js:428:64)
at writeOrBuffer (/usr/lib/node_modules/readable-stream/lib/_stream_writable.js:417:5)
at Writable.write (/usr/lib/node_modules/readable-stream/lib/_stream_writable.js:334:11)
at Socket.ondata (_stream_readable.js:693:20)
at Socket.emit (events.js:189:13)
at addChunk (_stream_readable.js:288:12)
at readableAddChunk (_stream_readable.js:269:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:145:17)

Tried already with two different mqtt servers, and the outcome is still the same. Would you have any idea, what do I do wrong?

Xiaomi Xiaofang cam, tried mqtt in Homebridge (RPi) and on Synology NAS,

mqtt.conf:

Options for mosquitto_sub & mosquitto_pub

USER="homebridge"
PASS="homebridge"
HOST=10.10.0.10
PORT=1883

config.json:
{
"platform": "Dafang",
"mqtt": {
"hostBroker": false,
"port": 1883,
"host": "10.10.0.10",
"debug": true
},
"cameras":

MQTT Pan Tilt Problem. Motor moves 2 times.

Hello,
thanks for the great plugin. works fine. But i have a small probem.
If i press over mqtt turn left, turn right, turn down or turn up the motor moves two steps. if i send press the button on dafang site the motor moves only one step.

can i add something to the config.json that the motor also with mqtt only make 1 move. press button = one move lfet or so on

thanks
best regards rene

[BUG] - leftovers after uninstall

Describe the bug
After uninstalling the plugin and removing all references to it in the CONFIG, it still is showing errors in my logs

Expected behavior
I expected that uninstalling the plugin would remove all plugins components.

Logs
[7/19/2019, 4:50:34 PM] [Config] Failed to parse plugin "homebridge-dafang": ENOENT: no such file or directory, open '/usr/local/lib/node_modules/homebridge-dafang/package.json'

Homekit stream not responding

My configuration is correct. I have a locally set up MQTT and have my rtsp address pointed to the correct IP address, but the live stream won't respond

Audio delay/lag

I have the problem of significant audio delay. It probably is a general Dafang hacks issue, but I wanted to ask here, because I use it mainly with homebridge/homekit. Are there any suggestions for the optimal setup of video/audio parameters? Here is my current setup:

Video: h265, 1280x720, VBR, Bitrate 1024kbps, 25fps
Audio: MP3, 16000 in and out, NS filter moderate, high pass filter on, AEC filter on

Homebridge is running on a raspberry pi 3 b+

I also get the delay in VLC though...

[BUG] - Brightness Sensor not changing.

Describe the bug
Installed this with the CFW on a new Wyzecam V2. The motion sensor and other items work, but brightness seems stuck at 40. I can sit in a dark room and it doesn't change.

Expected behavior
The expected behavior is to change with the brightness in the room. If the room is dark the value should approach 0. As it gets brighter it should approach 100.

Config
{ "platform": "Dafang", "mqtt": { "hostBroker": false, "port": 1883, "host": "192.168.1.90", "debug": true }, "cameras": [ { "cameraName": "Backyard wyzev2-0001", "cameraRTSPStreamUrl": "rtsp://192.168.1.226:8554/unicast", "mqttTopic": "BACKYARD/wyzev2-0001/#", "disableStream": false, "folder": "/homebridge/recordings/", "segmentLength": 60, "maxDirSize": 4096, "checkStorageSizeInterval": 300, "recordingDirectoryPathFormat": "MMM-D-YY", "recordingFilenameFormat": "M_D_YYYY_ h_mm_ss_a", "accessories": [ { "name": "Backyard Motion Sensor", "type": "richMotionSensor", "threshold": 3000000 }, { "name": "Backyard Auto Motion Tracking Switch", "type": "autoMotionTrackingSwitch" }, { "name": "Backyard Night Vision Sensor", "type": "nightVisionSensor", "threshold": 0 }, { "name": "Backyard Night Vision Switch", "type": "nightVisionSwitch" }, { "name": "Backyard Auto Night Vision Switch", "type": "autoNightVisionSwitch" }, { "name": "Record Video", "type": "recordVideo" }, { "name": "Record Audio", "type": "recordAudio" }, { "name": "Capture Image", "type": "captureImage" }, { "name": "RPi Storage Sensor", "type": "storageSensor" }, { "name": "Clear Storage Switch", "type": "clearStorage" }, { "name": "Reset Streaming", "type": "resetFFMPEG" }, { "name": "Motion Detection Switch", "type": "motionDetection" }, { "name": "RTSPSwitch", "type": "rtspSwitch" }, { "name": "MJPEG Switch", "type": "mjpegSwitch" }, { "name": "Recalibrate Switch", "type": "recalibrateSwitch" }, { "name": "Restart Switch", "type": "restartSwitch" }, { "name": "ReMount Switch", "type": "remountSwitch" }, { "name": "Camera Brightness", "type": "brightness" } ], "videoConfig": { "source": "-rtsp_transport tcp -i rtsp://192.168.1.226:8554/unicast", "stillImageSource": "-rtsp_transport http -i rtsp://192.168.1.226:8554/unicast -vframes 1 -r 1", "maxStreams": 5, "maxWidth": 1280, "maxHeight": 720, "maxFPS": 30, "vcodec": "h264", "debug": true } } ] }
Logs
Share the logs with debug as true in config.json

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Synology Docker Container
  • Node Version: 10.14.2

Additional context
Add any other context about the problem here.

MQTT doesn‘t work with authentification

Yeasterday i changed from Plugin Hosting mqtt to mosquitto and it worked fine.
Today i edited mosquitto to User authentification and changed my Camera mqtt settings. The Problem i have is that the Plugin always says that there is no authentification and homebridge crashes. If i edit mosquitto to anonymus true the Plugin works but the mqtt Connection with the Camera Not. It makes no difference if the camera has set User and password or not. Streaming works fine but the Switches don‘t....through my log i can See that homebridge is sending mqtt commands

Video stream stops after few seconds on Homekit

Hi guys! I have a problem related to the streaming of the imagine on my Homekit app. I have a Xiaomi Dafang and the Dafang plugin, I managed to get rid of the "ffmpeg exited with code 1" error by setting audio:false. If I go on my camera ip, I can see the streamed image, a bit slow but it is shown.
However, as soon as I start the streaming on Homekit, this is the output:

[2019-1-27 09:35:55] [Dafang] Start streaming video from My Dafang with 640x360@132kBit
ffmpeg -rtsp_transport tcp -i rtsp://192.168.21.106:8554/unicast -map 0:0 -vcodec h264 -pix_fmt yuv420p -r 15 -f rawvideo -tune zerolatency -vf scale=640:360 -b:v 132k -bufsize 132k -maxrate 132k -payload_type 99 -ssrc 2826387 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params jfXEwe+u9Rc411YP11WUSypHEMEa/ZZxPhCJ4k8o srtp://192.168.21.132:60434?rtcpport=60434&localrtcpport=60434&pkt_size=1316
[2019-1-27 09:35:59] [Dafang] Stopped streaming

I then have a snapshot from the Dafang, kinda useless.
Do you know how to get rid of the stopped streaming issue? I just cannot see the live image, it stops as soon as I tap on the camera on Homekit, really annoying!
I also installed the ffmpeg plugin, just to try to avoid the issue, but it is the same! I tried to change the quality parameters, but I always get "stopped streaming" after maximum 10 seconds.
Once more thank you in advance for the help!

what to do after fang-hack is installed?

i have the xiaofang 1s with arm chip
fang-hack is successfully installed and rtsp stream works (checked with vlc)

now what do i do?

i just cant figure out how to install mqtt, im very new to all this linux commands.
if i understand it correctly, ill be installing mqtt on my raspberry pi(thats where my homebridge is installed), and my xiaofang cam is good as it is now?

mqtt commands

Hi, i set up a new cam, yi home 1080 with your plug in, i have 2 dafang and one xiaofang already runing with it, my problem is when cam sends mqtt command motion/OFF, motionsensor goes off but richmotionsensor remains on. Can you please help me?

Record video

Hey. No video is recorded. Creates empty mp4 files. No errors.

Start record home/pi/record/recordingshall/Dafang Hall/Dec-11th-18/video/2018-12-11-5-24-26.mp4 [12/11/2018, 5:24:26 PM] [Dafang] Setting Record Video Value to true Start record home/pi/record/recordingshall/Dafang Hall/Dec-11th-18/video/2018-12-11-5-24-28.mp4 Start record home/pi/record/recordingshall/Dafang Hall/Dec-11th-18/video/2018-12-11-5-24-31.mp4 Start record home/pi/record/recordingshall/Dafang Hall/Dec-11th-18/video/2018-12-11-5-24-34.mp4 Start record home/pi/record/recordingshall/Dafang Hall/Dec-11th-18/video/2018-12-11-5-24-37.mp4 Start record home/pi/record/recordingshall/Dafang Hall/Dec-11th-18/video/2018-12-11-5-24-40.mp4 Start record home/pi/record/recordingshall/Dafang Hall/Dec-11th-18/video/2018-12-11-5-24-43.mp4 Start record home/pi/record/recordingshall/Dafang Hall/Dec-11th-18/video/2018-12-11-5-24-46.mp4 [12/11/2018, 5:24:48 PM] [RaspberryPi Info] Raspberry Temperatur: 52.078 Start record home/pi/record/recordingshall/Dafang Hall/Dec-11th-18/video/2018-12-11-5-24-49.mp4 Start record home/pi/record/recordingshall/Dafang Hall/Dec-11th-18/video/2018-12-11-5-24-51.mp4 Start record home/pi/record/recordingshall/Dafang Hall/Dec-11th-18/video/2018-12-11-5-24-53.mp4 [12/11/2018, 5:24:57 PM] [Dafang] ** Sending MQTT event to accessory at home/camerahall/brightness with payload : 20 [12/11/2018, 5:24:59 PM] [Dafang] ** Sending MQTT event to accessory at home/camerahall/night_mode with payload : ON [12/11/2018, 5:24:59 PM] [Dafang] ** Sending MQTT event to accessory at home/camerahall/night_mode/auto with payload : ON [12/11/2018, 5:24:59 PM] [Dafang] ** Sending MQTT event to accessory at home/camerahall/motion/detection with payload : OFF [12/11/2018, 5:25:00 PM] [Dafang] ** Sending MQTT event to accessory at home/camerahall/motion/tracking with payload : ON [12/11/2018, 5:25:00 PM] [Dafang] Setting Record Video Value to false

Audio file records...

[BUG] [Dafang] An error occurs while making snapshot request

Describe the bug
Installed the plugin, can see the camera in Home app, however I don't see a picture and receive an error in Homebridge.

[Dafang] An error occurs while making stream request
[2018-12-28 20:11:14] [Dafang] ERROR: FFmpeg exited with code -2
[2018-12-28 20:11:17] [Dafang] Snapshot from My Dafang at 480x270
[2018-12-28 20:11:17] [Dafang] An error occurs while making snapshot request

Expected behavior
I was expecting to see a snapshot and when pressing a live image.

Config
"platform": "Dafang",
"mqtt": {
"hostBroker": true,
"port": 1883,
"host": "192.168.1.35",
"debug": true,
"mongoUrl": "mongodb://localhost:32768/mqtt"
},
"cameras": [
{
"cameraName": "My Dafang",
"cameraRTSPStreamUrl": "rtsp://192.168.1.49:8554/unicast",
"mqttTopic": "home/Dafang/#",
"folder": "/volume1/homes/User/Snapshots Dafang/"

Logs
[Dafang] An error occurs while making stream request
[2018-12-28 20:11:14] [Dafang] ERROR: FFmpeg exited with code -2
[2018-12-28 20:11:17] [Dafang] Snapshot from My Dafang at 480x270
[2018-12-28 20:11:17] [Dafang] An error occurs while making snapshot request

Desktop (please complete the following information):

  • OS: Homebridge Docker on Synology
  • Node Version v8

[BUG] - plugin incorrectly registered

[5/8/2020, 19:58:03] One of your plugins incorrectly registered an external accessory using the platform name (Dafang) and not the plugin identifier. Please report this to the developer!

[noBUG] - Can't get ffmpeg to work propperly

Hi,

i am on a rpi 3 and ffmpeg is always exiting with error code 1 when i try to stream, one frame snapshots are no problem it's only when streaming should start and ffmpeg gets used.

First i tried to install ffmpeg this way: http://jollejolles.com/installing-ffmpeg-with-h264-support-on-raspberry-pi/

Then i decided to try ffmpeg from apt-get but with both no go.
homebridge is running under pi user context, is there something i need to adjust?

Also i really would like to try to install ffmpeg with brew like suggested in this project but i can'T get linuxbrew to run, i followed their instruction but i cannot type brew in command line, command not found.

Can someone help me to get ffmpeg running propper?
Is someone here were it's working with an rpi?

Regards Jens

[BUG] - ERROR: FFmpeg exited with code 1

I've an Raspberry Pi 3 B+that hosts Homebridge and installed plugin on it. Whenver I try to use livestream from Home app, it doesn't work and I get the message [Dafang] ERROR: FFmpeg exited with code 1 in the logs.

When I try to check the stream from another machine, it works just fine from VLC on Mac. You can see part of my configs below:

"cameraName": "Xiaomi Dafang",
                    "cameraRTSPStreamUrl": "rtsp://USERNAME:[email protected]:8554/unicast",
                    "videoConfig": {
                        "source": "-rtsp_transport tcp -i rtsp://USERNAME:[email protected]:8554/unicast",
                        "stillImageSource": "-rtsp_transport http -i rtsp://USERNAME:[email protected]:8554/unicast -vframes 1 -r 1",
                        "maxStreams": 5,
                        "maxWidth": 1280,
                        "maxHeight": 720,
                        "maxFPS": 25,
                        "debug": true,
                        "audio": true
                    },

In addition, I have two more cameras which has Motioneyeos and Motioneye server running on same Raspberry Pi. I've them in my Homebridge as well with homebridge-camera-ffmpeg plugin and live stream for them is also working fine.

What might be wrong with my configurations? Do I need to enable/disable some services from Dafang web interface?

[BUG] - Multiple camera fail with HAP error, hard crash of homebridge

Describe the bug
Adding multiple cameras to the config cause homebridge to crah; the HAP subsystem reports the error that two devices cannot have the same "id"

Expected behavior
Multiple (2 in this instance) cameras working

Config
... {
"platform": "Dafang",
"mqtt": {
"hostBroker": false,
"port": 1883,
"host": "localhost",
"debug": true,
"mongoUrl": "mongodb://localhost:27017/mqtt"
},
"cameras": [
{
"cameraName": "TRAK-R",
"videoConfig": {
"source": "-rtsp_transport tcp -i rtsp://192.168.87.69:8554/unicast",
"stillImageSource": "-rtsp_transport tcp -i rtsp://192.168.87.69:8554/unicast",
"vcodec": "copy",
"videoFilter": "none",
"maxFPS": 20,
"maxStreams": 4,
"maxBitrate": 284,
"debug": true,
"audio": false
},
"cameraRTSPStreamUrl": "rtsp://192.168.87.69:8554/unicast",
"mqttTopic": "hiddensprings/trakr/#",
"folder": "/root/Videos/",
"accessories": [
{
"name": "TRAK-R Sensor",
"type": "richMotionSensor",
"threshold": 300000
},
{
"name": "TRAK-R NV Sensor",
"type": "nightVisionSensor",
"threshold": 0
},
{
"name": "TRAK-R NV",
"type": "nightVisionSwitch"
},
{
"name": "TRAK-R Video",
"type": "recordVideo"
},
{
"name": "TRAK-R Audio",
"type": "recordAudio"
},
{
"name": "TRAK-R Image",
"type": "captureImage"
},
{
"name": "E14 Storage Sensor",
"type": "storageSensor"
},
{
"name": "E14 Clear Storage Switch",
"type": "clearStorage"
},
{
"name": "TRAK-R Reset",
"type": "resetFFMPEG"
},
{
"name": "TRAK-R Brightness",
"type": "brightness"
}
]
},
{
"cameraName": "WACH-R",
"videoConfig": {
"source": "-rtsp_transport tcp -i rtsp://192.168.87.248:8554/unicast",
"stillImageSource": "-rtsp_transport tcp -i rtsp://192.168.87.248:8554/unicast",
"vcodec": "copy",
"videoFilter": "none",
"maxFPS": 20,
"maxStreams": 4,
"maxBitrate": 284,
"debug": true,
"audio": false
},
"cameraRTSPStreamUrl": "rtsp://192.168.87.248:8554/unicast",
"mqttTopic": "hiddensprings/wachr/#",
"folder": "/root/Videos/",
"accessories": [
{
"name": "WACH-R Sensor",
"type": "richMotionSensor",
"threshold": 300000
},
{
"name": "WACH-R NV Sensor",
"type": "nightVisionSensor",
"threshold": 0
},
{
"name": "WACH-R NV",
"type": "nightVisionSwitch"
},
{
"name": "WACH-R Video",
"type": "recordVideo"
},
{
"name": "WACH-R Audio",
"type": "recordAudio"
},
{
"name": "WACH-R Image",
"type": "captureImage"
},
{
"name": "E14 Storage Sensor",
"type": "storageSensor"
},
{
"name": "E14 Clear Storage Switch",
"type": "clearStorage"
},
{
"name": "WACH-R Reset",
"type": "resetFFMPEG"
},
{
"name": "WACH-R Brightness",
"type": "brightness"
}
]
}
]
} ...

Logs
See Description

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: 13.x
  • Node Version v12.13.1

Additional context
Clearing cases, etc does not prevent or fix the issue.

Steps to Reproduce:

  • Add additional camera to the array
  • Start homebridge

[noBUG] - Xiaomi Xiaofang 1S user wanted -> working video stream

Hi,

is here anyone around whos using this project with a Xiaomi Xiaofang 1S?
grafik
I am a searching for a working setup where also streaming is working.

First only snapshots worked and ffmpeg always exited with error code 1,
then with the help of @renedivx: #27

I could compile a ffmpeg version that at least starts streaming for a little while without exiting with error code 1 but in the end the rtsp server on the camera crashes.

Before it crashes video starts for a little second, i can hear a sound flick and then the picture stucks or it moves like in slomotion for 1-3 seconds and then it stops finally...

So is someone here with this cam were streaming is working and if yes can you please report your steps and post your configuration settings?

Regards X23

No second camera controls

Hi,
I have two Xiaomi Dafang with the hack and working perfectly in my homebridge/home app except for the fact that i can´t control the second one, the control accesories doesn't appear in my home app. i have the same configuration in my config.json (with different names) i have tried to reset accesories with no result.
What am i doing wrong?
This is my code:
"cameras": [
{
"cameraName": "Camara Salon",
"cameraRTSPStreamUrl": "rtsp://root:[email protected]:8554/unicast",
"mqttTopic": "myhome/Camara1/#",
"disableStream": false,
"folder": "/Users/sahilchaddha/Sahil/Recordings/",
"segmentLength": 60,
"maxDirSize": 2048,
"checkStorageSizeInterval": 300,
"recordingDirectoryPathFormat": "MMM-D-YY",
"recordingFilenameFormat": "M_D_YYYY_ h_mm_ss_a",
"accessories": [
{
"name": "Salon Motion Sensor",
"type": "richMotionSensor",
"threshold": 300000
},
{
"name": "Motion Detection Switch",
"type": "motionDetection"
},
{
"name": "Horizontal Left",
"type": "moveCamera",
"axis": "horizontal",
"direction": "left"
},
{
"name": "Horizontal Right",
"type": "moveCamera",
"axis": "horizontal",
"direction": "right"
},
{
"name": "Vertical Up",
"type": "moveCamera",
"axis": "vertical",
"direction": "up"
},
{
"name": "Vertical Down",
"type": "moveCamera",
"axis": "vertical",
"direction": "down"
},
{
"name": "Reset Streaming",
"type": "resetFFMPEG"
}
],
"videoConfig": {
"source": "-rtsp_transport tcp -i rtsp://root:[email protected]:8554/unicast",
"stillImageSource": "-rtsp_transport http -i rtsp://xxx.xxx.x.xx:8554/unicast -vframes 1 -r 1",
"maxStreams": 5,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 25,
"vcodec": "h264_omx",
"debug": true,
"audio": "2way -f alsa default"
}
},
{
"cameraName": "Camara Habitacion",
"cameraRTSPStreamUrl": "rtsp://root:[email protected]:8554/unicast",
"mqttTopic": "myhome/Camara2/#",
"disableStream": false,
"folder": "/Users/sahilchaddha/Sahil/Recordings/",
"segmentLength": 60,
"maxDirSize": 2048,
"checkStorageSizeInterval": 300,
"recordingDirectoryPathFormat": "MMM-D-YY",
"recordingFilenameFormat": "M_D_YYYY_ h_mm_ss_a",
"accessories": [
{
"name": "Habitacion Motion Sensor",
"type": "richMotionSensor",
"threshold": 300000
},
{
"name": "Motion Detection Switch",
"type": "motionDetection"
},
{
"name": "Habitacion Left",
"type": "moveCamera",
"axis": "horizontal",
"direction": "left"
},
{
"name": "Habitacion Right",
"type": "moveCamera",
"axis": "horizontal",
"direction": "right"
},
{
"name": "Habitacion Up",
"type": "moveCamera",
"axis": "vertical",
"direction": "up"
},
{
"name": "Habitacion Down",
"type": "moveCamera",
"axis": "vertical",
"direction": "down"
}
],
"videoConfig": {
"source": "-rtsp_transport tcp -i rtsp://root:[email protected]:8554/unicast",
"stillImageSource": "-rtsp_transport http -i rtsp://xxx.xxx.x.xx:8554/unicast -vframes 1 -r 1",
"maxStreams": 5,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 25,
"vcodec": "h264_omx",
"debug": true,
"audio": true
}
}
]
},

Thanks for helping me

Usage without Dafang Hack? (RTSP BETA)

Hello,
Is it possible to use this plugin without Dafang hack as the wizen cam supports RTSP (in beta), or do things such as light sensor, motion, etc require dafang?

I only ask due to having issues with installing the CFW (Yes I know this isn't the place for support for CFW).

mqtt broker

I followed al the steps in the wiki (I installed mongodb on my hostraspberry 3(10.0.1.22) and it's running) and updated my json in homebridge but get an error:
Error: listen EADDRINUSE: address already in use :::1883 at Server.setupListenHandle [as _listen2] (net.js:1309:16) at listenInCluster (net.js:1357:12) at Server.listen (net.js:1445:7) at /usr/lib/node_modules/homebridge-dafang/node_modules/mosca/lib/server.js:225:16 at makeCall (/usr/lib/nod

My homebridge is down because of this error.

With 'sudo lsof -i :1883' I get:

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mosquitto 10783 mosquitto 5u IPv4 45600 0t0 TCP *:1883 (LISTEN)
mosquitto 10783 mosquitto 6u IPv6 45601 0t0 TCP *:1883 (LISTEN)
mosquitto 10783 mosquitto 9u IPv4 43888 0t0 TCP 10.0.1.22:1883->10.0.1.67:65361 (ESTABLISHED)

10.0.1.22 is my hostraspberry 3 and it looks like there is also a tasmotaswitch(10.0.1.67) with some kind of mosquitobroker linked to my raspberry. How do I solve this error?

[BUG] - No Audio in Home App

Hello

if i start the Video Stream in Home App i dont have audio sound. If i start with mqtt audio recording i get a .avi file on raspberry where i can hear the audio. Also if i stream the rtsp stream directly with VLC i have audio.

My Dafang audio settings are:
audio format: pcmu
in rate 8000
out rate 8000
no filter
volume max
I try also other setiings, but nothing change.

my other problem is if i change in config audo to true, i dont get any livestream in the home app. if i delete "audio": true, complete in config, i also dint get the live steam. the live stream only works if i make "audio": to false. but than i never get audio sound.

i use a raspberry 3 with debian stretch.

i also look at homebridge ffmpeg plugin to find a solution, but nothing works for me.

here is my config

{ "platform": "Dafang", "mqtt": { "hostBroker": false, "port": 1883, "host": "192.168.22.104", "debug": true }, "cameras": [ { "cameraName": "terrasse", "cameraRTSPStreamUrl": "rtsp://192.168.22.69:8554/unicast", "mqttTopic": "haus/terrasse/#", "folder": "/home/pi/kamera/", "recordingDirectoryPathFormat": "DD-MM-YYYY", "recordingFilenameFormat": "DD-MM-YYYY-kk-mm-ss", "accessories": [ { "name": "Bewegungssensor", "type": "richMotionSensor", "threshold": 100000 }, { "name": "Auto Bewegung", "type": "autoMotionTrackingSwitch" }, { "name": "Nachtsichtsensor", "type": "nightVisionSensor", "threshold": 0 }, { "name": "Nachtsicht", "type": "nightVisionSwitch" }, { "name": "Auto Nachtsicht", "type": "autoNightVisionSwitch" }, { "name": "Links", "type": "moveCamera", "axis": "horizontal", "direction": "left" }, { "name": "Rechts", "type": "moveCamera", "axis": "horizontal", "direction": "right" }, { "name": "Hoch", "type": "moveCamera", "axis": "vertical", "direction": "up" }, { "name": "Runter", "type": "moveCamera", "axis": "vertical", "direction": "down" }, { "name": "Video aufnehmen", "type": "recordVideo" }, { "name": "Audio aufnehmen", "type": "recordAudio" }, { "name": "Bild aufnehmen", "type": "captureImage" }, { "name": "RPi Speicher", "type": "storageSensor" }, { "name": "Speicher bereinigen", "type": "clearStorage" }, { "name": "Stream zurücksetzen", "type": "resetFFMPEG" }, { "name": "Helligkeit", "type": "brightness" }, { "name": "Neustarten", "type": "restartSwitch" }, { "name": "Kalibrieren", "type": "recalibrateSwitch" } ], "videoConfig": { "source": "-rtsp_transport tcp -re -i rtsp://192.168.22.69:8554/unicast", "stillImageSource": "-i http://root:[email protected]/cgi-bin/currentpic.cgi", "maxStreams": 2, "maxWidth": 1280, "maxHeight": 720, "maxFPS": 21, "maxBitrate": 299, "vcodec": "h264_omx", "audio": true, "packetSize": 188 } } ] },

thanks for your help
best regards rene

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.