Serial command to read and store Mysql

Hello at everyone.
I would like communicate for my openhab over serial .
When i write a command “1” the arduino respond to me with all information temperature and humidity.
The question is :slight_smile:
-How i can store this information for every 3 minutes in database mysql and visualize in basic interface of openhab?
Thanks advice
Fabrizio Bianchi


and

thanks for your reply.
I know this informations but i don’t know how do for that.
Mysql is internal database, sure, srial bindings is installed…
How i can write the code?

Welcome to OH
All the information you need is on the docs.
Start with the rules tutorial
We are not here to write code for you but to help you with your set up and code.
Give it a go. Follow the examples. Search for code on the forum.
If it doesn’t work, then post your code and items and we’ll help you make it work.

1 Like

Ok right.
I’ll write some code for my question. Arduino is connected on serial and serial bindings is installed.

items:

String Arduino "Arduino [%s]" (arduino) { serial="/dev/ttyUSB0@57600,REGEX(t1.(\\d+.\\d+))" }

sitemap:

    Text item=Arduino valuecolor=[>35="orange",>20="green",<=20="blue"]

My first step is communicate with my serial and print the value in my sitemap and does not work.
How i do this?