fieldpoc/fieldpoc/dect.py

25 lines
532 B
Python
Raw Normal View History

2022-06-19 13:10:21 +02:00
#!/usr/bin/env python3
import mitel_ommclient2
import time
class Dect:
def __init__(self, fp):
self.fp = fp
def _init_client(self):
self.c = mitel_ommclient2.OMMClient2(
host=self.fp.config.dect.host,
username=self.fp.config.dect.username,
password=self.fp.config.dect.password,
ommsync=True,
)
def run(self):
self._init_client()
while True:
print("meow")
print(self.c.ping())
time.sleep(2)