I can also try a PR
Pd objects are (unfortunately) not notified on connection changes and I can't think of a sane way to work around this. The real solution would be to add an API for object state change notifications. In the meantime, I would say: forget about it.