Due to protocol limitation, users will need to pair with the camera in a HomeKit app separately. Pairing PIN is the same as the HomeBridge pairing PIN.
Prerequisites
Node.js v6.6.0 or above
HomeBridge v0.4.6 or above
FFmpeg
Only H.264 cameras are supported.
Installation
Install homebridge using npm install -g homebridge.
Install this plugin using npm install -g homebridge-foscamcamera.
Update your configuration file. See configuration sample below.
Configuration
Edit your config.json accordingly. Configuration sample:
Array of camera config (multiple cameras supported).
Yes
|- username
Your camera login username.
admin
No
|- password
Your camera login password.
Yes
|- host
Your camera IP address.
Yes
|- port
Your camera port.
88
No
|- stay*
Configuration for Stay Arm.
0
No
|- away*
Configuration for Away Arm.
0
No
|- night*
Configuration for Night Arm.
0
No
|- armPreset
Preset point name for arm state.
undefined
No
|- disarmPreset
Preset point name for disarm state.
undefined
No
|- sensitivity
Motion sensor sensitivity from 0 (lowest) to 4 (high).
Camera Config
No
|- triggerInterval
Time in s (5-15) of which motion sensor can be retriggered.
Camera Config
No
|- videoConfig**
Array of video config for streaming.
Yes
*stay, away, night define configuration for different ARMED state.
**reference homebridge-camera-ffmpeg for configuration instructions.
The supported configurations depend on your device. The Foscam public CGI defines the following:
bit 3 | bit 2 | bit 1 | bit 0
bit 0 = Ring
bit 1 = Send email
bit 2 = Snap picture
bit 3 = Record
The following seems to be valid for the C2 as well (not found in any documentation)
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0
bit 0 = Ring
bit 1 = Send email
bit 2 = Snap picture
bit 3 = Record
bit 7 = Push notification
Note: The configuration is defined as int, thus the followings are valid, e.g. 0 (Do Nothing), 1 (Ring), 2 (Email), 3 (Ring + Email), 4 (Picture), 12 (Picture and Record), 13 (Ring, Picture and Record), etc.
P.S.: Any ARMED state will activate motion detection by default.
请发表评论