I am working on a node-red RDD (GUI) to chart
it uses viewtopic.php?f=99&t=11671&hilit=rrd+co ... =30#p84364 (the excel sheet) when you select the loggername, you get the options of RraNames (as in the excel sheet)
is a updated version from this possible ?
http://<ToonIP>/hcb_rrd?action=getRrdData&loggerName=gas_flow&rra=5min
option(s) that you can "select"
- &readableTime=0
- &nullForNaN=1
- &from=1588754943&to=1588776543
Are there more options in the URL ??
I will release the node-red flow (with reference to @Toonz for the excelsheet) for you all,
ps i can post a teaser (pic), i just didn't know where to post this ..
also when its done I will use the same "code" to http://toon-ip/hcb_rrd?action=setRrdData string to input values/change ..
if there are fields "new" or specific for solar ??
How do you add custom rrd fields ? I saw a post .. once (for this post can it be done via URL ? if not I will search for the post via command line)
node red-extract rrd data
Moderators: marcelr, TheHogNL, Toonz
Re: node red-extract rrd data
1st itteration done
flow for node-red , dateto & date from do work (now commented out)
I still want to add a chart and/or format it in a more usefull manor
[{"id":"e9098dde.b546a","type":"tab","label":"RDD-Toon extract","disabled":false,"info":"Writen to extract Toon Data \n\nthx to Toonz \nhttps://www.domoticaforum.eu/viewtopic.php?f=99 ... \n\n\nTodo \n- Correct date format (now commented out)\n- make a chart function \n- do other stuff ?"},{"id":"a352ea6.8e7ba18","type":"http request","z":"e9098dde.b546a","name":"HttpRequest1","method":"GET","ret":"txt","paytoqs":false,"url":"","tls":"","persist":false,"proxy":"","authType":"","x":860,"y":160,"wires":[["94757402.40ed78","cedb3965.009b48"]]},{"id":"92bd3731.521cf8","type":"function","z":"e9098dde.b546a","name":"ToonIP","func":"//Set here the IP of the Toon\nflow.set(\"ToonUrl\", \"http://192.168.1.x\");\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":80,"wires":[[]]},{"id":"178f244c.0dfcec","type":"inject","z":"e9098dde.b546a","name":"","topic":"","payload":"","payloadType":"date","repeat":"600","crontab":"","once":true,"onceDelay":0.1,"x":230,"y":80,"wires":[["92bd3731.521cf8"]]},{"id":"976db33c.dd285","type":"function","z":"e9098dde.b546a","name":"URL doe","func":"//http://192.168.1.65/hcb_rrd?action=getR ... n//msg.url = flow.get(\"ToonUrl\")+\"/hcb_rrd?action=\"+ flow.get(\"SelectLogger\")+\"/+flow.get(\"RraNames\") \nmsg.url = flow.get(\"ToonUrl\") \n+ \"/hcb_rrd?action=getRrdData\\&loggerName=\" \n+ flow.get(\"SelectLogger\") \n+ '\\&rra=' \n+ flow.get(\"RraNames\")\n+ '\\&readableTime='\n+ flow.get(\"EpochOrNormalTime\")\n+ '\\&samples='\n+ flow.get(\"NumberOfSamples\")\n+ '\\&&nullForNaN='\n+ flow.get(\"nullForNaN\");\n//+ '\\&from=' \n//+ flow.get(\"DateFrom\")\n//+ '\\&to='\n//+ flow.get(\"DateTo\")\nreturn msg;","outputs":1,"noerr":0,"x":600,"y":160,"wires":[["a352ea6.8e7ba18"]]},{"id":"75d0746a.93cfcc","type":"comment","z":"e9098dde.b546a","name":"Change you ip adres here, click for more info","info":"# Set here here the ip address your Toon uses.\nVer 1.0 26-05-2020 Victor Ophof \n\n","x":770,"y":80,"wires":[]},{"id":"e7150f57.6b91d","type":"ui_dropdown","z":"e9098dde.b546a","name":"SelectLogger","label":"SelectLogger","tooltip":"","place":"Select option","group":"82147ec2.c500d","order":1,"width":15,"height":1,"passthru":true,"multiple":false,"options":[{"label":"boiler_burner_minutes","value":"boiler_burner_minutes","type":"str"},{"label":"elec_fixed_day_cost","value":"elec_fixed_day_cost","type":"str"},{"label":"elec_flow","value":"elec_flow","type":"str"},{"label":"elec_produ_flow","value":"elec_produ_flow","type":"str"},{"label":"elec_quantity_lt","value":"elec_quantity_lt","type":"str"},{"label":"elec_quantity_lt_orig","value":"elec_quantity_lt_orig","type":"str"},{"label":"elec_quantity_lt_produ","value":"elec_quantity_lt_produ","type":"str"},{"label":"elec_quantity_nt","value":"elec_quantity_nt","type":"str"},{"label":"elec_quantity_nt_orig","value":"elec_quantity_nt_orig","type":"str"},{"label":"elec_quantity_nt_produ","value":"elec_quantity_nt_produ","type":"str"},{"label":"elec_solar_flow","value":"elec_solar_flow","type":"str"},{"label":"elec_solar_quantity","value":"elec_solar_quantity","type":"str"},{"label":"gas_flow","value":"gas_flow","type":"str"},{"label":"gas_quantity","value":"gas_quantity","type":"str"},{"label":"heat_quantity","value":"heat_quantity","type":"str"},{"label":"plug_elec_flow_69423C6FFA3","value":"plug_elec_flow_69423C6FFA3","type":"str"},{"label":"plug_elec_qtty_69423C6FFA3","value":"plug_elec_qtty_69423C6FFA3","type":"str"},{"label":"thermstat_AnticipatedTempRise","value":"thermstat_AnticipatedTempRise","type":"str"},{"label":"thermstat_boilerBurnerHours","value":"thermstat_boilerBurnerHours","type":"str"},{"label":"thermstat_boilerChPressure","value":"thermstat_boilerChPressure","type":"str"},{"label":"thermstat_boilerDhwBurnerHours","value":"thermstat_boilerDhwBurnerHours","type":"str"},{"label":"thermstat_boilerFailedBurnerStarts","value":"thermstat_boilerFailedBurnerStarts","type":"str"},{"label":"thermstat_boilerModLevel","value":"thermstat_boilerModLevel","type":"str"},{"label":"thermstat_boilerOpMode","value":"thermstat_boilerOpMode","type":"str"},{"label":"thermstat_boilerPumpStarts","value":"thermstat_boilerPumpStarts","type":"str"},{"label":"thermstat_boilerRetTemp","value":"thermstat_boilerRetTemp","type":"str"},{"label":"thermstat_boilerSetpoint","value":"thermstat_boilerSetpoint","type":"str"},{"label":"thermstat_boilerSuccesfulBurnerStarts","value":"thermstat_boilerSuccesfulBurnerStarts","type":"str"},{"label":"thermstat_boilerTemp","value":"thermstat_boilerTemp","type":"str"},{"label":"thermstat_CurrentProgramState","value":"thermstat_CurrentProgramState","type":"str"},{"label":"thermstat_DeadTime","value":"thermstat_DeadTime","type":"str"},{"label":"thermstat_dhwBurnerStarts","value":"thermstat_dhwBurnerStarts","type":"str"},{"label":"thermstat_ExpectedPreheatTime","value":"thermstat_ExpectedPreheatTime","type":"str"},{"label":"thermstat_heatingFactor","value":"thermstat_heatingFactor","type":"str"},{"label":"thermstat_Integrator","value":"thermstat_Integrator","type":"str"},{"label":"thermstat_internalBoilerSetpoint","value":"thermstat_internalBoilerSetpoint","type":"str"},{"label":"thermstat_internalSetpoint","value":"thermstat_internalSetpoint","type":"str"},{"label":"thermstat_IntPart","value":"thermstat_IntPart","type":"str"},{"label":"thermstat_longTermOffset","value":"thermstat_longTermOffset","type":"str"},{"label":"thermstat_MeasuredDeadTime","value":"thermstat_MeasuredDeadTime","type":"str"},{"label":"thermstat_MeasuredHeatingFactor","value":"thermstat_MeasuredHeatingFactor","type":"str"},{"label":"thermstat_MeasuredOutsideRate","value":"thermstat_MeasuredOutsideRate","type":"str"},{"label":"thermstat_MeasuredSteadyTemp","value":"thermstat_MeasuredSteadyTemp","type":"str"},{"label":"thermstat_outsideRate","value":"thermstat_outsideRate","type":"str"},{"label":"thermstat_outsideTemp","value":"thermstat_outsideTemp","type":"str"},{"label":"thermstat_programState","value":"thermstat_programState","type":"str"},{"label":"thermstat_PropPart","value":"thermstat_PropPart","type":"str"},{"label":"thermstat_realTemps","value":"thermstat_realTemps","type":"str"},{"label":"thermstat_setpoint","value":"thermstat_setpoint","type":"str"},{"label":"thermstat_SteadyTemp","value":"thermstat_SteadyTemp","type":"str"},{"label":"thermstat_SteadyTime","value":"thermstat_SteadyTime","type":"str"},{"label":"thermstat_UsedSteadyCorrection","value":"thermstat_UsedSteadyCorrection","type":"str"},{"label":"thermstat_UserInteracted","value":"thermstat_UserInteracted","type":"str"}],"payload":"","topic":"","x":130,"y":320,"wires":[["5620b3d4.063f9c","187434e.baea9cb"]]},{"id":"921387d7.474438","type":"ui_numeric","z":"e9098dde.b546a","name":"NumberOfSamples","label":"numeric","tooltip":"","group":"82147ec2.c500d","order":10,"width":11,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{value}}","min":0,"max":"10000","step":1,"x":130,"y":540,"wires":[["e235f0bb.92db2"]]},{"id":"5620b3d4.063f9c","type":"function","z":"e9098dde.b546a","name":"rraNamesSelect","func":"// 5min = DateA\n// 5yrhours = DateB\n// 10yrdays = DateC\n// 30days\t = DateD\n// year\t\t = DateE\n// 1monthhour = DateF\n// 1yearday = DateG \nvar rraNamesSelect = [\n{\"loggerName\":\"boiler_burner_minutes\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_fixed_day_cost\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_flow\",\"DateA\":\"1\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_produ_flow\",\"DateA\":\"1\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_quantity_lt\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_quantity_lt_orig\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_quantity_lt_produ\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_quantity_nt\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_quantity_nt_orig\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_quantity_nt_produ\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_solar_flow\",\"DateA\":\"1\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_solar_quantity\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"gas_flow\",\"DateA\":\"1\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"gas_quantity\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"heat_quantity\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"0\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"plug_elec_flow_69423C6FFA3\",\"DateA\":\"1\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"plug_elec_qtty_69423C6FFA3\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"1\",\"DateG\":\"1\"},\n{\"loggerName\":\"thermstat_AnticipatedTempRise\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerBurnerHours\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerChPressure\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerDhwBurnerHours\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerFailedBurnerStarts\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerModLevel\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerOpMode\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerPumpStarts\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerRetTemp\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerSetpoint\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerSuccesfulBurnerStarts\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerTemp\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_CurrentProgramState\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_DeadTime\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_dhwBurnerStarts\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_ExpectedPreheatTime\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_heatingFactor\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_Integrator\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_internalBoilerSetpoint\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_internalSetpoint\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_IntPart\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_longTermOffset\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_MeasuredDeadTime\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_MeasuredHeatingFactor\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_MeasuredOutsideRate\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_MeasuredSteadyTemp\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_outsideRate\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_outsideTemp\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_programState\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_PropPart\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_realTemps\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_setpoint\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_SteadyTemp\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_SteadyTime\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_UsedSteadyCorrection\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_UserInteracted\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"}\n]\nmsg.options = []\nfor (test in rraNamesSelect) {\n if (rraNamesSelect[test].loggerName == msg.payload){\n if (rraNamesSelect[test].DateA == \"1\"){ \n msg.options.push ({\"5min\":\"5min\"})\n }\n if (rraNamesSelect[test].DateB == \"1\"){\n msg.options.push ({\"5yrhours\":\"5yrhours\"})\n }\n if (rraNamesSelect[test].DateC == \"1\"){ \n msg.options.push ({\"10yrdays\":\"10yrdays\"})\n }\n if (rraNamesSelect[test].DateD == \"1\"){ \n msg.options.push ({\"30days\":\"30days\"})\n }\n if (rraNamesSelect[test].DateE == \"1\"){ \n msg.options.push ({\"year\":\"year\"})\n }\n if (rraNamesSelect[test].DateF == \"1\"){ \n msg.options.push ({\"1monthhour\":\"1monthhour\"})\n }\n if (rraNamesSelect[test].DateG == \"1\"){ \n msg.options.push ({\"1yearday\":\"1yearday\"})\n }\n // test display value \n // console.log(rraNamesSelect[test]);\n }\n}\n//console.log(msg.options)\nmsg.payload = undefined \nreturn msg;","outputs":1,"noerr":0,"x":400,"y":360,"wires":[["dc849ac4.7302d8"]]},{"id":"dc849ac4.7302d8","type":"ui_dropdown","z":"e9098dde.b546a","name":"rraNamesSelect-dropdown","label":"rraNamesSelect-dropdown","tooltip":"","place":"Select option","group":"82147ec2.c500d","order":3,"width":14,"height":1,"passthru":false,"multiple":false,"options":[],"payload":"","topic":"","x":160,"y":420,"wires":[["a87c1552.9464b8"]]},{"id":"1b697a25.71a896","type":"ui_switch","z":"e9098dde.b546a","name":"EpochOrNormalTime","label":"Epoch(linux) or Normal Time","tooltip":"","group":"82147ec2.c500d","order":6,"width":9,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":140,"y":480,"wires":[["6638f830.7fdbd8"]]},{"id":"f6b87e88.0931c","type":"ui_date_picker","z":"e9098dde.b546a","name":"dateFrom","label":"dateFrom","group":"82147ec2.c500d","order":8,"width":12,"height":1,"passthru":true,"topic":"","x":100,"y":720,"wires":[["a7846386.8ac7c"]]},{"id":"7f4623e9.26aa6c","type":"ui_date_picker","z":"e9098dde.b546a","name":"DateTo","label":"DateTo","group":"82147ec2.c500d","order":12,"width":12,"height":1,"passthru":true,"topic":"","x":100,"y":660,"wires":[["9b68eb0d.b5aa48"]]},{"id":"331215f6.ce477a","type":"ui_switch","z":"e9098dde.b546a","name":"nullForNaN","label":"nullForNaN","tooltip":"","group":"82147ec2.c500d","order":4,"width":10,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":110,"y":600,"wires":[["fff59cf7.f1b71"]]},{"id":"9da3cb9d.279c88","type":"ui_button","z":"e9098dde.b546a","name":"SendButton","group":"82147ec2.c500d","order":14,"width":2,"height":1,"passthru":false,"label":"Send","tooltip":"","color":"","bgcolor":"","icon":"","payload":"doe","payloadType":"str","topic":"","x":730,"y":420,"wires":[["976db33c.dd285"]]},{"id":"b2a3c4ca.936258","type":"inject","z":"e9098dde.b546a","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":160,"wires":[["976db33c.dd285"]]},{"id":"187434e.baea9cb","type":"function","z":"e9098dde.b546a","name":"Flow-SelectLogger","func":"flow.set(\"SelectLogger\", msg.payload );\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":320,"wires":[[]]},{"id":"a87c1552.9464b8","type":"function","z":"e9098dde.b546a","name":"flow.RraNames","func":"flow.set(\"RraNames\", msg.payload );\nmsg.enabled = true\nreturn msg;","outputs":1,"noerr":0,"x":400,"y":420,"wires":[["9da3cb9d.279c88"]]},{"id":"6638f830.7fdbd8","type":"function","z":"e9098dde.b546a","name":"flow.EpochOrNormalTime","func":"flow.set(\"EpochOrNormalTime\", msg.payload );\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":480,"wires":[[]]},{"id":"e235f0bb.92db2","type":"function","z":"e9098dde.b546a","name":"flow.NumberOfSamples","func":"flow.set(\"NumberOfSamples\", msg.payload );\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":540,"wires":[[]]},{"id":"fff59cf7.f1b71","type":"function","z":"e9098dde.b546a","name":"flow.nullForNaN","func":"flow.set(\"nullForNaN\", msg.payload );\nreturn msg;","outputs":1,"noerr":0,"x":400,"y":600,"wires":[[]]},{"id":"9b68eb0d.b5aa48","type":"function","z":"e9098dde.b546a","name":"flow.DateTo","func":"flow.set(\"DateTo\", msg.payload );\nreturn msg;","outputs":1,"noerr":0,"x":390,"y":660,"wires":[[]]},{"id":"a7846386.8ac7c","type":"function","z":"e9098dde.b546a","name":"flow.DateFrom","func":"flow.set(\"DateFrom\", msg.payload );\nreturn msg;","outputs":1,"noerr":0,"x":400,"y":720,"wires":[[]]},{"id":"a37534cb.d27a68","type":"hidden-ui-load","z":"e9098dde.b546a","group":"82147ec2.c500d","order":0,"name":"","x":100,"y":240,"wires":[["c8b32dd1.1ac5b"]]},{"id":"c8b32dd1.1ac5b","type":"function","z":"e9098dde.b546a","name":"button disable","func":"msg.enabled = false\nreturn msg;","outputs":1,"noerr":0,"x":400,"y":240,"wires":[["9da3cb9d.279c88"]]},{"id":"94757402.40ed78","type":"ui_text","z":"e9098dde.b546a","group":"82147ec2.c500d","order":14,"width":"27","height":"1","name":"URL Output","label":"URL Output","format":"{{msg.url}}","layout":"row-spread","x":1180,"y":160,"wires":[]},{"id":"cedb3965.009b48","type":"ui_text","z":"e9098dde.b546a","group":"82147ec2.c500d","order":15,"width":0,"height":0,"name":"URL Output-data","label":"URL Output-data","format":"{{msg.payload}}","layout":"col-center","x":1220,"y":280,"wires":[]},{"id":"82147ec2.c500d","type":"ui_group","z":"","name":"Rdd-Display","tab":"89b09248.e9e96","order":1,"disp":true,"width":30,"collapse":false},{"id":"89b09248.e9e96","type":"ui_tab","z":"","name":"Toon-RDD-Data","icon":"dashboard","disabled":false,"hidden":false}]
flow for node-red , dateto & date from do work (now commented out)
I still want to add a chart and/or format it in a more usefull manor
[{"id":"e9098dde.b546a","type":"tab","label":"RDD-Toon extract","disabled":false,"info":"Writen to extract Toon Data \n\nthx to Toonz \nhttps://www.domoticaforum.eu/viewtopic.php?f=99 ... \n\n\nTodo \n- Correct date format (now commented out)\n- make a chart function \n- do other stuff ?"},{"id":"a352ea6.8e7ba18","type":"http request","z":"e9098dde.b546a","name":"HttpRequest1","method":"GET","ret":"txt","paytoqs":false,"url":"","tls":"","persist":false,"proxy":"","authType":"","x":860,"y":160,"wires":[["94757402.40ed78","cedb3965.009b48"]]},{"id":"92bd3731.521cf8","type":"function","z":"e9098dde.b546a","name":"ToonIP","func":"//Set here the IP of the Toon\nflow.set(\"ToonUrl\", \"http://192.168.1.x\");\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":80,"wires":[[]]},{"id":"178f244c.0dfcec","type":"inject","z":"e9098dde.b546a","name":"","topic":"","payload":"","payloadType":"date","repeat":"600","crontab":"","once":true,"onceDelay":0.1,"x":230,"y":80,"wires":[["92bd3731.521cf8"]]},{"id":"976db33c.dd285","type":"function","z":"e9098dde.b546a","name":"URL doe","func":"//http://192.168.1.65/hcb_rrd?action=getR ... n//msg.url = flow.get(\"ToonUrl\")+\"/hcb_rrd?action=\"+ flow.get(\"SelectLogger\")+\"/+flow.get(\"RraNames\") \nmsg.url = flow.get(\"ToonUrl\") \n+ \"/hcb_rrd?action=getRrdData\\&loggerName=\" \n+ flow.get(\"SelectLogger\") \n+ '\\&rra=' \n+ flow.get(\"RraNames\")\n+ '\\&readableTime='\n+ flow.get(\"EpochOrNormalTime\")\n+ '\\&samples='\n+ flow.get(\"NumberOfSamples\")\n+ '\\&&nullForNaN='\n+ flow.get(\"nullForNaN\");\n//+ '\\&from=' \n//+ flow.get(\"DateFrom\")\n//+ '\\&to='\n//+ flow.get(\"DateTo\")\nreturn msg;","outputs":1,"noerr":0,"x":600,"y":160,"wires":[["a352ea6.8e7ba18"]]},{"id":"75d0746a.93cfcc","type":"comment","z":"e9098dde.b546a","name":"Change you ip adres here, click for more info","info":"# Set here here the ip address your Toon uses.\nVer 1.0 26-05-2020 Victor Ophof \n\n","x":770,"y":80,"wires":[]},{"id":"e7150f57.6b91d","type":"ui_dropdown","z":"e9098dde.b546a","name":"SelectLogger","label":"SelectLogger","tooltip":"","place":"Select option","group":"82147ec2.c500d","order":1,"width":15,"height":1,"passthru":true,"multiple":false,"options":[{"label":"boiler_burner_minutes","value":"boiler_burner_minutes","type":"str"},{"label":"elec_fixed_day_cost","value":"elec_fixed_day_cost","type":"str"},{"label":"elec_flow","value":"elec_flow","type":"str"},{"label":"elec_produ_flow","value":"elec_produ_flow","type":"str"},{"label":"elec_quantity_lt","value":"elec_quantity_lt","type":"str"},{"label":"elec_quantity_lt_orig","value":"elec_quantity_lt_orig","type":"str"},{"label":"elec_quantity_lt_produ","value":"elec_quantity_lt_produ","type":"str"},{"label":"elec_quantity_nt","value":"elec_quantity_nt","type":"str"},{"label":"elec_quantity_nt_orig","value":"elec_quantity_nt_orig","type":"str"},{"label":"elec_quantity_nt_produ","value":"elec_quantity_nt_produ","type":"str"},{"label":"elec_solar_flow","value":"elec_solar_flow","type":"str"},{"label":"elec_solar_quantity","value":"elec_solar_quantity","type":"str"},{"label":"gas_flow","value":"gas_flow","type":"str"},{"label":"gas_quantity","value":"gas_quantity","type":"str"},{"label":"heat_quantity","value":"heat_quantity","type":"str"},{"label":"plug_elec_flow_69423C6FFA3","value":"plug_elec_flow_69423C6FFA3","type":"str"},{"label":"plug_elec_qtty_69423C6FFA3","value":"plug_elec_qtty_69423C6FFA3","type":"str"},{"label":"thermstat_AnticipatedTempRise","value":"thermstat_AnticipatedTempRise","type":"str"},{"label":"thermstat_boilerBurnerHours","value":"thermstat_boilerBurnerHours","type":"str"},{"label":"thermstat_boilerChPressure","value":"thermstat_boilerChPressure","type":"str"},{"label":"thermstat_boilerDhwBurnerHours","value":"thermstat_boilerDhwBurnerHours","type":"str"},{"label":"thermstat_boilerFailedBurnerStarts","value":"thermstat_boilerFailedBurnerStarts","type":"str"},{"label":"thermstat_boilerModLevel","value":"thermstat_boilerModLevel","type":"str"},{"label":"thermstat_boilerOpMode","value":"thermstat_boilerOpMode","type":"str"},{"label":"thermstat_boilerPumpStarts","value":"thermstat_boilerPumpStarts","type":"str"},{"label":"thermstat_boilerRetTemp","value":"thermstat_boilerRetTemp","type":"str"},{"label":"thermstat_boilerSetpoint","value":"thermstat_boilerSetpoint","type":"str"},{"label":"thermstat_boilerSuccesfulBurnerStarts","value":"thermstat_boilerSuccesfulBurnerStarts","type":"str"},{"label":"thermstat_boilerTemp","value":"thermstat_boilerTemp","type":"str"},{"label":"thermstat_CurrentProgramState","value":"thermstat_CurrentProgramState","type":"str"},{"label":"thermstat_DeadTime","value":"thermstat_DeadTime","type":"str"},{"label":"thermstat_dhwBurnerStarts","value":"thermstat_dhwBurnerStarts","type":"str"},{"label":"thermstat_ExpectedPreheatTime","value":"thermstat_ExpectedPreheatTime","type":"str"},{"label":"thermstat_heatingFactor","value":"thermstat_heatingFactor","type":"str"},{"label":"thermstat_Integrator","value":"thermstat_Integrator","type":"str"},{"label":"thermstat_internalBoilerSetpoint","value":"thermstat_internalBoilerSetpoint","type":"str"},{"label":"thermstat_internalSetpoint","value":"thermstat_internalSetpoint","type":"str"},{"label":"thermstat_IntPart","value":"thermstat_IntPart","type":"str"},{"label":"thermstat_longTermOffset","value":"thermstat_longTermOffset","type":"str"},{"label":"thermstat_MeasuredDeadTime","value":"thermstat_MeasuredDeadTime","type":"str"},{"label":"thermstat_MeasuredHeatingFactor","value":"thermstat_MeasuredHeatingFactor","type":"str"},{"label":"thermstat_MeasuredOutsideRate","value":"thermstat_MeasuredOutsideRate","type":"str"},{"label":"thermstat_MeasuredSteadyTemp","value":"thermstat_MeasuredSteadyTemp","type":"str"},{"label":"thermstat_outsideRate","value":"thermstat_outsideRate","type":"str"},{"label":"thermstat_outsideTemp","value":"thermstat_outsideTemp","type":"str"},{"label":"thermstat_programState","value":"thermstat_programState","type":"str"},{"label":"thermstat_PropPart","value":"thermstat_PropPart","type":"str"},{"label":"thermstat_realTemps","value":"thermstat_realTemps","type":"str"},{"label":"thermstat_setpoint","value":"thermstat_setpoint","type":"str"},{"label":"thermstat_SteadyTemp","value":"thermstat_SteadyTemp","type":"str"},{"label":"thermstat_SteadyTime","value":"thermstat_SteadyTime","type":"str"},{"label":"thermstat_UsedSteadyCorrection","value":"thermstat_UsedSteadyCorrection","type":"str"},{"label":"thermstat_UserInteracted","value":"thermstat_UserInteracted","type":"str"}],"payload":"","topic":"","x":130,"y":320,"wires":[["5620b3d4.063f9c","187434e.baea9cb"]]},{"id":"921387d7.474438","type":"ui_numeric","z":"e9098dde.b546a","name":"NumberOfSamples","label":"numeric","tooltip":"","group":"82147ec2.c500d","order":10,"width":11,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{value}}","min":0,"max":"10000","step":1,"x":130,"y":540,"wires":[["e235f0bb.92db2"]]},{"id":"5620b3d4.063f9c","type":"function","z":"e9098dde.b546a","name":"rraNamesSelect","func":"// 5min = DateA\n// 5yrhours = DateB\n// 10yrdays = DateC\n// 30days\t = DateD\n// year\t\t = DateE\n// 1monthhour = DateF\n// 1yearday = DateG \nvar rraNamesSelect = [\n{\"loggerName\":\"boiler_burner_minutes\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_fixed_day_cost\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_flow\",\"DateA\":\"1\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_produ_flow\",\"DateA\":\"1\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_quantity_lt\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_quantity_lt_orig\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_quantity_lt_produ\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_quantity_nt\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_quantity_nt_orig\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_quantity_nt_produ\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_solar_flow\",\"DateA\":\"1\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_solar_quantity\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"gas_flow\",\"DateA\":\"1\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"gas_quantity\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"heat_quantity\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"0\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"plug_elec_flow_69423C6FFA3\",\"DateA\":\"1\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"plug_elec_qtty_69423C6FFA3\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"1\",\"DateG\":\"1\"},\n{\"loggerName\":\"thermstat_AnticipatedTempRise\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerBurnerHours\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerChPressure\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerDhwBurnerHours\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerFailedBurnerStarts\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerModLevel\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerOpMode\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerPumpStarts\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerRetTemp\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerSetpoint\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerSuccesfulBurnerStarts\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerTemp\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_CurrentProgramState\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_DeadTime\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_dhwBurnerStarts\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_ExpectedPreheatTime\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_heatingFactor\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_Integrator\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_internalBoilerSetpoint\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_internalSetpoint\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_IntPart\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_longTermOffset\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_MeasuredDeadTime\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_MeasuredHeatingFactor\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_MeasuredOutsideRate\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_MeasuredSteadyTemp\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_outsideRate\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_outsideTemp\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_programState\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_PropPart\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_realTemps\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_setpoint\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_SteadyTemp\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_SteadyTime\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_UsedSteadyCorrection\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_UserInteracted\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"}\n]\nmsg.options = []\nfor (test in rraNamesSelect) {\n if (rraNamesSelect[test].loggerName == msg.payload){\n if (rraNamesSelect[test].DateA == \"1\"){ \n msg.options.push ({\"5min\":\"5min\"})\n }\n if (rraNamesSelect[test].DateB == \"1\"){\n msg.options.push ({\"5yrhours\":\"5yrhours\"})\n }\n if (rraNamesSelect[test].DateC == \"1\"){ \n msg.options.push ({\"10yrdays\":\"10yrdays\"})\n }\n if (rraNamesSelect[test].DateD == \"1\"){ \n msg.options.push ({\"30days\":\"30days\"})\n }\n if (rraNamesSelect[test].DateE == \"1\"){ \n msg.options.push ({\"year\":\"year\"})\n }\n if (rraNamesSelect[test].DateF == \"1\"){ \n msg.options.push ({\"1monthhour\":\"1monthhour\"})\n }\n if (rraNamesSelect[test].DateG == \"1\"){ \n msg.options.push ({\"1yearday\":\"1yearday\"})\n }\n // test display value \n // console.log(rraNamesSelect[test]);\n }\n}\n//console.log(msg.options)\nmsg.payload = undefined \nreturn msg;","outputs":1,"noerr":0,"x":400,"y":360,"wires":[["dc849ac4.7302d8"]]},{"id":"dc849ac4.7302d8","type":"ui_dropdown","z":"e9098dde.b546a","name":"rraNamesSelect-dropdown","label":"rraNamesSelect-dropdown","tooltip":"","place":"Select option","group":"82147ec2.c500d","order":3,"width":14,"height":1,"passthru":false,"multiple":false,"options":[],"payload":"","topic":"","x":160,"y":420,"wires":[["a87c1552.9464b8"]]},{"id":"1b697a25.71a896","type":"ui_switch","z":"e9098dde.b546a","name":"EpochOrNormalTime","label":"Epoch(linux) or Normal Time","tooltip":"","group":"82147ec2.c500d","order":6,"width":9,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":140,"y":480,"wires":[["6638f830.7fdbd8"]]},{"id":"f6b87e88.0931c","type":"ui_date_picker","z":"e9098dde.b546a","name":"dateFrom","label":"dateFrom","group":"82147ec2.c500d","order":8,"width":12,"height":1,"passthru":true,"topic":"","x":100,"y":720,"wires":[["a7846386.8ac7c"]]},{"id":"7f4623e9.26aa6c","type":"ui_date_picker","z":"e9098dde.b546a","name":"DateTo","label":"DateTo","group":"82147ec2.c500d","order":12,"width":12,"height":1,"passthru":true,"topic":"","x":100,"y":660,"wires":[["9b68eb0d.b5aa48"]]},{"id":"331215f6.ce477a","type":"ui_switch","z":"e9098dde.b546a","name":"nullForNaN","label":"nullForNaN","tooltip":"","group":"82147ec2.c500d","order":4,"width":10,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":110,"y":600,"wires":[["fff59cf7.f1b71"]]},{"id":"9da3cb9d.279c88","type":"ui_button","z":"e9098dde.b546a","name":"SendButton","group":"82147ec2.c500d","order":14,"width":2,"height":1,"passthru":false,"label":"Send","tooltip":"","color":"","bgcolor":"","icon":"","payload":"doe","payloadType":"str","topic":"","x":730,"y":420,"wires":[["976db33c.dd285"]]},{"id":"b2a3c4ca.936258","type":"inject","z":"e9098dde.b546a","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":160,"wires":[["976db33c.dd285"]]},{"id":"187434e.baea9cb","type":"function","z":"e9098dde.b546a","name":"Flow-SelectLogger","func":"flow.set(\"SelectLogger\", msg.payload );\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":320,"wires":[[]]},{"id":"a87c1552.9464b8","type":"function","z":"e9098dde.b546a","name":"flow.RraNames","func":"flow.set(\"RraNames\", msg.payload );\nmsg.enabled = true\nreturn msg;","outputs":1,"noerr":0,"x":400,"y":420,"wires":[["9da3cb9d.279c88"]]},{"id":"6638f830.7fdbd8","type":"function","z":"e9098dde.b546a","name":"flow.EpochOrNormalTime","func":"flow.set(\"EpochOrNormalTime\", msg.payload );\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":480,"wires":[[]]},{"id":"e235f0bb.92db2","type":"function","z":"e9098dde.b546a","name":"flow.NumberOfSamples","func":"flow.set(\"NumberOfSamples\", msg.payload );\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":540,"wires":[[]]},{"id":"fff59cf7.f1b71","type":"function","z":"e9098dde.b546a","name":"flow.nullForNaN","func":"flow.set(\"nullForNaN\", msg.payload );\nreturn msg;","outputs":1,"noerr":0,"x":400,"y":600,"wires":[[]]},{"id":"9b68eb0d.b5aa48","type":"function","z":"e9098dde.b546a","name":"flow.DateTo","func":"flow.set(\"DateTo\", msg.payload );\nreturn msg;","outputs":1,"noerr":0,"x":390,"y":660,"wires":[[]]},{"id":"a7846386.8ac7c","type":"function","z":"e9098dde.b546a","name":"flow.DateFrom","func":"flow.set(\"DateFrom\", msg.payload );\nreturn msg;","outputs":1,"noerr":0,"x":400,"y":720,"wires":[[]]},{"id":"a37534cb.d27a68","type":"hidden-ui-load","z":"e9098dde.b546a","group":"82147ec2.c500d","order":0,"name":"","x":100,"y":240,"wires":[["c8b32dd1.1ac5b"]]},{"id":"c8b32dd1.1ac5b","type":"function","z":"e9098dde.b546a","name":"button disable","func":"msg.enabled = false\nreturn msg;","outputs":1,"noerr":0,"x":400,"y":240,"wires":[["9da3cb9d.279c88"]]},{"id":"94757402.40ed78","type":"ui_text","z":"e9098dde.b546a","group":"82147ec2.c500d","order":14,"width":"27","height":"1","name":"URL Output","label":"URL Output","format":"{{msg.url}}","layout":"row-spread","x":1180,"y":160,"wires":[]},{"id":"cedb3965.009b48","type":"ui_text","z":"e9098dde.b546a","group":"82147ec2.c500d","order":15,"width":0,"height":0,"name":"URL Output-data","label":"URL Output-data","format":"{{msg.payload}}","layout":"col-center","x":1220,"y":280,"wires":[]},{"id":"82147ec2.c500d","type":"ui_group","z":"","name":"Rdd-Display","tab":"89b09248.e9e96","order":1,"disp":true,"width":30,"collapse":false},{"id":"89b09248.e9e96","type":"ui_tab","z":"","name":"Toon-RDD-Data","icon":"dashboard","disabled":false,"hidden":false}]
Re: node red-extract rrd data
De "code" of beter gezegd FLOW is iets wat je direct in node-red (webgui) kan importeren .. dit is de "source code"marcelr wrote:WTAF?
viewtopic.php?f=104&t=12806#p94477 het plaatje is ook van uit node-red --> (web)gui
om iets duidelijker te zijn zie link in 1ste post .. de excel die Toonz gemaakt heeft met welke logger en welke rranames als optie(s) erbij hoort .
kan je via paar drop downs selecteren, nullfornan, datum in epoch of "human readable" .. en een tijd van-tot selecteren ..
(oeps dutch ===> to english )
(short translation) It 's sourcecode for node-red it allows you to extract the data via a simple gui thing (with help of Toonz excel sheet) to select all known to me options and extract the RRD data..
Also it should be very simple to transform this from "get" to "set" data if you wish ..
Also node-red is a very easy to setup between your domotica system --> node-red --> in my case domoticz
Re: node red-extract rrd data
If that's code, it certainly looks like sh*t. Linefeeds, indentation, comment, anyone?
Unintelligble gibberish, if you ask me
Unintelligble gibberish, if you ask me
Re: node red-extract rrd data
Just pull it through jsonlint and result:
Code: Select all
[{
"id": "e9098dde.b546a",
"type": "tab",
"label": "RDD-Toon extract",
"disabled": false,
"info": "Writen to extract Toon Data \n\nthx to Toonz \nhttps://www.domoticaforum.eu/viewtopic.php?f=99&t=11671&hilit=rrd+content&start=30#p84364\n\n\nTodo \n- Correct date format (now commented out)\n- make a chart function \n- do other stuff ?"
}, {
"id": "a352ea6.8e7ba18",
"type": "http request",
"z": "e9098dde.b546a",
"name": "HttpRequest1",
"method": "GET",
"ret": "txt",
"paytoqs": false,
"url": "",
"tls": "",
"persist": false,
"proxy": "",
"authType": "",
"x": 860,
"y": 160,
"wires": [
["94757402.40ed78", "cedb3965.009b48"]
]
}, {
"id": "92bd3731.521cf8",
"type": "function",
"z": "e9098dde.b546a",
"name": "ToonIP",
"func": "//Set here the IP of the Toon\nflow.set(\"ToonUrl\", \"http://192.168.1.x\");\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 510,
"y": 80,
"wires": [
[]
]
}, {
"id": "178f244c.0dfcec",
"type": "inject",
"z": "e9098dde.b546a",
"name": "",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "600",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"x": 230,
"y": 80,
"wires": [
["92bd3731.521cf8"]
]
}, {
"id": "976db33c.dd285",
"type": "function",
"z": "e9098dde.b546a",
"name": "URL doe",
"func": "//http://192.168.1.65/hcb_rrd?action=getRrdData&loggerName=elec_quantity_lt_orig&rra=10yrdays&readableTime=1&samples=2&nullForNaN=1&from=1588754943&to=1588776543\n//msg.url = flow.get(\"ToonUrl\")+\"/hcb_rrd?action=\"+ flow.get(\"SelectLogger\")+\"/+flow.get(\"RraNames\") \nmsg.url = flow.get(\"ToonUrl\") \n+ \"/hcb_rrd?action=getRrdData\\&loggerName=\" \n+ flow.get(\"SelectLogger\") \n+ '\\&rra=' \n+ flow.get(\"RraNames\")\n+ '\\&readableTime='\n+ flow.get(\"EpochOrNormalTime\")\n+ '\\&samples='\n+ flow.get(\"NumberOfSamples\")\n+ '\\&&nullForNaN='\n+ flow.get(\"nullForNaN\");\n//+ '\\&from=' \n//+ flow.get(\"DateFrom\")\n//+ '\\&to='\n//+ flow.get(\"DateTo\")\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 600,
"y": 160,
"wires": [
["a352ea6.8e7ba18"]
]
}, {
"id": "75d0746a.93cfcc",
"type": "comment",
"z": "e9098dde.b546a",
"name": "Change you ip adres here, click for more info",
"info": "# Set here here the ip address your Toon uses.\nVer 1.0 26-05-2020 Victor Ophof \n\n",
"x": 770,
"y": 80,
"wires": []
}, {
"id": "e7150f57.6b91d",
"type": "ui_dropdown",
"z": "e9098dde.b546a",
"name": "SelectLogger",
"label": "SelectLogger",
"tooltip": "",
"place": "Select option",
"group": "82147ec2.c500d",
"order": 1,
"width": 15,
"height": 1,
"passthru": true,
"multiple": false,
"options": [{
"label": "boiler_burner_minutes",
"value": "boiler_burner_minutes",
"type": "str"
}, {
"label": "elec_fixed_day_cost",
"value": "elec_fixed_day_cost",
"type": "str"
}, {
"label": "elec_flow",
"value": "elec_flow",
"type": "str"
}, {
"label": "elec_produ_flow",
"value": "elec_produ_flow",
"type": "str"
}, {
"label": "elec_quantity_lt",
"value": "elec_quantity_lt",
"type": "str"
}, {
"label": "elec_quantity_lt_orig",
"value": "elec_quantity_lt_orig",
"type": "str"
}, {
"label": "elec_quantity_lt_produ",
"value": "elec_quantity_lt_produ",
"type": "str"
}, {
"label": "elec_quantity_nt",
"value": "elec_quantity_nt",
"type": "str"
}, {
"label": "elec_quantity_nt_orig",
"value": "elec_quantity_nt_orig",
"type": "str"
}, {
"label": "elec_quantity_nt_produ",
"value": "elec_quantity_nt_produ",
"type": "str"
}, {
"label": "elec_solar_flow",
"value": "elec_solar_flow",
"type": "str"
}, {
"label": "elec_solar_quantity",
"value": "elec_solar_quantity",
"type": "str"
}, {
"label": "gas_flow",
"value": "gas_flow",
"type": "str"
}, {
"label": "gas_quantity",
"value": "gas_quantity",
"type": "str"
}, {
"label": "heat_quantity",
"value": "heat_quantity",
"type": "str"
}, {
"label": "plug_elec_flow_69423C6FFA3",
"value": "plug_elec_flow_69423C6FFA3",
"type": "str"
}, {
"label": "plug_elec_qtty_69423C6FFA3",
"value": "plug_elec_qtty_69423C6FFA3",
"type": "str"
}, {
"label": "thermstat_AnticipatedTempRise",
"value": "thermstat_AnticipatedTempRise",
"type": "str"
}, {
"label": "thermstat_boilerBurnerHours",
"value": "thermstat_boilerBurnerHours",
"type": "str"
}, {
"label": "thermstat_boilerChPressure",
"value": "thermstat_boilerChPressure",
"type": "str"
}, {
"label": "thermstat_boilerDhwBurnerHours",
"value": "thermstat_boilerDhwBurnerHours",
"type": "str"
}, {
"label": "thermstat_boilerFailedBurnerStarts",
"value": "thermstat_boilerFailedBurnerStarts",
"type": "str"
}, {
"label": "thermstat_boilerModLevel",
"value": "thermstat_boilerModLevel",
"type": "str"
}, {
"label": "thermstat_boilerOpMode",
"value": "thermstat_boilerOpMode",
"type": "str"
}, {
"label": "thermstat_boilerPumpStarts",
"value": "thermstat_boilerPumpStarts",
"type": "str"
}, {
"label": "thermstat_boilerRetTemp",
"value": "thermstat_boilerRetTemp",
"type": "str"
}, {
"label": "thermstat_boilerSetpoint",
"value": "thermstat_boilerSetpoint",
"type": "str"
}, {
"label": "thermstat_boilerSuccesfulBurnerStarts",
"value": "thermstat_boilerSuccesfulBurnerStarts",
"type": "str"
}, {
"label": "thermstat_boilerTemp",
"value": "thermstat_boilerTemp",
"type": "str"
}, {
"label": "thermstat_CurrentProgramState",
"value": "thermstat_CurrentProgramState",
"type": "str"
}, {
"label": "thermstat_DeadTime",
"value": "thermstat_DeadTime",
"type": "str"
}, {
"label": "thermstat_dhwBurnerStarts",
"value": "thermstat_dhwBurnerStarts",
"type": "str"
}, {
"label": "thermstat_ExpectedPreheatTime",
"value": "thermstat_ExpectedPreheatTime",
"type": "str"
}, {
"label": "thermstat_heatingFactor",
"value": "thermstat_heatingFactor",
"type": "str"
}, {
"label": "thermstat_Integrator",
"value": "thermstat_Integrator",
"type": "str"
}, {
"label": "thermstat_internalBoilerSetpoint",
"value": "thermstat_internalBoilerSetpoint",
"type": "str"
}, {
"label": "thermstat_internalSetpoint",
"value": "thermstat_internalSetpoint",
"type": "str"
}, {
"label": "thermstat_IntPart",
"value": "thermstat_IntPart",
"type": "str"
}, {
"label": "thermstat_longTermOffset",
"value": "thermstat_longTermOffset",
"type": "str"
}, {
"label": "thermstat_MeasuredDeadTime",
"value": "thermstat_MeasuredDeadTime",
"type": "str"
}, {
"label": "thermstat_MeasuredHeatingFactor",
"value": "thermstat_MeasuredHeatingFactor",
"type": "str"
}, {
"label": "thermstat_MeasuredOutsideRate",
"value": "thermstat_MeasuredOutsideRate",
"type": "str"
}, {
"label": "thermstat_MeasuredSteadyTemp",
"value": "thermstat_MeasuredSteadyTemp",
"type": "str"
}, {
"label": "thermstat_outsideRate",
"value": "thermstat_outsideRate",
"type": "str"
}, {
"label": "thermstat_outsideTemp",
"value": "thermstat_outsideTemp",
"type": "str"
}, {
"label": "thermstat_programState",
"value": "thermstat_programState",
"type": "str"
}, {
"label": "thermstat_PropPart",
"value": "thermstat_PropPart",
"type": "str"
}, {
"label": "thermstat_realTemps",
"value": "thermstat_realTemps",
"type": "str"
}, {
"label": "thermstat_setpoint",
"value": "thermstat_setpoint",
"type": "str"
}, {
"label": "thermstat_SteadyTemp",
"value": "thermstat_SteadyTemp",
"type": "str"
}, {
"label": "thermstat_SteadyTime",
"value": "thermstat_SteadyTime",
"type": "str"
}, {
"label": "thermstat_UsedSteadyCorrection",
"value": "thermstat_UsedSteadyCorrection",
"type": "str"
}, {
"label": "thermstat_UserInteracted",
"value": "thermstat_UserInteracted",
"type": "str"
}],
"payload": "",
"topic": "",
"x": 130,
"y": 320,
"wires": [
["5620b3d4.063f9c", "187434e.baea9cb"]
]
}, {
"id": "921387d7.474438",
"type": "ui_numeric",
"z": "e9098dde.b546a",
"name": "NumberOfSamples",
"label": "numeric",
"tooltip": "",
"group": "82147ec2.c500d",
"order": 10,
"width": 11,
"height": 1,
"wrap": false,
"passthru": true,
"topic": "",
"format": "{{value}}",
"min": 0,
"max": "10000",
"step": 1,
"x": 130,
"y": 540,
"wires": [
["e235f0bb.92db2"]
]
}, {
"id": "5620b3d4.063f9c",
"type": "function",
"z": "e9098dde.b546a",
"name": "rraNamesSelect",
"func": "// 5min = DateA\n// 5yrhours = DateB\n// 10yrdays = DateC\n// 30days\t = DateD\n// year\t\t = DateE\n// 1monthhour = DateF\n// 1yearday = DateG \nvar rraNamesSelect = [\n{\"loggerName\":\"boiler_burner_minutes\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_fixed_day_cost\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_flow\",\"DateA\":\"1\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_produ_flow\",\"DateA\":\"1\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_quantity_lt\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_quantity_lt_orig\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_quantity_lt_produ\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_quantity_nt\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_quantity_nt_orig\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_quantity_nt_produ\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_solar_flow\",\"DateA\":\"1\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"elec_solar_quantity\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"gas_flow\",\"DateA\":\"1\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"gas_quantity\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"1\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"heat_quantity\",\"DateA\":\"0\",\"DateB\":\"1\",\"DateC\":\"0\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"plug_elec_flow_69423C6FFA3\",\"DateA\":\"1\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"plug_elec_qtty_69423C6FFA3\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"0\",\"DateE\":\"0\",\"DateF\":\"1\",\"DateG\":\"1\"},\n{\"loggerName\":\"thermstat_AnticipatedTempRise\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerBurnerHours\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerChPressure\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerDhwBurnerHours\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerFailedBurnerStarts\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerModLevel\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerOpMode\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerPumpStarts\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerRetTemp\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerSetpoint\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerSuccesfulBurnerStarts\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_boilerTemp\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_CurrentProgramState\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_DeadTime\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_dhwBurnerStarts\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_ExpectedPreheatTime\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_heatingFactor\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_Integrator\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_internalBoilerSetpoint\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_internalSetpoint\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_IntPart\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_longTermOffset\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_MeasuredDeadTime\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_MeasuredHeatingFactor\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_MeasuredOutsideRate\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_MeasuredSteadyTemp\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_outsideRate\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_outsideTemp\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_programState\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_PropPart\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_realTemps\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_setpoint\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_SteadyTemp\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_SteadyTime\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_UsedSteadyCorrection\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"},\n{\"loggerName\":\"thermstat_UserInteracted\",\"DateA\":\"0\",\"DateB\":\"0\",\"DateC\":\"0\",\"DateD\":\"1\",\"DateE\":\"1\",\"DateF\":\"0\",\"DateG\":\"0\"}\n]\nmsg.options = []\nfor (test in rraNamesSelect) {\n if (rraNamesSelect[test].loggerName == msg.payload){\n if (rraNamesSelect[test].DateA == \"1\"){ \n msg.options.push ({\"5min\":\"5min\"})\n }\n if (rraNamesSelect[test].DateB == \"1\"){\n msg.options.push ({\"5yrhours\":\"5yrhours\"})\n }\n if (rraNamesSelect[test].DateC == \"1\"){ \n msg.options.push ({\"10yrdays\":\"10yrdays\"})\n }\n if (rraNamesSelect[test].DateD == \"1\"){ \n msg.options.push ({\"30days\":\"30days\"})\n }\n if (rraNamesSelect[test].DateE == \"1\"){ \n msg.options.push ({\"year\":\"year\"})\n }\n if (rraNamesSelect[test].DateF == \"1\"){ \n msg.options.push ({\"1monthhour\":\"1monthhour\"})\n }\n if (rraNamesSelect[test].DateG == \"1\"){ \n msg.options.push ({\"1yearday\":\"1yearday\"})\n }\n // test display value \n // console.log(rraNamesSelect[test]);\n }\n}\n//console.log(msg.options)\nmsg.payload = undefined \nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 400,
"y": 360,
"wires": [
["dc849ac4.7302d8"]
]
}, {
"id": "dc849ac4.7302d8",
"type": "ui_dropdown",
"z": "e9098dde.b546a",
"name": "rraNamesSelect-dropdown",
"label": "rraNamesSelect-dropdown",
"tooltip": "",
"place": "Select option",
"group": "82147ec2.c500d",
"order": 3,
"width": 14,
"height": 1,
"passthru": false,
"multiple": false,
"options": [],
"payload": "",
"topic": "",
"x": 160,
"y": 420,
"wires": [
["a87c1552.9464b8"]
]
}, {
"id": "1b697a25.71a896",
"type": "ui_switch",
"z": "e9098dde.b546a",
"name": "EpochOrNormalTime",
"label": "Epoch(linux) or Normal Time",
"tooltip": "",
"group": "82147ec2.c500d",
"order": 6,
"width": 9,
"height": 1,
"passthru": true,
"decouple": "false",
"topic": "",
"style": "",
"onvalue": "1",
"onvalueType": "num",
"onicon": "",
"oncolor": "",
"offvalue": "0",
"offvalueType": "num",
"officon": "",
"offcolor": "",
"x": 140,
"y": 480,
"wires": [
["6638f830.7fdbd8"]
]
}, {
"id": "f6b87e88.0931c",
"type": "ui_date_picker",
"z": "e9098dde.b546a",
"name": "dateFrom",
"label": "dateFrom",
"group": "82147ec2.c500d",
"order": 8,
"width": 12,
"height": 1,
"passthru": true,
"topic": "",
"x": 100,
"y": 720,
"wires": [
["a7846386.8ac7c"]
]
}, {
"id": "7f4623e9.26aa6c",
"type": "ui_date_picker",
"z": "e9098dde.b546a",
"name": "DateTo",
"label": "DateTo",
"group": "82147ec2.c500d",
"order": 12,
"width": 12,
"height": 1,
"passthru": true,
"topic": "",
"x": 100,
"y": 660,
"wires": [
["9b68eb0d.b5aa48"]
]
}, {
"id": "331215f6.ce477a",
"type": "ui_switch",
"z": "e9098dde.b546a",
"name": "nullForNaN",
"label": "nullForNaN",
"tooltip": "",
"group": "82147ec2.c500d",
"order": 4,
"width": 10,
"height": 1,
"passthru": true,
"decouple": "false",
"topic": "",
"style": "",
"onvalue": "1",
"onvalueType": "num",
"onicon": "",
"oncolor": "",
"offvalue": "0",
"offvalueType": "num",
"officon": "",
"offcolor": "",
"x": 110,
"y": 600,
"wires": [
["fff59cf7.f1b71"]
]
}, {
"id": "9da3cb9d.279c88",
"type": "ui_button",
"z": "e9098dde.b546a",
"name": "SendButton",
"group": "82147ec2.c500d",
"order": 14,
"width": 2,
"height": 1,
"passthru": false,
"label": "Send",
"tooltip": "",
"color": "",
"bgcolor": "",
"icon": "",
"payload": "doe",
"payloadType": "str",
"topic": "",
"x": 730,
"y": 420,
"wires": [
["976db33c.dd285"]
]
}, {
"id": "b2a3c4ca.936258",
"type": "inject",
"z": "e9098dde.b546a",
"name": "",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 180,
"y": 160,
"wires": [
["976db33c.dd285"]
]
}, {
"id": "187434e.baea9cb",
"type": "function",
"z": "e9098dde.b546a",
"name": "Flow-SelectLogger",
"func": "flow.set(\"SelectLogger\", msg.payload );\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 410,
"y": 320,
"wires": [
[]
]
}, {
"id": "a87c1552.9464b8",
"type": "function",
"z": "e9098dde.b546a",
"name": "flow.RraNames",
"func": "flow.set(\"RraNames\", msg.payload );\nmsg.enabled = true\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 400,
"y": 420,
"wires": [
["9da3cb9d.279c88"]
]
}, {
"id": "6638f830.7fdbd8",
"type": "function",
"z": "e9098dde.b546a",
"name": "flow.EpochOrNormalTime",
"func": "flow.set(\"EpochOrNormalTime\", msg.payload );\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 430,
"y": 480,
"wires": [
[]
]
}, {
"id": "e235f0bb.92db2",
"type": "function",
"z": "e9098dde.b546a",
"name": "flow.NumberOfSamples",
"func": "flow.set(\"NumberOfSamples\", msg.payload );\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 430,
"y": 540,
"wires": [
[]
]
}, {
"id": "fff59cf7.f1b71",
"type": "function",
"z": "e9098dde.b546a",
"name": "flow.nullForNaN",
"func": "flow.set(\"nullForNaN\", msg.payload );\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 400,
"y": 600,
"wires": [
[]
]
}, {
"id": "9b68eb0d.b5aa48",
"type": "function",
"z": "e9098dde.b546a",
"name": "flow.DateTo",
"func": "flow.set(\"DateTo\", msg.payload );\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 390,
"y": 660,
"wires": [
[]
]
}, {
"id": "a7846386.8ac7c",
"type": "function",
"z": "e9098dde.b546a",
"name": "flow.DateFrom",
"func": "flow.set(\"DateFrom\", msg.payload );\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 400,
"y": 720,
"wires": [
[]
]
}, {
"id": "a37534cb.d27a68",
"type": "hidden-ui-load",
"z": "e9098dde.b546a",
"group": "82147ec2.c500d",
"order": 0,
"name": "",
"x": 100,
"y": 240,
"wires": [
["c8b32dd1.1ac5b"]
]
}, {
"id": "c8b32dd1.1ac5b",
"type": "function",
"z": "e9098dde.b546a",
"name": "button disable",
"func": "msg.enabled = false\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 400,
"y": 240,
"wires": [
["9da3cb9d.279c88"]
]
}, {
"id": "94757402.40ed78",
"type": "ui_text",
"z": "e9098dde.b546a",
"group": "82147ec2.c500d",
"order": 14,
"width": "27",
"height": "1",
"name": "URL Output",
"label": "URL Output",
"format": "{{msg.url}}",
"layout": "row-spread",
"x": 1180,
"y": 160,
"wires": []
}, {
"id": "cedb3965.009b48",
"type": "ui_text",
"z": "e9098dde.b546a",
"group": "82147ec2.c500d",
"order": 15,
"width": 0,
"height": 0,
"name": "URL Output-data",
"label": "URL Output-data",
"format": "{{msg.payload}}",
"layout": "col-center",
"x": 1220,
"y": 280,
"wires": []
}, {
"id": "82147ec2.c500d",
"type": "ui_group",
"z": "",
"name": "Rdd-Display",
"tab": "89b09248.e9e96",
"order": 1,
"disp": true,
"width": 30,
"collapse": false
}, {
"id": "89b09248.e9e96",
"type": "ui_tab",
"z": "",
"name": "Toon-RDD-Data",
"icon": "dashboard",
"disabled": false,
"hidden": false
}]
Member of the Toon Software Collective
Re: node red-extract rrd data
I hope its usefullTheHogNL wrote:Just pull it through jsonlint and result:
<code>