prodromos
Topic Author
Posts: 5
Joined: 22 Nov 2022, 23:28

SQLite & setpoints

22 Nov 2022, 23:36

hello everyone I have 4 questions for my project that i will use 1 DIO
1)I would like to save the data to SQLite database ,is there any tutorial or quide how to install the sqlite to revolution device?
2)can i take files (what type of files?like CSV?JASON?) in order to introduced to sqlite?how?
3)can I set up setpoints ? or only for analog revolution device?
4)how can i import a timer to DIO in order to stop or start a specific input or output?

thank you
 
User avatar
dirk
KUNBUS
Posts: 1688
Joined: 15 Dec 2016, 13:19
Answers: 1

Re: SQLite & setpoints

23 Nov 2022, 11:53

Hi prodromos,
1,2,3) just google RaspberryPi SQLite ;)
4) Have a look at the Tutorial RevPiTimer
 
prodromos
Topic Author
Posts: 5
Joined: 22 Nov 2022, 23:28

Re: SQLite & setpoints

23 Nov 2022, 12:26

thank you !

i have a last question the revolution PI which type of files record the data ? in order to take the file and import it to database .
 
User avatar
nicolaiB
KUNBUS
Posts: 714
Joined: 21 Jun 2018, 10:33
Answers: 1
Location: Berlin
Contact:

Re: SQLite & setpoints

23 Nov 2022, 12:45

The IOs are stored in the process image, which can be read via ioctls. I personally would use Python with the libraries revpimodio2 and sqlite3 for this particular project. Both project have great examples, which should help you with the start.

Nicolai
 
prodromos
Topic Author
Posts: 5
Joined: 22 Nov 2022, 23:28

Re: SQLite & setpoints

23 Nov 2022, 13:41

thanks for your reply but what do you mean with IOs? that i have understood is that i should make a image and then to put to SQLite ...
 
User avatar
nicolaiB
KUNBUS
Posts: 714
Joined: 21 Jun 2018, 10:33
Answers: 1
Location: Berlin
Contact:

Re: SQLite & setpoints

23 Nov 2022, 14:16

IO = Input / Output
 
prodromos
Topic Author
Posts: 5
Joined: 22 Nov 2022, 23:28

Re: SQLite & setpoints

24 Nov 2022, 19:24

Thank you very much.the only way to take the data is throught the process image?
 
User avatar
nicolaiB
KUNBUS
Posts: 714
Joined: 21 Jun 2018, 10:33
Answers: 1
Location: Berlin
Contact:

Re: SQLite & setpoints

24 Nov 2022, 23:13

Yes, besides the RevPi compact, which integrated IOs can also queried via gpio subsystem, this is the only way.
 
prodromos
Topic Author
Posts: 5
Joined: 22 Nov 2022, 23:28

Re: SQLite & setpoints

25 Nov 2022, 09:56

how can active and inactive a specific output or input with the timer?
 
User avatar
nicolaiB
KUNBUS
Posts: 714
Joined: 21 Jun 2018, 10:33
Answers: 1
Location: Berlin
Contact:

Re: SQLite & setpoints

25 Nov 2022, 12:15

If you want to use a timer after a certain value change I would recommend to use the reg_event IO function in revpimodio2 (https://revpimodio.org/en/doc2/io/). In the case that you want to trigger a IO at a certain time you can call a script via a cronjob or use the python library schedule https://schedule.readthedocs.io/en/stable/

Nicolai

Who is online

Users browsing this forum: No registered users and 0 guests