Communicate with Thingsboard using UMQTT
I am facing issues when trying to send sensor values to Thingsboard. For those of you who don't know, it's a IOT platform which is mostly used to display values or even control devices linked to it. For that, I am using the umqtt Micropython library found here : https://github.com/micropython/micropython-lib/blob/master/umqtt.simple/umqtt/simple.py. However, I am not able to see the sensor values sent on Thingsboard, even if the publish function I use apparently seem to be working (I print a text such as ''Data sent'' just after I call this function, to make sure it has occured). This may be because I am not using the library and the different methods that come with it correctly. I could do this process perfectly with Adafruit IO and would've thought it works exactly the same way with Thingsboard but apparently that's not the case. Also, I don't know if that matters, but I don't have Thingsboard installed on my computer, I am rather using the demo version (which is free). I tried to follow this tutorial which explains how it works with Raspberry and was thinking about adapting it : https://thingsboard.io/docs/samples/raspberry/temperature/. You can find below the way I programmed my code. By the way, I could perfectly connect my device to a wifi so I don't think the problem comes from that.
Thanks a lot for helping, I can provide you with further information if needed.
@mfalkvidd the client.connect() returns 1, i fgure this means that the connection to the client has well been established right ?
mfalkvidd last edited by
@brossingo what was the output if the program when you ran it?
Checking the return value of client.connect() might yield useful information.