AttributeError: 'TBDeviceMqttClient' object has no attribute '__name__'
import network from uthingsboard.client import TBDeviceMqttClient
sta_if = network.WLAN(network.STA_IF) ap_if = network.WLAN(network.AP_IF)
ap_if.active(False) sta_if.active(True) sta_if.connect('Sahil', '12345678')
while not sta_if.isconnected(): pass print("connected to internet")
See examples for more authentication options
client = TBDeviceMqttClient('X.X.X.X', access_token='shgfisfwfiwufhweh', port = 1883)
Connecting to ThingsBoard
print("connecting") client.connect() print("connected")
Sending telemetry
telemetry = {'New': 458, 'enabled': True} client.send_telemetry(telemetry)
Checking for incoming subscriptions or RPC call requests (non-blocking)
client.check_msg()
Disconnecting from ThingsBoard
client.disconnect()
getting this error while running this code.
File "main.py", line 19, in
There is no uthingsboard module or TBDeviceMqttClient code here in this repository. Most likely the module in use was from https://github.com/manuargue/thingsboard-micropython - and issues with the module should be directed there.