Uniq needs sorted lines, so sort them first.
Add 3 more commas to skip field2 definition before defining result type. Print empty field1 definition if len[i]<=0.
For some reason, I don't have GNU awk installed - so I removed the usage of array length and strtonum(). Further I'd prefer ebusctl which seems to come with every ebusd installation to avoid the dependency for 'nc'.