Node-RED SQLITE stores Data Base on windows

Hi there !

I wanna store the temperature measurement and the time when the measurement was done; actually works fine on my flow (I've a UI to display the table, I made it using dashboard), the problem is I don't know where the sqlite node save the data base file, I can't find it ... I tried using the file node but doesn't works ...

OS: Windows 10 pro x64
sqlite: https://flows.nodered.org/node/node-red-node-sqlite

what are the node configuration options?

thanks ukmoose...

OK so the sqlite node will save to the sqlite database that you must have installed separately.

Well, that's a problem, I've not installed sqlite database separately ... I searched in google and found this tutorial: http://noderedguide.com/tutorial-sqlite-and-node-red/ ... Never say that I must install database separately; nevertheless, when start node-red in windows PowerShell show this:

Looks like sqlite already exist: "7 Jul 19:27:02 - [info] [sqlitedb:2536932f.016bcc] opened sqlite ok"

Please, could you explain me how its works?

Absolutely no idea!
My experience is primarily based on these tutorials for the Raspberry Pi.

http://randomnerdtutorials.com/sqlite-with-node-red-and-raspberry-pi/

Which starts off by stating "Install SQLlite"

Not sure what you mean by that. It seems that it is working (other than, obviously, the flow is trying to create a table that has already been created once.

I have no problem with the flow, works OK ... I wanna know where the sqlite node saves (in my windows PC ) the database called "sqlite" ... in previous replies I posted the setting sqlite node (Node-RED SQLITE stores Data Base on windows)

In this reply: Node-RED SQLITE stores Data Base on windows
I'm saying that the node "sqlitedb:2536932f.016bcc" open the database called "sqlite", but I don't know where the file is ....

Well, this example was usefull: https://medium.com/@supotsaeea/node-red-sqlite-d78a57ec4561

I assumed that the database file made by sqlite node will be save in C:\Users_username_.node-red ... I was wrong, I don't know where is

I don't use windows but presumably there is a search program that you could use to find it. However in Linux you can specify a full path to the file, so presumably you can do that in windows too.

@kharlos04 I ran into the same issues - plenty of Linux tutorials... that don't seem to work under Windows.

Here is the solution that I found: https://github.com/mpolinowski/nodered-sqlite

Mostly a best-of from the tutorials - but verified to work under Windows 10.

TL;DR

1.) Install SQLite
2.) Use the CLI tool to create a database, e.g. inside the .node-red installation folder (be aware that the file is not created right away - you can call .databases from the SQLite3 tool to have it show up)
3.) Install the sqlite node in node-red, drag the node into your flow and type in the absolute path to the .db file created in the step above.

The clue is in the background default text. Put in an absolute path. If you don't put in any path, it will create it in your userDir folder (default ~/.node-red).

If you don't start the name with an absolute path, the path will be relative to the userDir folder.

You should perhaps raise an issue (or do a pull request) on the node-red-nodes github in order to improve the documentation.

In my case, I installed sqlite in C:\sqlite3 of windows 10 and created a db folder. This resulted in C:\sqlite3\db. Then in Node-Red, I selected a sqlite node and filled C:\sqlite3\db\db_002 in a blank of Database where db_002 is a db filename. A good youtube for making sqlite - Node-Red is https://www.youtube.com/watch?v=4YfnjOcnq5s.