From 729bba418d63aa8b04a057d70b121e4486d1fa13 Mon Sep 17 00:00:00 2001 From: Andrew <86694484+andrewpono@users.noreply.github.com> Date: Sun, 22 Jan 2023 23:54:20 -0800 Subject: [PATCH] Delete playerstatusled directory --- playerstatusled/.gitignore | 5 - playerstatusled/UIConfig.json | 52 ---- playerstatusled/config.json | 15 - playerstatusled/i18n/strings_en.json | 19 -- playerstatusled/i18n/strings_fr.json | 19 -- playerstatusled/index.js | 245 ----------------- playerstatusled/install.sh | 11 - playerstatusled/package-lock.json | 395 --------------------------- playerstatusled/package.json | 36 --- playerstatusled/readme.md | 12 - playerstatusled/requiredConf.json | 2 - playerstatusled/uninstall.sh | 7 - 12 files changed, 818 deletions(-) delete mode 100644 playerstatusled/.gitignore delete mode 100644 playerstatusled/UIConfig.json delete mode 100644 playerstatusled/config.json delete mode 100644 playerstatusled/i18n/strings_en.json delete mode 100644 playerstatusled/i18n/strings_fr.json delete mode 100644 playerstatusled/index.js delete mode 100644 playerstatusled/install.sh delete mode 100644 playerstatusled/package-lock.json delete mode 100644 playerstatusled/package.json delete mode 100644 playerstatusled/readme.md delete mode 100644 playerstatusled/requiredConf.json delete mode 100644 playerstatusled/uninstall.sh diff --git a/playerstatusled/.gitignore b/playerstatusled/.gitignore deleted file mode 100644 index 8896b342d..000000000 --- a/playerstatusled/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -.gitignore -node_modules -*.zip -package-lock.json -readme.md diff --git a/playerstatusled/UIConfig.json b/playerstatusled/UIConfig.json deleted file mode 100644 index 7ab220304..000000000 --- a/playerstatusled/UIConfig.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "page": { - "label": "TRANSLATE.PLUGIN_CONFIGURATION" - }, - "sections": [ - { - "id": "section_settings", - "element": "section", - "label": "TRANSLATE.PLUGIN_SECTION_TITLE", - "icon": "fa-plug", - "onSave": { - "type": "controller", - "endpoint": "system_hardware/playerstatusled", - "method": "saveSettings" - }, - "saveButton": { - "label": "TRANSLATE.SAVE", - "data": [ - "gpionum", - "activestate", - "interval" - ] - }, - "content": [ - { - "id": "gpionum", - "element": "input", - "type": "number", - "doc": "TRANSLATE.GPIONUM_DOC", - "label": "TRANSLATE.GPIONUM_LBL", - "value": 22 - }, - { - "id": "activestate", - "element": "input", - "type": "number", - "doc": "TRANSLATE.ACTIVESTATE_DOC", - "label": "TRANSLATE.ACTIVESTATE_LBL", - "value": 0 - }, - { - "id": "interval", - "element": "input", - "type": "number", - "doc": "TRANSLATE.INTERVAL_DOC", - "label": "TRANSLATE.INTERVAL_LBL", - "value": 500 - } - ] - } - ] -} \ No newline at end of file diff --git a/playerstatusled/config.json b/playerstatusled/config.json deleted file mode 100644 index 558adff52..000000000 --- a/playerstatusled/config.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "gpionum":{ - "type": "number", - "value": 22 - }, - "activestate":{ - "type": "number", - "value": 0 - }, - "interval":{ - "type": "number", - "value": 500 - } -} - diff --git a/playerstatusled/i18n/strings_en.json b/playerstatusled/i18n/strings_en.json deleted file mode 100644 index 15cd0b56a..000000000 --- a/playerstatusled/i18n/strings_en.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "PLUGIN_CONFIGURATION": "Player Status LED configuration", - "PLUGIN_SECTION_TITLE": "Player Status LED settings", - "SAVE": "Save", - "SUCCESS_TITLE": "Saved settings", - "SUCCESS_MESSAGE": "Successfully saved settings", - - "GPIONUM_DOC": "Enter GPIO number LED is wired to", - "GPIONUM_LBL": "GPIO Number", - "ACTIVESTATE_DOC": "Enter GPIO active state. 0 = LED wired to power and GPIO", - "ACTIVESTATE_LBL": "GPIO active state", - "INTERVAL_DOC": "Enter the number of miliseconds between led state changes", - "INTERVAL_LBL": "Blink interval", - - "ERROR_OUT_OF_RANGE_TITLE": " value out of range", - "ERROR_OUT_OF_RANGE_MESSAGE": "Enter a number between ", - - "ERROR_NOT_FOUND_TITLE": " not found" -} diff --git a/playerstatusled/i18n/strings_fr.json b/playerstatusled/i18n/strings_fr.json deleted file mode 100644 index 8312b0c41..000000000 --- a/playerstatusled/i18n/strings_fr.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "PLUGIN_CONFIGURATION": "configuration de Player Status LED", - "PLUGIN_SECTION_TITLE": "Paramètres de Player Status LED", - "SAVE": "Enregistrer", - "SUCCESS_TITLE": "Paramètres enregistrés", - "SUCCESS_MESSAGE": "Enregistrement réussi", - - "GPIONUM_DOC": "Saisir le numréro de GPIO sur lequel la LED est branchée", - "GPIONUM_LBL": "Numéro GPIO", - "ACTIVESTATE_DOC": "Entrez l'état actif GPIO. 0 = LED câblée pour alimenter et GPIO", - "ACTIVESTATE_LBL": "État actif GPIO", - "INTERVAL_DOC": "Saisir le nombre de milisecondes entre les changements d'états de la LED", - "INTERVAL_LBL": "Interval de clignotement", - - "ERROR_OUT_OF_RANGE_TITLE": " valeur hors plage", - "ERROR_OUT_OF_RANGE_MESSAGE": "Entrez un nombre entre ", - - "ERROR_NOT_FOUND_TITLE": " pas trouvé" -} diff --git a/playerstatusled/index.js b/playerstatusled/index.js deleted file mode 100644 index c819e5c2a..000000000 --- a/playerstatusled/index.js +++ /dev/null @@ -1,245 +0,0 @@ -'use strict'; - -var libQ = require('kew'); -var fs = require('fs-extra'); -var gpio = require('onoff').Gpio; -var io = require('socket.io-client'); - -var socket; // local volumio web socket -var led; // led that indicates status - -const pluginName = 'PlayerStatusLed'; // this plugin name string used in messages. - -module.exports = StatusLedController; - -function StatusLedController(context) { - var self = this; - - self.context = context; - self.commandRouter = self.context.coreCommand; - self.logger = self.context.logger; - self.configManager = self.context.configManager; -} - -StatusLedController.prototype.onVolumioStart = function () { - var self = this; - - var configFile = self.commandRouter.pluginManager.getConfigurationFile(self.context, 'config.json'); - self.config = new (require('v-conf'))(); // this needs to be here to load config, not in global var declarations. - self.config.loadFile(configFile); - self.log('Initialized'); - - return libQ.resolve(); -}; - -StatusLedController.prototype.onStart = function () { - var self = this; - var defer = libQ.defer(); - - self.load18nStrings(); - socket = io.connect('http://localhost:3000'); - socket.on('connect_error', (err) => { - self.log('websocket connection error: ' + err); - defer.reject(); - }); - - socket.on('connect', () => { - self.log('connected to websocket'); - socket.on('error', (err) => {self.log('websocket error: ' + err)}); // handle possible socket errors - socket.on('pushState', self.statusChanged.bind(self)); // listen to status reports from Volumio websocket - self.initLed(); - socket.emit('getState', ''); // make socket push status update on startup to reflect current state - defer.resolve(); - }); - - return defer.promise; -}; - -StatusLedController.prototype.onStop = function () { - var self = this; - - if(led?.timerId) { - clearInterval(led.timerId); - } - - socket.removeAllListeners(); - socket.disconnect(); - - self.releaseLed(); - - return libQ.resolve(); -}; - -// Player status has changed (might not always be play or pause action) -StatusLedController.prototype.statusChanged = function (state) { - var self = this; - - //self.log(`player state update: ${led.playerState} -> ${state.status}`); // DEBUGGING only - - // status updates come async by other plugin requests, avoid processing when no change happened - if (led.playerState == state.status) { - return; - } - - self.log(`player state update: ${led.playerState} -> ${state.status}`); - - switch (state.status) { - case 'play': - self.log('turning LED on'); - if(led.timerId) { - clearInterval(led.timerId); // stop blinking before turning LED on - } - led.write(1) - .catch(err => self.log(err)); - break; - case 'pause': // BUG: volumio allows pause command on web streams. Resuming with play does not produce status update. Exit-stop. - self.log('starting to blink LED'); - led.timerId = setInterval( function() { - led.read() - .then(value => led.write(value ^ 1)) - .catch(err => { - self.log(err); - clearInterval(led.timerId); // plugin may be disabled or GPIO unexported during blinking. - }) - }, led.delay); - break; - default: - self.log('turning LED off'); - if(led.timerId) { - clearInterval(led.timerId); - } - led.write(0) - .catch(err => self.log(err)); - } - - led.playerState = state.status; // store new state -}; - -// initialize LED gpio to the one stored in the config -StatusLedController.prototype.initLed = function() { - var self = this; - - self.log('initializing GPIO'); - led = new gpio(self.config.get('gpionum'), 'out'); - led.timerId; // store blinker timer reference here - led.playerState; // player state before state change. - led.delay = self.config.get('interval'); // blink interval - led.setActiveLow(self.config.get('activestate')); -}; - -// initialize LED gpio to the one stored in the config -StatusLedController.prototype.releaseLed = function() { - var self = this; - - self.log('releasing GPIO'); - try { - led.unexport(); // something else may have unexported this GPIO, fatal error. Unexport is synchronous. - } catch(err) { - self.log('releasing GPIO: ' + err); - } -}; - -// Output to log -StatusLedController.prototype.log = function(s) { - var self = this; - self.logger.info(`[${pluginName}] ${s}`); -} - -// Settings Methods ----------------------------------------------------------------------------- - -StatusLedController.prototype.saveSettings = function (data) { - var self = this; - var defer = libQ.defer(); - - try { - if (isNaN(data['gpionum']) || data['gpionum'] < 0 || data['gpionum'] > 200) { - throw new Error (self.getI18nString('GPIONUM_LBL') + self.getI18nString('ERROR_OUT_OF_RANGE_TITLE') + '. ' + self.getI18nString('ERROR_OUT_OF_RANGE_MESSAGE') + '0 - 200' ); - } - - if (isNaN(data['activestate']) || data['activestate'] < 0 || data['activestate'] > 1) { - throw new Error (self.getI18nString('ACTIVESTATE_LBL') + self.getI18nString('ERROR_OUT_OF_RANGE_TITLE') + '. ' + self.getI18nString('ERROR_OUT_OF_RANGE_MESSAGE') + '0 - 1' ); - } - - if (isNaN(data['interval']) || data['interval'] < 100 || data['interval'] > 10000) { - throw new Error (self.getI18nString('INTERVAL_LBL') + self.getI18nString('ERROR_OUT_OF_RANGE_TITLE') + '. ' + self.getI18nString('ERROR_OUT_OF_RANGE_MESSAGE') + '100 - 10000' ); - } - - self.config.set('gpionum', data['gpionum']); - self.config.set('activestate', data['activestate']); - self.config.set('interval', data['interval']); // numeric params do not need ['value'] - - self.releaseLed(); // unexport GPIO before constructing new GPIO object. This wll not throw if not exported. - self.initLed(); - - self.commandRouter.pushToastMessage('success', self.getI18nString('SUCCESS_TITLE'), self.getI18nString('SUCCESS_MESSAGE')); - - } catch(err) { // some errors require toString() to be properly displayed by the toast msg. - self.commandRouter.pushToastMessage('error', self.getI18nString('ERROR_MESSAGE'), err.toString()); - } - - defer.resolve(); - - return defer.promise; -}; - -StatusLedController.prototype.load18nStrings = function () { - var self = this; - - try { - var language_code = this.commandRouter.sharedVars.get('language_code'); - self.i18nStrings = fs.readJsonSync(__dirname + '/i18n/strings_' + language_code + '.json'); - } catch (e) { - self.i18nStrings = fs.readJsonSync(__dirname + '/i18n/strings_en.json'); - } - - self.i18nStringsDefaults = fs.readJsonSync(__dirname + '/i18n/strings_en.json'); -}; - -StatusLedController.prototype.getI18nString = function (key) { - var self = this; - - if (self.i18nStrings[key] !== undefined) - return self.i18nStrings[key]; - else - return self.i18nStringsDefaults[key]; -}; - -// Configuration Methods ----------------------------------------------------------------------------- -StatusLedController.prototype.getUIConfig = function () { - var self = this; - var defer = libQ.defer(); - - const lang_code = this.commandRouter.sharedVars.get('language_code'); - - self.commandRouter.i18nJson(__dirname+'/i18n/strings_'+lang_code+'.json', - __dirname+'/i18n/strings_en.json', - __dirname + '/UIConfig.json') - .then(function(uiconf) - { - uiconf.sections[0].content[0].value = self.config.get('gpionum', 22); - uiconf.sections[0].content[1].value = self.config.get('activestate', 0); - uiconf.sections[0].content[2].value = self.config.get('interval', 500); - defer.resolve(uiconf); - }) - .fail(function(err) - { - self.logger.error(`Failed to parse UI Configuration page for plugin ${pluginName}: ${err}`); - defer.reject(err); - }); - - return defer.promise; -}; - -StatusLedController.prototype.getConfigurationFiles = function () { - return ['config.json']; -}; - -StatusLedController.prototype.updateUIConfig = function () { - var self = this; - - self.commandRouter.getUIConfigOnPlugin('system_hardware', 'playerstatusled', {}) - .then(function (uiconf) { - self.commandRouter.broadcastMessage('pushUiConfig', uiconf); - }); - self.commandRouter.broadcastMessage('pushUiConfig'); -}; \ No newline at end of file diff --git a/playerstatusled/install.sh b/playerstatusled/install.sh deleted file mode 100644 index 52317caee..000000000 --- a/playerstatusled/install.sh +++ /dev/null @@ -1,11 +0,0 @@ -echo "Installing playerstatusled Dependencies" -sudo apt-get update -# Install the required packages via apt-get. build-essential is required for epoll onoff depends on. -sudo apt-get -y install build-essential --no-install-recommends - -# If you need to differentiate install for armhf and i386 you can get the variable like this -#DPKG_ARCH=`dpkg --print-architecture` -# Then use it to differentiate your install - -#requred to end the plugin install -echo "plugininstallend" \ No newline at end of file diff --git a/playerstatusled/package-lock.json b/playerstatusled/package-lock.json deleted file mode 100644 index e8567038e..000000000 --- a/playerstatusled/package-lock.json +++ /dev/null @@ -1,395 +0,0 @@ -{ - "name": "playerstatusled", - "version": "1.0.1", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "after": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", - "integrity": "sha512-QbJ0NTQ/I9DI3uSJA4cbexiwQeRAfjPScqIbSjUDd9TOrcg6pTkdgziesOqxBMBzit8vFCTwrP27t13vFOORRA==" - }, - "arraybuffer.slice": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz", - "integrity": "sha512-6ZjfQaBSy6CuIH0+B0NrxMfDE5VIOCP/5gOqSpEIsaAZx9/giszzrXg6PZ7G51U/n88UmlAgYLNQ9wAnII7PJA==" - }, - "backo2": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", - "integrity": "sha512-zj6Z6M7Eq+PBZ7PQxl5NT665MvJdAkzp0f60nAJ+sLaSCBPMwVak5ZegFbgVCzFcCJTKFoMizvM5Ld7+JrRJHA==" - }, - "base64-arraybuffer": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", - "integrity": "sha512-437oANT9tP582zZMwSvZGy2nmSeAb8DW2me3y+Uv1Wp2Rulr8Mqlyrv3E7MLxmsiaPSMMDmiDVzgE+e8zlMx9g==" - }, - "better-assert": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", - "integrity": "sha512-bYeph2DFlpK1XmGs6fvlLRUN29QISM3GBuUwSFsMY2XRx4AvC0WNCS57j4c/xGrK2RS24C1w3YoBOsw9fT46tQ==", - "requires": { - "callsite": "1.0.0" - } - }, - "bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "requires": { - "file-uri-to-path": "1.0.0" - } - }, - "blob": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.4.tgz", - "integrity": "sha512-YRc9zvVz4wNaxcXmiSgb9LAg7YYwqQ2xd0Sj6osfA7k/PKmIGVlnOYs3wOFdkRC9/JpQu8sGt/zHgJV7xzerfg==" - }, - "callsite": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", - "integrity": "sha512-0vdNRFXn5q+dtOqjfFtmtlI9N2eVZ7LMyEV2iKC5mEEFvSg/69Ml6b/WU2qF8W1nLRa0wiSrDT3Y5jOHZCwKPQ==" - }, - "component-bind": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", - "integrity": "sha512-WZveuKPeKAG9qY+FkYDeADzdHyTYdIboXS59ixDeRJL5ZhxpqUnxSOwop4FQjMsiYm3/Or8cegVbpAHNA7pHxw==" - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha512-jPatnhd33viNplKjqXKRkGU345p263OIWzDL2wH3LGIGp5Kojo+uXizHmOADRvhGFFTnJqX3jBAKP6vvmSDKcA==" - }, - "component-inherit": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", - "integrity": "sha512-w+LhYREhatpVqTESyGFg3NlP6Iu0kEKUHETY9GoZP/pQyW4mHFZuFWRUCIqVPZ36ueVLtoOEZaAqbCF2RDndaA==" - }, - "debug": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.3.3.tgz", - "integrity": "sha512-dCHp4G+F11zb+RtEu7BE2U8R32AYmM/4bljQfut8LipH3PdwsVBVGh083MXvtKkB7HSQUzSwiXz53c4mzJvYfw==", - "requires": { - "ms": "0.7.2" - } - }, - "engine.io-client": { - "version": "1.8.6", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-1.8.6.tgz", - "integrity": "sha512-6+rInQu8xU7c0fIF6RC4SRKuHVWPt8Xq0bZYS4lMrTwmhRineOlEMsU3X0zS5mHIvCgJsmpOKEX7DhihGk7j0g==", - "requires": { - "component-emitter": "1.2.1", - "component-inherit": "0.0.3", - "debug": "2.3.3", - "engine.io-parser": "1.3.2", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "parsejson": "0.0.3", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "ws": "~1.1.5", - "xmlhttprequest-ssl": "1.6.3", - "yeast": "0.1.2" - } - }, - "engine.io-parser": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-1.3.2.tgz", - "integrity": "sha512-3UyTJo+5Jbmr7rd3MosTAApK7BOIo4sjx8dJYSHa3Em5R3A9Y2s9GWu4JFJe6Px0VieJC0hKUA5NBytC+O7k2A==", - "requires": { - "after": "0.8.2", - "arraybuffer.slice": "0.0.6", - "base64-arraybuffer": "0.1.5", - "blob": "0.0.4", - "has-binary": "0.1.7", - "wtf-8": "1.0.0" - } - }, - "epoll": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/epoll/-/epoll-4.0.1.tgz", - "integrity": "sha512-BgCq0nEsk+XI7y9qjrRtt9uXsyFEdvevvq42xl6t/hKZjxLSDZreD9rTZ0pU40V//c3Zzk2PZGuIsn8YJHSJ4g==", - "requires": { - "bindings": "^1.5.0", - "nan": "^2.14.2" - } - }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" - }, - "fs-extra": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.0.tgz", - "integrity": "sha512-0rcTq621PD5jM/e0a3EJoGC/1TC5ZBCERW82LQuwfGnCa1V8w7dpYH1yNu+SLb6E5dkeCBzKEyLGlFrnr+dUyw==", - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "dependencies": { - "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" - } - } - }, - "graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" - }, - "has-binary": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/has-binary/-/has-binary-0.1.7.tgz", - "integrity": "sha512-k1Umb4/jrBWZbtL+QKSji8qWeoZ7ZTkXdnDXt1wxwBKAFM0//u96wDj43mBIqCIas8rDQMYyrBEvcS8hdGd4Sg==", - "requires": { - "isarray": "0.0.1" - } - }, - "has-cors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", - "integrity": "sha512-g5VNKdkFuUuVCP9gYfDJHjK2nqdQJ7aDLTnycnc2+RvsOQbuLdF5pm7vuE5J76SEBIQjs4kQY/BWq74JUmjbXA==" - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==" - }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg==" - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" - }, - "json3": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", - "integrity": "sha512-I5YLeauH3rIaE99EE++UeH2M2gSYo8/2TqDac7oZEH6D/DSQ4Woa628Qrfj1X9/OY5Mk5VvIDQaKCDchXaKrmA==" - }, - "jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "requires": { - "graceful-fs": "^4.1.6", - "universalify": "^2.0.0" - }, - "dependencies": { - "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" - } - } - }, - "kew": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz", - "integrity": "sha512-IG6nm0+QtAMdXt9KvbgbGdvY50RSrw+U4sGZg+KlrSKPJEwVE5JVoI3d7RWfSMdBQneRheeAOj3lIjX5VL/9RQ==" - }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==" - }, - "ms": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", - "integrity": "sha512-5NnE67nQSQDJHVahPJna1PQ/zCXMnQop3yUCxjKPNzCxuyPSKWTQ/5Gu5CZmjetwGLWRA+PzeF5thlbOdbQldA==" - }, - "multimap": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/multimap/-/multimap-1.0.1.tgz", - "integrity": "sha512-3BA0yy/HC53U1emi32s5Kk78bwDG70Hdx4TkPFSCFTNXqsDR10VoX3zJb2Kn+L6U4X929q8WChzEy2HeI7l1Bg==" - }, - "nan": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", - "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==" - }, - "object-component": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", - "integrity": "sha512-S0sN3agnVh2SZNEIGc0N1X4Z5K0JeFbGBrnuZpsxuUh5XLF0BnvWkMjRXo/zGKLd/eghvNIKcx1pQkmUjXIyrA==" - }, - "onoff": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/onoff/-/onoff-6.0.3.tgz", - "integrity": "sha512-xtVlwRDzswYM69bzzIui/qzu7QHsFnjsQiCV1iYVA/HXt5xdc9utc97SYAlXzK8wAhIN7+H7MaVqh2vpfdKk9A==", - "requires": { - "epoll": "^4.0.1", - "lodash.debounce": "^4.0.8" - } - }, - "options": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", - "integrity": "sha512-bOj3L1ypm++N+n7CEbbe473A414AB7z+amKYshRb//iuL3MpdDCLhPnw6aVTdKB9g5ZRVHIEp8eUln6L2NUStg==" - }, - "parsejson": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/parsejson/-/parsejson-0.0.3.tgz", - "integrity": "sha512-v38ZjVbinlZ2r1Rz06WUZEnGoSRcEGX+roMsiWjHeAe23s2qlQUyfmsPQZvh7d8l0E8AZzTIO/RkUr00LfkSiA==", - "requires": { - "better-assert": "~1.0.0" - } - }, - "parseqs": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", - "integrity": "sha512-B3Nrjw2aL7aI4TDujOzfA4NsEc4u1lVcIRE0xesutH8kjeWF70uk+W5cBlIQx04zUH9NTBvuN36Y9xLRPK6Jjw==", - "requires": { - "better-assert": "~1.0.0" - } - }, - "parseuri": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz", - "integrity": "sha512-ijhdxJu6l5Ru12jF0JvzXVPvsC+VibqeaExlNoMhWN6VQ79PGjkmc7oA4W1lp00sFkNyj0fx6ivPLdV51/UMog==", - "requires": { - "better-assert": "~1.0.0" - } - }, - "slide": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", - "integrity": "sha512-NwrtjCg+lZoqhFU8fOwl4ay2ei8PaqCBOUV3/ektPY9trO1yQ1oXEfmHAhKArUVUr/hOHvy5f6AdP17dCM0zMw==" - }, - "socket.io-client": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-1.7.4.tgz", - "integrity": "sha512-vW9xr9XyTJejFS//7GNZmLTLkUSAcvOSxRXXhrojV+7wboTFB8CuvK1UBCW3NiB2kqyi0h9cTeyD7dXjdUd9jQ==", - "requires": { - "backo2": "1.0.2", - "component-bind": "1.0.0", - "component-emitter": "1.2.1", - "debug": "2.3.3", - "engine.io-client": "~1.8.4", - "has-binary": "0.1.7", - "indexof": "0.0.1", - "object-component": "0.0.3", - "parseuri": "0.0.5", - "socket.io-parser": "2.3.1", - "to-array": "0.1.4" - } - }, - "socket.io-parser": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.3.1.tgz", - "integrity": "sha512-j6l4g/+yWQjmy1yByzg1DPFL4vxQw+NwCJatIxni/AE1wfm17FBtIKSWU4Ay+onrJwDxmC4eK4QS/04ZsqYwZQ==", - "requires": { - "component-emitter": "1.1.2", - "debug": "2.2.0", - "isarray": "0.0.1", - "json3": "3.3.2" - }, - "dependencies": { - "component-emitter": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz", - "integrity": "sha512-YhIbp3PJiznERfjlIkK0ue4obZxt2S60+0W8z24ZymOHT8sHloOqWOqZRU2eN5OlY8U08VFsP02letcu26FilA==" - }, - "debug": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", - "integrity": "sha512-X0rGvJcskG1c3TgSCPqHJ0XJgwlcvOC7elJ5Y0hYuKBZoVqWpAMfLOeIh2UI/DCQ5ruodIjvsugZtjUYUw2pUw==", - "requires": { - "ms": "0.7.1" - } - }, - "ms": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", - "integrity": "sha512-lRLiIR9fSNpnP6TC4v8+4OU7oStC01esuNowdQ34L+Gk8e5Puoc88IqJ+XAY/B3Mn2ZKis8l8HX90oU8ivzUHg==" - } - } - }, - "to-array": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", - "integrity": "sha512-LhVdShQD/4Mk4zXNroIQZJC+Ap3zgLcDuwEdcmLv9CCO73NWockQDwyUnW/m8VX/EElfL6FcYx7EeutN4HJA6A==" - }, - "ultron": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz", - "integrity": "sha512-QMpnpVtYaWEeY+MwKDN/UdKlE/LsFZXM5lO1u7GaZzNgmIbGixHEmVMIKT+vqYOALu3m5GYQy9kz4Xu4IVn7Ow==" - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" - }, - "v-conf": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/v-conf/-/v-conf-1.4.3.tgz", - "integrity": "sha512-jhnAhXDbzorq3pkoqrOzbiLP0yO4rxlfmWUvUuffDM6Dz6YZRN/LfzS1WmvJOFeq8CWapLRyO2std/U2VsOpBg==", - "requires": { - "fs-extra": "^3.0.1", - "multimap": "1.0.1", - "write-file-atomic": "1.3.1" - }, - "dependencies": { - "fs-extra": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-3.0.1.tgz", - "integrity": "sha512-V3Z3WZWVUYd8hoCL5xfXJCaHWYzmtwW5XWYSlLgERi8PWd8bx1kUHUk8L1BT57e49oKnDDD180mjfrHc1yA9rg==", - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^3.0.0", - "universalify": "^0.1.0" - } - }, - "jsonfile": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.1.tgz", - "integrity": "sha512-oBko6ZHlubVB5mRFkur5vgYR1UyqX+S6Y/oCfLhqNdcc2fYFlDpIoNc7AfKS1KOGcnNAkvsr0grLck9ANM815w==", - "requires": { - "graceful-fs": "^4.1.6" - } - } - } - }, - "write-file-atomic": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.1.tgz", - "integrity": "sha512-RCTmbZJFENrUmJVmdaf3SiIDlP1YQGFub6P/WbrTxKHKLWmhnSgaM/cYsjxDwnzD0gVE2tlTUpX6Zr/9V4+DQg==", - "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" - } - }, - "ws": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ws/-/ws-1.1.5.tgz", - "integrity": "sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w==", - "requires": { - "options": ">=0.0.5", - "ultron": "1.0.x" - } - }, - "wtf-8": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wtf-8/-/wtf-8-1.0.0.tgz", - "integrity": "sha512-qfR6ovmRRMxNHgUNYI9LRdVofApe/eYrv4ggNOvvCP+pPdEo9Ym93QN4jUceGD6PignBbp2zAzgoE7GibAdq2A==" - }, - "xmlhttprequest-ssl": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.6.3.tgz", - "integrity": "sha512-3XfeQE/wNkvrIktn2Kf0869fC0BN6UpydVasGIeSm2B1Llihf7/0UfZM+eCkOw3P7bP4+qPgqhm7ZoxuJtFU0Q==" - }, - "yeast": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", - "integrity": "sha512-8HFIh676uyGYP6wP13R/j6OJ/1HwJ46snpvzE7aHAN3Ryqh2yX6Xox2B4CUmTwwOIzlG3Bs7ocsP5dZH/R1Qbg==" - } - } -} diff --git a/playerstatusled/package.json b/playerstatusled/package.json deleted file mode 100644 index 2043ba733..000000000 --- a/playerstatusled/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "playerstatusled", - "version": "1.0.1", - "description": "Indicate player status via gpio LED: On while playing, Blink on pause, Off on stop", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "AP", - "license": "ISC", - "repository": "https://github.com/andrewpono", - "volumio_info": { - "prettyName": "Player Status LED", - "icon": "fa-microchip", - "plugin_type": "system_hardware", - "architectures": [ - "armhf" - ], - "os": [ - "buster" - ], - "details": "Indicate player status via gpio LED for Volumio 3 by AP.", - "changelog": "1.0.0 - initial release for Volumio 3" - }, - "engines": { - "node": ">=14.0.0", - "volumio": ">=3" - }, - "dependencies": { - "fs-extra": "^0.28.0", - "kew": "^0.7.0", - "onoff": "^6.0.3", - "socket.io-client": "^1.4.5", - "v-conf": "^1.4.0" - } -} diff --git a/playerstatusled/readme.md b/playerstatusled/readme.md deleted file mode 100644 index 9bbe377bb..000000000 --- a/playerstatusled/readme.md +++ /dev/null @@ -1,12 +0,0 @@ -# Player State LED Indicator - -- This plugin can indicate Volumio player state with an LED connected to an available GPIO pin. -- Player states: - - Stop: LED off. - - Play: LED on. - - Pause: blink LED. -- Pause is supported by the API and remote controls. -- Blink rate is adjustable. -- Tested on Raspberry Pi 4 B. -- Intended for Volumio players with no display. -- This plugin is based on (and inspired by) [supercrab's](https://community.volumio.org/u/supercrab) [gpio_control](https://github.com/volumio/volumio-plugins-sources/tree/master/gpio_control) plugin. diff --git a/playerstatusled/requiredConf.json b/playerstatusled/requiredConf.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/playerstatusled/requiredConf.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/playerstatusled/uninstall.sh b/playerstatusled/uninstall.sh deleted file mode 100644 index 764a6de3e..000000000 --- a/playerstatusled/uninstall.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# Uninstall dependendencies -# apt-get remove -y - -echo "Done" -echo "pluginuninstallend" \ No newline at end of file