rewritten example with read and write tool. Added list of known domains and a way to check for known domains to CMDevice