Hello Guys,
after many nights my rfid reader dashboard looks the way i want to and works great.
The last thing i want to have is a logger that shows me the last users who access the reader.
I want to do this with the "ui-list" https://flows.nodered.org/node/node-red-node-ui-list
after a bit of testing, i do a inject node for example, formatted with a json code, to show me in the list what i wanted.
I build a second example inject node, but this replaced the first information, but i want a "growing list".... i was aware off....
Till i find the node "ring-buffer" https://flows.nodered.org/node/node-red-contrib-ring-buffer.
I was very happy, that is exactly the node iam looking for, i can set the maximal capacity of messages and sort them from old to new and so on.
if you put a meesage in it stacks the messages, till the size is reached.
my problem is now, how to format the output of the ring buffer correct to display the "growing list" in my ui-list node.
i hope someone can help me.
This works like i want, but replaces the message before:
[{"id":"415371c4.bf4fd","type":"ui_list","z":"c7a9e01b.3778c","group":"bb9f2da2.5fec9","name":"","order":1,"width":"12","height":"5","lineType":"two","actionType":"none","allowHTML":true,"outputs":0,"topic":"","x":1590,"y":1000,"wires":[]},{"id":"8a2854c.cb931a8","type":"inject","z":"c7a9e01b.3778c","name":"Pierre","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"title\":\"<b>Pierre</b>\",\"description\":\"Am <font color=\\\"yellow\\\"><b>23.07.2020</b></font color> um <font color=\\\"yellow\\\"><b>23.17 Uhr</b>.\",\"icon\":null}]","payloadType":"json","x":1230,"y":980,"wires":[["415371c4.bf4fd"]]},{"id":"dd52fe2.4068","type":"inject","z":"c7a9e01b.3778c","name":"Alessandro","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"title\":\"<b>Alessandro</b>\",\"description\":\"Am <font color=\\\"yellow\\\"><b>21.07.2020</b></font color> um <font color=\\\"yellow\\\"><b>11.32 Uhr</b>.\",\"icon\":null}]","payloadType":"json","x":1220,"y":1020,"wires":[["415371c4.bf4fd"]]},{"id":"bb9f2da2.5fec9","type":"ui_group","z":"","name":"Letzte Benutzer","tab":"11f55352.a4e0dd","order":1,"disp":true,"width":"14","collapse":false},{"id":"11f55352.a4e0dd","type":"ui_tab","z":"","name":"Log","icon":"dashboard","order":2,"disabled":false,"hidden":false}]
This stacks the messages like i want, but i dont know how to format the ring-buffer output to work with the ui-list:
[{"id":"108cb558.2669fb","type":"ui_list","z":"c7a9e01b.3778c","group":"bb9f2da2.5fec9","name":"","order":1,"width":"12","height":"5","lineType":"two","actionType":"none","allowHTML":true,"outputs":0,"topic":"","x":1590,"y":1140,"wires":[]},{"id":"9206a3c4.fe052","type":"inject","z":"c7a9e01b.3778c","name":"Pierre","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"title\":\"<b>Pierre</b>\",\"description\":\"Am <font color=\\\"yellow\\\"><b>23.07.2020</b></font color> um <font color=\\\"yellow\\\"><b>23.17 Uhr</b>.\",\"icon\":null}]","payloadType":"json","x":1230,"y":1120,"wires":[["d6d7d8d.c507528"]]},{"id":"590281b7.b8aa","type":"inject","z":"c7a9e01b.3778c","name":"Alessandro","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"title\":\"<b>Alessandro</b>\",\"description\":\"Am <font color=\\\"yellow\\\"><b>21.07.2020</b></font color> um <font color=\\\"yellow\\\"><b>11.32 Uhr</b>.\",\"icon\":null}]","payloadType":"json","x":1220,"y":1160,"wires":[["d6d7d8d.c507528"]]},{"id":"d6d7d8d.c507528","type":"ring-buffer","z":"c7a9e01b.3778c","name":"","capacity":"100","order":"new-to-old","sendOnlyIfFull":false,"pushAfterClear":false,"extra":false,"perTopic":false,"x":1420,"y":1140,"wires":[["108cb558.2669fb"]]},{"id":"bb9f2da2.5fec9","type":"ui_group","z":"","name":"Letzte Benutzer","tab":"11f55352.a4e0dd","order":1,"disp":true,"width":"14","collapse":false},{"id":"11f55352.a4e0dd","type":"ui_tab","z":"","name":"Log","icon":"dashboard","order":2,"disabled":false,"hidden":false}]
thank you!