{"id":13588765,"url":"https://github.com/kbrashears5/typescript-homebridge-schedule","last_synced_at":"2025-04-11T06:51:21.081Z","repository":{"id":38409050,"uuid":"260754703","full_name":"kbrashears5/typescript-homebridge-schedule","owner":"kbrashears5","description":"Scheduled, repeatable triggers for Homebridge automation with HomeKit","archived":false,"fork":false,"pushed_at":"2024-06-01T05:32:24.000Z","size":640,"stargazers_count":56,"open_issues_count":9,"forks_count":10,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-20T02:40:52.490Z","etag":null,"topics":["automation","homebridge","homebridge-plugin","plugin","repeat","schedule","typescript"],"latest_commit_sha":null,"homepage":"https://github.com/kbrashears5/typescript-homebridge-schedule#readme","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kbrashears5.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-05-02T18:55:33.000Z","updated_at":"2024-12-13T10:59:41.000Z","dependencies_parsed_at":"2024-11-06T08:34:00.381Z","dependency_job_id":"6ec01b8b-9621-4b00-aa63-2fbbeb015304","html_url":"https://github.com/kbrashears5/typescript-homebridge-schedule","commit_stats":{"total_commits":100,"total_committers":7,"mean_commits":"14.285714285714286","dds":0.6799999999999999,"last_synced_commit":"682bf6d6911ad70477a439d43141d709471fe3a9"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbrashears5%2Ftypescript-homebridge-schedule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbrashears5%2Ftypescript-homebridge-schedule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbrashears5%2Ftypescript-homebridge-schedule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbrashears5%2Ftypescript-homebridge-schedule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kbrashears5","download_url":"https://codeload.github.com/kbrashears5/typescript-homebridge-schedule/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248358548,"owners_count":21090401,"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":["automation","homebridge","homebridge-plugin","plugin","repeat","schedule","typescript"],"created_at":"2024-08-01T15:06:54.688Z","updated_at":"2025-04-11T06:51:21.058Z","avatar_url":"https://github.com/kbrashears5.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eHomebridge-Schedule\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \n\u003cb\u003eAutomate Homebridge based on interval or cron\u003c/b\u003e\n    \n[![CI/CD](https://github.com/kbrashears5/typescript-homebridge-schedule/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/kbrashears5/typescript-homebridge-schedule/actions/workflows/ci-cd.yml)\n[![npm](https://img.shields.io/npm/v/homebridge-schedule)](https://img.shields.io/npm/v/homebridge-schedule)\n[![downloads](https://img.shields.io/npm/dt/homebridge-schedule)](https://img.shields.io/npm/dt/homebridge-schedule)\n\n[![verified-by-homebridge](https://badgen.net/badge/homebridge/verified/purple)](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)\n\n\u003c/div\u003e\n\nThis [Homebridge](https://github.com/nfarina/homebridge) plugin allows you to create HomeKit automations for more than just the default \"A time of day occurs\"\n\nThe original thought for this was to create an hourly automation to check my thermostat in the house and send me a notification if it was above or below a certain threshold\n\nHomebridge-Schedule is similar to [Homebridge-Dummy](https://github.com/nfarina/homebridge-dummy), in the sense that it creates some dummy switches in HomeKit that turn on at your desired interval. They will turn off one second later. This is useful for triggering automations, or even shortcuts.\n\n## Installation\n\n```\nsudo npm i homebridge-schedule@latest -g\n```\n\n## Usage\n\n### Interval Based\n\nAdd accessories to your `config.json` similar to below for interval based schedules:\n\n```json\n{\n  \"accessories\": [\n    {\n      \"accessory\": \"Schedule\",\n      \"name\": \"Hourly\",\n      \"interval\": 60,\n      \"serial\": \"123456789\",\n      \"enabledDuration\": 10\n    }\n  ]\n}\n```\n\n| Property         | Description                                                                      |\n|------------------|----------------------------------------------------------------------------------|\n| Accessory        | Must be \"Schedule\"                                                               |\n| Name             | Unique name for the dummy switch                                                 |\n| Interval         | Interval, in minutes                                                             |\n| Serial           | Serial number to give the accessory in HomeKit. Defaults to 123456789            |\n| Enabled Duration | Number of seconds to leave switch enabled before disabling. Defaults to 1 second |\n\nUpon startup of Homebridge, the device will turn on at the specified interval\n\n#### Notes\n\nThe interval starts when Homebridge is started up. If you want something to run hourly on the hour, then you need to make sure Homebridge is started up on the hour\n\nRarely, if your HomeKit bridge is too sluggish to detect Homebridge Schedule switches turning on and off, you can configure an Enabled Duration to have the switches remain on longer\n\n### Cron Based\n\nAdd accessories to your `config.json` similar to below for cron based schedules:\n\n```json\n{\n  \"accessories\": [\n    {\n      \"accessory\": \"Schedule\",\n      \"name\": \"Hourly\",\n      \"cron\": \"* * * * * *\",\n      \"serial\": \"123456789\"\n    }\n  ]\n}\n```\n\n| Property         | Description                                                                      |\n|------------------|----------------------------------------------------------------------------------|\n| Accessory        | Must be \"Schedule\"                                                               |\n| Name             | Unique name for the dummy switch                                                 |\n| Cron             | Cron string                                                                      |\n| Serial           | Serial number to give the accessory in HomeKit. Defaults to 123456789            |\n| Enabled Duration | Number of seconds to leave switch enabled before disabling. Defaults to 1 second |\n\nCron string details: https://www.npmjs.com/package/cron\n\nCron string uses seconds, so for an hourly cron string use:\n\n\u003e \"0 0 \\* \\* \\* \\*\"\n\n\u003e \"{seconds} {minutes} {hours} {days} {months} {weeks}\"\n\n## Use Cases\n\nI have created a \"room\" called Automation in my HomeKit, which then allows me to create an automation \"When the Automation Hourly turns on\" to check my thermostat temperature, check the current outside temperature at my house, and based on some conditions, set the thermostat.\n\nSteps:\n\n1. Create new automation based on \"An Accessory is Controlled\"\n2. Find your newly created dummy switch\n3. Select Turns On and add any desired time or people conditions\n4. You can then choose a scene or another accessory to control, or at the very bottom, you can create a shortcut\n5. Done! You now have one automation for things you want to happen hourly rather than 24\n\n## Creating HomeKit Automations\n\nCreate new Accessory automation:\n![Step1](https://github.com/kbrashears5/typescript-homebridge-schedule/blob/master/images/step1.jpg?raw=true)\n\nChoose the accessory created by homebridge-schedule:\n![Step2](https://github.com/kbrashears5/typescript-homebridge-schedule/blob/master/images/step2.jpg?raw=true)\n\nSelect when it turns on or turns off and any time or people configurations\n![Step3](https://github.com/kbrashears5/typescript-homebridge-schedule/blob/master/images/step3.jpg?raw=true)\n\nScroll all the way to the bottom and choose `Convert to Shortcut`\n![Step4](https://github.com/kbrashears5/typescript-homebridge-schedule/blob/master/images/step4.jpg?raw=true)\n\nCreate shortcut:\n\n1. Get the current temperature of a HomeKit thermostat\n2. Convert to Fahrenheit\n3. If the indoor temperature is greater than a threshold\n   - Get current weather outside\n   - Convert to Fahrenheit\n   - If the current weather outside is also above a threshold\n     - Turn on fans, set thermostat, etc.\n\n![Step5](https://github.com/kbrashears5/typescript-homebridge-schedule/blob/master/images/step5_1.jpg?raw=true)\n![Step5](https://github.com/kbrashears5/typescript-homebridge-schedule/blob/master/images/step5_2.jpg?raw=true)\n\n## Development\n\nClone the latest and run\n\n```npm\nnpm run prep\n```\n\nto install packages and prep the git hooks\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkbrashears5%2Ftypescript-homebridge-schedule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkbrashears5%2Ftypescript-homebridge-schedule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkbrashears5%2Ftypescript-homebridge-schedule/lists"}