Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
flatsiedatsie authored Feb 3, 2023
1 parent 8823750 commit 81606b1
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions pkg/matter_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
from pathlib import Path
from sys import path

import aiohttp
#import aiohttp
from aiorun import run
import coloredlogs

Expand Down Expand Up @@ -275,8 +275,12 @@ def __init__(self, verbose=False):

# run the server. This is blocking.
run(self.run_matter(), shutdown_callback=self.handle_stop)
#self.server.start()


# How to shut down nicely?
# https://pypi.org/project/aiorun/
# loop = asyncio.get_event_loop()
# loop.stop()



Expand Down Expand Up @@ -585,7 +589,7 @@ def discover(self):

def start_matter_pairing(self,pairing_type,code,device):
if self.DEBUG:
print("\n\nin start_matter_pairing. Pairing type: " + str(pairing_type)", Code: " + str(code) + ", device: " + str(device))
print("\n\nin start_matter_pairing. Pairing type: " + str(pairing_type) + ", Code: " + str(code) + ", device: " + str(device))
self.pairing_failed = False

try:
Expand Down Expand Up @@ -757,6 +761,9 @@ def unload(self):
if self.server != None:
self.server.stop()

# loop = asyncio.get_event_loop()
# loop.stop()


#try:
# self.devices['matter-thing'].properties['status'].update( "Bye")
Expand Down

0 comments on commit 81606b1

Please sign in to comment.