Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a raw event #1

Merged
merged 1 commit into from
Apr 25, 2014
Merged

Add a raw event #1

merged 1 commit into from
Apr 25, 2014

Conversation

hross
Copy link
Contributor

@hross hross commented Apr 23, 2014

Sweet library, thanks for creating this. I needed a way to pull zone information from the second piece of the response so I added a raw event that lets me see/debug anything that comes in via the ad2usb.

@alexkwolfe
Copy link
Owner

Thanks for the PR. I'd love to add a way to parse the zone info from the second piece of the response. How are you doing that?

@hross
Copy link
Contributor Author

hross commented Apr 23, 2014

I am doing it the sad old fashioned way:

if (sec3.indexOf('"FAULT') == 0) {
  var zone = config.zones[sec2];

Sec2 is a 3 digit zone code, so I just walked through my house and
triggered my motion/door sensors with the ad2usb connected and listening to
raw:

config.zones = {
"001": {name: 'Front Door', type: 'door'},
"002": {name: 'Front Hall', type: 'motion'},
"003": {name: 'Family Room', type: 'motion'},
"004": {name: 'Back Door', type: 'door'},
"006": {name: 'Laundry Hall', type: 'motion'}
};

On Wed, Apr 23, 2014 at 1:08 PM, Alex Wolfe notifications@github.comwrote:

Thanks for the PR. I'd love to add a way to parse the zone info from the
second piece of the response. How are you doing that?


Reply to this email directly or view it on GitHubhttps://github.com//pull/1#issuecomment-41187863
.

alexkwolfe added a commit that referenced this pull request Apr 25, 2014
@alexkwolfe alexkwolfe merged commit 843bc3c into alexkwolfe:master Apr 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants