{"comment":{"url":"https://api.github.com/repos/genielabs/HomeGenie/comments/9754218","html_url":"https://github.com/genielabs/HomeGenie/commit/7b23d2099c153e567a2cdfd5b8feb0db4a418382#commitcomment-9754218","id":9754218,"user":{"login":"hybridview","id":742638,"avatar_url":"https://avatars.githubusercontent.com/u/742638?v=3","gravatar_id":"","url":"https://api.github.com/users/hybridview","html_url":"https://github.com/hybridview","followers_url":"https://api.github.com/users/hybridview/followers","following_url":"https://api.github.com/users/hybridview/following{/other_user}","gists_url":"https://api.github.com/users/hybridview/gists{/gist_id}","starred_url":"https://api.github.com/users/hybridview/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hybridview/subscriptions","organizations_url":"https://api.github.com/users/hybridview/orgs","repos_url":"https://api.github.com/users/hybridview/repos","events_url":"https://api.github.com/users/hybridview/events{/privacy}","received_events_url":"https://api.github.com/users/hybridview/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"7b23d2099c153e567a2cdfd5b8feb0db4a418382","created_at":"2015-02-15T22:18:50Z","updated_at":"2015-02-15T22:18:50Z","body":"Just a minor thing. In Multiinstance parsing, instanceCommandClass is a bit off in the index. The logic for choosing index should be something like (from my Meter.cs file on my previous pull request):\r\n\r\nbyte commandClass = message[7];\r\n            byte commandType = message[8];\r\n            //\r\n            if (commandClass == (byte)CommandClass.MultiInstance)\r\n            {\r\n                // v1 ENCAP: Uses instance;\r\n                // v2 ENCAP: uses Start/End POint.\r\n\r\n                // NOTE: MultiChannel is the name for the v2 of MutilInstance per SPEC.\r\n                if (commandType == (byte)Command.MultiInstaceV2Encapsulated)\r\n                {\r\n                    //dataStart = 15;\r\n                    byte sourceEndPoint = message[9];\r\n                    byte destEndPoint = message[10];\r\n\r\n                    /* We now have the ENCAP part of the frame. Next step is to determine format of inner frame \r\n                    * based on cmd being called.\r\n                    * */\r\n                    byte encappedCmdClass = message[11];\r\n                    byte encappedCmd = message[12];\r\n\r\n                    return TryHandleMultiInstanceMessage(encappedCmdClass, encappedCmd, message, sourceEndPoint);\r\n\r\n                }\r\n                else if (commandType == (byte)Command.MultiInstanceReport) //MultiInstanceCmd_Encap\r\n                {\r\n                    // Instance only used for MULTIINSTANCE (v1).\r\n                    byte instance = message[9];\r\n                    byte encappedCmdClass = message[10];\r\n                    byte encappedCmd = message[11];\r\n\r\n                    return TryHandleMultiInstanceMessage(encappedCmdClass, encappedCmd, message, instance);\r\n                }\r\n\r\n            }"}}