CREATE TABLE dhtreadings(id INTEGER PRIMARY KEY AUTOINCREMENT, temperature NUMERIC, humidity NUMERIC, currentdate DATE, currenttime TIME, device TEXT)
msg.topic = "INSERT INTO dhtreadings(temperature, humidity, currentdate, currenttime, device) VALUES (22.4, 48, date('now'), time('now'), manual)"; msg.payload = [temperature, humidity, currentdate, currenttime, device];
return msg;
This seems to have the wrong syntax.
Any idea?
Wow can i archieve to write real readings of the DHT21 Sensor into the Database?
Is it possible to write both values in one step or do i have to handle them seperatly?
Thanks a lot
Thomas
On Jul 14, 2017, at 4:29 AM, Ken Kaktus <perg...@gmail.com> wrote:INSERT INTO dhtreadings(temperature, humidity, currentdate, currenttime, device) VALUES (22.4, 48, date('now'), time('now'), manual)
Jus in case if helps you: