Use cec-utils to autodetect TV and other devices reachable via HDMI-CEC
echo scan | cec-client -s -d 1
shows a list of all devices reachable via HDMI-CEC - Like StorageRadar I suggest that we have a cec-radar which scans using the above command and automatically (with confirmation) add the devices found.