{"id":23130031,"url":"https://github.com/tetreum/motion-broker","last_synced_at":"2026-05-11T05:44:20.235Z","repository":{"id":146311264,"uuid":"159955277","full_name":"tetreum/motion-broker","owner":"tetreum","description":"Acts as broker, receiving requests to record from ipcameras and using vlc to save the stream.","archived":false,"fork":false,"pushed_at":"2018-12-02T10:42:08.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-09T17:46:12.245Z","etag":null,"topics":["ipcamera","nodejs","rtsp","vlc"],"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/tetreum.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":"2018-12-01T14:57:21.000Z","updated_at":"2020-01-15T20:52:49.000Z","dependencies_parsed_at":"2023-07-10T14:16:10.167Z","dependency_job_id":null,"html_url":"https://github.com/tetreum/motion-broker","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/tetreum%2Fmotion-broker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tetreum%2Fmotion-broker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tetreum%2Fmotion-broker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tetreum%2Fmotion-broker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tetreum","download_url":"https://codeload.github.com/tetreum/motion-broker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247135125,"owners_count":20889420,"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":["ipcamera","nodejs","rtsp","vlc"],"created_at":"2024-12-17T10:12:03.602Z","updated_at":"2026-05-11T05:44:15.188Z","avatar_url":"https://github.com/tetreum.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Motion broker\n\nThis app acts as broker, receiving requests to record from ipcameras and using vlc to record them.\n\nOldest records will be deleted automatically. Check [config.demo.js](https://github.com/tetreum/motion-broker/blob/master/conf.demo.js) do see the available options.\n\nHas only been tested with a Xiaomi Dafang in Windows.\n\n\n## Requirements\n- node \u003e= v8\n- VLC\n- Windows? (Should work on linux too, but i didn't test it)\n\n## Setup\n\n1. Copy conf.demo.js to conf.js\n2. Edit conf.js\n3. Start the app with `node index.js`\n\n## Usage\n\nWhenever one of your cameras detects motion it should query: `http://WHERE_THIS_APP_IS:3001/start` so system can start recording. Example:\n`curl http://192.168.0.155:3001/start 2\u003e/dev/null`\n\n`/start` will return a json containing file's name where the recording is begin saved.\n\nIf you're using a middle device to make the request/debbugging, you should point to `http://WHERE_THIS_APP_IS:3001/start?ip=CAMERA_IP` as by default it will try to get the stream from requester's ip.\n\n### Motion detection triggered recording script for Xiaomi Dafang hacked\nYour Dafang must have https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks firmware.\n\nFile path:`config/userscripts/motiondetection/startRecording.sh`\n\nContent:\n```sh\n#!/bin/sh\nif [ \"$1\" == \"on\" ]; then\n    response=$(/system/sdcard/bin/curl http://WHERE_THIS_APP_IS:3001/start 2\u003e/dev/null)\n\techo \"$response\"\nelif [ \"$1\" == \"off\" ]; then\n\tresponse=$(/system/sdcard/bin/curl http://WHERE_THIS_APP_IS:3001/stop 2\u003e/dev/null)\n\techo \"$response\"\nfi\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftetreum%2Fmotion-broker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftetreum%2Fmotion-broker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftetreum%2Fmotion-broker/lists"}