Profile with more than 10 points - cflurin/node-red-contrib-ramp-thermostat GitHub Wiki
If you need more than 10 points, use the setProfile
to add an object (JSON):
Flow
[{"id":"b837d175.768fd","type":"ramp-thermostat","z":"6da90f72.dff58","name":"my room","profile":"7a5597f.52e6468","hysteresisplus":"1","hysteresisminus":"1","x":360,"y":320,"wires":[],[],["7afc28cc.743e08"](/cflurin/node-red-contrib-ramp-thermostat/wiki/],[],["7afc28cc.743e08")},{"id":"8a523c9b.dd4f","type":"inject","z":"6da90f72.dff58","name":"","topic":"","payload":"22","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":190,"y":380,"wires":["b837d175.768fd"](/cflurin/node-red-contrib-ramp-thermostat/wiki/"b837d175.768fd")},{"id":"8d604248.b5cae","type":"inject","z":"6da90f72.dff58","name":"","topic":"","payload":"19","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":190,"y":420,"wires":["b837d175.768fd"](/cflurin/node-red-contrib-ramp-thermostat/wiki/"b837d175.768fd")},{"id":"33aa1cd.c73cce4","type":"ui_chart","z":"6da90f72.dff58","name":"","group":"251e880a.3e91e8","order":2,"width":"10","height":"5","label":"{{msg.label}}","chartType":"line","legend":"false","xformat":"HH","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#ff7f0e","#0433ff","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":510,"y":400,"wires":[],[](/cflurin/node-red-contrib-ramp-thermostat/wiki/],[)},{"id":"7afc28cc.743e08","type":"function","z":"6da90f72.dff58","name":"map","func":"if (msg.topic === \"getProfile\") {\n var p = msg.payload;\n var c = {};\n c.data = [];\n var data = [];\n\n p.points.forEach(function(point) {\n var key = Object.keys(point);\n data.push({\"x\": \"2018-11-21T\"+key+\":00\", \"y\":point[key]});\n });\n\n c.series = [\"Profile\"];\n c.data = [data];\n c.labels = [\"\"];\n\n msg.label = p.name;\n msg.payload = [c];\n} else {\n msg = null;\n}\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":320,"wires":["33aa1cd.c73cce4"](/cflurin/node-red-contrib-ramp-thermostat/wiki/"33aa1cd.c73cce4")},{"id":"14ae345.eadd1cc","type":"inject","z":"6da90f72.dff58","name":"","topic":"getProfile","payload":"actual","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":160,"y":340,"wires":["b837d175.768fd"](/cflurin/node-red-contrib-ramp-thermostat/wiki/"b837d175.768fd")},{"id":"8c05f15d.aa153","type":"inject","z":"6da90f72.dff58","name":"setProfile","topic":"setProfile","payload":"{\"name\":\"dining room\",\"points\":[{\"00:00\":18},{\"03:00\":18},{\"06:00\":18.5},{\"08:00\":20},{\"10:00\":20},{\"11:00\":20.5},{\"12:30\":20.5},{\"12:30\":19.5},{\"15:00\":19.5},{\"17:00\":20.5},{\"19:00\":20.5},{\"19:00\":20},{\"21:30\":20},{\"21:30\":18},{\"23:59\":18}]}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":300,"wires":["b837d175.768fd"](/cflurin/node-red-contrib-ramp-thermostat/wiki/"b837d175.768fd")},{"id":"7a5597f.52e6468","type":"profile","z":"","name":"test","time1":"00:00","temp1":"16.1","time2":"07:00","temp2":"17","time3":"19:00","temp3":"20.5","time4":"20:00","temp4":"17","time5":"23:59","temp5":"17","time6":"","temp6":"","time7":"","temp7":"","time8":"","temp8":"","time9":"","temp9":"","time10":"","temp10":""},{"id":"251e880a.3e91e8","type":"ui_group","z":"","name":"Profile","tab":"a8b1385e.93cb58","order":2,"disp":true,"width":"10","collapse":false},{"id":"a8b1385e.93cb58","type":"ui_tab","z":"","name":"ramp-themostat","icon":"dashboard"}]