{"id":23480391,"url":"https://github.com/alump/fridgecop","last_synced_at":"2026-04-25T21:34:09.605Z","repository":{"id":144881070,"uuid":"201826750","full_name":"alump/fridgecop","owner":"alump","description":"Fridge Cop is simple node.js service to be called from IFTTT when IOT door sensor fires.","archived":false,"fork":false,"pushed_at":"2019-08-12T21:23:13.000Z","size":161,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T21:14:23.212Z","etag":null,"topics":["iot","nodejs","rest-api"],"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/alump.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":"2019-08-11T23:36:59.000Z","updated_at":"2019-08-12T21:23:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"442f63d4-47d4-4c55-b277-48e8280354e7","html_url":"https://github.com/alump/fridgecop","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alump/fridgecop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alump%2Ffridgecop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alump%2Ffridgecop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alump%2Ffridgecop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alump%2Ffridgecop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alump","download_url":"https://codeload.github.com/alump/fridgecop/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alump%2Ffridgecop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32278249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["iot","nodejs","rest-api"],"created_at":"2024-12-24T20:12:24.071Z","updated_at":"2026-04-25T21:34:09.590Z","avatar_url":"https://github.com/alump.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fridge Cop\n\n\u003cimg src=\"https://github.com/alump/fridgecop/raw/master/public/images/fridgecop.png\" width=\"128\" height=\"128\"\u003e\n\n\u003cimg src=\"https://github.com/alump/fridgecop/raw/master/docs/notification-demo.png\"\u003e\n\n## What Is It?\n\nMe just trying to do simple REST service to call via IFTTT when it receives on/off signals from my IOT door open sensor. Idea is to use this to trigger alarm if fridge door is left open for more than N minutes. This is just fastly written PoC, free free to steal and adapt if useful.\n\n## Usage\n\n### Pull code and dependencies\nTo run app you need to have git, node and npm available on your machine.\n\u003e git clone https://github.com/alump/fridgecop.git\n\n\u003e cd fridgecop\n\n\u003e npm install\n\n### Configuration\n\nTo define configuration, make actual config file from example file.\n\n\u003e cp config/fridgecop-config-example.json config/fridgecop-config.json\n\n In file there are values `` and ``, generate those values with command:\n\n\u003e`./node_modules/.bin/web-push generate-vapid-keys`\n\nAfter you have updated `config/fridgecop-config.json`, you can simply start application with:\n\n### Run\n\n\u003e node app.js\n\nAfter this you should see \"Service started\" message.\n\n### Calling Service\n\n#### REST/JSON Calls\n\nTo get current status call (GET): http://localhost:3000/status\n\nTo send \"open\" update call (GET): http://localhost:3000/open?secretKey=XXX\n\nTo send \"closed\" update call (GET): http://localhost:3000/closed?secretKey=XXX\n\nTo read the latest events (GET): http://localhost:3000/history\n\n#### Browser\n\nThere is also page for browser: http://localhost:3000\n\n\n### Configuration\n\nYou can get initial configuration copying example file to your config:\n\u003e cp config/fridgecop-config-example.json config/fridgecop-config.json\n\n#### Configuration Values in config/fridgecop-config.json\n| Key | Example Value | Description |\n|---|---|---|\n| \"alarmMinutes\"  | 3  | How long door has to be open to cause alarm  |\n| \"dbPath\" | \"./data\" | Path were app's db files are stored |\n| \"deviceName\"  |  \"Fridge Door\" |  Name of your device |\n| \"email\"  |  \"john.doe@example.com\" |  Your email address |\n| \"historySize\"  | 10  | Amount of latest history events given by API  |\n| \"httpPort\"  | 3000 | Which TCP port app will listen  |\n| \"secretKey\"  | \"password\"  | Secret key needed in open and closed calls  |\n| \"serviceWorkerScope\" | \"/\" | Replace if your app's path if not in domain \"root\" |\n| \"timeZone\" | \"America/Los_Angeles\"  | Time zone used with times |\n| \"vapidPublicKey\" | | Generate value with `./node_modules/.bin/web-push generate-vapid-keys` |\n| \"vapidPrivateKey\" | | Generate value with `./node_modules/.bin/web-push generate-vapid-keys` |\n\n## Version History\n\n### 0.0.1 Initialial Release (TBD)\n- Still under development\n\n## Dependencies\n\n| Library | Used for |\n|---|---|\n| express | To offer HTTP services outside |\n| express-handlebars | To template browser pages |\n| express-ws | To push updates to browser |\n| moment-timezone | To modify and present dates and times |\n| nedb | To store information over restarts |\n| uuid | To generate unique IDs |\n| web-push | To push notifications to users |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falump%2Ffridgecop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falump%2Ffridgecop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falump%2Ffridgecop/lists"}