Thingsboard w/MQTT

Since my favorite dashboard, Freeboard, has finally decided to require payment, it was time to look for another free dashboard. We found Thingsboard, which is open source and Apache licensed. The examples I found used MQTT to upload data. Using their example code, along with the PubSub library code, and a little tweaking to make it work in the Photon world, I’m now able to begin re-creating the weather and environmental dashboards I had before. Right now it’s just uploading temp and humidity, but it appears the graphing options are substantially better in Thingsboard.

Check it out and let me know what you think.

6 Likes

Thank you for sharing this!

You’re welcome, @KyleG

1 Like

Just finished reworking my Freeboard weather dashboard into Thingsboard. Screen capture attached showing various types of widgets available.

3 Likes

you wouldnt want to share your code would you ?? I am figting with things board big time

@jade7272, is there a particular piece of code you’re looking for? I’ll be happy to share whatever helps.

Hey thanks for replying …Yea the particle code …I’ve been fighting with it for 4 days …I’m able to use MQTT to post to the things board and curl as well from different computers but I’m not getting anything out of particle we need to do a direct connection to particle and post really fast …Any help you can provide would be fantastic

@jade7272, here is the link to my code. You just need to add your Thingsboard token. I was using a Si7021 sensor to provide the data.

https://go.particle.io/shared_apps/5c12a70ee66c20aee6000aa5

Hope it helps.

2 Likes

Your awesome …As soon as my internet is back up …I’ll get on this

It works great thank you very much I am going to publish an article using your code ,on Hackster.io when I do Ill give you the Link,Ill give due where its due …

I’m glad it worked for you.

I’m confused. I looked at your project and I didn’t see anywhere where you’re doing MQTT?

Or was this another project you posted?

Right now I’m using Node red to subscribe to the Published topic and then using functions but Im going to switch over to MQTT and the Things board …Try to get responses a bit quicker on the switch side of things…maybe publish both ways …

Project is far from complete

Hey Jade /Syrinxtech

This looked exactly what I need since I want to use Thingsboard, but as a novice with all this and what with the above comments could you enlighten me as to this project.
It worked for jade7272 and then Syrinxtech said it’s not using MQTT, but the code I copied has MQTT bits in it.

I’m a bit / lot lost…

The code linked above should work fine with TB - you need to install your own TB server or use the demo one, add a device in TB. Make sure its using an access token credential. Put this token into the definition.

image

#define TOKEN           "XXXXXXXXXXXXXXX"

Flash to your device and then open the telemetry tab on the device record in TB and watch for data …

image

Yes you’re right – it seems to work just fine . So far using their demo server :slight_smile: