Corsair iCUE sensor logging to InfluxDB
This flow is special usefull if you have the Corsair Commander Pro fan controller since the temperature and fan speed is hard to parse elsewhere.
iCUE software has to be setup with sensor logging to a folder that only contains the sensor loggings, and a location that Node-Red could reach.
The first node has to be mapped to this location and will watch for file change in the folder.
In iCUE 4 it is possible to change the name on the fans aswell, which is used as the field in InfluxDB.
To summarize, you only have to edit the first and last node for your installation, the rest of the nodes doesn't have to be edited. Only tested on InfluxDB 1.x.
Here is the CPU Load shown in Grafana:
[{"id":"ec1c5f021db83c8d","type":"tab","label":"Icue","disabled":false,"info":"","env":[]},{"id":"e8bb7fc41f9f76b7","type":"watch","z":"ec1c5f021db83c8d","name":"","files":"/icue","recursive":"","x":90,"y":120,"wires":[["4ee92d22abfc47b6"]]},{"id":"2fefd92d93c879cc","type":"csv","z":"ec1c5f021db83c8d","name":"","sep":",","hdrin":true,"hdrout":"none","multi":"mult","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":390,"y":120,"wires":[["fa8b789ab70172c8"]]},{"id":"4ee92d22abfc47b6","type":"file in","z":"ec1c5f021db83c8d","name":"","filename":"","format":"utf8","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":240,"y":120,"wires":[["2fefd92d93c879cc"]]},{"id":"fa8b789ab70172c8","type":"function","z":"ec1c5f021db83c8d","name":"Last line picker","func":"var my_array = msg.payload;\nvar last_element = my_array[my_array.length - 1];\nmsg.payload = last_element;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":560,"y":120,"wires":[["7f4c9fc26ec698e0"]]},{"id":"7f4c9fc26ec698e0","type":"change","z":"ec1c5f021db83c8d","name":"","rules":[{"t":"delete","p":"payload.Timestamp","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":810,"y":120,"wires":[["de76db432d856e12"]]},{"id":"adf176ef2c9ebf3e","type":"function","z":"ec1c5f021db83c8d","name":"String to float","func":"var col2 = msg.payload;\nvar col2par = parseFloat(col2);\nmsg.payload = col2par;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1200,"y":120,"wires":[["aad1a97b42f257d4"]]},{"id":"9f3b7f4173f936e9","type":"influxdb out","z":"ec1c5f021db83c8d","influxdb":"9fd41ed0bb1e078a","name":"","measurement":"icue","precision":"","retentionPolicy":"","database":"database","precisionV18FluxV20":"ms","retentionPolicyV18Flux":"","org":"organisation","bucket":"bucket","x":1630,"y":120,"wires":[]},{"id":"2ead9f3863cfc584","type":"comment","z":"ec1c5f021db83c8d","name":"Delete timestamp","info":"Delete timestamp since it is wrongly formated.\nDon't change anything here.","x":800,"y":80,"wires":[]},{"id":"12866a818fb545d8","type":"debug","z":"ec1c5f021db83c8d","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1590,"y":60,"wires":[]},{"id":"de76db432d856e12","type":"split","z":"ec1c5f021db83c8d","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"topic","x":1030,"y":120,"wires":[["adf176ef2c9ebf3e"]]},{"id":"aad1a97b42f257d4","type":"join","z":"ec1c5f021db83c8d","name":"","mode":"auto","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":"false","timeout":"","count":"","reduceRight":false,"x":1370,"y":120,"wires":[["12866a818fb545d8","9f3b7f4173f936e9"]]},{"id":"6bdf2d24d343513a","type":"comment","z":"ec1c5f021db83c8d","name":"Split","info":"Split for easier string to float converting.\nDon't change anything here.","x":1030,"y":80,"wires":[]},{"id":"bce493c59371b130","type":"comment","z":"ec1c5f021db83c8d","name":"iCUE log location","info":"iCUE sensor logging has be logget to a folder that Node-Red could reach.\nThis node listening for changes in the folder and send the filename of the file that have changed.","x":100,"y":80,"wires":[]},{"id":"31dab04683888975","type":"comment","z":"ec1c5f021db83c8d","name":"Last line picker","info":"Picks the last line in the csv file since it is the newest measurement.\nDon't change anything here.","x":560,"y":80,"wires":[]},{"id":"9fd41ed0bb1e078a","type":"influxdb","hostname":"127.0.0.1","port":"8086","protocol":"http","database":"icue","name":"influxdb-icue","usetls":false,"tls":"","influxdbVersion":"1.x","url":"http://localhost:8086","rejectUnauthorized":true}]