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

Insteon: Generate Voice Commands is a Mess #181

Closed
krkeegan opened this issue May 9, 2013 · 1 comment
Closed

Insteon: Generate Voice Commands is a Mess #181

krkeegan opened this issue May 9, 2013 · 1 comment
Assignees

Comments

@krkeegan
Copy link
Collaborator

krkeegan commented May 9, 2013

This is more of a developer issue, but the Generate Voice Commands routine in Insteon.pm is an utter mess. The logic tree is very hard to follow, much of the code is duplicative, and adding new voice commands for specific objects is far from easy.

Three things need to be done:

  1. The logic tree needs to be straightened out (which will be helped by 2.)
  2. The code needs to be reworked to remove much of the duplicative code
  3. A structure should be added to permit voice commands to be added at the class level
  • Insteon.pm should only include the most common base commands
  • Individual classes should define their more specific and unique voice commands
  • A developer adding a new insteon class type shouldn't need to edit the base Insteon.pm file

This will require editing a number of Insteon files and should wait until after the 3.0 merge is done.

@ghost ghost assigned krkeegan May 9, 2013
krkeegan added a commit to krkeegan/misterhouse that referenced this issue Jul 20, 2013
Generate_voice_commands in Insteon.pm now calls get_voice_cmds for each object.
get_voice_cmds is written to be inherited and modified by higher level objects
This allows for unique voice commands to be added to objects in their respective class files without messing with the base Insteon.pm file.

This commit merely copied over the voice commands as they existed before with little to no changes in the voice command design.

Fixes hollie#181
@mstovenour
Copy link
Collaborator

Nice work Kevin!

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

No branches or pull requests

2 participants