now scraping rooms from capmus mgmt
This commit is contained in:
@@ -110,6 +110,10 @@ def get_defined_recorder_adapters():
|
||||
rec_model = {'id': f_p[1], 'name': f_p[1], 'commands': {}}
|
||||
if hasattr(rec_model_module, 'RECORDER_MODEL_NAME'):
|
||||
rec_model['name'] = rec_model_module.RECORDER_MODEL_NAME
|
||||
if hasattr(rec_model_module, 'REQUIRES_USER'):
|
||||
rec_model['requires_user'] = rec_model_module.REQUIRES_USER
|
||||
if hasattr(rec_model_module, 'REQUIRES_PW'):
|
||||
rec_model['requires_password'] = rec_model_module.REQUIRES_PW
|
||||
for name, obj in inspect.getmembers(rec_model_module, inspect.isclass):
|
||||
if issubclass(obj, RecorderAdapter):
|
||||
commands = {}
|
||||
|
||||
@@ -2,6 +2,8 @@ from backend.recorder_adapters import telnetlib, TelnetAdapter, RecorderAdapter
|
||||
|
||||
RECORDER_MODEL_NAME = "SMP 351 / 352"
|
||||
VERSION = "0.9.0"
|
||||
REQUIRES_USER = False
|
||||
REQUIRES_PW = True
|
||||
|
||||
# HOST = "localhost"
|
||||
# HOST = "129.13.51.102" # Audimax SMP 351
|
||||
@@ -13,9 +15,9 @@ PW = "123mzsmp"
|
||||
|
||||
|
||||
class SMP(TelnetAdapter, RecorderAdapter):
|
||||
def __init__(self, address, admin_password):
|
||||
def __init__(self, address, password, **kwargs):
|
||||
super().__init__(address)
|
||||
self.admin_pw = admin_password
|
||||
self.admin_pw = password
|
||||
|
||||
def _login(self):
|
||||
self.tn = telnetlib.Telnet(HOST)
|
||||
|
||||
Reference in New Issue
Block a user