{"_id":"@danelowe/scrypted-plugin-kingcam","_rev":"4-65ef411aa4eb0bfaf186d8d2c966aaa3","name":"@danelowe/scrypted-plugin-kingcam","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.1":{"name":"@danelowe/scrypted-plugin-kingcam","version":"0.0.1","keywords":["scrypted","plugin","onvif","camera"],"author":{"name":"Scrypted"},"license":"Apache","_id":"@danelowe/scrypted-plugin-kingcam@0.0.1","maintainers":[{"name":"danelowe","email":"dane.r.lowe@gmail.com"}],"dist":{"shasum":"3a094cf758122cf53403d7bc65bc8a4ef870b328","tarball":"https://registry.npmjs.org/@danelowe/scrypted-plugin-kingcam/-/scrypted-plugin-kingcam-0.0.1.tgz","fileCount":21,"integrity":"sha512-tZ3ZkHFS3PXgtDmzq2QhYXVspC7iGLkeYGHQmGhwjWNKWQjMQ4CX5LwLSvQzv32o3iefgdqwubvs4fKENnyB1A==","signatures":[{"sig":"MEUCIDQOzFxA+quhDKbOSu+p3T8K9919yoPWuCiyMtAYT6dQAiEA6sbS3TFqr9nAnLr8aBaliLijhKuxulUb/BOgoBZEESU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":818127,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitRPVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqkLxAAh9chLVgeqtlcrEHE9yZB0IrLssOA+6BTQOFhnlRWecAgGZxT\r\n+zn3SKGN485acJYZ4tnNFvsN7D9QQ96oxqPz2U1a2sjG4YXhcm258Mak/JvT\r\nUqgLRfEopZO8yvfaA+D3565ena9dNYQrBVuxNVu5jDMeTjZHrQkjN5ayJJ6n\r\nbF3zI9bWWlFS9BBfSnIKu8R6lXbTDdba/pFcAt077d4SK29G6Nwi5NHCvdXs\r\nslI95tBRB4wV6yMNg943ysM8nN0AWEpHDl6z8BBE1GC2hTC2ZXTFBzXNG/sD\r\nm0c8ub+cAgVF2XR3x2faN+58yf3ysw8h+MJuPBMp2wneqt0JZ35m7jNKKGMm\r\nB+lgNDHVdVH0ifSw3F6FOf7a7/u5B5iF2IDo5B/XmNkFMEAh50noxtB2pyl0\r\nHq6sHammy9X9FoBTFxzGLhrgtjYKpjz1KT5yAZSTDJ2zVks+290kg0nsveVl\r\nz18j5zcMVZ6K23pcNGKimfimfY9NVrXgPoCdQ1MlHv2gcxgaCD1CQouU+WiA\r\n2FjiejZoo3o8WyF9Inxdi2V/ByDwx/kUeHI0jtW/SYh4+YqoxD8gPWUAicCA\r\n87fnyNmmObDYNEA2zTOInjUugDrsYDJ54mOwsH8eBWHVrYWTdJbILeHAxWXB\r\nbRDx7tX36Jo2wIH91MJj3dnTd4bUkxxBjIA=\r\n=DeCg\r\n-----END PGP SIGNATURE-----\r\n"},"gitHead":"122bb30201e8bbe334a384e26b6118c7912b4f95","scripts":{"build":"scrypted-webpack","prepublishOnly":"NODE_ENV=production scrypted-webpack","scrypted-debug":"scrypted-debug","scrypted-deploy":"scrypted-deploy","scrypted-readme":"scrypted-readme","scrypted-deploy-debug":"scrypted-deploy-debug","scrypted-package-json":"scrypted-package-json","scrypted-setup-project":"scrypted-setup-project","scrypted-vscode-launch":"scrypted-deploy-debug","prescrypted-setup-project":"scrypted-package-json","prescrypted-vscode-launch":"scrypted-webpack"},"_npmUser":{"name":"danelowe","email":"dane.r.lowe@gmail.com"},"scrypted":{"name":"KingCam ONVIF Camera Plugin","type":"DeviceProvider","interfaces":["Settings","DeviceProvider","DeviceCreator","DeviceDiscovery"],"pluginDependencies":["@scrypted/prebuffer-mixin"]},"_npmVersion":"8.5.5","description":"KingCam ONVIF Camera Plugin for Scrypted","directories":{},"_nodeVersion":"16.15.0","dependencies":{"md5":"^2.3.0","syno":"^2.2.0","onvif":"^0.6.6","xml2js":"^0.4.23","base-64":"^1.0.0","node-fetch":"^3.2.6","@types/node":"^16.9.1","@scrypted/sdk":"^0.0.199","http-auth-utils":"^3.0.2","@scrypted/common":"^1.0.1","@koush/axios-digest-auth":"^0.8.5"},"_hasShrinkwrap":false,"devDependencies":{"@types/md5":"^2.3.1","@types/xml2js":"^0.4.9","webpack-bundle-analyzer":"^4.5.0"},"_npmOperationalInternal":{"tmp":"tmp/scrypted-plugin-kingcam_0.0.1_1656034261430_0.8972621612720235","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@danelowe/scrypted-plugin-kingcam","version":"0.0.2","keywords":["scrypted","plugin","onvif","camera"],"author":{"name":"Scrypted"},"license":"Apache","_id":"@danelowe/scrypted-plugin-kingcam@0.0.2","maintainers":[{"name":"danelowe","email":"dane.r.lowe@gmail.com"}],"dist":{"shasum":"1a7251a6040f36c03f14cdbdb57851904908be71","tarball":"https://registry.npmjs.org/@danelowe/scrypted-plugin-kingcam/-/scrypted-plugin-kingcam-0.0.2.tgz","fileCount":23,"integrity":"sha512-5z5mdWlZmw9/g6+Rk1a4yElVXqkcs+5XE7HaFQxiiDGSX3YvSDdKILzx4ejQ6Voh0xO5LAyVXIDMzdzaOZWTsw==","signatures":[{"sig":"MEQCIGOt6NXR2sPh8y7lmX77P13LTVSZvupe2dHNgdWUgEG0AiAuT6PEBpJM+d8m+UAnpzxjmaq7hSqzY9BifPHuMb2SPQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":462332},"gitHead":"846950e6a507d3467969999b2cbd77558179d465","scripts":{"build":"scrypted-webpack","prepublishOnly":"NODE_ENV=production scrypted-webpack","scrypted-debug":"scrypted-debug","scrypted-deploy":"scrypted-deploy","scrypted-readme":"scrypted-readme","scrypted-deploy-debug":"scrypted-deploy-debug","scrypted-package-json":"scrypted-package-json","scrypted-setup-project":"scrypted-setup-project","scrypted-vscode-launch":"scrypted-deploy-debug","prescrypted-setup-project":"scrypted-package-json","prescrypted-vscode-launch":"scrypted-webpack"},"_npmUser":{"name":"danelowe","email":"dane.r.lowe@gmail.com"},"scrypted":{"name":"KingCam ONVIF Camera Plugin","type":"DeviceProvider","interfaces":["Settings","DeviceProvider","DeviceCreator","DeviceDiscovery"],"pluginDependencies":["@scrypted/prebuffer-mixin"]},"_npmVersion":"9.7.2","description":"KingCam ONVIF Camera Plugin for Scrypted","directories":{},"_nodeVersion":"18.16.0","dependencies":{"xml2js":"^0.6.0","@scrypted/sdk":"^0.2.103","@scrypted/common":"^1.0.1","@koush/axios-digest-auth":"^0.8.5"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^20.3.1","@types/xml2js":"^0.4.11"},"_npmOperationalInternal":{"tmp":"tmp/scrypted-plugin-kingcam_0.0.2_1690101155692_0.339930966015215","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"@danelowe/scrypted-plugin-kingcam","version":"0.0.3","keywords":["scrypted","plugin","onvif","camera"],"author":{"name":"Scrypted"},"license":"Apache","_id":"@danelowe/scrypted-plugin-kingcam@0.0.3","maintainers":[{"name":"danelowe","email":"dane.r.lowe@gmail.com"}],"dist":{"shasum":"a441e8b8dbbfbb95516e6fc93c5d7318440382e0","tarball":"https://registry.npmjs.org/@danelowe/scrypted-plugin-kingcam/-/scrypted-plugin-kingcam-0.0.3.tgz","fileCount":20,"integrity":"sha512-uLXY+cUKq+Okwvstl/FFVCaZU2TuwZ9pebAVECw30brUVZ5snnRYNFWvMv8r3AnSHsAYVsye6XOw9zOW+IGebA==","signatures":[{"sig":"MEUCICFETJb4Ic7i/J/5KfMdea3CxMGgkgT2uiE0S5gdyJyMAiEA3pOUnZcxGK0ct1suGATc3jIkIesVItHoPkYjZ/4HfPo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":478121},"gitHead":"846950e6a507d3467969999b2cbd77558179d465","scripts":{"build":"scrypted-webpack","prepublishOnly":"NODE_ENV=production scrypted-webpack","scrypted-debug":"scrypted-debug","scrypted-deploy":"scrypted-deploy","scrypted-readme":"scrypted-readme","scrypted-deploy-debug":"scrypted-deploy-debug","scrypted-package-json":"scrypted-package-json","scrypted-setup-project":"scrypted-setup-project","scrypted-vscode-launch":"scrypted-deploy-debug","prescrypted-setup-project":"scrypted-package-json","prescrypted-vscode-launch":"scrypted-webpack"},"_npmUser":{"name":"danelowe","email":"dane.r.lowe@gmail.com"},"scrypted":{"name":"KingCam ONVIF Camera Plugin","type":"DeviceProvider","interfaces":["Settings","DeviceProvider","DeviceCreator","DeviceDiscovery"],"pluginDependencies":["@scrypted/prebuffer-mixin"]},"_npmVersion":"10.9.2","description":"KingCam ONVIF Camera Plugin for Scrypted","directories":{},"_nodeVersion":"22.14.0","dependencies":{"xml2js":"^0.6.2","@scrypted/sdk":"^0.5.48","@scrypted/common":"^1.0.2","@koush/axios-digest-auth":"^0.8.7"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^24.8.1","@types/xml2js":"^0.4.14"},"_npmOperationalInternal":{"tmp":"tmp/scrypted-plugin-kingcam_0.0.3_1760948550597_0.18960916267473338","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@danelowe/scrypted-plugin-kingcam","version":"0.0.4","description":"KingCam ONVIF Camera Plugin for Scrypted","author":{"name":"Scrypted"},"license":"Apache","scripts":{"scrypted-setup-project":"scrypted-setup-project","prescrypted-setup-project":"scrypted-package-json","build":"scrypted-webpack","prepublishOnly":"NODE_ENV=production scrypted-webpack","prescrypted-vscode-launch":"scrypted-webpack","scrypted-vscode-launch":"scrypted-deploy-debug","scrypted-deploy-debug":"scrypted-deploy-debug","scrypted-debug":"scrypted-debug","scrypted-deploy":"scrypted-deploy","scrypted-readme":"scrypted-readme","scrypted-package-json":"scrypted-package-json"},"keywords":["scrypted","plugin","onvif","camera"],"scrypted":{"name":"KingCam ONVIF Camera Plugin","type":"DeviceProvider","interfaces":["Settings","DeviceProvider","DeviceCreator","DeviceDiscovery"],"pluginDependencies":["@scrypted/prebuffer-mixin"]},"dependencies":{"@koush/axios-digest-auth":"^0.8.7","@scrypted/common":"^1.0.2","@scrypted/sdk":"^0.5.48","xml2js":"^0.6.2"},"devDependencies":{"@types/node":"^24.8.1","@types/xml2js":"^0.4.14"},"_id":"@danelowe/scrypted-plugin-kingcam@0.0.4","gitHead":"361aaa77739a217f6634bca05a62471ea77e5beb","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-UeMOLwmKslgo4RqjXE/IAgaU88z7HtATrNgQ6M1WMOtl47HzKM8FHwpdEY4oVHXBkcVt7KkWAzCqhA1J7ti46Q==","shasum":"fe6443d7a5278fea2566e3844d8c54c523f2f89c","tarball":"https://registry.npmjs.org/@danelowe/scrypted-plugin-kingcam/-/scrypted-plugin-kingcam-0.0.4.tgz","fileCount":20,"unpackedSize":478042,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEIpT6Oubs8DhNvCrCLAxIKSFT77KKeJbZu26L3zj45xAiBUzuYpraBty+3lERtmd/oSggWkedorqkG2Hs1+a+eBBA=="}]},"_npmUser":{"name":"danelowe","email":"dane.r.lowe@gmail.com"},"directories":{},"maintainers":[{"name":"danelowe","email":"dane.r.lowe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/scrypted-plugin-kingcam_0.0.4_1760948956502_0.2319627702197613"},"_hasShrinkwrap":false}},"time":{"created":"2022-06-24T01:31:01.374Z","modified":"2025-10-20T08:29:17.702Z","0.0.1":"2022-06-24T01:31:01.698Z","0.0.2":"2023-07-23T08:32:35.926Z","0.0.3":"2025-10-20T08:22:30.833Z","0.0.4":"2025-10-20T08:29:16.717Z"},"author":{"name":"Scrypted"},"license":"Apache","keywords":["scrypted","plugin","onvif","camera"],"description":"KingCam ONVIF Camera Plugin for Scrypted","maintainers":[{"name":"danelowe","email":"dane.r.lowe@gmail.com"}],"readme":"# KingCam ONVIF Plugin for Scrypted\n\nI've implemented a custom client that supports the minimum required ONVIF endpoints to get KingCam cameras set up with Scrypted. This is in `src/client`.\n\n`common.ts` and `rtsp.ts` are extracted from Scrypted.\n\n## publish\n\n`npm publish --access public`\n\n## Deploy to scrypted\n`npm run build && npm run scrypted-deploy 192.168.1.100`\n\n## Scrypted\n\nSet up to make security cameras compatible with HomeKit Secure Video.\n\nInstall `@danelowe/scrypted-plugin-kingcam` plugin, `@scrypted/homekit` `@scrypted/snapshot`\n\nThe cameras should have motion detection enabled, and able to send ONVIF events to scrypted.\n\n### Required docker config:\n```dockerfile\nFROM koush/scrypted:v0.1.6\nRUN apt-get -y update\nRUN apt-get install -y ffmpeg\n```\n```yaml\n  scrypted:\n    build: ./scrypted/\n    privileged: true # this may not be necessary for all setups\n    container_name: scrypted\n    restart: always\n    network_mode: host\n    volumes:\n        - ./volumes/scrypted:/server/volume\n        # Adds `{ type: () => true }` to plain text body parser to allow XML or other non-JSON bodies to be posted.\n        - ./scrypted/plugin-http.js:/server/node_modules/@scrypted/server/dist/plugin/plugin-http.js\n    devices:\n      - /dev/dri/renderD128 # for intel hwaccel\n    environment:\n      SCRYPTED_FFMPEG_PATH: /usr/bin/ffmpeg # Use OS package rather than node package, to support VAAPI hardware decoding.\n    logging:\n        driver: \"json-file\"\n        options:\n            max-size: \"10m\"\n            max-file: \"10\"\n```\n\n### Scrypted setup for each camera\n\n- Integrations, WebRTC (required), Rebroadcast, Transcoding, HomeKit, Snapshot.\n- Disable audio. The cameras might actually support audio, but HKSV requires AAC (which may be supported by camera?), and we don't really want audio.\n- HomeKit Tab - Transcoding Debug Mode.\n- HomeKit Pairing - Standalone Accessory Mode.\n- Transcoding - All streams: `-hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p`\n- Stream: MainStream, Stream: SubStream - set RTSP parser to FFMPEG TCP\n- Snapshot: from prebuffer.\n\n**Reload plugins to ensure cameras are no longer set up in bridge mode*\n\n## Enable motion detection.\n\nMotion detection is performed by the camera, and posted to scrypted.\n\nMotion detection should be enabled on each camera. \n\nIf you don't have Internet Explorer, the easiest method is telnet.\n\n```\n➜  onvif telnet 192.168.1.155 9999\nTrying 192.168.1.155...\nConnected to 192.168.1.155.\nEscape character is '^]'.\nlist\n[Success]list;accfg;aeawbblccfg;alarmincfg;alarmoutcfg;alarmtest;alarmhost;audiocfg;audiotestcfg;blackmargincfg;ca2aicfg;ca2host;ca2mdcfg;ca2vlcfg;ca2vmcfg;capturecfg;ca2ipconflict;ca2linkbroken;ca2diskfull;ca2diskerror;ddns9299;ddns3322;devrecordcfg;devvecfg;denoisecfg;emailcfg;ethcfg;ftpclicfg;getalarmevent;ircfg;mdcfg;mdmbcfg;nfsrecordcfg;osdcfg;osdstrcfg;osdstylecfg;portcfg;pppoecfg;roicfg;sambarecordcfg;searchfilecfg;getlog;sysctrl;timecfg;update;ntpcfg;upnpcfg;sdcard;userpasswd;veprofile;version;vicfg;vlcfg;toggle;videomaskcfg;capability;showweb;ptzcfg;checkuser;authmode;diskalarmcfg;vmaskalarmcfg;prienv;bootargs;guobiaocfg;guobiaoaddr;tslivecfg;hngscfg;jstarcfg;tutkcfg;format;mkdosfsprogbar;lensdpc;lenscs;danalecfg;danaleconf;dhcpnotify;outispadjust;\n\nConnection closed by foreign host.\n➜  onvif telnet 192.168.1.155 9999\nTrying 192.168.1.155...\nConnected to 192.168.1.155.\nEscape character is '^]'.\nmdmbcfg -act list\n[Success]enable=1;thresh=100;mbdesc=0000000000000000000000,0000000000000000000000,0000000000000000000000,0000000000000000000000,0000000000000000000000,0000000000000000000000,0000000000000000000000,0000000000000000000000,0000000000000000000000,0000000000000000000000,0000000000000000000000,0000000000000000000000,0000000000000000000000,0000000000000000000000,0000000000000000000000,0000000000000000000000,0000000000000000000000,0000000000000000000000,;timestrategy=0:2164260863,1:2164260863,2:2164260863,3:2164260863,4:2164260863,5:2164260863,6:2164260863,;\n```\n\n```bash\n➜  ~ telnet 192.168.1.155 9999\nTrying 192.168.1.155...\nConnected to 192.168.1.155.\nEscape character is '^]'.\nmdmbcfg -act list\n[Success]enable=1;thresh=20;mbdesc=0000000000000000000000,0000000000000000000000,0111111111111111111000,0111111111111111111000,0111111111111111111000,0111111111111111111000,0111111111111111111000,0111111111111111111000,0111111111111111111000,0111111111111111111000,0111111111111111111000,0111111111111111111000,0111111111111111111000,0111111111111111111000,0111111111111111111000,0000000000000000000000,0000000000000000000000,0000000000000000000000,;timestrategy=0:2164260863,1:2164260863,2:2164260863,3:2164260863,4:2164260863,5:2164260863,6:2164260863,;\n```\n\n`thresh` is sensitivity threshold. 100 is most sensitive, 0 is least sensitive.\n\n`mbdesc` is 18 sets of 22 bits. Presumably this is just splitting the screen into boxes, with `1` indicating that motion in that box should be detected.\n\n```\n0000000000000000000000,\n0000000000000000000000,\n0111111111111111111000,\n0111111111111111111000,\n0111111111111111111000,\n0111111111111111111000,\n0111111111111111111000,\n0111111111111111111000,\n0111111111111111111000,\n0111111111111111111000,\n0111111111111111111000,\n0111111111111111111000,\n0111111111111111111000,\n0111111111111111111000,\n0111111111111111111000,\n0000000000000000000000,\n0000000000000000000000,\n0000000000000000000000\n```\n\n`timestrategy` is the times that motion detection is enabled by day of week. `2164260863` is all day.\n\nTo enable motion detection at all time, in all areas of the camera, with a detection sensitivity of 20/100, run:\n\n```\nmdmbcfg -act set -enable 1 -thresh 20 -mbdesc 1111111111111111111111,1111111111111111111111,1111111111111111111111,1111111111111111111111,1111111111111111111111,1111111111111111111111,1111111111111111111111,1111111111111111111111,1111111111111111111111,1111111111111111111111,1111111111111111111111,1111111111111111111111,1111111111111111111111,1111111111111111111111,1111111111111111111111,1111111111111111111111,1111111111111111111111,1111111111111111111111 -timestrategy 0:2164260863,1:2164260863,2:2164260863,3:2164260863,4:2164260863,5:2164260863,6:2164260863;\n```","readmeFilename":"README.md"}