Narete stvari da delajo
This commit is contained in:
parent
64a10b0512
commit
29b2beca5a
45 changed files with 809 additions and 1600 deletions
|
@ -47,12 +47,17 @@ async def shell(reader, writer):
|
|||
async with aiomqtt.Client('localhost', 1883) as client:
|
||||
task_status_query = asyncio.create_task(extron_audio_telnet_status(client, writer, reader))
|
||||
task_control = asyncio.create_task(extron_audio_telnet_control(client, writer))
|
||||
await asyncio.gather(task_control)
|
||||
await asyncio.gather(task_status_query, task_control)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
config_file = os.getenv('MM_CONFIG_PATH', './malinaConfig.toml')
|
||||
conf = toml.load(config_file)
|
||||
room = conf['global']['room']
|
||||
mqttHost = conf['global']['mqttHost']
|
||||
mqttPort = conf['global']['mqttPort']
|
||||
|
||||
loop = asyncio.get_event_loop()
|
||||
#coro = telnetlib3.open_connection('localhost', 1234, shell=shell)
|
||||
coro = telnetlib3.open_connection('192.168.192.14', 23, shell=shell)
|
||||
reader, writer = loop.run_until_complete(coro)
|
||||
loop.run_until_complete(writer.protocol.waiter_closed)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue