I just took a quick look, and I think the problem is that the relays being added with NONE capabilites. This means they can't do anything (neither read nor write).
Unless you want to use specific capabilities, you can omit that argument in addRelay, so they will be added with the default capabilities (READ + WRITE).