{"_id":"@davidhekim/homebridge-website-change-check","_rev":"2-7ec160a9a20e24a690a39325eb02f84d","name":"@davidhekim/homebridge-website-change-check","dist-tags":{"latest":"1.0.12"},"versions":{"1.0.10":{"name":"@davidhekim/homebridge-website-change-check","displayName":"Homebridge Website Change Check","version":"1.0.10","description":"Homebridge plugin for checking if a value on a website has changed.","main":"dist/index.js","scripts":{"clean":"rimraf ./dist","build":"npm run test:ci && rimraf ./dist && tsc","prepublishOnly":"npm run build","postpublish":"npm run clean","test":"jest","test:watch":"jest --watch --detectOpenHandles","test:ci":"","test:local":"jest --watch --testPathPattern=localDebugger.test.ts","publish-beta":"npm publish --tag beta","serve":""},"funding":[{"type":"paypal","url":"https://paypal.me/davidhekim"}],"repository":{"type":"git","url":"git+https://github.com/davidhekim/homebridge-website-change-check.git"},"author":{"name":"David Hekim","email":"d.hekim@hotmail.com","url":"https://hekim.dev/"},"engines":{"homebridge":">=1.0.0"},"license":"ISC","bugs":{"url":"https://github.com/davidhekim/homebridge-website-change-check/issues"},"keywords":["homebridge-plugin","website-change-check","change-updates"],"homepage":"https://github.com/davidhekim/homebridge-website-change-check#readme","devDependencies":{"@babel/core":"^7.12.17","@babel/preset-env":"^7.12.17","@babel/preset-typescript":"^7.12.17","@types/jest":"^26.0.20","@types/node":"^14.6.2","babel-jest":"^26.6.3","homebridge":"^1.1.2","http-server":"^0.12.3","jest":"^26.6.3","rimraf":"^3.0.2","start-server-and-test":"^1.12.0","typescript":"^4.0.2"},"dependencies":{"dotenv":"^8.2.0","playwright-core":"^1.9.2"},"gitHead":"0d6178e755706d0c41e0f1a9827219921c61e42d","_id":"@davidhekim/homebridge-website-change-check@1.0.10","_nodeVersion":"18.2.0","_npmVersion":"8.9.0","dist":{"integrity":"sha512-3A+w3R8TvH7qKnXdj6lsk6iVySk+HsBGSy91RVrIRuLzcNh6/P7TbNDuhOnVFYNs3lNTYPrcUGrtDJEZXaRm2Q==","shasum":"17417366186f9abd911bb91006f9f430b9df42c5","tarball":"https://registry.npmjs.org/@davidhekim/homebridge-website-change-check/-/homebridge-website-change-check-1.0.10.tgz","fileCount":60,"unpackedSize":196058,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCxsFOaVTLE3ZdVrjM0NuRagPqBFdnbAYvMvb/Qx2FZAwIhAN7XTmK1zuU+8CPsles/+jdA7bHRkkutaViLMYG1d7Ch"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkAxdYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqBrxAAgaAhfveZZzRvTkL4EovxGNrMpiP+f6IvE0i8jKxkv98oIPI5\r\nGlQmRkvd8kbepltF7X/ZlPPeEPa6GLjcgLpSzM93Vd+aM2F1nr/W5oP6QGkb\r\nsBgU+go2YXurhqBtBRvhh13xIsCXi1m8gE6t48VfjkXm7a8rLyIlWiRqF+9C\r\n0zDjqx0WZFxJOf1WSzqgU7KnmmGW522B/Gi+pl5x8E0Aw9ju/rbkfEiCk/ld\r\nXZsICe8Luyx/ToKMfkTHStFk5aF+ke79CvZm+jOkF7wCwsjbuohlSf5/Wa1I\r\n/GE5n/TZws2JiLzzxM4ZeGbOrOotugg+Gnrz3tahcPfWdeeWECrE9Tf0nwa/\r\nvtYeifpRAr4DJlrqNcjC+mazkiJLaWP0N+XftJ2/aki8BZjHJN3P/FY0RZ3n\r\n5hLMGtQbpgoJARgLcx2Q2dIzILA3odC5scUvUoG+CTCEUKLgQR2dCoWlo5h9\r\n2I76L8xuuUEGjhDunhfzpbQE0xr0tzKOrcmpgUZsk3zXG+h8J+34WUcV1aD7\r\nz1Ekl1OKT7uyBpmxkgjS7dIEqcO8NaC2HCKM8FJEQt8G+0QUOt3Kbg8KzwMR\r\n2xu/ZsnJ1WTkfonAL78aIxviuiNPh7LX92fj0bOnGC5Gsb4vE6h6weU7V2Ev\r\n0l4Iy+g7UmULfwfg8hR4G2hmFLLAJm8zTyA=\r\n=eVo2\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"davidhekim","email":"d.hekim@hotmail.com"},"directories":{},"maintainers":[{"name":"davidhekim","email":"d.hekim@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/homebridge-website-change-check_1.0.10_1677924184022_0.46155570480748165"},"_hasShrinkwrap":false},"1.0.11":{"name":"@davidhekim/homebridge-website-change-check","displayName":"Homebridge Website Change Check","version":"1.0.11","description":"Homebridge plugin for checking if a value on a website has changed.","main":"dist/index.js","scripts":{"clean":"rimraf ./dist","build":"npm run test:ci && rimraf ./dist && tsc","prepublishOnly":"npm run build","postpublish":"npm run clean","test":"jest","test:watch":"jest --watch --detectOpenHandles","test:ci":"","test:local":"jest --watch --testPathPattern=localDebugger.test.ts","publish-beta":"npm publish --tag beta","serve":""},"funding":[{"type":"paypal","url":"https://paypal.me/davidhekim"}],"repository":{"type":"git","url":"git+https://github.com/davidhekim/homebridge-website-change-check.git"},"author":{"name":"David Hekim","email":"d.hekim@hotmail.com","url":"https://hekim.dev/"},"engines":{"homebridge":">=1.0.0"},"license":"MIT","bugs":{"url":"https://github.com/davidhekim/homebridge-website-change-check/issues"},"keywords":["homebridge-plugin","website-change-check","change-updates"],"homepage":"https://github.com/davidhekim/homebridge-website-change-check#readme","devDependencies":{"@babel/core":"^7.12.17","@babel/preset-env":"^7.12.17","@babel/preset-typescript":"^7.12.17","@types/jest":"^26.0.20","@types/node":"^14.6.2","babel-jest":"^26.6.3","homebridge":"^1.1.2","http-server":"^0.12.3","jest":"^26.6.3","rimraf":"^3.0.2","start-server-and-test":"^1.12.0","typescript":"^4.0.2"},"dependencies":{"dotenv":"^8.2.0","playwright-core":"^1.9.2"},"gitHead":"c730faecef5f44618c80cf7129bf529e9ff36db3","_id":"@davidhekim/homebridge-website-change-check@1.0.11","_nodeVersion":"18.2.0","_npmVersion":"8.9.0","dist":{"integrity":"sha512-SqDl6UeFDYshJU2iQtzINmkcEHkCkHQETIujEtkwoikkXLfpgNe9OPCMQblpYOYFtxay/hBCB6M4bCJIqFAzCQ==","shasum":"7d712cbaa4d9e96259fd27cfcee8813fa91c2a08","tarball":"https://registry.npmjs.org/@davidhekim/homebridge-website-change-check/-/homebridge-website-change-check-1.0.11.tgz","fileCount":66,"unpackedSize":222431,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6KwVZZA/0q1h8ueNqFLX5oiV273Jl+HjKOQn3K79wUAIhALZjGfmfVcqZRhwshAXgw1rzSCXXYNYbhaZigp2hPekL"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkAxrgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoNChAAmTY3OEUqY7V/n47EjdoXorI+S53hCaDUwvwtpf8jl1H3gWvi\r\ncX78NPyXjGwJhu/v2X5jWgeLm9GqC57LI3AHBjFWytvY3vClvIyG9mrTyjle\r\nph/+HMp5Y4Z/VTAZDgnD68fih5qOCWdKrrniHRGrYpQn+8I5SxTmTEejjB0N\r\n2lHWb6CxtH8OzktSK/fuT6f44kt4pU+eLS2vYpKdir9PacBm3Tlq2HhFLQLf\r\n2DyTgM6UOfUXiEWKuLsZqpoVI04X5ggTA/MC/i9Poc1hj1DKZnQVaLEUfuIg\r\nGmMCHMmIJY4pufwEZ2Gbw7Sbz0f2jRq7xVnCLoHZZ0+NxHSyqC1cYVPxjNs5\r\nu74a41p0QDFJYxDAZbJl9lu/vr4ps55i0qpizGzPoA4IIHXLkOsMjTmToBOh\r\nsa1hM7hV1jseYKLxkcTmcpW615U6fgcOnh9ZYvhdzCOYy9+OcdG1PoVdlxYB\r\nU3tOl6li5w9heYYsYYxg086SiBmKPvylH/jytubzm0/bxQ6/1laI2xvKME1c\r\nzPiqULT5+NNUyPv06ThIKPp4yCfC4aZdMTJwDBE51iIYUg4C8E1bPjBUbjjG\r\nqUclN0Y3yT1kAfCNgmHT9A89RZdfxVq84gDsDII030dlUJZ4XdQmWbCgNgue\r\n0r8IZ9pYO3r+U2seoLH2dA7+mazQEZKf/To=\r\n=VuDu\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"davidhekim","email":"d.hekim@hotmail.com"},"directories":{},"maintainers":[{"name":"davidhekim","email":"d.hekim@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/homebridge-website-change-check_1.0.11_1677925088073_0.39220917534775435"},"_hasShrinkwrap":false},"1.0.12":{"name":"@davidhekim/homebridge-website-change-check","displayName":"Homebridge Website Change Check","version":"1.0.12","description":"Homebridge plugin for checking if a value on a website has changed.","main":"dist/index.js","scripts":{"clean":"rimraf ./dist","build":"npm run test:ci && rimraf ./dist && tsc","prepublishOnly":"npm run build","postpublish":"npm run clean","test":"jest","test:watch":"jest --watch --detectOpenHandles","test:ci":"","test:local":"jest --watch --testPathPattern=localDebugger.test.ts","publish-beta":"npm publish --tag beta","serve":"http-server src/__tests__/pages"},"funding":[{"type":"paypal","url":"https://paypal.me/davidhekim"}],"repository":{"type":"git","url":"git+https://github.com/davidhekim/homebridge-website-change-check.git"},"author":{"name":"David Hekim","email":"d.hekim@hotmail.com","url":"https://hekim.dev/"},"engines":{"homebridge":">=1.0.0"},"license":"MIT","bugs":{"url":"https://github.com/davidhekim/homebridge-website-change-check/issues"},"keywords":["homebridge-plugin","website-change-check","change-updates"],"homepage":"https://github.com/davidhekim/homebridge-website-change-check#readme","devDependencies":{"@babel/core":"^7.12.17","@babel/preset-env":"^7.12.17","@babel/preset-typescript":"^7.12.17","@types/jest":"^26.0.20","@types/node":"^14.6.2","babel-jest":"^26.6.3","homebridge":"^1.1.2","http-server":"^0.12.3","jest":"^26.6.3","rimraf":"^3.0.2","start-server-and-test":"^1.12.0","typescript":"^4.0.2"},"dependencies":{"dotenv":"^8.2.0","playwright-core":"^1.9.2"},"gitHead":"066e52e39b3f0bc6189cf617d2a0cf03645cf5c4","_id":"@davidhekim/homebridge-website-change-check@1.0.12","_nodeVersion":"18.2.0","_npmVersion":"8.9.0","dist":{"integrity":"sha512-CCjQbDTP9I87Uji8O3S15CI0Ew+sjyaXHeqoxCyOk+o+fYMVVg6pWLu6o2bM8taZwo4G5kHWbZamW2EsUdy5Eg==","shasum":"25847c51bb686b0f0315e23389746957b4e72f5b","tarball":"https://registry.npmjs.org/@davidhekim/homebridge-website-change-check/-/homebridge-website-change-check-1.0.12.tgz","fileCount":66,"unpackedSize":222488,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGwV4QKC+ac5q/d3WTpXgYT98plugVuFNbmMLAc0xg+sAiAJP5eKbewIJRcGHSu9Prkqgb4OjqsRG43DzHbRyEOwsg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkBQI/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqWNBAAkqcbCbjSHYYhaJTkJPHS8tkhPQtn2KMY/a8LmxgrPMwMqZwx\r\nJDTQd4xZmuq49c7vlhgjX0glkpfDuxE0HMAqEumBMMBgGDzsE3If3U3EZqlL\r\n0g1l9/QCZ/MV1hxq3pXXBZLGJEU8fMJbrHWSAf+La8ioZdlnvE4IFu971ESI\r\nhhLnyV8n7Qe2pKsNWWQS1udg3+MCFeIcJsjY482jNeUd+MG0INchnVhH4OeV\r\nFoLji/wlYQ0FRQiDN9dftSW/9e857/eeSHrxTGOJl1ykwnK7xwbCUOCb2nOd\r\nNqkhv8JqaHqCeSiVbup2ziT+SI0YiYdU3pGdsUOyaTohSXhFmmErzGBQz3bI\r\ni+aFHFqUIoeY0RSNEXl+HbNV5tmBgnGTpk5I49XabWCXsLYzVSqIuEa4cuEh\r\nBEtwSbD0D7tMgEmIv0PWuHd8f+XMwnL5wtrHzqFu/MC5tfxayMN2HJtcSX7G\r\nWmr1iWF7rcYt/PvQT1jE46E8T1vTFKsslJZ8DRa9IgCKVDDxS0A+ZwizT4kR\r\nxB+Ocud3w/o5QVaU2I46trkrZW+9rpJC19I6ndCaedpCVm0BpkUvk5NosPF2\r\nmLD+j79xOX0J74UCepx9BF9bo9VlJsbdlAXzMSCibuLoovDtAy56cBkPqgWL\r\n8JstiS02TXEoOwS6nUkFI0e5hVehUQVvD68=\r\n=Nanb\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"davidhekim","email":"d.hekim@hotmail.com"},"directories":{},"maintainers":[{"name":"davidhekim","email":"d.hekim@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/homebridge-website-change-check_1.0.12_1678049855426_0.37540589372876254"},"_hasShrinkwrap":false}},"time":{"created":"2023-03-04T10:03:03.952Z","1.0.10":"2023-03-04T10:03:04.228Z","modified":"2023-03-05T20:57:35.679Z","1.0.11":"2023-03-04T10:18:08.243Z","1.0.12":"2023-03-05T20:57:35.590Z"},"maintainers":[{"name":"davidhekim","email":"d.hekim@hotmail.com"}],"description":"Homebridge plugin for checking if a value on a website has changed.","homepage":"https://github.com/davidhekim/homebridge-website-change-check#readme","keywords":["homebridge-plugin","website-change-check","change-updates"],"repository":{"type":"git","url":"git+https://github.com/davidhekim/homebridge-website-change-check.git"},"author":{"name":"David Hekim","email":"d.hekim@hotmail.com","url":"https://hekim.dev/"},"bugs":{"url":"https://github.com/davidhekim/homebridge-website-change-check/issues"},"license":"MIT","readme":"<span align=\"center\">\r\n\r\n# @davidhekim/homebridge-website-change-check\r\n\r\n[![@davidhekim/homebridge-website-change-check](https://badgen.net/npm/v/@davidhekim/homebridge-website-change-check?icon=npm)](https://www.npmjs.com/package/@davidhekim/homebridge-website-change-check)\r\n[![mit-license](https://badgen.net/npm/license/@davidhekim/homebridge-website-change-check)](https://github.com/davidhekim/homebridge-website-change-check/blob/master/LICENSE)\r\n\r\n</span>\r\n\r\n`@davidhekim/homebridge-website-change-check` is a plugin for homebridge which allows you to check if a value on a website has changed. The special part of this plugin is that values are checked using a headless browser. Therefor values can even be fetched on websites with asynchronous data calls.\r\n\r\n## Installation\r\n\r\nIf you are new to homebridge, please first read the homebridge [documentation](https://www.npmjs.com/package/homebridge).\r\nIf you are running on a Raspberry, you will find a tutorial in the [homebridge wiki](https://github.com/homebridge/homebridge/wiki/Install-Homebridge-on-Raspbian).\r\n\r\nInstall homebridge:\r\n```sh\r\nsudo npm install -g homebridge\r\n```\r\n\r\nInstall @davidhekim/homebridge-website-change-check:\r\n```sh\r\nsudo npm install -g @davidhekim/homebridge-website-change-check\r\n```\r\n\r\nIn the Homebridge terminal, run:\r\n```sh\r\nsudo apt install chromium-browser chromium-codecs-ffmpeg\r\n```\r\n\r\nThis is necessary when running on an ARM processor, like on a Raspberry Pi. This will install a headless Chromium browser which is used for change detection. \r\n\r\n## Configuration\r\n\r\nAdd the `WebsiteChangeCheck` platform in `config.json` in your home directory inside `.homebridge`.\r\n\r\nExample configuration:\r\n\r\n```js\r\n{\r\n  \"platforms\": [\r\n    {\r\n        \"platform\": \"WebsiteChangeCheck\",\r\n        \"changeChecks\": [\r\n            {\r\n                \"name\": \"BBC check\",\r\n                \"url\": \"http://bbc.com/\",\r\n                \"selector\": \".module--header .module__title span\",\r\n                \"checkInterval\": 300000,\r\n                \"ignoreValues\": []\r\n            }\r\n        ]\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\nEvery device stated in the config will be automatically added as an accessory to Homekit. \r\n\r\n### Platform Configuration fields\r\n\r\nProperty | Required? | Remarks\r\n--- | :-: | ---\r\n`platform` | :heavy_check_mark: | Should always be **\"WebsiteChangeCheck\"**.\r\n`changeChecks` | :heavy_check_mark: | A list of your website checks.\r\n\r\n### changeChecks configuration fields\r\nProperty | Required? | Remarks\r\n--- | :-: | ---\r\n`name` | :heavy_check_mark: |Custom name for your check\r\n`url` | :heavy_check_mark: | URL of the website/page you want to check\r\n`selector` | :heavy_check_mark: | Selector of the value you want to compare. \r\n`checkInterval` | | Interval of the checks\r\n`stepsBeforeCheck` | | List of steps that should be executed before checking for the selector. Could be useful if, for example, a value is only visible after filling in a form. See [configuration](#stepsbeforecheck-configuration-fields)\r\n`ignoreValues` | | List of change values that do not cause a motion trigger\r\n### stepsBeforeCheck configuration options\r\nType | Remarks \r\n--- | ---\r\n`{ action: 'setSelectValue', selector: string, value: string \\| number \\| '*' }` | Used for selecting a value in a `select` element. The value can be either a string, a number, or a `*`. The `*` value makes sure the first possible truthy value will be set. \r\n`{ action: 'setInputValue', selector: string, value: string \\| number }` | Used for setting a value in an `input` element.\r\n`{ action: 'click', selector: string }` | Used for clicking an element\r\n`{ action: 'waitForMilliseconds', value: number }` | Used for waiting a certain amount of milliseconds before the next action takes place\r\n\r\n#### stepsBeforeCheck example usage in config\r\n```js\r\n{\r\n  \"platforms\": [\r\n    {\r\n        \"platform\": \"WebsiteChangeCheck\",\r\n        \"changeChecks\": [\r\n            {\r\n                \"name\": \"BBC check\",\r\n                \"url\": \"http://bbc.com/\",\r\n                \"selector\": \".module--header .module__title span\",\r\n                \"checkInterval\": 300000,\r\n                \"stepsBeforeCheck\": [\r\n                    {\r\n                        \"action\": \"waitForMilliseconds\",\r\n                        \"value\": 500\r\n                    },\r\n                    {\r\n                        \"action\": \"setSelectValue\", \r\n                        \"selector\": \"#mySelectId\", \r\n                        \"value\": \"*\"\r\n                    }\r\n                ]\r\n            }\r\n        ]\r\n    }\r\n  ]\r\n}\r\n```\r\nIn this example the script will wait 500 milliseconds, then set the first possible truthy value in the #mySelectId `select` element, after which it checks the value in `.module--header .module__title span`.\r\n\r\n## Local debugging\r\nSee the [LOCAL_DEBUG.md](LOCAL_DEBUG.md) manual for an explanation on how to test your scenario on your local machine. This also includes screenshot so you can visually see what every step of your script does.\r\n\r\n## Contributors\r\nIf you'd like to contribute to this repository, feel free to! \r\n \r\nOnly know that if you're testing the scripts locally, you have to install Chromium yourself. This is because `puppeteer` with Chromium included didn't work on my RaspberryPi Homebridge, therefor like stated above, it requires a manual installation. For that reason you need to download it locally as well. You can find the right version for you over [here](https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html). Just make sure that the correct path is included in a `.env` file. For an example of the `.env` file, see `.env.example`. \r\n","readmeFilename":"README.md"}