Plasma scripting examples do not take into account applets in tray
Thus, Iterate all widgets and print their config values sample iterates over applets in desktops and panels, but not in tray. This is not expected behavior I guess, and it's not obvious how to achieve that.
I need that functionality for my applet so adapting the script, will provide when it's ready.
Edited by Andrey Butirsky