{"id":15669139,"url":"https://github.com/patchworkboy/domoticz-cam-bridge","last_synced_at":"2025-04-09T08:26:22.522Z","repository":{"id":147127361,"uuid":"65464052","full_name":"PatchworkBoy/domoticz-cam-bridge","owner":"PatchworkBoy","description":"IP Camera HTTP Alarm to Domoticz Virtual Switch","archived":false,"fork":false,"pushed_at":"2018-04-15T15:42:18.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-15T02:41:36.400Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PatchworkBoy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-11T11:27:32.000Z","updated_at":"2018-04-15T15:42:20.000Z","dependencies_parsed_at":"2023-05-14T03:30:45.636Z","dependency_job_id":null,"html_url":"https://github.com/PatchworkBoy/domoticz-cam-bridge","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatchworkBoy%2Fdomoticz-cam-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatchworkBoy%2Fdomoticz-cam-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatchworkBoy%2Fdomoticz-cam-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatchworkBoy%2Fdomoticz-cam-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PatchworkBoy","download_url":"https://codeload.github.com/PatchworkBoy/domoticz-cam-bridge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248001848,"owners_count":21031481,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T14:21:39.725Z","updated_at":"2025-04-09T08:26:22.503Z","avatar_url":"https://github.com/PatchworkBoy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# domoticz-cam-bridge\nA quick bodge of an unrefined IP Camera HTTP \u0026 FTP Alarm to Domoticz Virtual Switch Bridge\n\nClone the repo...\n\n```\ncd ~/\ngit clone https://github.com/PatchworkBoy/domoticz-cam-bridge.git\n```\n\nThen head to ~/domoticz-cam-bridge/ and bring in the dependencies by running...\n\n```\ncd ~/domoticz-cam-bridge/\nnpm install\n```\n\nEdit the source code (server_http.js \u0026 server_ftp.js), creating enough servers/ports/idx's for your Cameras / Domoticz sensors... all should make itself apparent from the comments. Each script is set up for 2 cameras. Just replicate the necessary bits for more.\n\nCreate Virtual Switches in Domoticz, edit them and set their Switch Type to 'Motion Sensor', and specify an off timeout. Get their IDX Numbers from Domoticz \u003e Setup \u003e Devices, and enter into the code, replacing mine. \n\nThe script will send the 'On' command to Domoticz while it detects motion, and Domoticz will reset the switch after the timeout period in seconds of inactivity.\n\nSet each IP Camera's FTP Alarm to the relevant IP \u0026 Port via the camera's GUI or CLI:\n\n- Cam1: http://[domoticzip]:8089\n- Cam2: http://[domoticzip]:8090\n\nSet each IP Camera's HTTP Alarm to the relevant IP \u0026 Port via the camera's GUI or CLI:\n\n- Cam3: http://[domoticzip]:8091\n- Cam4: http://[domoticzip]:8092\n\nLaunch with forever (replace {path}):\n\n```\nsudo npm install -g forever  //if you don't already have it!\nforever start ~/domoticz-cam-bridge/server_http.js\nforever start ~/domoticz-cam-bridge/server_ftp.js\n```\n\nRun at boot on Jessie via...\n\n```\nsudo pico /lib/systemd/system/domoticz-http-cam-bridge.service\n```\n\nCopy \u0026 Paste in...\n```\n[Unit]\nDescription=Domotic HTTP Cam Bridge Service\nAfter=multi-user.target\n\n[Service]\nUser=pi\nType=idle\nExecStart=/usr/bin/forever start /home/pi/domoticz-cam-bridge/server_http.js\n\n[Install]\nWantedBy=multi-user.target\n```\n\n{ctrl-o to save, ctrl-x to quit}\n\n```\nsudo pico /lib/systemd/system/domoticz-ftp-cam-bridge.service\n```\n\nCopy \u0026 Paste in...\n```\n[Unit]\nDescription=Domotic FTP Cam Bridge Service\nAfter=multi-user.target\n\n[Service]\nUser=pi\nType=idle\nExecStart=/usr/bin/forever start /home/pi/domoticz-cam-bridge/server_ftp.js\n\n[Install]\nWantedBy=multi-user.target\n```\n\n{ctrl-o to save, ctrl-x to quit}\n\nNow run:\n```\nsudo chmod 644 /lib/systemd/system/domoticz-http-cam-bridge.service\nsudo chmod 644 /lib/systemd/system/domoticz-ftp-cam-bridge.service\nsudo systemctl daemon-reload\nsudo systemctl enable domoticz-http-cam-bridge.service\nsudo systemctl enable domoticz-ftp-cam-bridge.service\nsudo reboot\n```\n\nYou now no longer need to manually start the cam bridge. It should run automatically at boot up.\n\nTo check bridge Status...\n\n```\nsudo systemctl status domoticz-http-cam-bridge.service -l\nsudo systemctl status domoticz-ftp-cam-bridge.service -l\n```\n\nTo restart the bridge...\n\n```\nforever restart /home/pi/domoticz-cam-bridge/server_http.js\nforever restart /home/pi/domoticz-cam-bridge/server_ftp.js\n```\n\nSee https://github.com/foreverjs/forever for proper 'forever' usage.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatchworkboy%2Fdomoticz-cam-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatchworkboy%2Fdomoticz-cam-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatchworkboy%2Fdomoticz-cam-bridge/lists"}