{"action":"created","issue":{"url":"https://api.github.com/repos/kkapitan/homebridge-homesung/issues/2","repository_url":"https://api.github.com/repos/kkapitan/homebridge-homesung","labels_url":"https://api.github.com/repos/kkapitan/homebridge-homesung/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/kkapitan/homebridge-homesung/issues/2/comments","events_url":"https://api.github.com/repos/kkapitan/homebridge-homesung/issues/2/events","html_url":"https://github.com/kkapitan/homebridge-homesung/issues/2","id":359927722,"node_id":"MDU6SXNzdWUzNTk5Mjc3MjI=","number":2,"title":"KEY_POWER bug ","user":{"login":"boro55","id":42983304,"node_id":"MDQ6VXNlcjQyOTgzMzA0","avatar_url":"https://avatars2.githubusercontent.com/u/42983304?v=4","gravatar_id":"","url":"https://api.github.com/users/boro55","html_url":"https://github.com/boro55","followers_url":"https://api.github.com/users/boro55/followers","following_url":"https://api.github.com/users/boro55/following{/other_user}","gists_url":"https://api.github.com/users/boro55/gists{/gist_id}","starred_url":"https://api.github.com/users/boro55/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boro55/subscriptions","organizations_url":"https://api.github.com/users/boro55/orgs","repos_url":"https://api.github.com/users/boro55/repos","events_url":"https://api.github.com/users/boro55/events{/privacy}","received_events_url":"https://api.github.com/users/boro55/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":22,"created_at":"2018-09-13T14:42:55Z","updated_at":"2018-10-01T07:52:50Z","closed_at":null,"author_association":"NONE","body":"@kkapitan I think I discovered a bug. I added a `KEY_POWER` command to my config.json. When I trigger it on my phone it does turn the TV off. But after I turn the TV back on using my remote and try to trigger any other command related to homesung plugin, e.g. `KEY_VOLUP` the whole HomeKit app on my phone becomes unresponsive (including other accessories not related with your plugin). The only way to make the plugin work again is to run `homesung-pair <ip of the device>`, generate new PIN and update `aesKey`. \r\n\r\nThat's the log from Homebridge after I triggered the `KEY_POWER`, turned the TV on with remote and tried to trigged any other command:\r\n\r\n/usr/lib/node_modules/homebridge-homesung/vendor/encryption/asmcrypto.js:3\r\n!function(a,b){function c(){var a=Error.apply(this,arguments);this.message=a.message,this.stack=a.stack}function d(){var a=Error.apply(this,arguments);this.message=a.message,this.stack=a.stack}function e(){var a=Error.apply(this,arguments);this.message=a.message,this.stack=a.stack}function f(a,b){b=!!b;for(var c=a.length,d=new Uint8Array(b?4*c:c),e=0,f=0;c>e;e++){var g=a.charCodeAt(e);if(b&&g>=55296&&56319>=g){if(++e>=c)throw new Error(„Malformed string, low surrogate expected at position „+e);g=(55296^g)<<10|65536|56320^a.charCodeAt(e)}else if(!b&&g>>>8)throw new Error(„Wide characters are not allowed.”);!b||127>=g?d[f++]=g:2047>=g?(d[f++]=192|g>>6,d[f++]=128|63&g):65535>=g?(d[f++]=224|g>>12,d[f++]=128|g>>6&63,d[f++]=128|63&g):(d[f++]=240|g>>18,d[f++]=128|g>>12&63,d[f++]=128|g>>6&63,d[f++]=128|63&g)}return d.subarray(0,f)}function g(a){var b=a.length;1&b&&(a=„0”+a,b++);for(var c=new Uint8Array(b>>1),d=0;b>d;d+=2)c[d>>1]=parseInt(a.s\r\nError: bad padding\r\n    at new e (/usr/lib/node_modules/homebridge-homesung/vendor/encryption/asmcrypto.js:3:219)\r\n    at z.y [as decrypt] (/usr/lib/node_modules/homebridge-homesung/vendor/encryption/asmcrypto.js:3:5196)\r\n    at Function.G [as decrypt] (/usr/lib/node_modules/homebridge-homesung/vendor/encryption/asmcrypto.js:3:6018)\r\n    at Object.decryptData (/usr/lib/node_modules/homebridge-homesung/vendor/encryption/index.js:666:41)\r\n    at Encryption.decrypt (/usr/lib/node_modules/homebridge-homesung/src/connection/encryption.js:16:22)\r\n    at Object.handleMessage (/usr/lib/node_modules/homebridge-homesung/src/connection/handlers.js:51:54)\r\n    at SocketConnection.<anonymous> (/usr/lib/node_modules/homebridge-homesung/src/connection/connection.js:35:35)\r\n    at emitOne (events.js:116:13)\r\n    at WebSocket.emit (events.js:211:7)\r\n    at Receiver.receiverOnMessage (/usr/lib/node_modules/homebridge-homesung/node_modules/ws/lib/websocket.js:719:20)"},"comment":{"url":"https://api.github.com/repos/kkapitan/homebridge-homesung/issues/comments/425818923","html_url":"https://github.com/kkapitan/homebridge-homesung/issues/2#issuecomment-425818923","issue_url":"https://api.github.com/repos/kkapitan/homebridge-homesung/issues/2","id":425818923,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNTgxODkyMw==","user":{"login":"boro55","id":42983304,"node_id":"MDQ6VXNlcjQyOTgzMzA0","avatar_url":"https://avatars2.githubusercontent.com/u/42983304?v=4","gravatar_id":"","url":"https://api.github.com/users/boro55","html_url":"https://github.com/boro55","followers_url":"https://api.github.com/users/boro55/followers","following_url":"https://api.github.com/users/boro55/following{/other_user}","gists_url":"https://api.github.com/users/boro55/gists{/gist_id}","starred_url":"https://api.github.com/users/boro55/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boro55/subscriptions","organizations_url":"https://api.github.com/users/boro55/orgs","repos_url":"https://api.github.com/users/boro55/repos","events_url":"https://api.github.com/users/boro55/events{/privacy}","received_events_url":"https://api.github.com/users/boro55/received_events","type":"User","site_admin":false},"created_at":"2018-10-01T07:52:50Z","updated_at":"2018-10-01T07:52:50Z","author_association":"NONE","body":"@kkapitan editing `request-identity.js` didn't help in my case. I still get the same error as I mentioned above. Do you have any predictions what might be the cause of this?  "}}
{"actor":{"display_login":"boro55"}}