{"_id":"@cartman640/spooky-lights","_rev":"1-358a04060603f3c90206abea50c4f57d","name":"@cartman640/spooky-lights","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@cartman640/spooky-lights","version":"0.0.1","description":"A spooky lighting automation for Philips Hue lights","repository":{"type":"git","url":"git+https://github.com/cartman640/spooky-lights.git"},"author":{"name":"Allan Ramsay"},"license":"MIT","bin":{"spooky-lights":"./dist/index.js"},"scripts":{"start":"ts-node ./src/index.ts","build":"npm run tslint && npm run build-ts","build-ts":"tsc","tslint":"tslint -c tslint.json -p tsconfig.json","release":"np"},"dependencies":{"dotenv":"^6.1.0","fs-extra":"^7.0.0","inquirer":"^6.2.0","node-hue-api":"^2.4.4"},"devDependencies":{"@types/dotenv":"^4.0.2","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/node":"^9.4.6","@types/node-hue-api":"^2.3.0","np":"^3.0.4","ts-node":"^5.0.0","tslint":"^5.9.1","typescript":"^2.7.2"},"publishConfig":{"access":"public"},"gitHead":"759bdd78656cfa9d93327935c6c13ff972e6a234","bugs":{"url":"https://github.com/cartman640/spooky-lights/issues"},"homepage":"https://github.com/cartman640/spooky-lights#readme","_id":"@cartman640/spooky-lights@0.0.1","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"cartman640","email":"a.ramsay@gmail.com"},"dist":{"integrity":"sha512-HUcYgVKqPaGLlS3YoRDHD4/SY13+P6aCRMoKvssTb9uQkUqSDeeZGPnbk60PPgEQa7nY9i0SiRZF7J6NDgP8Lw==","shasum":"88134bb9ff7a29f08521b3961099919b3da3d047","tarball":"https://registry.npmjs.org/@cartman640/spooky-lights/-/spooky-lights-0.0.1.tgz","fileCount":9,"unpackedSize":18827,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0+B9CRA9TVsSAnZWagAA+yUQAJVAmtSGWDbYwDyAOmp2\n6X8/lc8Shc3G/LM+LSh+DFvL3nmiA2M4dxxvotGLoOkaBHbJDS1RESyAIkRL\nkFjbRQxwX0bgWkQ9gd6e+8ormcZuKnNrmr3Swtqn6U9gEgXS6jnb7KrIN2MQ\nH9h/n33aWHxuX1RRTuXFH7hTDbXXNwirdywuLBT6zorEjQNyHxmY7VOFeF4U\nOZI13LlOwGzGCP8sJZkZXXiDkvlaTwAXjS2d5KN7hKLaI31swI1Xrn2Qaz0i\n5FsA6EE2PXWD+Eph9AqFfVeaZ43OM6Lh3sUBPyBOP1AFWbVrZxx0HEKFe2up\nCft8DCcAg91cpQII2BEjYoFcxsQDrCT8QchNwbtaavX0/oPxcXJYehCpfYc3\neHjr+Xb4EroiaZ6dmzMUXocWBrg6tP64nRqQbKa+q+fw5dat4oeNGXeRYFgm\n+y1FCNmIH45QLx7u4CPSsU6nS+9iQMPkm0x+rsBh0BcOPU2QBbRCWGznPnvb\n998LkFxw64QxV050DnObqHcHzumWKX3sbn+aVwpwzQDLuJB+2m6GwYw03ugA\n2YjR5ptf/T1XM6c2BDEZIhJ9QtXiXX1/T1NHLjH3xt9kDOO+8566CK1ZyrIY\nBOzkPQUQcwMWQCADYdkpQEbPYTh9LM0vprSyCQ77M0AkuEjjmnlfLhp2+wA0\nyHQ1\r\n=xz+H\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCP9GDsaZv3dY8iVH2bhqjChmiUEvyns499RflqsNXCnAIhANSbmRByW86ZdzndgamuhG9JOixSNRAgBa/v6nCzXLSi"}]},"maintainers":[{"name":"cartman640","email":"a.ramsay@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/spooky-lights_0.0.1_1540612221351_0.8124876639892593"},"_hasShrinkwrap":false}},"time":{"created":"2018-10-27T03:50:21.191Z","0.0.1":"2018-10-27T03:50:21.500Z","modified":"2022-04-04T21:59:32.891Z"},"maintainers":[{"name":"cartman640","email":"a.ramsay@gmail.com"}],"description":"A spooky lighting automation for Philips Hue lights","homepage":"https://github.com/cartman640/spooky-lights#readme","repository":{"type":"git","url":"git+https://github.com/cartman640/spooky-lights.git"},"author":{"name":"Allan Ramsay"},"bugs":{"url":"https://github.com/cartman640/spooky-lights/issues"},"license":"MIT","readme":"# Spooky Lights\nSpooky Lights is a quick script to add a spooky, haunted house vibe to your\nPhilips Hue home lighting. Currently it supports two effects, `flicker` and\n`breathe`.\n\nIt is mostly auto discovering and quite easy to configure. The base setup of\nthe lights is done through the Hue app (or your existing home automation\nsystem) and Spooky Lights just reads the existing state of each light. If\nlights are turned off, they will be ignored.\n\n## Installation\nInstalling can be done via NPM:\n\n```\nnpm install -g @cartman640/spooky-lights\n```\n\nSpooky Lights should then be avaiable on your command line with the command\n`spooky-lights`.\n\n## Configuration\n### 1. Authentication\nSpooky Lights needs to be able to talk to your Hue Bridge. It expects a `.env`\nfile in the directory that you are running it from containing a `HUE_USER`\nvariable.\n\nTo register a new user on your Hue Bridge, just select the `register-user`\noption:\n\n```\n? Choose command\n  run\n  list-lights\n> register-user\n```\n\nSpooky Lights will prompt you to press the link button on the top of your\nHue Bridge, then press Enter to proceed.\n\n```\n? Press the link button on your Hue bridge (Y/n)\n```\n\nOnce registered, you will be given a username to put into the `.env` file.\n\n### 2. Setting up rules\nSpooky Lights reads its rules from a `rules.json` file that lives in the\ncurrent working directory. The basic format of this is an array of objects:\n\n```json\n[\n    {\n        \"name\": \"Kitchen\",\n        \"command\": \"flicker\",\n        \"frequency\": 20\n    },\n    { ... }\n]\n```\n\nWhere `name` is the name of the light from the Hue app, `command` is either\n\"**flicker**\" or \"**breathe**\" and `frequency` is a number between 0 and 100.\n\nFrequency is the chance that this light will be included in the \"effect\nlottery\". If all lights are the same (e.g. 20) then there is a 20% chance\nthat an effect will be run, and a `1/n` where `n` is the number of lights\nthat this particular light will be used.\n\nThe rules are evaluated every second.\n\nYou can list the available lights for convenience from Spooky Lights, just\nselect the `list-lights` option:\n\n```\n? Choose command\n  run\n> list-lights\n  register-user\n```\n\nYou will get a list of available lights, non RGB lights will only be able to\nuse the **flicker** effect (as shown in the output).\n\n## Running\nOnce your `.env` and `rules.json` files have been setup, you can start Spooky\nLights by selecting the `run` option:\n\n```\n? Choose command (Use arrow keys)\n> run\n  list-lights\n  register-user\n```\n\nIf everything has been configured correctly you should see a conneciton\nsuccessful message:\n\n```\n? Choose command run\nFound bridge: 10.16.2.7\nChecking connection...\nConnection successful\n```\n\nAnd your lights will begin to flicker.\n\n## Caveats\nThis relies on your network being configured in such a way that the Hue auto\ndiscovery works for finding the bridge, and it will always use the first bridge\nit finds.\n\nTesting has only been completed on the regular Hue White lights, the Extended\nColor RGB lights and the light strips.","readmeFilename":"README.md"}