{"id":18665380,"url":"https://github.com/robertklep/homey-log-to-file","last_synced_at":"2025-10-07T06:57:40.063Z","repository":{"id":142182112,"uuid":"594453229","full_name":"robertklep/homey-log-to-file","owner":"robertklep","description":"Capture stdout/stderr of Homey app to a logfile","archived":false,"fork":false,"pushed_at":"2023-01-29T08:03:25.000Z","size":2,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-09T13:01:47.227Z","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/robertklep.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":"2023-01-28T15:50:18.000Z","updated_at":"2024-07-23T04:28:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"c4c0de3b-abdf-4984-ac73-248683fc6cee","html_url":"https://github.com/robertklep/homey-log-to-file","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/robertklep/homey-log-to-file","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertklep%2Fhomey-log-to-file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertklep%2Fhomey-log-to-file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertklep%2Fhomey-log-to-file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertklep%2Fhomey-log-to-file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertklep","download_url":"https://codeload.github.com/robertklep/homey-log-to-file/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertklep%2Fhomey-log-to-file/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278734412,"owners_count":26036404,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-07T08:27:27.173Z","updated_at":"2025-10-07T06:57:40.048Z","avatar_url":"https://github.com/robertklep.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# homey-log-to-file\n\nCapture stdout/stderr of a Homey app and write it to a logfile (default: `/userdata/std.log`).\n\nThe logfile can be retrieved through an HTTP request to your Homey (default port: 8008)\n\n## Installation\n\nAdd the package to your Homey app.\n```\nnpm i robertklep/homey-log-to-file\n```\n\n## Usage\n\n```\nconst LogToFile = require('homey-log-to-file');\n...\n\nclass MyApp extends Homey.App {\n\n  async onInit() {\n    await LogToFile();\n    ...\n  }\n}\n```\n\nMake sure to remove the call (and optionally the package itself) from your app before publishing to the app store.\n\n## Configuration\n\n```\nasync LogToFile(logfile = '/userdata/std.log', port = 8008, flags = 'w')\n```\n\n* `logfile`: file to write log statements to (`/userdata` is where apps can write persistent data to, and it's highly recommended to use this directory for the logfile)\n* `port`: port on which the HTTP server will listen\n* `flags`: [file system flags](https://nodejs.org/api/fs.html#file-system-flags) to use for the logfile (the default, `w`, will create or truncate the file; if you want to keep the logfile contents across restarts of your app, use `a`) \n\n## Retrieving the logfile contents\n\nThe contents of the logfile can be downloaded by making an HTTP request to `http://IP.OF.YOUR.HOMEY:PORT/`\n\n```shell\ncurl http://192.168.1.8:8008/\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertklep%2Fhomey-log-to-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertklep%2Fhomey-log-to-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertklep%2Fhomey-log-to-file/lists"}