Controller/gateway