thomasdelaet / python-velbus

A python library to control the Velbus home automation system
MIT License
17 stars 8 forks source link

Added SUB_VMBGPOD to commandregister #36

Closed brefra closed 4 years ago

Cereal2nd commented 4 years ago

i get a double command registry

Traceback (most recent call last): File "../examples/scan.py", line 9, in import velbus File "/home/cereal/python-velbus/velbus/init.py", line 4, in from velbus.controller import Controller File "/home/cereal/python-velbus/velbus/controller.py", line 6, in from velbus.parser import VelbusParser File "/home/cereal/python-velbus/velbus/parser.py", line 8, in from velbus.messages.module_type import ModuleTypeMessage File "/home/cereal/python-velbus/velbus/messages/init.py", line 20, in from velbus.messages.module_status import ModuleStatusMessage File "/home/cereal/python-velbus/velbus/messages/module_status.py", line 148, in register_command(COMMAND_CODE, ModuleStatusMessage2, 'SUB_VMBGPOD') File "/home/cereal/python-velbus/velbus/command_registry.py", line 61, in register_command commandRegistry.register_command(command_value, command_class, module_type) File "/home/cereal/python-velbus/velbus/command_registry.py", line 21, in register_command self._register_override(command_value, command_class, module_type) File "/home/cereal/python-velbus/velbus/command_registry.py", line 31, in _register_override raise Exception("double registration in command registry") Exception: double registration in command registry

The registercommand does not store the SUB correct these are stored inside the wrong index

brefra commented 4 years ago

Added addtional commits to have multiple submodules be registered. Only first sub module was registered (as "none"), now every sub module is registered using the submodule name.