genielabs / HomeGenie

HomeGenie, the programmable automation intelligence
https://homegenie.it
GNU General Public License v3.0
401 stars 157 forks source link

Add support for Security CommandClass and Door Lock #155

Closed snagytx closed 9 years ago

snagytx commented 9 years ago

Add SecurityHandler for Security CommandClass and any required changes to make DoorLocks work. Tested with Schlage BE469

There are required a few changes at the main components, I tried to keep them at the minimum, which also caused required me to add SecurityHandler outside of Security CommandClass and make all the required calls from Security CommandClass to SecurityHandler.

Tested compilation of Windows and Ubuntu 14 - On Ubuntu I also creates a deb file and deployed on a R Pi - on windows I didn't create an installer - so I don't know if that works or not - but from the debugger everything is deployed correctly.

Maybe you guys can implement it in a better way because you know the internals better - if needed you can send me the code and I'll test it.

Let me know if you have any questions.

genemars commented 9 years ago

do all the fix you can. Let me know when finished so I will merge and work on the new code (see self-notes).

snagytx commented 9 years ago

I revisited through all the changes and cleaned up the code - keeping in mind your comments. See if there is any requirement for more changes

genemars commented 9 years ago

thanks, I'll take care of other minor changes.

genemars commented 9 years ago

hi @snagytx , this is going to be much more complex than I imagined, so I need your help. I'm now going to commit some work-in-progress around your code. Mainly I've been trying to make it fit into the current library structure, so I had to revert some changes you made mainly to ZWaveNode and tried to put the pieces of code in a better place. These modifications, broke up your code and actually it won't even compile. I'm pushing this the same, just to give an idea of how code should be arranged. The main work has to be done around the Security.cs file and Controller.cs file I guess. Just few notes about file implementing ICommandClass interface:

genemars commented 9 years ago

@snagytx this is the commit: https://github.com/genielabs/HomeGenie/commit/a955d81c5f156cfb352c16b439e8f547546907c5