DS18B20 Temperature Driving Wemo Switch

add a catch node connected to a debug node (display complete msg object) and then go to each of the ds18b20 nodes and re-select the sensors. Do a deploy and see what that shows

Here is the log file, seems lik

e it's something to do with the object in the sensor nodes, any ideas? DOI need to use the sensor ID's in my other nodes rather than the name I have given them?

It's saying the sensors are undifined

No it isn’t, it is saying that ‘msg.display complete msg object’ is undefined. You need to click on msg in the debug config and select complete message object, not type it into the property name field.

Woops.... Newbie error.... This

looks. This look more like it!

It is the error object from one of the temperature nodes that you need to look at, not the error from the csv node, as that is presumably being caused by the error from the temperature node.

Yes this isn’t coming the temp sensors, however there are limited properties for me to change there

Hmm - try making the names not have spaces.

Yep, tried that still get object error :persevere:

Any one got any ideas. Mingling around in circles…

So how are you joining them now - you seem to have got an array… I think we need to get to the bottom of what that sensor is really sending… from your pic two previous, it seems to have a topic in a form we can use, but the payload seems to be an array with one thing in (which we can’t). Whereas previous I’m sure you were in a position where payload was just a number (the temperature).

Can you use the twistie > arrows in the debug to expand one of the messages coming out of the debug node attached directly to the sensor - and paste that here.

yes the payload is a number:

26/05/2018, 09:02:24Parrot Temperature
msg.payload : number
23.625

try resetting each of the sensor nodes, i.e. edit them and select a different sensor, save it and then change it back to the original. then turn off all the debug nodes, but the ones attached to the sensor nodes and make sure each on is returning data.

Also provide your latest flow - make sure you copy and paste it directly into a response and don’t use a word processor in between so not to change quptes to smart quotes etc.

So, I've completed that and now I seem to have the CSV string being produced however it's missing the names of the sensors in the string

Here is my latest flow:

[{"id":"a9042db5.63c75","type":"inject","z":"3e6bee58.6c7192","name":"","topic":"","payload":"","payloadType":"date","repeat":"5","crontab":"","once":true,"x":106.71891021728516,"y":712.9752440452576,"wires":[["ea8bdd13.8b481","f0ceb327.8abde","2e88b9b0.ff94c6"]]},{"id":"ee36b6fd.161ca8","type":"debug","z":"3e6bee58.6c7192","name":"Head Temperature","active":true,"console":"false","complete":"payload","x":521.8370513916016,"y":454.89871883392334,"wires":[]},{"id":"fd994064.26dbc","type":"debug","z":"3e6bee58.6c7192","name":"Condenser Temperature","active":true,"console":"false","complete":"payload","x":565.6937561035156,"y":658.8297529220581,"wires":[]},{"id":"93233ef3.bdc07","type":"debug","z":"3e6bee58.6c7192","name":"Parrot Temperature","active":true,"console":"false","complete":"payload","x":541.7286071777344,"y":848.1891250610352,"wires":[]},{"id":"ea8bdd13.8b481","type":"sensor-ds18b20","z":"3e6bee58.6c7192","name":"Head_Temperature","sensorid":"28-0417032fa4ff","timer":"5","repeat":false,"x":246.3389892578125,"y":530.0540838241577,"wires":[["ee36b6fd.161ca8","45fa01f8.3b3c2","5cb0ec0b.4416d4","3df162e8.a42cce","4802acee.4a5694"]]},{"id":"f0ceb327.8abde","type":"sensor-ds18b20","z":"3e6bee58.6c7192","name":"Condenser_Temperature","sensorid":"28-0517025602ff","timer":"5","repeat":false,"x":309.94468688964844,"y":712.162727355957,"wires":[["fd994064.26dbc","b0699cb1.96828","41af098d.a58178","b6608481.3ee908"]]},{"id":"2e88b9b0.ff94c6","type":"sensor-ds18b20","z":"3e6bee58.6c7192","name":"Parrot_Temperature","sensorid":"28-0517020dd1ff","timer":"5","repeat":false,"x":308.45245361328125,"y":888.0283603668213,"wires":[["93233ef3.bdc07","e029901.c7d687","6c8adf46.d87e8","cc6b6f65.cdc59"]]},{"id":"45fa01f8.3b3c2","type":"ui_chart","z":"3e6bee58.6c7192","name":"Head Temperature","group":"4d53767c.4861b8","order":2,"width":0,"height":0,"label":"Head Temperature","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"x":521.0974426269531,"y":546.9853820800781,"wires":[[],[]]},{"id":"b0699cb1.96828","type":"ui_gauge","z":"3e6bee58.6c7192","name":"Condenser Temperature","group":"9921a143.fbd54","order":0,"width":0,"height":0,"gtype":"gage","title":"Gauge","label":"units","format":"{{value}}","min":0,"max":"30","colors":["#00ffff","#ffff00","#ff0000"],"seg1":"10","seg2":"20","x":590.1820678710938,"y":703.7646484375,"wires":[]},{"id":"41af098d.a58178","type":"ui_chart","z":"3e6bee58.6c7192","name":"Condenser Temperature","group":"9921a143.fbd54","order":0,"width":0,"height":0,"label":"Condenser Temperature","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"x":567.9756317138672,"y":763.1827125549316,"wires":[[],[]]},{"id":"e029901.c7d687","type":"ui_gauge","z":"3e6bee58.6c7192","name":"Parrot Temperature","group":"6f230a4d.73e214","order":0,"width":0,"height":0,"gtype":"gage","title":"Gauge","label":"units","format":"{{value}}","min":0,"max":"30","colors":["#00ffff","#00ff00","#ff0000"],"seg1":"10","seg2":"20","x":546.2290191650391,"y":903.1178932189941,"wires":[]},{"id":"6c8adf46.d87e8","type":"ui_chart","z":"3e6bee58.6c7192","name":"Parrot Temperature","group":"6f230a4d.73e214","order":0,"width":0,"height":0,"label":"Parrot Temperature","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"x":556.2205200195312,"y":950.3787860870361,"wires":[[],[]]},{"id":"5cb0ec0b.4416d4","type":"ui_gauge","z":"3e6bee58.6c7192","name":"Head Temperature","group":"4d53767c.4861b8","order":1,"width":0,"height":0,"gtype":"gage","title":"Gauge","label":"units","format":"{{value}}","min":0,"max":"100","colors":["#00ffff","#00ff00","#ff0000"],"seg1":"88","seg2":"92","x":536.0448608398438,"y":501.8367528915405,"wires":[]},{"id":"3df162e8.a42cce","type":"function","z":"3e6bee58.6c7192","name":"Temp Switch","func":"if (msg.payload < 25) {\n    msg.payload = \"on\";\n}  else if (msg.payload > 25) {\n    msg.payload = \"off\";\n}   \nreturn msg;","outputs":"1","noerr":0,"x":506.56494903564453,"y":606.5916175842285,"wires":[[]]},{"id":"4802acee.4a5694","type":"change","z":"3e6bee58.6c7192","name":"Head_Temperature","rules":[{"t":"set","p":"topic","pt":"msg","to":"Head_Temperature","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":510.3155059814453,"y":380.37893867492676,"wires":[["c1821753.35f768"]]},{"id":"c1821753.35f768","type":"join","z":"3e6bee58.6c7192","name":"Temperature Combined Data","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":",","joinerType":"str","accumulate":false,"timeout":"","count":"3","x":1220.2577514648438,"y":663.8734741210938,"wires":[["41fa2656.b3dac8"]]},{"id":"b6608481.3ee908","type":"change","z":"3e6bee58.6c7192","name":"Condenser_Temperature","rules":[{"t":"set","p":"topic","pt":"msg","to":"Condenser_Temperature","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":579.4920043945312,"y":811.1876220703125,"wires":[["c1821753.35f768"]]},{"id":"cc6b6f65.cdc59","type":"change","z":"3e6bee58.6c7192","name":"Parrott_Temperature","rules":[{"t":"set","p":"topic","pt":"msg","to":"Parrott_Temperature","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":567.593620300293,"y":1012.8177299499512,"wires":[["c1821753.35f768"]]},{"id":"41fa2656.b3dac8","type":"change","z":"3e6bee58.6c7192","name":"","rules":[{"t":"set","p":"payload.time","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":1434.3788452148438,"y":752.895263671875,"wires":[["c90a3a3a.de95d8","37504384.1bca9c"]]},{"id":"37504384.1bca9c","type":"csv","z":"3e6bee58.6c7192","name":"Combined CSV","sep":",","hdrin":false,"hdrout":false,"multi":"one","ret":"\\r\\n","temp":"time,Head_Temperature,Condenser_Temperature,Parrott_Temperature","x":1621.5537872314453,"y":655.8065528869629,"wires":[["c81dc31.10e3e4","695c20eb.ef1fd"]],"inputLabels":["msg : string"],"outputLabels":["msg : number"]},{"id":"c81dc31.10e3e4","type":"file","z":"3e6bee58.6c7192","name":"log","filename":"/tmp/logs.csv","appendNewline":true,"createDir":true,"overwriteFile":"false","x":1819.6768531799316,"y":739.7759761810303,"wires":[]},{"id":"695c20eb.ef1fd","type":"debug","z":"3e6bee58.6c7192","name":"CSV Debug","active":true,"console":"false","complete":"payload","x":1811.900032043457,"y":589.8309860229492,"wires":[]},{"id":"c90a3a3a.de95d8","type":"debug","z":"3e6bee58.6c7192","name":"Time Stamp","active":false,"console":"false","complete":"payload","x":1581.0012741088867,"y":603.9669322967529,"wires":[]},{"id":"5530ec58.a6e044","type":"debug","z":"3e6bee58.6c7192","name":"Catch","active":true,"console":"false","complete":"true","x":289.70519012212753,"y":463.72803688049316,"wires":[]},{"id":"e864179b.7fdfa8","type":"catch","z":"3e6bee58.6c7192","name":"","scope":null,"x":74.83812713623047,"y":434.2076494693756,"wires":[["5530ec58.a6e044"]]},{"id":"4d53767c.4861b8","type":"ui_group","z":"","name":"Head Temperature","tab":"337f460d.8fa05a","disp":true,"width":"6"},{"id":"9921a143.fbd54","type":"ui_group","z":"","name":"Condenser Temperature","tab":"337f460d.8fa05a","disp":true,"width":"6"},{"id":"6f230a4d.73e214","type":"ui_group","z":"","name":"Parrot Temperature","tab":"337f460d.8fa05a","disp":true,"width":"6"},{"id":"337f460d.8fa05a","type":"ui_tab","z":"","name":"Home","icon":"dashboard"}]

Please wrap pasted flows with ``` at the beginning and end so it is treated as a code block and doesn’t modify the quotes.

When you say it is missing the names in the string, do you mean the row names?

In other words, you are creating a CSV file, do you want the first row to be the column names OR do you want the data string to contain both the value of the sensor and sensor name?

currently looks like this: 1527420724072,18.125,19.625,18.125
do you want it to be:1527420724072,“Head_Temperature”, 18.125,“Condenser_Temperature”,19.625, “Parrott_Temperature”,18.125

If you want the csv string to be:

1527420724072,“Head_Temperature”, 18.125,“Condenser_Temperature”,19.625, “Parrott_Temperature”,18.125

try this for the change->combine CVS nodes:
[{"id":"a619edb.9b7969","type":"change","z":"fd4e413b.9a8328","name":"","rules":[{"t":"set","p":"payload.time","pt":"msg","to":"","tot":"date"},{"t":"set","p":"payload[\"col1\"]","pt":"msg","to":"Head Temperature","tot":"str"},{"t":"set","p":"payload[\"col2\"]","pt":"msg","to":"Condenser Temperature,","tot":"str"},{"t":"set","p":"payload[\"col3\"]","pt":"msg","to":"Parrott Temperature","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1020,"y":420,"wires":[["fbce70db.3d8a08","602e764d.27e548"]]},{"id":"602e764d.27e548","type":"csv","z":"fd4e413b.9a8328","name":"Combined CSV","sep":",","hdrin":false,"hdrout":false,"multi":"one","ret":"\\r\\n","temp":"time,col1,Head_Temperature,col2,Condenser_Temperature,col3,Parrott_Temperature","x":1040,"y":540,"wires":[["2f26b85.2a0cec8","ae2465dd.496348"]],"inputLabels":["msg : string"],"outputLabels":["msg : number"]}]

Perfect! It works… At last :wink: Thank you to everyone who has helped!

One last question, do you know how you can output the timestamp in a human readable format?

Also has anyone had an experience of getting a file saved to a google drive account rather than the local drive?