{"id":18637863,"url":"https://github.com/ihrigb/node-doorbird","last_synced_at":"2025-04-11T10:30:54.780Z","repository":{"id":38613491,"uuid":"404133501","full_name":"ihrigb/node-doorbird","owner":"ihrigb","description":"Node client library for Doorbird's HTTP API.","archived":false,"fork":false,"pushed_at":"2025-04-05T02:03:01.000Z","size":1421,"stargazers_count":5,"open_issues_count":3,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-06T19:06:41.060Z","etag":null,"topics":["client-library","doorbell","doorbird","library","smarthome"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ihrigb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2021-09-07T21:58:15.000Z","updated_at":"2025-04-02T19:30:57.000Z","dependencies_parsed_at":"2022-08-03T04:46:06.503Z","dependency_job_id":"8f00ab69-7690-4144-b77a-703a1b39f20e","html_url":"https://github.com/ihrigb/node-doorbird","commit_stats":{"total_commits":111,"total_committers":3,"mean_commits":37.0,"dds":0.4774774774774775,"last_synced_commit":"b6a76c70e8504044d4ff39cfd984132182d02fa9"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ihrigb%2Fnode-doorbird","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ihrigb%2Fnode-doorbird/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ihrigb%2Fnode-doorbird/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ihrigb%2Fnode-doorbird/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ihrigb","download_url":"https://codeload.github.com/ihrigb/node-doorbird/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248374699,"owners_count":21093372,"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":["client-library","doorbell","doorbird","library","smarthome"],"created_at":"2024-11-07T05:38:06.218Z","updated_at":"2025-04-11T10:30:54.512Z","avatar_url":"https://github.com/ihrigb.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-doorbird\n\n[![](https://img.shields.io/npm/v/doorbird.svg)](https://www.npmjs.com/package/doorbird)\n[![Apache 2.0 License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/ihrigb/node-doorbird/blob/master/LICENSE)\n\nThis is a NodeJS library to interact with Doorbird Door Stations, based on their API.\n\n## Disclaimer\n\nAs this library potentially interacts with devices that are integrated in the security of the building, I want you to be aware of the fact, that you are using it at your own risk. I cannot be held responsible for any damage that occurs by the usage of this library.\n\n## Installation\n\n```bash\nnpm i doorbird\n```\n\n## Usage\n\n### Prerequisites\n\nIn order to use Doorbird's HTTP API, you need a user with privileges to use the API. For specific things, such as live view, open doors, there are dedicated privilates you have to grant to the user, if needed.\n\n### Client Initialization\n\n```typescript\nlet doorbird = new Doorbird({\n    scheme: Scheme.http, // or https\n    host: '\u003cDoorbid IP Address\u003e',\n    username: '\u003cDoorbird Username\u003e',\n    password: '\u003cDoorbird Password\u003e',\n    certificate: '\u003ccertificate in pem format\u003e' // can be omitted and is then loaded from the host\n});\n```\n\n### Session Management\n\n```typescript\n// initialize a session\ndoorbird.initializeSession().then(response =\u003e {\n    let sessionId = response.SESSIONID;\n}).catch(err =\u003e {\n    console.log(err);\n});\n\n// destroy a session\ndoorbird.destroySession().then(response =\u003e {\n    console.log(\"Session destroyed.\");\n}).catch(err =\u003e {\n    console.log(err);\n});\n```\n\n### Basic Control\n\n```typescript\n// get station info\ndoorbird.getInfo().then(response =\u003e {\n    console.log(response.VERSION[\"DEVICE-TYPE\"]);\n}).catch(err =\u003e {\n    console.log(err);\n});\n\n// open door (switch relay)\ndoorbird.openDoor(\"1\").then(response =\u003e {\n    console.log(\"Door open.\");\n}).catch(err =\u003e {\n    console.log(err);\n});\n\n// lights on (nightvision)\ndoorbird.lightOn().then(response =\u003e {\n    console.log(\"Lights switched on.\");\n}).catch(err =\u003e {\n    console.log(err);\n});\n\n// restart device\ndoorbird.restart().then(() =\u003e {\n    console.log(\"Doorbird device restarted.\");\n}.catch(err =\u003e {\n    console.log(err);\n});\n```\n\n### Favorite Handling\n\n```typescript\n// list favorites\ndoorbird.listFavorites().then(response =\u003e {\n    console.log(\"Favorites:\", response);\n}).catch(err =\u003e {\n    console.log(err);\n});\n\n// create favorite\ndoorbird.createFavorite(FavoriteType.http, {\n    title: 'My Favorite',\n    value: 'http://anyIp/doorbird'\n}).then(() =\u003e {\n    console.log(\"Favorite created.\");\n}).catch(err =\u003e {\n    console.log(err);\n});\n\n// update favorite\ndoorbird.createFavorite(\"favoriteId\", FavoriteType.http, {\n    title: 'My Favorite',\n    value: 'http://anyChangedIp/doorbird'\n}).then(() =\u003e {\n    console.log(\"Favorite updated.\");\n}).catch(err =\u003e {\n    console.log(err);\n});\n\n// delete favorite\ndoorbird.createFavorite(\"favoriteId\", FavoriteType.http).then(() =\u003e {\n    console.log(\"Favorite deleted.\");\n}).catch(err =\u003e {\n    console.log(err);\n});\n```\n\n### Schedule\n\n```typescript\n// get schedule\ndoorbird.getSchedule().then(response =\u003e {\n    console.log(\"Schedule:\", response);\n}).catch(err =\u003e {\n    console.log(err);\n});\n\n// create schedule entry\ndoorbird.createScheduleEntry({\n    input: 'doorbell',\n    output: {\n        event: 'http',\n        param: 'My Favorite',\n        schedule: 'once'\n    }\n}).then(() =\u003e {\n    console.log(\"Schedule entry created.\");\n}).catch(err =\u003e {\n    console.log(err);\n});\n\n// update schedule entry\ndoorbird.updateScheduleEntry({\n    input: 'doorbell',\n    output: {\n        event: 'http',\n        param: 'My Favorite',\n        schedule: 'once'\n    }\n}).then(() =\u003e {\n    console.log(\"Schedule entry updated.\");\n}).catch(err =\u003e {\n    console.log(err);\n});\n\n// delete schedule entry\ndoorbird.deleteScheduleEntry(\"doorbell\", \"My Favorite\").then(() =\u003e {\n    console.log(\"Schedule entry deleted.\");\n}).catch(err =\u003e {\n    console.log(err);\n});\n```\n\n### SIP\n\n\u003e To be documented. (Already available in the library)\n\n### Image, Audio and Video URLs\n\n```typescript\n// get image url\nlet imageUrl = doorbird.getImageUrl();\n\n// get audio url\nlet audioUrl = doorbird.getAudioUrl(sessionId)\n\n// get video url\nlet videoUrl = doorbird.getVideoUrl(sessionId);\n```\n\n### dgram UDP Socket for Ring and Motion Events\n\n```typescript\n// initialize dgram UDP socket\nlet doorbirdUdpSocket = doorbird.startUdpSocket(6524);\n\n// register a listener for ring events\ndoorbirdUdpSocket.registerRingListener(ringEvent =\u003e {\n    console.log(\"IntercomId:\", ringEvent.intercomId);\n    console.log(\"Event:\", ringEvent.event);\n    console.log(\"Time:\", ringEvent.timestamp);\n});\n\n// register a listener for motion events\ndoorbirdUdpSocket.registerMotionListener(motionEvent =\u003e {\n    console.log(\"IntercomId:\", motionEvent.intercomId);\n    console.log(\"Time:\", motionEvent.timestamp);\n});\n\n// close dgram UDP socket\ndoorbirdUdpSocket.close();\n```\n\n## Doorbird API\n\nRevision: 0.36\nDate: November 13th 2023\nhttps://www.doorbird.com/downloads/api_lan.pdf?rev=0.36\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fihrigb%2Fnode-doorbird","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fihrigb%2Fnode-doorbird","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fihrigb%2Fnode-doorbird/lists"}