{"action":"created","issue":{"url":"https://api.github.com/repos/KhaosT/HAP-NodeJS/issues/206","labels_url":"https://api.github.com/repos/KhaosT/HAP-NodeJS/issues/206/labels{/name}","comments_url":"https://api.github.com/repos/KhaosT/HAP-NodeJS/issues/206/comments","events_url":"https://api.github.com/repos/KhaosT/HAP-NodeJS/issues/206/events","html_url":"https://github.com/KhaosT/HAP-NodeJS/issues/206","id":130174064,"number":206,"title":"Fail on Waiting for callback(); in Characteristic.on('set') or ('get')","user":{"login":"antonkluev","id":12466732,"avatar_url":"https://avatars.githubusercontent.com/u/12466732?v=3","gravatar_id":"","url":"https://api.github.com/users/antonkluev","html_url":"https://github.com/antonkluev","followers_url":"https://api.github.com/users/antonkluev/followers","following_url":"https://api.github.com/users/antonkluev/following{/other_user}","gists_url":"https://api.github.com/users/antonkluev/gists{/gist_id}","starred_url":"https://api.github.com/users/antonkluev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonkluev/subscriptions","organizations_url":"https://api.github.com/users/antonkluev/orgs","repos_url":"https://api.github.com/users/antonkluev/repos","events_url":"https://api.github.com/users/antonkluev/events{/privacy}","received_events_url":"https://api.github.com/users/antonkluev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-31T19:50:20Z","updated_at":"2016-01-31T23:14:59Z","closed_at":null,"body":"Hi, Guys!\r\n\r\nI have here some issue :) ive builded a TimeCapsule Object that control Netatalk and Mounted Disks a la TimeCapsule. If i try to get TimeCapsule state, my Homekit hangs on because my TimeCapsule needs a bit time to check, if it running. Or if i switch my TimeCapsule off, it needs time to unmount disk and get Netatalk down... Where can i set the longer timeout, that my Homekit will not crash?\r\n\r\n\r\n```\r\nDevice\r\n    .addService(Service.Switch, TimeCapsule.alias, TimeCapsule.alias)\r\n    .getCharacteristic(Characteristic.On)\r\n    .on('set', function(value, callback) {\r\n        \r\n        TimeCapsule.on('set', value, function () {\r\n                console.log(TimeCapsule.alias +' is set to '+ (value? 'ON': 'OFF'));\r\n                callback();\r\n        });\r\n    })\r\n    .on('get', function(callback) {\r\n        \r\n        TimeCapsule.on('get', function (value) {\r\n                console.log(TimeCapsule.alias +' is '+ (value? 'ON': 'OFF'));\r\n                callback(null, value);\r\n        });\r\n    });\r\n```\r\n\r\nThanks :)"},"comment":{"url":"https://api.github.com/repos/KhaosT/HAP-NodeJS/issues/comments/177656881","html_url":"https://github.com/KhaosT/HAP-NodeJS/issues/206#issuecomment-177656881","issue_url":"https://api.github.com/repos/KhaosT/HAP-NodeJS/issues/206","id":177656881,"user":{"login":"antonkluev","id":12466732,"avatar_url":"https://avatars.githubusercontent.com/u/12466732?v=3","gravatar_id":"","url":"https://api.github.com/users/antonkluev","html_url":"https://github.com/antonkluev","followers_url":"https://api.github.com/users/antonkluev/followers","following_url":"https://api.github.com/users/antonkluev/following{/other_user}","gists_url":"https://api.github.com/users/antonkluev/gists{/gist_id}","starred_url":"https://api.github.com/users/antonkluev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonkluev/subscriptions","organizations_url":"https://api.github.com/users/antonkluev/orgs","repos_url":"https://api.github.com/users/antonkluev/repos","events_url":"https://api.github.com/users/antonkluev/events{/privacy}","received_events_url":"https://api.github.com/users/antonkluev/received_events","type":"User","site_admin":false},"created_at":"2016-01-31T23:14:59Z","updated_at":"2016-01-31T23:14:59Z","body":"for example here\r\n\r\n    ```\r\n.on('set', function(value, callback) {\r\n\r\n        TimeCapsule.on('set', value, function () {\r\n                console.log(TimeCapsule.alias +' is set to '+ (value? 'ON': 'OFF'));\r\n                callback();\r\n        });\r\n    })\r\n```\r\n\r\nIf i switch it on - my Harddrive will powered up -> accelerate -> mounted -> and start Netatalk. It takes ca. 10 - 30 seconds. But in this time my Homekit app shows no information about all accessories until i wait a long time or gonna restart HAP. But this \"callback();\" must block only this switcher, not the whole app ))"}}