4

I have historical data stored in an SQL database as date in the format (2017.10.27 12:00:25) and the corresponding temperature in the format (26.55). I am using the node iot_datasourse to show the data and the debug message shows the time and the corresponding temperature, but the dashboard doesn't show any graphic.

The flow nodes are as follows, I would appreciate some help

 [  
   {  
      "id":"3eeefbee.524fa4",
      "type":"iot-datasource",
      "z":"a287c70.b313638",
      "name":"Temperature_historical_data",
      "tstampField":"tstamp",
      "dataField":"data",
      "disableDiscover":false,
      "x":760,
      "y":1580,
      "wires":[  
         [  
            "c63ec7ee.45bef8"
         ]
      ]
   },
   {  
      "id":"19f7ecaf.b15d73",
      "type":"function",
      "z":"a287c70.b313638",
      "name":"Temp",
      "func":"var p =msg.payload;\n\nfor(var i=0;i<p.length;i++){\n    var dUnix =Date.parse(p[i].Datum);\n    node.send({payload:{data:p[i].Temp, tstamp:dUnix}});\n}\nreturn;",
      "outputs":1,
      "noerr":0,
      "x":550,
      "y":1580,
      "wires":[  
         [  
            "3eeefbee.524fa4",
            "9ac5be07.61cb7"
         ]
      ]
   },
   {  
      "id":"3ff59acb.6fa9d6",
      "type":"MSSQL",
      "z":"a287c70.b313638",
      "mssqlCN":"e1823c68.173aa",
      "name":"database_sql",
      "query":"",
      "outField":"payload",
      "x":390,
      "y":1580,
      "wires":[  
         [  
            "19f7ecaf.b15d73"
         ]
      ]
   },
   {  
      "id":"df2d6585.9e5338",
      "type":"inject",
      "z":"a287c70.b313638",
      "name":"",
      "topic":"",
      "payload":"SELECT * FROM [test].[Temp]",
      "payloadType":"str",
      "repeat":"",
      "crontab":"",
      "once":false,
      "onceDelay":0.1,
      "x":170,
      "y":1580,
      "wires":[  
         [  
            "3ff59acb.6fa9d6"
         ]
      ]
   },
   {  
      "id":"9ac5be07.61cb7",
      "type":"debug",
      "z":"a287c70.b313638",
      "name":"",
      "active":true,
      "tosidebar":true,
      "console":false,
      "tostatus":false,
      "complete":"false",
      "x":730,
      "y":1500,
      "wires":[  

      ]
   },
   {  
      "id":"c63ec7ee.45bef8",
      "type":"debug",
      "z":"a287c70.b313638",
      "name":"",
      "active":true,
      "tosidebar":true,
      "console":false,
      "tostatus":false,
      "complete":"false",
      "x":970,
      "y":1500,
      "wires":[  

      ]
   },
   {  
      "id":"e1823c68.173aa",
      "type":"MSSQL-CN",
      "z":"",
      "name":"SQL",
      "server":"localhost",
      "encyption":true,
      "database":"test"
   }
]

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.