Hi everyone, It is posible I dont want using any database to store the data?
Now I tried to use the getter and setter to store the temporary data. I dont know why the node red cannot get the previous data. If current minute is 20 I would like to get also 15,10 and 5.
`[{"id":"e8ee6740.9d5ce8","type":"inject","z":"8debfc1f.64b44","name":"","topic":"","payload":"","payloadType":"date","repeat":"30","crontab":"","once":false,"onceDelay":0.1,"x":270,"y":1980,"wires":[["1afb4e8a.2cab81","a0637ea5.4bf94","43fdadf3.8783c4","24721b90.b4ffe4"]]},{"id":"1afb4e8a.2cab81","type":"function","z":"8debfc1f.64b44","name":"get data 15,35,55 (payload4)","func":"d = new Date();\nminute = d.getMinutes();\n\nif(minute%5 === 0){\nif(minute === 15 || minute === 35 || minute === 55){\ncontext.get('minutes15',minute)\nif(minute != 'minutes15'){\ncontext.set('minutes15',minute)\nmsg={payload4:{minute:minute}}\n}else{\ncontext.set('minutes15',minute)\nmsg={payload4:{minute}}\n}\n}\n}else return null\n\n/*context.set('hour',hour)\ncontext.set('minute',minute)\ncontext.set('second',second)\ncontext.set('year',year)\ncontext.set('month',month)\ncontext.set('day',day)\n\n\n\nif(minute === 15 || minute === 35 || minute ===55){\n msg={payload4:{\n hour:hour,\n minute:minute,\n second:second,\n year:year,\n month:month,\n day:day,\n\n \n /*'hours':context.set(hour),\n 'minutes':context.set(minute),\n 'seconds':context.set(second),\n 'years':context.set(year),\n 'months':context.set(month),\n 'days':context.set(day),\n\n \n }}\n}else{\n msg={payload4:{\n hour:context.get('hour'),\n minute:context.get('minute'),\n second:context.get('second'),\n year:context.get('year'),\n month:context.get('month'),\n day:context.get('day'),\n\n }}\n}\n*/\n\n\nreturn msg;","outputs":1,"noerr":0,"x":540,"y":1940,"wires":[["a18e938c.609de"]]},{"id":"a0637ea5.4bf94","type":"function","z":"8debfc1f.64b44","name":"get data 20,40,0 (payload1)","func":"d = new Date();\nminute = d.getMinutes();\n\nif(minute%5 === 0){\nif(minute === 20 || minute === 40 || minute === 0){\ncontext.get('minutes15',minute)\nif(minute != 'minutes15'){\ncontext.set('minutes15',minute)\nmsg={payload1:{minute:minute}}\n}else{\ncontext.set('minutes15',minute)\nmsg={payload1:{minute}}\n}\n}\n}else return null\n\n/*context.set('hour',hour)\ncontext.set('minute',minute)\ncontext.set('second',second)\ncontext.set('year',year)\ncontext.set('month',month)\ncontext.set('day',day)\n\n\n\nif(minute === 15 || minute === 35 || minute ===55){\n msg={payload4:{\n hour:hour,\n minute:minute,\n second:second,\n year:year,\n month:month,\n\n \n /*'hours':context.set(hour),\n 'minutes':context.set(minute),\n 'seconds':context.set(second),\n 'years':context.set(year),\n 'months':context.set(month),\n 'days':context.set(day),\n\n \n }}\n}else{\n msg={payload4:{\n hour:context.get('hour'),\n minute:context.get('minute'),\n second:context.get('second'),\n year:context.get('year'),\n month:context.get('month'),\n day:context.get('day'),\n\n }}\n}\n*/\n\n\n\nreturn msg;","outputs":1,"noerr":0,"x":540,"y":1980,"wires":[["a18e938c.609de"]]},{"id":"43fdadf3.8783c4","type":"function","z":"8debfc1f.64b44","name":"get data 25,45,5 (payload2)","func":"d = new Date();\nminute = d.getMinutes();\n\nif(minute%5 === 0){\nif(minute === 25 || minute === 45 || minute === 5){\ncontext.get('minutes15',minute)\nif(minute != 'minutes15'){\ncontext.set('minutes15',minute)\nmsg={payload2:{minute:minute}}\n}else{\ncontext.set('minutes15',minute)\nmsg={payload2:{minute}}\n}\n}\n}else return null\n\n/*context.set('hour',hour)\ncontext.set('minute',minute)\ncontext.set('second',second)\ncontext.set('year',year)\ncontext.set('month',month)\ncontext.set('day',day)\n\n\n\nif(minute === 15 || minute === 35 || minute ===55){\n msg={payload4:{\n hour:hour,\n minute:minute,\n second:second,\n year:year,\n month:month,\n day:day,\n\n \n /*'hours':context.set(hour),\n 'minutes':context.set(minute),\n 'seconds':context.set(second),\n 'years':context.set(year),\n 'months':context.set(month),\n 'days':context.set(day),\n\n \n }}\n}else{\n msg={payload4:{\n hour:context.get('hour'),\n minute:context.get('minute'),\n second:context.get('second'),\n year:context.get('year'),\n month:context.get('month'),\n day:context.get('day'),\n\n }}\n}\n*/\n\n\n\nreturn msg;","outputs":1,"noerr":0,"x":540,"y":2020,"wires":[["a18e938c.609de"]]},{"id":"24721b90.b4ffe4","type":"function","z":"8debfc1f.64b44","name":"get data 30,50,10 (payload3)","func":"d = new Date();\nminute = d.getMinutes();\n\nif(minute%5 === 0){\nif(minute === 30 || minute === 50 || minute === 10){\ncontext.get('minutes15',minute)\nif(minute != 'minutes15'){\ncontext.set('minutes15',minute)\nmsg={payload3:{minute:minute}}\n}else{\ncontext.set('minutes15',minute)\nmsg={payload3:{minute}}\n}\n}\n}else return null\n\n/*context.set('hour',hour)\ncontext.set('minute',minute)\ncontext.set('second',second)\ncontext.set('year',year)\ncontext.set('month',month)\ncontext.set('day',day)\n\n\n\nif(minute === 15 || minute === 35 || minute ===55){\n msg={payload4:{\n hour:hour,\n minute:minute,\n second:second,\n year:year,\n month:month,\n day:day,\n\n \n /*'hours':context.set(hour),\n 'minutes':context.set(minute),\n 'seconds':context.set(second),\n 'years':context.set(year),\n 'months':context.set(month),\n 'days':context.set(day),\n\n \n }}\n}else{\n msg={payload4:{\n hour:context.get('hour'),\n minute:context.get('minute'),\n second:context.get('second'),\n year:context.get('year'),\n month:context.get('month'),\n day:context.get('day'),\n\n }}\n}\n*/\n\n\n\nreturn msg;","outputs":1,"noerr":0,"x":540,"y":2060,"wires":[["a18e938c.609de"]]},{"id":"a18e938c.609de","type":"debug","z":"8debfc1f.64b44","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":810,"y":2020,"wires":[]}]`
This is my code.
Thanks.