node-red-contrib-persist
node-red-contrib-persist copied to clipboard
4th store fails to save..
I am using 4 x graphs in a dashboard and 4 x persistent store files, but the 4th graph fails to restore after a system restart?
the whole graph/store subflow is as follows.. Every time my pi reboots the EC graph is empty..
Thanks.
[{"id":"67194ebe.24bad","type":"mqtt in","z":"c3d8d21d.ac538","name":"Plant Notifications","topic":"Notify/Plant/#","qos":"2","broker":"a368882b.be65d8","x":213.00012969970703,"y":839.0390968322754,"wires":[["77778f05.6f8ab"]]},{"id":"77778f05.6f8ab","type":"function","z":"c3d8d21d.ac538","name":"order plant metrics","func":"//Requires:\n// message with a numeric payload and topic in the \n// format Notify/Plant/X/Y where X ia a numeric id of \n// a sensor/plant area, and Y is a code indicating the\n// metric the payload represents\n//Returns:\n// a message in the format\n// PlantX\payload sent to the graph as indicated\n// by the metric code the payload containing the data\n//Results:\n// no expected side effects beyond\n// the relevant graphs should get updated with \n// the new data.\nvar plantnum = msg.topic.split("/")[2];\nvar Metric = msg.topic.split("/")[3];\nmsg.topic = msg.topic.split("/")[1]+ plantnum;\n// 4 x outputs 1 moisture metric = M\n// Battery level metric = B\n// Temperature metric = T\n// EC Metric = EC\n// return[msg1,msg2,msg3,msg4]\nswitch(Metric) {\n case 'M': // moisture\n return [msg,null,null,null]\n break;\n case 'B': //attery level\n return [null,msg,null,null]\n break;\n case 'T': // Temperature\n return [null,null,msg,null]\n break;\n case 'EC': // EC\n return [null,null,null,msg];\n break;\n default:\n return msg;\n}","outputs":4,"noerr":0,"x":459.00012969970703,"y":839.039080619812,"wires":[["65cec4e0.c104ec"],["e31e5024.22819"],["c5505726.221e58"],["330322a6.79076e"]],"outputLabels":["Mosture","Battery Level","Temperature","EC"]},{"id":"e2915821.2a81e8","type":"persist in","z":"c3d8d21d.ac538","name":"PlantMoisture","storageNode":"e2fd001c.c7677","x":1043.000202178955,"y":725.0391216278076,"wires":[]},{"id":"49d72841.768898","type":"persist in","z":"c3d8d21d.ac538","name":"BatteryLevel","storageNode":"d062dc20.7217b","x":1032.0001239776611,"y":778.0390672683716,"wires":[]},{"id":"da8e890e.6ab1a8","type":"persist in","z":"c3d8d21d.ac538","name":"PlantTemperature","storageNode":"42a8b7b8.d63598","x":1052.0001220703125,"y":884.0390815734863,"wires":[]},{"id":"aa65de30.44c3c","type":"persist in","z":"c3d8d21d.ac538","name":"Plant EC","storageNode":"d0a2b159.06af3","x":1020.0001201629639,"y":924.0390663146973,"wires":[]},{"id":"b88c2080.4729c","type":"persist out","z":"c3d8d21d.ac538","name":"PlantMoisture","storageNode":"e2fd001c.c7677","x":229.00018310546875,"y":748.039083480835,"wires":[["65cec4e0.c104ec"]]},{"id":"5f6849d9.4a1348","type":"persist out","z":"c3d8d21d.ac538","name":"BatteryLevel","storageNode":"d062dc20.7217b","x":219.00013732910156,"y":786.0390815734863,"wires":[["e31e5024.22819"]]},{"id":"9e05ef14.6632d","type":"persist out","z":"c3d8d21d.ac538","name":"PlantTemperature","storageNode":"42a8b7b8.d63598","x":236.0001564025879,"y":894.0391063690186,"wires":[["c5505726.221e58"]]},{"id":"75a53003.3ef03","type":"persist out","z":"c3d8d21d.ac538","name":"PlantEC","storageNode":"d0a2b159.06af3","x":205.0001564025879,"y":933.0390911102295,"wires":[["330322a6.79076e"]]},{"id":"65cec4e0.c104ec","type":"ui_chart","z":"c3d8d21d.ac538","name":"Moisture","group":"9bd2a697.f535d8","order":1,"width":"24","height":"6","label":"Moisture","chartType":"line","legend":"true","xformat":"auto","interpolate":"linear","nodata":"waiting","dot":true,"ymin":"0","ymax":"100","removeOlder":1,"removeOlderPoints":"1000","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":true,"x":688.000186920166,"y":745.0390820503235,"wires":[["e2915821.2a81e8"],[]],"outputLabels":["persistant store",""]},{"id":"e31e5024.22819","type":"ui_chart","z":"c3d8d21d.ac538","name":"","group":"9bd2a697.f535d8","order":4,"width":"24","height":"6","label":"Batery Level %","chartType":"line","legend":"true","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":true,"ymin":"0","ymax":"106","removeOlder":1,"removeOlderPoints":"1000","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":true,"x":704.0001277923584,"y":785.0390787124634,"wires":[["49d72841.768898"],[]],"outputLabels":["persistant store",""]},{"id":"c5505726.221e58","type":"ui_chart","z":"c3d8d21d.ac538","name":"","group":"9bd2a697.f535d8","order":2,"width":"24","height":"6","label":"Temperature","chartType":"line","legend":"true","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":true,"ymin":"5","ymax":"45","removeOlder":1,"removeOlderPoints":"1000","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":true,"x":694.0001850128174,"y":892.0391092300415,"wires":[["da8e890e.6ab1a8"],[]],"outputLabels":["persistant store",""]},{"id":"330322a6.79076e","type":"ui_chart","z":"c3d8d21d.ac538","name":"","group":"9bd2a697.f535d8","order":3,"width":"24","height":"6","label":"EC","chartType":"line","legend":"true","xformat":"auto","interpolate":"linear","nodata":"","dot":true,"ymin":"0","ymax":"","removeOlder":1,"removeOlderPoints":"1000","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":true,"x":676.0001220703125,"y":933.0390939712524,"wires":[["aa65de30.44c3c"],[]],"outputLabels":["persistant store",""]},{"id":"a368882b.be65d8","type":"mqtt-broker","z":"","name":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"e2fd001c.c7677","type":"persist-store","z":"","filename":"moisture.json","interval":"100"},{"id":"d062dc20.7217b","type":"persist-store","z":"","filename":"batterylevel.json","interval":"90"},{"id":"42a8b7b8.d63598","type":"persist-store","z":"","filename":"temperature.json","interval":"80"},{"id":"d0a2b159.06af3","type":"persist-store","z":"","filename":"electroconductivity.json","interval":"60"},{"id":"9bd2a697.f535d8","type":"ui_group","z":"","name":"PC","tab":"2956ec1.813c114","disp":true,"width":"24","collapse":false},{"id":"2956ec1.813c114","type":"ui_tab","z":"","name":"Home","icon":"dashboard"}]