When I create in Node Red an Inject node with the topic: INSERT INTO tempreadings(in_toevoer) values(11.5); which is connected to a sqlite-node, it inserts a new row into the database.
When I send the same string from my ESP8266 by MQTT to the mqqt-in node connected to the same sqlite node, I get a SQL error.
The debug message from the MQTT-in node is: “INSERT INTO tempreadings(in_toevoer) values(11.5);”, it looks like that the quotes are added, which create (I think) the SQL error.
How can I insert a new row from ESP8266 via MQTT into a sqlite database?
Hello Cor, I hope you are doing well and I’m sorry for taking so long to get back to you.
I’m not sure if that’s what is causing the error…
In the inject node which payload type did you use? If you’ve used the string (az) payload type, it will still output the query with the quotes, right?
Which SQL error is it printing in the debug window?
Thanks for your patience!
Thanks for your answer.
I found the problem, I was trying to send (from the esp6288 via mqtt) a string variable into a sql nummeric cell )-8