List stopped working

I found (somewhere) (here) a bit of code to list things in a msg.payload to a window/list.

It worked.

(Note: past tense)

I have not done anything to that part of the flow, so I am now stuck why it isn't working.

This is what is sent to it:

["TPG-VZBS","WiFi-DFFA","Tango2","Chilli","TelstraCCBDD1","TelstraCA5E31","Telstra Air","Fon WiFi","BigPond121C","Telstra Air","Fon WiFi"]

This is the flow part:

[{"id":"7139950b.cc620c","type":"json","z":"ce7fe016.6c0348","name":"","property":"payload","action":"","pretty":false,"x":350,"y":240,"wires":[["86eb2f06.fbf9f8","6313161a.1e53b8"]]},{"id":"6313161a.1e53b8","type":"ui_template","z":"ce7fe016.6c0348","group":"93ff74eb.94d69","name":"WiFi networks in range","order":2,"width":"4","height":"6","format":"<table id=\"table\" border=\"1\">\n <tr>\n <th>Visible WiFi networks</th> \n </tr>\n <tbody>\n <tr ng-repeat=\"row in msg.payload\">\n <td class=\"text\" >{{row}}</td>\n </tr>\n </tbody>\n</table>\n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":640,"y":290,"wires":[[]]},{"id":"93ff74eb.94d69","type":"ui_group","z":"","name":"Visible WiFi networks","tab":"9c6bae0.3b358d","order":1,"disp":true,"width":"4","collapse":false},{"id":"9c6bae0.3b358d","type":"ui_tab","z":"","name":"List of visible WiFi networks","icon":"dashboard","order":33}]

I see the part I posted first going into the JSON{} node, but nothing is displayed.

As said: It used to work, and I haven't changed any part of the flow to do with that, so it should still work.

Any ideas?

This is maybe a better representation of the incoming message:

{"topic":"STATUS/WAP/","payload":["TPG-VZBS","WiFi-DFFA","Tango2","Chilli","TelstraCA5E31","Telstra Air","Fon WiFi","Telstra Air","Fon WiFi","TelstraCCBDD1"],"qos":2,"retain":false,"_msgid":"94e3028e.1d06b"}

See browser console. It saysError: [ngRepeat:dupes]
And there is link in this error to find explanation what happened. :wink:

Ok.....

I opened the browser console (CTL SHIFT K)

I am not seeing that. (Or I am blind)
Alas that window doesn't support "search" (filter, but not sure if that is the same)
Either way I can't see that error.

(I need to go to the eye specialist.)

Ok. I was in the wrong window when I opened it.

Looking now.

But!

Why did it used to work and now suddenly it doesn't?

But look at the array, what do you see ?

Telstra Air,Fon Wifi,Telstra Air,Fon Wifi - duplicates

change
row in msg.payload
to
row in msg.payload track by $index

1 Like