{"action":"created","issue":{"url":"https://api.github.com/repos/bigkevmcd/node-rfxcom/issues/31","labels_url":"https://api.github.com/repos/bigkevmcd/node-rfxcom/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/bigkevmcd/node-rfxcom/issues/31/comments","events_url":"https://api.github.com/repos/bigkevmcd/node-rfxcom/issues/31/events","html_url":"https://github.com/bigkevmcd/node-rfxcom/pull/31","id":40266901,"number":31,"title":"Additional packet types, new events, new commands, address range checking and more","user":{"login":"maxwellhadley","id":6557194,"avatar_url":"https://avatars.githubusercontent.com/u/6557194?v=3","gravatar_id":"","url":"https://api.github.com/users/maxwellhadley","html_url":"https://github.com/maxwellhadley","followers_url":"https://api.github.com/users/maxwellhadley/followers","following_url":"https://api.github.com/users/maxwellhadley/following{/other_user}","gists_url":"https://api.github.com/users/maxwellhadley/gists{/gist_id}","starred_url":"https://api.github.com/users/maxwellhadley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxwellhadley/subscriptions","organizations_url":"https://api.github.com/users/maxwellhadley/orgs","repos_url":"https://api.github.com/users/maxwellhadley/repos","events_url":"https://api.github.com/users/maxwellhadley/events{/privacy}","received_events_url":"https://api.github.com/users/maxwellhadley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-08-14T15:35:07Z","updated_at":"2015-02-07T10:54:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bigkevmcd/node-rfxcom/pulls/31","html_url":"https://github.com/bigkevmcd/node-rfxcom/pull/31","diff_url":"https://github.com/bigkevmcd/node-rfxcom/pull/31.diff","patch_url":"https://github.com/bigkevmcd/node-rfxcom/pull/31.patch"},"body":"This is the big rework to support my node-RED rfxcom nodes.\r\nI now handle all lighting packet types except lighting4, and all the weather sensor packet types. I have added extra commands where needed to support the new lighting types, all of which now range-check their 'address' parameters. The address parameters (i.e. the deviceId) may now optionally be passed as an array of pre-split strings. I did this because some types use a single character house code, and some a '/' delimited path, and I needed consistency across all lighting types - the original splitting behaviour is not affected.\r\nI have added a commandNumber property to the lighting event parameters, to better support internationalisation of the command names, but the originals are still present.\r\nI have standardised the evt.subtype properties to be strings (they were a mix of string or number depending on the event type). I changed the packet subtype name arrays to BiMaps, so it is easy to convert from subtype number to string or vice-versa (I consider these strings to be essentially arbitrary identifiers so internationalisation doesn't really apply)\r\nI have added many additional test cases to cover these changes\r\n**Comments**\r\nI am finding it inconvenient as well as unnecessary to have one event type for each 'weather sensor' subtype, e.g. th1, th2, ... In my code they are all being handled by a common function, as I have been careful about naming properties in the evt object. If you really need to know the subtype (sometimes the available properties depend on this) rather than just testing using hasOwnProperty(), then this is available as evt.subtype.\r\nI still occasionally see parsing errors, generally giving an 'unknown packet type' message, but once or twice it just stops giving any data messages. I can't reliably reproduce it though :-(\r\nThere are a couple of other very minor points - check the TODO's"},"comment":{"url":"https://api.github.com/repos/bigkevmcd/node-rfxcom/issues/comments/73359473","html_url":"https://github.com/bigkevmcd/node-rfxcom/pull/31#issuecomment-73359473","issue_url":"https://api.github.com/repos/bigkevmcd/node-rfxcom/issues/31","id":73359473,"user":{"login":"bwired-nl","id":5882794,"avatar_url":"https://avatars.githubusercontent.com/u/5882794?v=3","gravatar_id":"","url":"https://api.github.com/users/bwired-nl","html_url":"https://github.com/bwired-nl","followers_url":"https://api.github.com/users/bwired-nl/followers","following_url":"https://api.github.com/users/bwired-nl/following{/other_user}","gists_url":"https://api.github.com/users/bwired-nl/gists{/gist_id}","starred_url":"https://api.github.com/users/bwired-nl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwired-nl/subscriptions","organizations_url":"https://api.github.com/users/bwired-nl/orgs","repos_url":"https://api.github.com/users/bwired-nl/repos","events_url":"https://api.github.com/users/bwired-nl/events{/privacy}","received_events_url":"https://api.github.com/users/bwired-nl/received_events","type":"User","site_admin":false},"created_at":"2015-02-07T10:54:14Z","updated_at":"2015-02-07T10:54:14Z","body":"Thanks guys, cant wait :-)\r\n\r\n\r\n\r\n> Op 7 feb. 2015 om 11:49 heeft Max Hadley <notifications@github.com> het volgende geschreven:\r\n> \r\n> ...just in time for node 0.12!\r\n> \r\n> Cheers\r\n> \r\n> Max\r\n> \r\n> Sent from my iPhone\r\n> \r\n> > On 7 Feb 2015, at 10:15, Kevin McDermott <notifications@github.com> wrote:\r\n> > \r\n> > Thanks for that, I'll spend this weekend reviewing, and hopefully get it landed :-)\r\n> > \r\n> > —\r\n> > Reply to this email directly or view it on GitHub.\r\n> > \r\n> —\r\n> Reply to this email directly or view it on GitHub.\r\n> \r\n"}}