-
Notifications
You must be signed in to change notification settings - Fork 67
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
plugins #41
Comments
Take a look at the tornado branch. I wrote a quick plugin architecture On Thu, May 19, 2016 at 1:13 PM, the-right-solution <
|
Thanks for the response juggie, just started writing a plugin, fairly straight forward. I'm having one issue though, how can I get a user code for the event? I looked at format_event function where you are using int(parameters[1:5]) to get the code, but it is not working in the plugin. The parameter just seems to contain partition number and not the user code |
I won't have time to test for a week (out of town) but from a quick look. We cut the variable here: https://github.com/juggie/AlarmServer/blob/feature/tornado/core/envisalink.py#L104 (in a odd way too, woops!) parameters is then passed to two different places, format_event where you see it used but then also to handle_* (where * is handle_event, handle_zone, handle_partition depending on the type of event received). In this case, I am guessing you are triggering a partition event that contains the user code you mentioned, however in handle_partition it simply takes the first character of the parameters (the partition number) and ignores the rest. This is I would expect where you are losing the user code. As I said I can't fix this right now but this should set you on the right track to fixing the issue. Pull requests are welcomed, I've personally never made use of that feature. |
Any documentation on how to get started with the plugins?
The text was updated successfully, but these errors were encountered: