1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
#!/usr/bin/env python3
import asyncio
import logging
async def test():
log = logging.getLogger(__name__)
def log_callback(message):
log.info("Callback invoked: %s" % message)
host = "127.0.0.1"
port = 14999
log.info("Connecting to Anthem AVR at %s:%i" % (host, port))
# conn = await anthemav.Connection.create(host=host,port=port,loop=loop,update_callback=log_callback,auto_reconnect=False)
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(test())
|