Hi,
I am creating a dashboard with temperature, humidity and heatindex gauge and history charts. The dashboard works fine for realtime data. I have inserted the 3 parameters data in Mysql by using join and function node. However i would not be able to read the data back from Mysql in dashboard. I have created a form with data wise search input but still cant get the data visualize in table or chart as historical data.
[{"id":"a79b8870bf169f3d","type":"tab","label":"Flow 15","disabled":false,"info":"","env":[]},{"id":"afee5c9df15d52a8","type":"mqtt in","z":"a79b8870bf169f3d","name":"home/temperature5","topic":"home/temperature5","qos":"2","datatype":"auto-detect","broker":"3b7c4b221eb69910","nl":false,"rap":true,"rh":0,"inputs":0,"x":170,"y":220,"wires":[["f647214f1803feb0","234b936925863308","c9b78fe1c3b959f1"]]},{"id":"db6f196b033007be","type":"mqtt in","z":"a79b8870bf169f3d","name":"home/humidity5","topic":"home/humidity5","qos":"2","datatype":"auto-detect","broker":"3b7c4b221eb69910","nl":false,"rap":true,"rh":0,"inputs":0,"x":160,"y":300,"wires":[["eac07e0b2a71ad3f","2834212b1975c877","c9b78fe1c3b959f1"]]},{"id":"f647214f1803feb0","type":"ui_gauge","z":"a79b8870bf169f3d","name":"Device Temperature","group":"e1c18b9de2a81a73","order":1,"width":0,"height":0,"gtype":"gage","title":"Device Temperature","label":"Degree Centigrade","format":"{{value}}","min":0,"max":"80","colors":["#00b500","#e6e600","#ca3838"],"seg1":"28","seg2":"45","className":"","x":530,"y":220,"wires":[]},{"id":"eac07e0b2a71ad3f","type":"ui_gauge","z":"a79b8870bf169f3d","name":"Relative Humidity","group":"e1c18b9de2a81a73","order":2,"width":0,"height":0,"gtype":"gage","title":"Relative Humidity","label":"Percentage","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":540,"y":300,"wires":[]},{"id":"f6c5012ab812ce1c","type":"ui_gauge","z":"a79b8870bf169f3d","name":"Heat index","group":"e1c18b9de2a81a73","order":2,"width":0,"height":0,"gtype":"gage","title":"Heat index","label":"Percentage","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":550,"y":400,"wires":[]},{"id":"cf5ffb0b36989540","type":"mqtt in","z":"a79b8870bf169f3d","name":"home/heatindex5","topic":"home/heatindex5","qos":"2","datatype":"auto-detect","broker":"3b7c4b221eb69910","nl":false,"rap":true,"rh":0,"inputs":0,"x":160,"y":400,"wires":[["f6c5012ab812ce1c","4c23fba062102cbc","c9b78fe1c3b959f1"]]},{"id":"4c23fba062102cbc","type":"debug","z":"a79b8870bf169f3d","name":"debug 11","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":340,"y":520,"wires":[]},{"id":"2834212b1975c877","type":"debug","z":"a79b8870bf169f3d","name":"debug 12","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":340,"y":340,"wires":[]},{"id":"234b936925863308","type":"debug","z":"a79b8870bf169f3d","name":"debug 13","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":340,"y":160,"wires":[]},{"id":"cf7857d130eab6f5","type":"mysql","z":"a79b8870bf169f3d","mydb":"2aec8b90542176b0","name":"","x":1310,"y":660,"wires":[["97bd469ba45d6f24"]]},{"id":"97bd469ba45d6f24","type":"debug","z":"a79b8870bf169f3d","name":"debug 14","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1340,"y":420,"wires":[]},{"id":"e1a0c4f4bc4117c0","type":"debug","z":"a79b8870bf169f3d","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1070,"y":420,"wires":[]},{"id":"c9b78fe1c3b959f1","type":"join","z":"a79b8870bf169f3d","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":770,"y":660,"wires":[["f8a3df8d7bc976db","55674741617539ac"]]},{"id":"f8a3df8d7bc976db","type":"debug","z":"a79b8870bf169f3d","name":"debug 15","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":780,"y":420,"wires":[]},{"id":"55674741617539ac","type":"function","z":"a79b8870bf169f3d","name":"INSERT Data","func":"temp = msg.payload[\"home/temperature5\"];\nhum = msg.payload[\"home/humidity5\"];\nhi = msg.payload[\"home/heatindex5\"];\nmsg.topic = `INSERT INTO SensorData5(temperature, humidity, heatindex) VALUES(${temp},${hum},${hi})`;\nreturn msg;\n","outputs":1,"noerr":6,"initialize":"","finalize":"","libs":[],"x":1030,"y":660,"wires":[["e1a0c4f4bc4117c0","cf7857d130eab6f5"]]},{"id":"553ae0647facba39","type":"ui_table","z":"a79b8870bf169f3d","group":"2fdee068.4551f8","name":"Historical Data","order":3,"width":"0","height":"0","columns":[{"field":"id","title":"S. #","width":"","align":"center","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"temperature","title":"Temperature","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"humidity","title":"Humidity","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"heatindex","title":"Heat Index","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"reading_time","title":"Time Stamp","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}}],"outputs":0,"cts":false,"x":1080,"y":880,"wires":[]},{"id":"8b09dadb1fcafef6","type":"mysql","z":"a79b8870bf169f3d","mydb":"2aec8b90542176b0","name":"DB","x":870,"y":900,"wires":[["553ae0647facba39","229a474ab818d170"]]},{"id":"d6d3dd9a1d9e3c11","type":"function","z":"a79b8870bf169f3d","name":"","func":"let startDateTime = msg.payload.startDate.slice(0, 10) + \" \" + msg.payload.startTime\nlet endDateTime = msg.payload.endDate.slice(0, 10) + \" \" + msg.payload.endTime\n// SELECT * FROM SensorData5 WHERE Timestamp BETWEEN '2020-12-01 11:08:13' AND '2020-12-01 16:05:13'\nmsg.topic = `SELECT * FROM SensorData5 WHERE 'reading_time' BETWEEN '${startDateTime}' AND '${endDateTime}'`\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":620,"y":900,"wires":[["8b09dadb1fcafef6","4e68305564b34da9"]]},{"id":"229a474ab818d170","type":"debug","z":"a79b8870bf169f3d","name":"","active":true,"console":"false","complete":"false","x":1050,"y":800,"wires":[]},{"id":"4e68305564b34da9","type":"debug","z":"a79b8870bf169f3d","name":"","active":true,"console":"false","complete":"false","x":790,"y":800,"wires":[]},{"id":"9dccd93333ed5dd7","type":"ui_form","z":"a79b8870bf169f3d","name":"","label":"","group":"2fdee068.4551f8","order":1,"width":16,"height":5,"options":[{"label":"Start Date","value":"startDate","type":"date","required":true,"rows":null},{"label":"Start Time","value":"startTime","type":"text","required":true,"rows":null},{"label":"End Date","value":"endDate","type":"date","required":true,"rows":null},{"label":"End Time","value":"endTime","type":"text","required":true,"rows":null}],"formValue":{"startDate":"","startTime":"","endDate":"","endTime":""},"payload":"","submit":"submit","cancel":"cancel","topic":"","topicType":"str","splitLayout":false,"className":"","x":370,"y":800,"wires":[["d6d3dd9a1d9e3c11"]]},{"id":"3b7c4b221eb69910","type":"mqtt-broker","name":"","broker":"192.168.100.111","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"e1c18b9de2a81a73","type":"ui_group","name":"Equipment Monitoring","tab":"2669d5cf7077f35a","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"2aec8b90542176b0","type":"MySQLdatabase","name":"sensor_data","host":"127.0.0.1","port":"3306","db":"sesnordata","tz":"","charset":"UTF8"},{"id":"2fdee068.4551f8","type":"ui_group","name":"Select Date time range","tab":"b724c3ac.56f638","order":1,"disp":true,"width":"16","collapse":false},{"id":"2669d5cf7077f35a","type":"ui_tab","name":"Water Meter - Demo Device","icon":"dashboard","order":6,"disabled":false,"hidden":false},{"id":"b724c3ac.56f638","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]