Hello,
I am having a hard time inserting a few values into a db.
The flow looks like this;
[{"id":"1f014414.ca877c","type":"sqlite","z":"f10130b.539efd","mydb":"dd149518.c13258","sqlquery":"msg.topic","sql":"","name":"DataToSQLite","x":1220,"y":180,"wires":[[]]},{"id":"9fd92e27.a46db","type":"change","z":"f10130b.539efd","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1010,"y":180,"wires":[["cb49f6fe.6bc368","1f014414.ca877c"]]},{"id":"3e8af77d.672f08","type":"join","z":"f10130b.539efd","name":"JoinToSQL","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"","joinerType":"str","accumulate":false,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":810,"y":180,"wires":[["9fd92e27.a46db"]]},{"id":"a0235603.419c98","type":"change","z":"f10130b.539efd","name":"SQL 3","rules":[{"t":"set","p":"parts.index","pt":"msg","to":"2","tot":"num"},{"t":"set","p":"payload","pt":"msg","to":");","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":140,"wires":[["3e8af77d.672f08"]]},{"id":"d6e68690.c7ea98","type":"change","z":"f10130b.539efd","name":"SQL 2","rules":[{"t":"set","p":"parts.index","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":180,"wires":[["3e8af77d.672f08"]]},{"id":"ed91bd36.bb1c2","type":"change","z":"f10130b.539efd","name":"SQL 1","rules":[{"t":"set","p":"parts.index","pt":"msg","to":"0","tot":"num"},{"t":"set","p":"payload","pt":"msg","to":"INSERT INTO Meteo(DateTime, Temperature, Humidity, Dewpoint) VALUES(","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":100,"wires":[["3e8af77d.672f08"]]},{"id":"13826652.d6fe7a","type":"join","z":"f10130b.539efd","name":"JoinData","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":",","joinerType":"str","accumulate":false,"timeout":"","count":"4","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":460,"y":180,"wires":[["53fe10fa.8010e","d6e68690.c7ea98"]]},{"id":"a27d64b9.3b0438","type":"change","z":"f10130b.539efd","name":"Dew 4","rules":[{"t":"set","p":"parts.index","pt":"msg","to":"3","tot":"num"},{"t":"set","p":"payload","pt":"msg","to":"payload.StatusSNS.SI7021.DewPoint","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":270,"y":180,"wires":[["13826652.d6fe7a"]]},{"id":"15ccc837.197228","type":"change","z":"f10130b.539efd","name":"Hum 3","rules":[{"t":"set","p":"parts.index","pt":"msg","to":"2","tot":"num"},{"t":"set","p":"payload","pt":"msg","to":"payload.StatusSNS.SI7021.Humidity","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":270,"y":220,"wires":[["13826652.d6fe7a"]]},{"id":"15e82a12.1003b6","type":"change","z":"f10130b.539efd","name":"Tmp 2","rules":[{"t":"set","p":"parts.index","pt":"msg","to":"1","tot":"num"},{"t":"set","p":"payload","pt":"msg","to":"payload.StatusSNS.SI7021.Temperature","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":270,"y":260,"wires":[["13826652.d6fe7a"]]},{"id":"fd0501fa.46c29","type":"moment","z":"f10130b.539efd","name":"Time 1","topic":"0","input":"payload","inputType":"msg","inTz":"Europe/Bucharest","adjAmount":"0","adjType":"hours","adjDir":"add","format":"YYYY-MM-DDTHH:mm:ss","locale":"en-GB","output":"payload","outputType":"msg","outTz":"Europe/Bucharest","x":270,"y":140,"wires":[["13826652.d6fe7a","e7ac3a8f.157698"]]},{"id":"686ac101.a6d28","type":"inject","z":"f10130b.539efd","name":"Cycle 3m","props":[{"p":"payload"},{"p":"parts.index","v":"0","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":80,"wires":[["fd0501fa.46c29","a0235603.419c98","ed91bd36.bb1c2"]]},{"id":"e7ac3a8f.157698","type":"debug","z":"f10130b.539efd","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":450,"y":40,"wires":[]},{"id":"53fe10fa.8010e","type":"debug","z":"f10130b.539efd","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":630,"y":260,"wires":[]},{"id":"cb49f6fe.6bc368","type":"debug","z":"f10130b.539efd","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"topic","targetType":"msg","statusVal":"params","statusType":"auto","x":1200,"y":240,"wires":[]},{"id":"bc11f81d.d70108","type":"mqtt in","z":"f10130b.539efd","name":"Sensors","topic":"Meteo/STATUS8","qos":"2","datatype":"json","broker":"a36e2f8a.1c6a6","nl":false,"rap":false,"x":80,"y":180,"wires":[["a27d64b9.3b0438","15ccc837.197228","15e82a12.1003b6"]]},{"id":"dd149518.c13258","type":"sqlitedb","db":"/home/pi/noderedlocal/nodered.db","mode":"RW"},{"id":"a36e2f8a.1c6a6","type":"mqtt-broker","name":"","broker":"192.168.101.3","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"3","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
The table was created like;
BEGIN;
CREATE TABLE Meteo(DateTime BLOB, Temperature NUMERIC, Humidity NUMERIC, Dewpoint NUMERIC);
COMMIT;
But I tried NUMERIC and INTEGER also for DateTime.
With YYYY-MM-DD HH:mm:ss format the error is;
With YYYY-MM-DDTHH:mm:ss format the error is;
What am I doing wrong?
Thanks in advance kindly, I am beginner everything and I am running out of hair to pull out.
Edit: fixed the link node.