{"action":"created","issue":{"url":"https://api.github.com/repos/openhab/org.openhab.binding.zwave/issues/151","repository_url":"https://api.github.com/repos/openhab/org.openhab.binding.zwave","labels_url":"https://api.github.com/repos/openhab/org.openhab.binding.zwave/issues/151/labels{/name}","comments_url":"https://api.github.com/repos/openhab/org.openhab.binding.zwave/issues/151/comments","events_url":"https://api.github.com/repos/openhab/org.openhab.binding.zwave/issues/151/events","html_url":"https://github.com/openhab/org.openhab.binding.zwave/issues/151","id":180685230,"number":151,"title":"ZWaveAlarm CC possible bug","user":{"login":"pizerg","id":4287940,"avatar_url":"https://avatars.githubusercontent.com/u/4287940?v=3","gravatar_id":"","url":"https://api.github.com/users/pizerg","html_url":"https://github.com/pizerg","followers_url":"https://api.github.com/users/pizerg/followers","following_url":"https://api.github.com/users/pizerg/following{/other_user}","gists_url":"https://api.github.com/users/pizerg/gists{/gist_id}","starred_url":"https://api.github.com/users/pizerg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pizerg/subscriptions","organizations_url":"https://api.github.com/users/pizerg/orgs","repos_url":"https://api.github.com/users/pizerg/repos","events_url":"https://api.github.com/users/pizerg/events{/privacy}","received_events_url":"https://api.github.com/users/pizerg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-03T16:29:21Z","updated_at":"2016-10-04T09:58:53Z","closed_at":null,"body":"I was testing Philio PST02-1X family of sensors (A/B/C variants) which support Notification Report V4 and it got stuck in DYNAMIC_VALUES init stage because NOTIFICATION_REPORT was crashing as it was trying to read some non-existent bytes (ZWaveAlarmCommandClass.java line 164 and the ones following).\r\n\r\nI checked with Zniffer and it did not complain about the message being incorrect (see attached captures with NOTIFICATION_SUPPORTED_REPORT and with NOTIFICATION_REPORT messages breakdown). \r\nI also noticed a difference with Zniffer with the notification supported report, I can see the log:\r\n\r\n> NODE: NOTIFICATION_SUPPORTED_REPORT reports V1 ALARM support\r\n\r\nBut then zniffer shows V1 Alarm field to false.\r\n\r\nThe other option is that maybe the device is not sending the report properly even if it has the ZWave compliant logo.\r\n\r\nI had no time to investigate the issue and run through the official zwave specs so I just coded some protection before reading those values, that way I could continue to work with the sensor, it was just a single line of code before all the failed readings:\r\n\r\n`if(serialMessage.getMessagePayload().length > offset + 6){ .... }`\r\n\r\nHope this helps to isolate the issue faster.\r\n\r\nPS: All tests were performed with security option disabled (security_inclusion = 2)\r\nPS 2: The payload is shown at the very bottom of the attached images\r\n\r\n![notificationsupportedreport](https://cloud.githubusercontent.com/assets/4287940/19045025/1e3bc906-8997-11e6-962a-6ebd46a57b96.PNG)\r\n![alarmv4report](https://cloud.githubusercontent.com/assets/4287940/19045026/1e3d0bea-8997-11e6-9105-00fa138df30a.PNG)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/openhab/org.openhab.binding.zwave/issues/comments/251346129","html_url":"https://github.com/openhab/org.openhab.binding.zwave/issues/151#issuecomment-251346129","issue_url":"https://api.github.com/repos/openhab/org.openhab.binding.zwave/issues/151","id":251346129,"user":{"login":"pizerg","id":4287940,"avatar_url":"https://avatars.githubusercontent.com/u/4287940?v=3","gravatar_id":"","url":"https://api.github.com/users/pizerg","html_url":"https://github.com/pizerg","followers_url":"https://api.github.com/users/pizerg/followers","following_url":"https://api.github.com/users/pizerg/following{/other_user}","gists_url":"https://api.github.com/users/pizerg/gists{/gist_id}","starred_url":"https://api.github.com/users/pizerg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pizerg/subscriptions","organizations_url":"https://api.github.com/users/pizerg/orgs","repos_url":"https://api.github.com/users/pizerg/repos","events_url":"https://api.github.com/users/pizerg/events{/privacy}","received_events_url":"https://api.github.com/users/pizerg/received_events","type":"User","site_admin":false},"created_at":"2016-10-04T09:58:53Z","updated_at":"2016-10-04T09:58:53Z","body":"Hello Chris,\r\n\r\nFind attached the logs with the matching zniffer captures for those two messages. \r\nFor the AlarmReportV4.txt the last two lines are mine just to indicate that the payload lenth is shorter than V4 expected and in that case I just set (for now) the alarmType to GENERAL(0).\r\n\r\n[AlarmTypeSupportedReport.txt](https://github.com/openhab/org.openhab.binding.zwave/files/508117/AlarmTypeSupportedReport.txt)\r\n![supportedreport](https://cloud.githubusercontent.com/assets/4287940/19069990/90fb7cd8-8a29-11e6-928c-e5f00078efee.PNG)\r\n[AlarmReportV4.txt](https://github.com/openhab/org.openhab.binding.zwave/files/508118/AlarmReportV4.txt)\r\n![alarmreportv4](https://cloud.githubusercontent.com/assets/4287940/19069991/90fc0770-8a29-11e6-96db-252e61e9a059.PNG)\r\n\r\nRegards,\r\n\r\nAdrián"}}
{"actor":{"display_login":"pizerg"}}