{"action":"created","issue":{"url":"https://api.github.com/repos/tagyoureit/nodejs-poolController/issues/99","repository_url":"https://api.github.com/repos/tagyoureit/nodejs-poolController","labels_url":"https://api.github.com/repos/tagyoureit/nodejs-poolController/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/tagyoureit/nodejs-poolController/issues/99/comments","events_url":"https://api.github.com/repos/tagyoureit/nodejs-poolController/issues/99/events","html_url":"https://github.com/tagyoureit/nodejs-poolController/issues/99","id":342936131,"node_id":"MDU6SXNzdWUzNDI5MzYxMzE=","number":99,"title":"Unhandled rejection TypeError: Cannot set property 'light' of undefined, with two Intellibrites and logging on","user":{"login":"emes","id":363010,"node_id":"MDQ6VXNlcjM2MzAxMA==","avatar_url":"https://avatars0.githubusercontent.com/u/363010?v=4","gravatar_id":"","url":"https://api.github.com/users/emes","html_url":"https://github.com/emes","followers_url":"https://api.github.com/users/emes/followers","following_url":"https://api.github.com/users/emes/following{/other_user}","gists_url":"https://api.github.com/users/emes/gists{/gist_id}","starred_url":"https://api.github.com/users/emes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emes/subscriptions","organizations_url":"https://api.github.com/users/emes/orgs","repos_url":"https://api.github.com/users/emes/repos","events_url":"https://api.github.com/users/emes/events{/privacy}","received_events_url":"https://api.github.com/users/emes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-07-20T00:49:24Z","updated_at":"2018-07-24T05:13:06Z","closed_at":null,"author_association":"NONE","body":"### Expected behavior and actual behavior\r\n\r\nWhen logIntellibrite is on, I'm getting the following error:\r\n\r\nUnhandled rejection TypeError: Cannot set property 'light' of undefined\r\n\r\nand thereafter everything goes to hell :-) (all packetWrites fail)\r\n\r\n### What is actually happening (screenshots are helpful)\r\n\r\nThe actual exception:\r\n\r\n```\r\nUnhandled rejection TypeError: Cannot set property 'light' of undefined\r\n    at Object.assignControllerLightGroup (/home/ms/nodejs-poolController/src/lib/equipment/circuit.js:774:61)\r\n    at Object.process (/home/ms/nodejs-poolController/src/lib/comms/inbound/controller/39.js:34:27)\r\n    at Object.processControllerPacket (/home/ms/nodejs-poolController/src/lib/comms/inbound/process-controller.js:115:45)\r\n    at decode (/home/ms/nodejs-poolController/src/lib/comms/inbound/decode-helper.js:263:51)\r\n    at Object.processChecksum (/home/ms/nodejs-poolController/src/lib/comms/inbound/decode-helper.js:301:13)\r\n    at Object.iterateOverArrayOfArrays (/home/ms/nodejs-poolController/src/lib/comms/inbound/receive-buffer.js:117:44)\r\n    at Object.push (/home/ms/nodejs-poolController/src/lib/comms/inbound/packet-buffer.js:36:37)\r\n    at SerialPort.<anonymous> (/home/ms/nodejs-poolController/src/lib/comms/sp-helper.js:78:44)\r\n    at emitNone (events.js:106:13)\r\n    at SerialPort.emit (events.js:208:7)\r\n    at emitReadable_ (_stream_readable.js:513:10)\r\n    at emitReadable (_stream_readable.js:507:7)\r\n    at addChunk (_stream_readable.js:274:7)\r\n    at readableAddChunk (_stream_readable.js:250:11)\r\n    at SerialPort.Readable.push (_stream_readable.js:208:10)\r\n    at binding.read.then (/home/ms/nodejs-poolController/node_modules/serialport/lib/serialport.js:374:10)\r\n```\r\n\r\nProbably related, even without logIntellibrite, I see the following error in the javascript console when using the bootstrap UI.\r\n\r\n```\r\nUncaught TypeError: Cannot read property 'colorSetStr' of undefined\r\n    at Object.<anonymous> (main.js:791)\r\n    at Function.each (jquery.js:360)\r\n    at insertLightEdit (main.js:627)\r\n    at r.<anonymous> (main.js:1051)\r\n    at r.emit (index.js:83)\r\n    at r.onevent (index.js:83)\r\n    at r.onpacket (index.js:83)\r\n    at r.<anonymous> (index.js:83)\r\n    at r.emit (index.js:83)\r\n    at r.ondecoded (index.js:83)\r\n```\r\n\r\n### Steps to reproduce the problem\r\n\r\nchange config.json so log.logIntellibrite is 1\r\n\r\n### Specifications\r\n\r\n1. What version of the code are you using?\r\n\r\n5.1.1\r\n\r\n2. All output from the file log\r\n\r\nhttps://gist.github.com/emes/213c2d6d4adb1e1bf31b6c6862d63a9a\r\n\r\n3. Any errors that are in the console\r\n\r\nsee above.\r\n\r\n4. Your config.json or in-use configuration file\r\n\r\nfresh install using default config.json, see logs for embedded config\r\n\r\n5. Your pool equipment\r\n\r\nIntelliTouch 5+S (with IntelliChlor disabled), pool-only\r\nIntelliFlow VS\r\n(2) IntelliBrite lights, each on a separate relay\r\n(2) valve actuators, on when Pool Heat on"},"comment":{"url":"https://api.github.com/repos/tagyoureit/nodejs-poolController/issues/comments/407283433","html_url":"https://github.com/tagyoureit/nodejs-poolController/issues/99#issuecomment-407283433","issue_url":"https://api.github.com/repos/tagyoureit/nodejs-poolController/issues/99","id":407283433,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzI4MzQzMw==","user":{"login":"tagyoureit","id":1646840,"node_id":"MDQ6VXNlcjE2NDY4NDA=","avatar_url":"https://avatars2.githubusercontent.com/u/1646840?v=4","gravatar_id":"","url":"https://api.github.com/users/tagyoureit","html_url":"https://github.com/tagyoureit","followers_url":"https://api.github.com/users/tagyoureit/followers","following_url":"https://api.github.com/users/tagyoureit/following{/other_user}","gists_url":"https://api.github.com/users/tagyoureit/gists{/gist_id}","starred_url":"https://api.github.com/users/tagyoureit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tagyoureit/subscriptions","organizations_url":"https://api.github.com/users/tagyoureit/orgs","repos_url":"https://api.github.com/users/tagyoureit/repos","events_url":"https://api.github.com/users/tagyoureit/events{/privacy}","received_events_url":"https://api.github.com/users/tagyoureit/received_events","type":"User","site_admin":false},"created_at":"2018-07-24T05:13:06Z","updated_at":"2018-07-24T05:13:06Z","author_association":"OWNER","body":"There are a few places that the code needs to change.  I think I have most of them identified, which is the good news.  Bad news is that you'll need to wait until I fix them for the Intellibrites work.  \r\n\r\nIn the mean time, if you want the rest of the code working without it crashing sans Intellibrite, you can comment out the following lines:\r\n* https://github.com/tagyoureit/nodejs-poolController/blob/master/src/lib/comms/inbound/controller/39.js#L34\r\n* https://github.com/tagyoureit/nodejs-poolController/blob/master/src/lib/comms/inbound/controller/96.js#L34\r\n\r\n"}}
{"actor":{"display_login":"tagyoureit"}}