Smart relay behind the key