{"action":"opened","issue":{"url":"https://api.github.com/repos/AlexGustafsson/homebridge-wol/issues/37","repository_url":"https://api.github.com/repos/AlexGustafsson/homebridge-wol","labels_url":"https://api.github.com/repos/AlexGustafsson/homebridge-wol/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/AlexGustafsson/homebridge-wol/issues/37/comments","events_url":"https://api.github.com/repos/AlexGustafsson/homebridge-wol/issues/37/events","html_url":"https://github.com/AlexGustafsson/homebridge-wol/issues/37","id":318673518,"number":37,"title":"SyntaxError: Block-scoped ... strict mode.","user":{"login":"pfinnegane","id":27660434,"avatar_url":"https://avatars0.githubusercontent.com/u/27660434?v=4","gravatar_id":"","url":"https://api.github.com/users/pfinnegane","html_url":"https://github.com/pfinnegane","followers_url":"https://api.github.com/users/pfinnegane/followers","following_url":"https://api.github.com/users/pfinnegane/following{/other_user}","gists_url":"https://api.github.com/users/pfinnegane/gists{/gist_id}","starred_url":"https://api.github.com/users/pfinnegane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfinnegane/subscriptions","organizations_url":"https://api.github.com/users/pfinnegane/orgs","repos_url":"https://api.github.com/users/pfinnegane/repos","events_url":"https://api.github.com/users/pfinnegane/events{/privacy}","received_events_url":"https://api.github.com/users/pfinnegane/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-28T22:33:17Z","updated_at":"2018-04-28T22:33:17Z","closed_at":null,"author_association":"NONE","body":"### Backstory\r\nI was attempting to re-configure homebridge-wol due to a recent move w/ switch of equipment.\r\n\r\n### Issue\r\nI do not know what exactly happened, it didn't yell at me before. I've updated and reinstalled everything (including deleting the .homebridge folder at ~/ and /root/) to make sure something didn't corrupt or anything.\r\n\r\n### Environment\r\n- [ x] * Os & os version: Raspbian 9 stretch  | Controlling a Windows 10.pre.1803 desktop\r\n- [ x] * node version: 4.8.2\r\n- [ x] * homebridge version: 4.38\r\n- [ x] * homebridge-wol version: 3.2.2\r\n\r\n### Configuration\r\nMy configuration looks like this:\r\n```\r\n{\r\n   \"bridge\": {\r\n        \"name\": \"Homebridge\",\r\n        \"username\": \"<Mac-address>\",\r\n        \"port\": 51826,\r\n        \"pin\": \"031-45-154\"\r\n   },\r\n\"accessories\":[\r\n   {\r\n        \"accessory\": \"WinPC\",\r\n        \"name\": \"My Windows PC\",\r\n        \"http_method\": \"GET\",\r\n        \"on_url\": \"wol://<Mac-address>\",\r\n        \"off_url\": \"http://10.0.0.1:7879/?action=System.Shutdown\",\r\n        \"status_url\": \"http://10.0.0.1:7879/\",\r\n        \"sendimmediately\": \"yes\",\r\n        \"poll_status_interval\": \"60\",\r\n        \"username\" : \"User\",\r\n        \"password\" : \"<Mac-address>\",\r\n        \"powerstateOnError\" : \"0\",\r\n        \"powerstateOffError\": \"1\"\r\n   },\r\n   {\r\n       \"accessory\": \"NetworkDevice\",\r\n       \"name\": \"PC\",\r\n       \"mac\": \"<Mac-address>\",\r\n       \"ip\": \"10.0.0.1\",\r\n       \"shutdownCommand\": \"net rpc shutdown --ipaddress 10.0.0.1 --user redacted%redacted\"\r\n   }\r\n ]\r\n}\r\n\r\nIMPORTANT!\r\n- [x ] Remove any mac addresses from the configuration by \r\nexchanging them with <Mac-address>\r\n```\r\n\r\n### Log\r\nHomebridge fails to load at error, so can't really debug. But, here is the console output.\r\n--------------------------------------------------------------------------------------------------------------------\r\n[28/04/2018, 22:16:41] Loaded plugin: homebridge-winpc\r\n[28/04/2018, 22:16:41] Registering accessory 'homebridge-winpc.WinPC'\r\n[28/04/2018, 22:16:41] ---\r\n[28/04/2018, 22:16:41] ====================\r\n[28/04/2018, 22:16:41] ERROR LOADING PLUGIN homebridge-wol:\r\n[28/04/2018, 22:16:41] SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode\r\n    at exports.runInThisContext (vm.js:53:16)\r\n    at Module._compile (module.js:373:25)\r\n    at Module.load (module.js:343:32)\r\n    at Function.Module._load (module.js:300:12)\r\n    at Module.require (module.js:353:17)\r\n    at require (internal/module.js:12:17)\r\n    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-wol/index.js:1:88)\r\n    at Module._compile (module.js:409:26)\r\n    at Object.Module._extensions..js (module.js:416:10)\r\n[28/04/2018, 22:16:41] ====================\r\n[28/04/2018, 22:16:41] Loaded config.json with 2 accessories and 0 platforms.\r\n[28/04/2018, 22:16:41] ---\r\n[28/04/2018, 22:16:41] Loading 2 accessories...\r\n[28/04/2018, 22:16:41] [My Windows PC] Initializing WinPC accessory...\r\n[28/04/2018, 22:16:41] [My Windows PC] Setting info: {\"serialnumber\":\"Unknown\",\"model\":\"Windows PC\",\"manufacterer\":\"Microsoft\",\"name\":\"Windows PC\",\"softwareversion\":\"Unknown\",\"manufacturer\":\"Microsoft\"}\r\nHAP Warning: Characteristic 00000054-0000-1000-8000-0026BB765291 not in required or optional characteristics for service 0000003E-0000-1000-8000-0026BB765291. Adding anyway.\r\n/usr/local/lib/node_modules/homebridge/lib/api.js:64\r\n      throw new Error(\"The requested accessory '\" + name + \"' was not registered by any plugin.\");\r\n      ^\r\n\r\nError: The requested accessory 'NetworkDevice' was not registered by any plugin.\r\n    at API.accessory (/usr/local/lib/node_modules/homebridge/lib/api.js:64:13)\r\n    at Server.str.replace.Server._loadAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:264:42)\r\n    at Server.str.replace.Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:86:38)\r\n    at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)\r\n    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)\r\n    at Module._compile (module.js:409:26)\r\n    at Object.Module._extensions..js (module.js:416:10)\r\n    at Module.load (module.js:343:32)\r\n    at Function.Module._load (module.js:300:12)\r\n    at Function.Module.runMain (module.js:441:10)\r\n---------------------------------------------------------------------------------------------------------------------\r\n\r\n\r\n### Notes\r\nnone\r\n"}}
{"actor":{"display_login":"pfinnegane"}}