{"action":"created","issue":{"url":"https://api.github.com/repos/marcokeur/pimatic-foscam/issues/1","repository_url":"https://api.github.com/repos/marcokeur/pimatic-foscam","labels_url":"https://api.github.com/repos/marcokeur/pimatic-foscam/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/marcokeur/pimatic-foscam/issues/1/comments","events_url":"https://api.github.com/repos/marcokeur/pimatic-foscam/issues/1/events","html_url":"https://github.com/marcokeur/pimatic-foscam/issues/1","id":132028670,"number":1,"title":"cameraIp should (ideally ;) be able to use DNS names, in addition to IP addresses","user":{"login":"poeml","id":12400278,"avatar_url":"https://avatars.githubusercontent.com/u/12400278?v=3","gravatar_id":"","url":"https://api.github.com/users/poeml","html_url":"https://github.com/poeml","followers_url":"https://api.github.com/users/poeml/followers","following_url":"https://api.github.com/users/poeml/following{/other_user}","gists_url":"https://api.github.com/users/poeml/gists{/gist_id}","starred_url":"https://api.github.com/users/poeml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poeml/subscriptions","organizations_url":"https://api.github.com/users/poeml/orgs","repos_url":"https://api.github.com/users/poeml/repos","events_url":"https://api.github.com/users/poeml/events{/privacy}","received_events_url":"https://api.github.com/users/poeml/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-08T00:29:10Z","updated_at":"2016-02-09T18:43:42Z","closed_at":null,"body":"Hi! I discovered your plugin and am thrilled to try it out with a Foscam FI9803P IP camera.\r\n\r\nI use this config:\r\n\r\n```\r\n   {\r\n      \"id\": \"fc1-new\",\r\n      \"class\": \"IpCamera\",\r\n      \"name\": \"Foscam fc1-new Test\",\r\n      \"username\": \"USER\",\r\n      \"password\": \"PASS\",\r\n      \"cameraIp\": \"CAM.MY.DOMAIN\",\r\n      \"cameraPort\": 88,\r\n      \"wsPort\": 9500\r\n}\r\n```\r\n\r\npimatic doesn't start any longer, though. It seems to silently crash. Only when I run it in the foreground, it gives the following error when exiting:\r\n\r\n\r\n```\r\nevents.js:72\r\n        throw er; // Unhandled 'error' event\r\n              ^\r\nError: spawn ENOENT\r\n    at errnoException (child_process.js:1000:11)\r\n    at Process.ChildProcess._handle.onexit (child_process.js:791:34)\r\nzsh: exit 8     sudo node_modules/pimatic/pimatic.js\r\n```\r\n\r\nIt crashes at a relatively early point (only few lines logged up to this point).\r\n\r\nWhen I use a DNS name instead of an IP address, it gets much farther with the starting, and I see a promising line `Started WS stream at port 9500 from origin rtsp:///...` :-)\r\n\r\nIt crashes afterwards, though, with the exact same error message, which will be subject of a further issue. "},"comment":{"url":"https://api.github.com/repos/marcokeur/pimatic-foscam/issues/comments/181998767","html_url":"https://github.com/marcokeur/pimatic-foscam/issues/1#issuecomment-181998767","issue_url":"https://api.github.com/repos/marcokeur/pimatic-foscam/issues/1","id":181998767,"user":{"login":"poeml","id":12400278,"avatar_url":"https://avatars.githubusercontent.com/u/12400278?v=3","gravatar_id":"","url":"https://api.github.com/users/poeml","html_url":"https://github.com/poeml","followers_url":"https://api.github.com/users/poeml/followers","following_url":"https://api.github.com/users/poeml/following{/other_user}","gists_url":"https://api.github.com/users/poeml/gists{/gist_id}","starred_url":"https://api.github.com/users/poeml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poeml/subscriptions","organizations_url":"https://api.github.com/users/poeml/orgs","repos_url":"https://api.github.com/users/poeml/repos","events_url":"https://api.github.com/users/poeml/events{/privacy}","received_events_url":"https://api.github.com/users/poeml/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T18:43:42Z","updated_at":"2016-02-09T18:43:42Z","body":"Hi Marco,\n\nyou are right. It was not the problem. DNS resolution now works for me, too.  It must have been another problem in the config I was testing. \n\nI tried to reproduce with a non-existing DNS name, and that yields a rather different error:\n\n`\nTypeError: Cannot read property 'CGI_Result' of undefined\n    at /home/pi/pimatic-app/node_modules/pimatic-foscam/foscam.coffee:107:24\n    at Parser.<anonymous> (/home/pi/pimatic-app/node_modules/xml2js/lib/xml2js.js:488:18)\n    at Parser.emit (events.js:95:17)\n    at Parser.exports.Parser.Parser.parseString (/home/pi/pimatic-app/node_modules/xml2js/lib/xml2js.js:507:16)\n    at Parser.parseString (/home/pi/pimatic-app/node_modules/xml2js/lib/xml2js.js:7:59)\n    at exports.parseString (/home/pi/pimatic-app/node_modules/xml2js/lib/xml2js.js:535:19)\n    at Request._callback (/home/pi/pimatic-app/node_modules/pimatic-foscam/foscam.coffee:106:9)\n    at self.callback (/usr/lib/nodejs/request/index.js:148:22)\n    at Request.emit (events.js:95:17)\n    at ClientRequest.self.clientErrorHandler (/usr/lib/nodejs/request/index.js:258:10)\n    at ClientRequest.emit (events.js:95:17)\n    at Socket.socketErrorListener (http.js:1547:9)\n    at Socket.emit (events.js:95:17)\n    at net.js:833:16\n    at process._tickDomainCallback (node.js:463:13)\n`\n\nThis error message is still a bit misleading, but that probably shouldn't  have high priority at this stage. Feel free to close the issue!"}}