More overhauling

Added initial support for dimming. Now using 'tdtool --list-devices' and 'tdtool --list-sensors' instead.