{"_id":"smarthome","_rev":"6-1636df90dd1874dcec0e10fda094259f","name":"smarthome","description":"RWE Smarthome API","dist-tags":{"latest":"1.1.2"},"versions":{"1.0.0":{"name":"smarthome","version":"1.0.0","description":"RWE Smarthome API","main":"lib/main.js","license":"MIT","repository":"","directories":{"test":"test"},"scripts":{"test":"mocha test/*.js"},"author":{"name":"Felix Rotthowe"},"dependencies":{"request":"","forever-agent":"","cheerio":"","moment":"","underscore":"","loglevel":""},"devDependencies":{"mocha":"","should":""},"gitHead":"4d1c1d30c0491a51ee103f17a6b7a0375d6ee75a","_id":"smarthome@1.0.0","_shasum":"f2d8202b099d62bf2162e435232a6bdb5426999f","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.1.0","_npmUser":{"name":"planbnet","email":"felix@planbnet.org"},"dist":{"shasum":"f2d8202b099d62bf2162e435232a6bdb5426999f","tarball":"https://registry.npmjs.org/smarthome/-/smarthome-1.0.0.tgz","integrity":"sha512-hpEap+IiTGEsyNxfEkWxx39mv+L0u112TzoB96Lqw34CQle46+YuyzK2tVaSonmpGxpooo5/IBsH+0k1Rl5rFA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCx7x1GzGUtbRSI695sJynwBferJxvVaxAOI5tfM6qIzgIgVtE7Bxt6Rdfp6ZefugvHwkgVW4FsIl2jmgvm3Oh4YmE="}]},"maintainers":[{"name":"planbnet","email":"felix@planbnet.org"}]},"1.1.0":{"name":"smarthome","version":"1.1.0","description":"RWE Smarthome API","main":"lib/main.js","directories":{"test":"test"},"scripts":{"test":"mocha test/*.js"},"repository":"","author":{"name":"Felix Rotthowe"},"license":"MIT","dependencies":{"request":"","forever-agent":"","cheerio":"","moment":"","underscore":"","loglevel":""},"devDependencies":{"mocha":"","should":""},"gitHead":"147f92423423ed58a3e4a745f0425beec2b039ca","_id":"smarthome@1.1.0","_shasum":"a10e53a9d63418df5f3f196202a8eabca4cdb3e4","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"planbnet","email":"felix@planbnet.org"},"maintainers":[{"name":"planbnet","email":"felix@planbnet.org"}],"dist":{"shasum":"a10e53a9d63418df5f3f196202a8eabca4cdb3e4","tarball":"https://registry.npmjs.org/smarthome/-/smarthome-1.1.0.tgz","integrity":"sha512-UJ603bDJKuaw/K5LQcICxNw/Wt0mb7xzQt0fZj5IGbJV1pi1rX25JtkcO4DHdnnZmtc7k8ZAOSwfmx2PyJaU1Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF+xs1phOz0P45jrZKpmvowVCs+wsPXRTCe+kzNRbHX3AiAbcvZ63qjy13fmfOR8LUHpE+EG+AmdBavVaPeVq9T0tg=="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/smarthome-1.1.0.tgz_1458506517858_0.8710675279144198"}},"1.1.1":{"name":"smarthome","version":"1.1.1","description":"RWE Smarthome API","main":"lib/main.js","directories":{"test":"test"},"scripts":{"test":"mocha test/*.js"},"repository":"","author":{"name":"Felix Rotthowe"},"license":"MIT","dependencies":{"async":"^2.0.0-rc.2","cheerio":"","forever-agent":"","loglevel":"","moment":"","request":"","underscore":""},"devDependencies":{"mocha":"","should":""},"gitHead":"97d95b85ecb1345a47d055f6e9c358a36e40f46a","_id":"smarthome@1.1.1","_shasum":"ac1526267d13acdb382badf0ac10b4f9ee64ce9d","_from":".","_npmVersion":"2.15.2","_nodeVersion":"0.10.29","_npmUser":{"name":"planbnet","email":"felix@planbnet.org"},"dist":{"shasum":"ac1526267d13acdb382badf0ac10b4f9ee64ce9d","tarball":"https://registry.npmjs.org/smarthome/-/smarthome-1.1.1.tgz","integrity":"sha512-MkJU0hPtBRHBOLKvrwTHwml0JuhM+bpkQfOswgQwh38Sc6BqIYe2iBNsCg4J5uL3LXxUfsuLdRQPE4JWqXnPYg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCaS1KVPuoHjgDx1VP6u8r3MLUK17OQt3tPlllymOI8SQIhALdG6yB0ipISYG/2qYj2p8IT7Z0YV5wYaxRwOuNZgybb"}]},"maintainers":[{"name":"planbnet","email":"felix@planbnet.org"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/smarthome-1.1.1.tgz_1458926450192_0.6698038489557803"}},"1.1.2":{"name":"smarthome","version":"1.1.2","description":"RWE Smarthome API","main":"lib/main.js","directories":{"test":"test"},"scripts":{"test":"mocha test/*.js"},"repository":"","author":{"name":"Felix Rotthowe"},"license":"MIT","dependencies":{"async":"^2.0.0-rc.2","cheerio":"","forever-agent":"","loglevel":"","moment":"","request":"","underscore":""},"devDependencies":{"mocha":"","should":""},"gitHead":"b0442b03bfc4c0d72c430981224d4e30075c7fa3","_id":"smarthome@1.1.2","_shasum":"64778992086beeba1f1deba40aa6c59bc288495c","_from":".","_npmVersion":"2.15.2","_nodeVersion":"0.10.29","_npmUser":{"name":"planbnet","email":"felix@planbnet.org"},"dist":{"shasum":"64778992086beeba1f1deba40aa6c59bc288495c","tarball":"https://registry.npmjs.org/smarthome/-/smarthome-1.1.2.tgz","integrity":"sha512-YfLjqt4cLBi6KhMXqnsnTFfq8RkwB0wg3VlLeLsPE/SyV6o+y+f3n381d87oID/53YgKACdzPWFZfFg5zBIHKA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG19eJfAgAC0c9GJpFcZeiyGt+1M4svvjp3K8ZgInp0LAiBZR20pbwZ3JyZ333NqdsP9qBPll7zLxjzTNAWGmjhQeg=="}]},"maintainers":[{"name":"planbnet","email":"felix@planbnet.org"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/smarthome-1.1.2.tgz_1458928545133_0.3926217055413872"}}},"readme":"RWE Smarthome API\n=================\n\nScrapes the RWE Smarthome Mobile Web Interface and implements the\nlong polling mechanism that the site uses to be notified of changes.\n\nThe biggest problem is that it seems to timeout after a while and receives\ninvalid response from the server (unfortunately with status 200).\n\nUse it like this:\n\n```js\nvar smarthome = require('smarthome');\nsmarthome.setLogLevel(\"debug\");\n\nsmarthome.connect(USERNAME, PASSWORD, function( error, api ) {\n  if (error) {\n    console.log(\"error:\" + error);\n    process.exit();\n  }\n\n  //list sensors\n  //(the same works for api.devices and api.locations)\n  for (var i = 0; i < api.sensors.length; i++) {\n    var s = api.sensors[i];\n    console.log(\"Found sensor \" + s.name + \" in \" + s.location.displayName);\n  }\n\n  //you can search for devices or locations by id\n  var bath = api.location(\"dead1-beef2-cafe3-1234-5678\");\n  var x = api.device(\"dead1-beef2-cafe3-1234-5678\");\n\n  //or by name (case insensitive substring search, return first match)\n  var livingroom = api.location(\"livingroom\");\n  //even on a location\n  var windowinlivingroom = livingroom.sensor(\"window\");\n\n  for (var i = 0; i < api.locations.length; i++) {\n    var loc = api.locations[i];\n    console.log( loc.displayName + \": \" + loc.temperature() );\n  }\n\n  //watch for changes like this:\n  windowinlivingroom.on(\"change\", function(window, oldValue) {\n    console.log(\"Window in living room changed from \" + oldValue + \" to \" + window.value);\n  });\n\n  //or for all changes. displayValue() gives human readable values \n  api.on(\"change\", function(device) {\n    console.log(device.name + \" changed to \" + device.displayValue());\n  });\n\n  //You can set values like this:\n  var actuator = api.actuator(\"dead1-beef2-cafe3-1234-5678\");\n  actuator.setValue(1, function(error, newvalue) { ... } );\n  //the callback is not required - simply watch the device for changes when you need to be informed \n\n  //finally, very very rough error handling:\n  api.on(\"error\", function(error) {\n    console.log(error);\n  });\n  \n  //To automatically reconnect, hook on \"disconnect\" event\n  api.on(\"disconnect\", function() {\n    //create new connection, reinitialize listeners, etc\n  });\n\n});\n```\n","maintainers":[{"name":"planbnet","email":"felix@planbnet.org"}],"time":{"modified":"2022-06-26T21:23:42.656Z","created":"2016-01-06T19:18:34.779Z","1.0.0":"2016-01-06T19:18:34.779Z","1.1.0":"2016-03-20T20:41:58.314Z","1.1.1":"2016-03-25T17:20:52.642Z","1.1.2":"2016-03-25T17:55:47.436Z"},"author":{"name":"Felix Rotthowe"},"license":"MIT","readmeFilename":"README.md"}