Are there any of you, who have succesfully transmitted data from TTN, to a wordpress database?
I would like to display my sensor values on my own website, but is not quite sure how to integrate TTN to wordpress.
I’m looking forward to hear from you, and thanks in advance
Rather than querying and filtering the data from the Data Storage integration, you might want to be use the MQTT API or HTTP Integration instead, if only as that would also give you all metadata.
Yup, I am aware, however I’m not looking to create a full data experience that having the meta data brings - more offload the random requests for dashboards back to the user. My primary target is proof-of-concept projects.
It can get a bit complicated part initialising WordPress so you can use it’s facilities from a URL that is being called externally, so I’ll leave that out the picture for now.
Hi Nick,
One approach could be to use http integration to push the data to a Zapier webhook. Then, you can send it to a Google Sheet, and transorm it into a dashboard with Google Data Studio. After that, you can integrate it to your WP site without having to deal with the DB. Should be fair for a POC
(In the example you might want to look for the comment about “Or, to add at the top (which … nicely extends any existing ranges, like when used in charts)”.)
Data Studio will work with both solutions, it only needs a sheet as datasource. Zapier is just a facilitator here, but direct push is always better, for sure. Of course, at the end, it can not be used for any production, as there are limitations with Google sheet (nb of rows and script calls per day for instance).
Actually, I’ve used similar things in production, for sales data that was quite high traffic at peak hours. (Think: every 10 seconds.)
For LoRaWAN, I’d guess that the Google limits are far below TTN’s Fair Access Policy? (Even if one would push that Fair Access to its limits. Aside: I happen to create sheets for each month, which might help.)
It really depends of the number of devices and data you have. It can quickly become a nightmare if you have thousands of rows, especially in terms of performances. Today, you can build a db server for 1,49 eur/month (ovh), install MySQL on it and add a basic api made with php. It will always be better.
Hmmm, this has potential. Although, as you note, we do rack up a fair number of rows so the data source has to be right-sized.
The WP plugin isn’t for a single project POC, it’s to simplify future POC & starter projects and by providing a simple set of selections for sensor & date range, leave the client to finesse the presentation.
I already have a desktop version built in FileMaker which also helps with device management, more complex alarming groups and allows for adhoc queries without the user having to get in to SQL. But web enablement is costly and the UI for the charts display is a bit clunky.
Google Data Studio is only an interface. It can use almost any type of datasource (sheet, sql, bigquery. Etc.). Same as PowerBI, but free… Adding a table to the WP DB and using it as DS should not be that complicated…
On server side, you have to implement a script that will create an endpoint for the http integration and write to the DB.
Not really in this case. Datastudio integrates better with Google Cloud, so the strategy is probably to encourage users to migrate their data to Google Cloud. But if you really want to pay, there are plenty of solutions. Power BI in integrated mode is very powerfull.
Billions of webservices connect to distant mysql databases each day. Each time that you are using a cloud database, you have to do that. There are many ways to secure a DB access, but of course, it requires some skills.
The main vulnerability is very often between the screen and the chair, with people who don’t really know what they are doing. The best solution to protect a website is to keep it on an internal network. Ok. But if you need to make it available to the world, you will secure it. There is absolutely no difference with a DB.
Last but not least: Wordpress itself is a security nightmare, because plugins are coded by people who have mostly very basic knowledge related to security. The funny thing is that you can make DB injection thru them