Compare commits
2 Commits
4cc057ea57
...
1e87df0b7a
Author | SHA1 | Date | |
---|---|---|---|
1e87df0b7a | |||
7d5d68e29c |
4
main.py
4
main.py
|
@ -43,7 +43,7 @@ async def play_sound(filename):
|
|||
|
||||
async def barkbark(sound):
|
||||
global COOLDOWN
|
||||
if time.time() - COOLDOWN < 15.0:
|
||||
if time.time() - COOLDOWN < 20.0:
|
||||
logging.info('Cooldown skipping.')
|
||||
return
|
||||
COOLDOWN = time.time()
|
||||
|
@ -84,7 +84,7 @@ async def process_mqtt(message):
|
|||
|
||||
async def fetch_mqtt():
|
||||
await asyncio.sleep(3)
|
||||
async with Client('192.168.0.100') as client:
|
||||
async with Client('192.168.0.106') as client:
|
||||
async with client.filtered_messages('iot/cameras') as messages:
|
||||
await client.subscribe('#')
|
||||
async for message in messages:
|
||||
|
|
Loading…
Reference in New Issue
Block a user