Transfer Many MQTT Data into ui table

Check the data you are actually sending to the table, and make sure there is no missing data.

the node red is connected to esp8266, the data from esp8266 is transferred to node red via mqtt. So, a group of 4 data will be sent consequently to node red.

I realised the issue already, because there are 6 data under wildcard, but I just want to show 5 data only, so when the sixth data is triggered with other 4 data, value will display on the table, that's why sometimes it causes the table missing some data
Thanks for your advices.

You can limit the allowed topics by either using a dynamic subscription in the mqtt node , or setting up a switch to only allow certain topics through.
e.g.

[{"id":"0e122710461d2246","type":"mqtt in","z":"65617ffeb779f51c","name":"","topic":"room/+","qos":"2","datatype":"auto-detect","broker":"e8ba3ef5.22f4a8","nl":false,"rap":true,"rh":0,"inputs":0,"x":90,"y":1400,"wires":[["c9d03fee2d27dbf1"]]},{"id":"c9d03fee2d27dbf1","type":"switch","z":"65617ffeb779f51c","name":"","property":"$$.topic in [\t  \"room/temperature\",\t  \"room/RH\",\t  \"room/waterLevel\",\t  \"room/rainfall\",\t  \"room/ledstatus\"\t]","propertyType":"jsonata","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":110,"y":1480,"wires":[["63e4161fe3cecff5"]]},{"id":"63e4161fe3cecff5","type":"change","z":"65617ffeb779f51c","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"$split($$.topic, \"/\")[-1]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":280,"y":1480,"wires":[["0941ee8c116965ce"]]},{"id":"0941ee8c116965ce","type":"join","z":"65617ffeb779f51c","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"5","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":430,"y":1480,"wires":[["8a7e6caf38f10c2c"]]},{"id":"8a7e6caf38f10c2c","type":"change","z":"65617ffeb779f51c","name":"","rules":[{"t":"set","p":"payload.timestamp","pt":"msg","to":"$moment().tz(\"Europe/London\").format(\"YYYY/MM/DD HH:mm:ss\")","tot":"jsonata"},{"t":"set","p":"table_data","pt":"flow","to":"$append([$$.payload],$flowContext(\"table_data\")[])[[0..200]]","tot":"jsonata"},{"t":"set","p":"payload","pt":"msg","to":"table_data","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":569.9999923706055,"y":1483.7499628067017,"wires":[["742cb961597f00e9","a45c9748bc26bb2d"]]},{"id":"742cb961597f00e9","type":"ui_table","z":"65617ffeb779f51c","group":"a2bb10fbbd3af25e","name":"","order":1,"width":18,"height":1,"columns":[{"field":"timestamp","title":"Date & Time","width":"22%","align":"center","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"temperature","title":"Temperature (°C)","width":"17%","align":"center","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"RH","title":"Relative Humidity (%)","width":"20%","align":"center","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"waterLevel","title":"Water Level (m)","width":"17%","align":"center","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"rainfall","title":"Rainfall (mm)","width":"14%","align":"center","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"ledstatus","title":"Motor","width":"10%","align":"center","formatter":"tickCross","formatterParams":{"target":"_blank"}}],"outputs":0,"cts":false,"x":799.9999923706055,"y":1483.7499628067017,"wires":[]},{"id":"a45c9748bc26bb2d","type":"debug","z":"65617ffeb779f51c","name":"debug","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload.arguments[0][0].ledstatus","statusType":"msg","x":590,"y":1360,"wires":[]},{"id":"12c2a89103838ac3","type":"inject","z":"65617ffeb779f51c","name":"extra topic","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"room/extratopic","payload":"$round($random())","payloadType":"jsonata","x":200,"y":1340,"wires":[["628cf953f1178e97"]]},{"id":"76501eed5b59d6ad","type":"inject","z":"65617ffeb779f51c","name":"led status","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"room/ledstatus","payload":"$round($random())","payloadType":"jsonata","x":209.99999237060547,"y":1303.7499628067017,"wires":[["628cf953f1178e97"]]},{"id":"85a9b03822f84f45","type":"inject","z":"65617ffeb779f51c","name":"rainfall","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"room/rainfall","payload":"$round($random()*10, 2)","payloadType":"jsonata","x":199.99999237060547,"y":1263.7499628067017,"wires":[["628cf953f1178e97"]]},{"id":"89e416fac5974fa7","type":"inject","z":"65617ffeb779f51c","name":"waterlevel","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"room/waterLevel","payload":"$round($random()*10, 2)","payloadType":"jsonata","x":209.99999237060547,"y":1223.7499628067017,"wires":[["628cf953f1178e97"]]},{"id":"a0e419839485d4b6","type":"inject","z":"65617ffeb779f51c","name":"rh","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"room/RH","payload":"$round($random()*10, 2)","payloadType":"jsonata","x":199.99999237060547,"y":1183.7499628067017,"wires":[["628cf953f1178e97"]]},{"id":"baa5513c65a311a1","type":"inject","z":"65617ffeb779f51c","name":"temp","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"room/temperature","payload":"$round($random()*10, 2)","payloadType":"jsonata","x":199.99999237060547,"y":1143.7499628067017,"wires":[["628cf953f1178e97"]]},{"id":"628cf953f1178e97","type":"mqtt out","z":"65617ffeb779f51c","name":"send test data","topic":"","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"e8ba3ef5.22f4a8","x":429.99999237060547,"y":1163.7499628067017,"wires":[]},{"id":"e8ba3ef5.22f4a8","type":"mqtt-broker","name":"testb","broker":"192.168.1.25","port":"1883","clientid":"node-red-test","autoConnect":true,"usetls":false,"compatmode":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"a2bb10fbbd3af25e","type":"ui_group","name":"Group 1","tab":"d6eb2d1eb564a3bc","order":1,"disp":true,"width":18},{"id":"d6eb2d1eb564a3bc","type":"ui_tab","name":"Flow4","icon":"dashboard","order":18,"disabled":false,"hidden":false}]

Thank you for your help. I appreciate it very much.

Thanks you for your help. I appreciate it very much.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.