diff --git a/assets/webconfig/js/content_leds.js b/assets/webconfig/js/content_leds.js index 2a95af81..1aec94ab 100755 --- a/assets/webconfig/js/content_leds.js +++ b/assets/webconfig/js/content_leds.js @@ -2069,7 +2069,7 @@ var updateOutputSelectList = function (ledType, discoveryInfo) { case "devRPiPWM": key = ledType; - if (discoveryInfo.devices.length == 0) { + if (!discoveryInfo.isUserAdmin) { enumVals.push("NONE"); enumTitleVals.push($.i18n('edt_dev_spec_devices_discovered_none')); $('#btn_submit_controller').prop('disabled', true); diff --git a/libsrc/leddevice/dev_rpi_pwm/LedDeviceWS281x.cpp b/libsrc/leddevice/dev_rpi_pwm/LedDeviceWS281x.cpp index 2b67173c..af72304a 100644 --- a/libsrc/leddevice/dev_rpi_pwm/LedDeviceWS281x.cpp +++ b/libsrc/leddevice/dev_rpi_pwm/LedDeviceWS281x.cpp @@ -159,12 +159,10 @@ QJsonObject LedDeviceWS281x::discover(const QJsonObject& /*params*/) QJsonArray deviceList; - if (SysInfo::isUserAdmin()) - { - //Indicate the general availability of the device, if hyperion is run under root - deviceList << QJsonObject ({{"found",true}}); - devicesDiscovered.insert("devices", deviceList); - } + //Indicate the general availability of the device, if hyperion is run under root + devicesDiscovered.insert("isUserAdmin", SysInfo::isUserAdmin()); + + devicesDiscovered.insert("devices", deviceList); DebugIf(verbose,_log, "devicesDiscovered: [%s]", QString(QJsonDocument(devicesDiscovered).toJson(QJsonDocument::Compact)).toUtf8().constData());