Sets up the HTTP API and debug interface.
ifconfigisNoneorDOMAINnotinconfig:
config= {DOMAIN: {}}
api_password = config[DOMAIN].get(CONF_API_PASSWORD)
no_password_set = api_password is Noneif no_password_set:
api_password = util.get_random_string()// If no server host is given, accept all incoming requests
server_host = config[DOMAIN].get(CONF_SERVER_HOST, "0.0.0.0")