mirror of
https://github.com/thingsboard/thingsboard-gateway
synced 2025-10-26 22:31:42 +08:00
Fixed import
This commit is contained in:
1
setup.py
1
setup.py
@@ -67,7 +67,6 @@ setup(
|
|||||||
'grpcio<=1.43.0',
|
'grpcio<=1.43.0',
|
||||||
'protobuf',
|
'protobuf',
|
||||||
'cachetools',
|
'cachetools',
|
||||||
'tb-mqtt-client'
|
|
||||||
],
|
],
|
||||||
download_url='https://github.com/thingsboard/thingsboard-gateway/archive/%s.tar.gz' % VERSION,
|
download_url='https://github.com/thingsboard/thingsboard-gateway/archive/%s.tar.gz' % VERSION,
|
||||||
entry_points={
|
entry_points={
|
||||||
|
|||||||
Submodule tb_mqtt_client updated: 1dd202aa55...9a2454a452
@@ -16,9 +16,15 @@ import logging
|
|||||||
import threading
|
import threading
|
||||||
from time import sleep, time
|
from time import sleep, time
|
||||||
from ssl import CERT_REQUIRED, PROTOCOL_TLSv1_2
|
from ssl import CERT_REQUIRED, PROTOCOL_TLSv1_2
|
||||||
from tb_mqtt_client.tb_gateway_mqtt import TBGatewayMqttClient
|
|
||||||
from thingsboard_gateway.tb_utility.tb_utility import TBUtility
|
from thingsboard_gateway.tb_utility.tb_utility import TBUtility
|
||||||
|
|
||||||
|
try:
|
||||||
|
from tb_gateway_mqtt import TBGatewayMqttClient
|
||||||
|
except ImportError:
|
||||||
|
print("tb-mqtt-client library not found - installing...")
|
||||||
|
TBUtility.install_package('tb-mqtt-client')
|
||||||
|
from tb_gateway_mqtt import TBGatewayMqttClient
|
||||||
|
|
||||||
log = logging.getLogger("tb_connection")
|
log = logging.getLogger("tb_connection")
|
||||||
|
|
||||||
CHECK_CERT_PERIOD = 86400
|
CHECK_CERT_PERIOD = 86400
|
||||||
|
|||||||
Reference in New Issue
Block a user