I have a Maria DB installed on my IoT2020 and I'm writing data on to it via this flow:
Everything works fine so far but now I want to display the table on the dashboard but I have no idea how to use the output from the MariaDB node. Is it somehow possible to connect a function saying SELECT * to the input or output and get a message with an array or is their a even better way?
Thanks in advance!
It is really hard for anyone to help if you don't tell us what kind of output you want?
Have you looked in the flows library for Dashboard extensions? I believe that there is one that will build a table for you for example.
If you connect a debug node to the output of the MariaDB node, you will see what data you are getting back.
Do you mean you don't know how to get the data from the db or you don't know how to display it?
Sorry if it was unclear. I basically know how to display it in a table on the dashboard and meanwhile I found that I get my entire data from the db as output from the SQL node if I connect the function with SELECT * to the input.
I looked at some flows here in the forum but I couldnt find how I can put this data into an array and show it then. The msg object looks like this:
Each object should be in a new row.
Start by reading the node red page on Working with Messages. That should help you understand what you need to do. Each row in the database will be one of the 4 elements of the array in msg.payload.
Also find a primer on Mariadb or MySQL to show you how to get the data you want out of the db. MariaDB is the same sql syntax as MySQL I believe.
It is already in an array.
msg.payload is an array of objects. I think that you might be able to pass that direct to the ui-table node
Thank you, this node is the sollution for my problem. Unfortunately, this node doesnt work with my node red version 0.16.2. I can install the node but as soon as I configure it and deploy it all columns are deleted and I get no output on the dashboard.
But thanks anyways. I will wait until npm 2.6 is available for the SIMATIC IoT Gateway.
npm 2.6??? I've got npm v6.13.1 running!
I'm afraid that you will be waiting forever
Intel Quark lacks support for certain hardware instructions required in newer versions of V8 engine that Node.js uses to run
The latest version of node.js you can run is 7.10 according to this thread:
That still will prevent you from running newer versions of Node-RED and from using many nodes which typically require at least node.js v8.16