File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222SOFTWARE.
2323"""
2424from __future__ import annotations
25+
2526import json
2627import logging
2728import ssl
2829import threading
2930import time
30-
3131from socket import gaierror
32+
3233import paho .mqtt .client as mqtt
3334import shortuuid
3435import zmq
3536
3637from .constants import CONNECTION_PUB_URL
3738from .iotcontrol .enums import ConnectionState
3839
39-
4040logger = logging .getLogger (__name__ )
4141
4242
@@ -341,7 +341,7 @@ def run(self):
341341 control_type = ""
342342 while self .running :
343343 try :
344- socks = dict (poller .poll (1 ))
344+ socks = dict (poller .poll (10 ))
345345 except zmq .error .ContextTerminated :
346346 break
347347
Original file line number Diff line number Diff line change 2222SOFTWARE.
2323"""
2424from __future__ import annotations
25+
2526import json
2627import logging
2728import threading
2829import time
30+
2931import shortuuid
3032import zmq
3133
32- from .constants import CONNECTION_PUB_URL , BAD_CHARS
34+ from .constants import BAD_CHARS , CONNECTION_PUB_URL
3335from .iotcontrol .alarm import Alarm
3436from .iotcontrol .device_view import DeviceView
3537from .iotcontrol .enums import ControlName
36- from .load_config import encode_cfg64
37- from .load_config import CONTROL_INSTANCE_DICT , CONFIG_INSTANCE_DICT
38-
38+ from .load_config import (CONFIG_INSTANCE_DICT , CONTROL_INSTANCE_DICT ,
39+ encode_cfg64 )
3940
4041logger = logging .getLogger (__name__ )
4142
@@ -633,6 +634,7 @@ def __init__(
633634 self .controls_dict = {}
634635 self ._cfg = {}
635636 self ._cfg ["deviceSetup" ] = ''
637+ self ._cfg ["cfgRev" ] = 1
636638 self ._device_id_str = f"\t { device_id } "
637639 self ._cfg ["numDeviceViews" ] = 0
638640 if cfg_dict is not None :
@@ -752,3 +754,4 @@ def run(self):
752754 self .tx_zmq_pub .close ()
753755 self .rx_zmq_sub .close ()
754756 self .context .term ()
757+ self .context .term ()
You can’t perform that action at this time.
0 commit comments