{"action":"created","issue":{"url":"https://api.github.com/repos/nfarina/homebridge/issues/173","labels_url":"https://api.github.com/repos/nfarina/homebridge/issues/173/labels{/name}","comments_url":"https://api.github.com/repos/nfarina/homebridge/issues/173/comments","events_url":"https://api.github.com/repos/nfarina/homebridge/issues/173/events","html_url":"https://github.com/nfarina/homebridge/pull/173","id":106479518,"number":173,"title":"File-based motion or contact sensor","user":{"login":"SphtKr","id":3403287,"avatar_url":"https://avatars.githubusercontent.com/u/3403287?v=3","gravatar_id":"","url":"https://api.github.com/users/SphtKr","html_url":"https://github.com/SphtKr","followers_url":"https://api.github.com/users/SphtKr/followers","following_url":"https://api.github.com/users/SphtKr/following{/other_user}","gists_url":"https://api.github.com/users/SphtKr/gists{/gist_id}","starred_url":"https://api.github.com/users/SphtKr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SphtKr/subscriptions","organizations_url":"https://api.github.com/users/SphtKr/orgs","repos_url":"https://api.github.com/users/SphtKr/repos","events_url":"https://api.github.com/users/SphtKr/events{/privacy}","received_events_url":"https://api.github.com/users/SphtKr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-15T05:02:17Z","updated_at":"2015-09-15T17:25:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nfarina/homebridge/pulls/173","html_url":"https://github.com/nfarina/homebridge/pull/173","diff_url":"https://github.com/nfarina/homebridge/pull/173.diff","patch_url":"https://github.com/nfarina/homebridge/pull/173.patch"},"body":"This module creates a motion sensor accessory based on watching a directory or file. This is useful because many inexpensive IP cameras (Foscam, D-Link, others) have an option to FTP an image or video file when they detect motion. If you use this accessory to monitor that FTP drop location, you can expose that camera as a motion sensor to HomeKit.\r\n\r\nConfig:\r\n\r\n* `path`: the dir, file, or glob to watch (see docs for the chokidar module for what's possible)\r\n* `window_seconds`: A file modification date has to be within this many seconds of now to trigger the sensor. This is also the length of time that the sensor will stay triggered before falling back to it's default state.\r\n* `inverse`: if needed, you can invert the behavior of the sensor, for instance so that finding a file means there is ''no'' motion or contact detected.\r\n* `sensor_type`: currently either `\"m\"` for motion sensor or `\"c\"` for contact sensor. Contact sensor support is a little wonky right now, it doesn't seem to want to fall back to the untriggered state for some reason--also app support seems to be lacking."},"comment":{"url":"https://api.github.com/repos/nfarina/homebridge/issues/comments/140472754","html_url":"https://github.com/nfarina/homebridge/pull/173#issuecomment-140472754","issue_url":"https://api.github.com/repos/nfarina/homebridge/issues/173","id":140472754,"user":{"login":"nfarina","id":117280,"avatar_url":"https://avatars.githubusercontent.com/u/117280?v=3","gravatar_id":"","url":"https://api.github.com/users/nfarina","html_url":"https://github.com/nfarina","followers_url":"https://api.github.com/users/nfarina/followers","following_url":"https://api.github.com/users/nfarina/following{/other_user}","gists_url":"https://api.github.com/users/nfarina/gists{/gist_id}","starred_url":"https://api.github.com/users/nfarina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nfarina/subscriptions","organizations_url":"https://api.github.com/users/nfarina/orgs","repos_url":"https://api.github.com/users/nfarina/repos","events_url":"https://api.github.com/users/nfarina/events{/privacy}","received_events_url":"https://api.github.com/users/nfarina/received_events","type":"User","site_admin":false},"created_at":"2015-09-15T17:25:01Z","updated_at":"2015-09-15T17:25:01Z","body":"Very cool!"}}