Code Monkey home page Code Monkey logo

gpio-buttons's People

Contributors

macmpi avatar slidor avatar thomaspasser avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gpio-buttons's Issues

Can't install

I wasn't able to install it from Plugin menu :

Downloading plugin at http://tomatpasser.dk/gpio-buttons.zip END DOWNLOAD: http://tomatpasser.dk/gpio-buttons.zip Creating folder on disk Unpacking plugin Checking for duplicate plugin Copying Plugin into location The folowing error occurred when installing the plugin: Error: Error: EACCES: permission denied, link '/data/plugins//gpio-buttons' -> '/data/plugins//miscellanea/gpio-buttons'

I tried to restart RPI before install, then stopped and launch volumio with sudo, same issue.
RPI2 + HifiBerry DAC+
System Version: 0.979 Released: Sat Aug 20 18:39:20 CEST 2016

Extending GPIO actions

Looking at interesting @tim-felix-lange work in GPIO amp on/off plugin, I was wondering how much it would make sense to add this as a new action within gpio-buttons.
Keeping most GPIO features together in one plugin may have some interest to avoid conflicts should user run multiple GPIO-related plugins in parallel...

Maybe this could offer an interesting case to see how gpio-button could evolve to give more flexibility for creating other actions (settings, actions definitions, etc).

Any interest from authors?

up-to-date plugin info

Would be nice if gpio-plugin info is kept up-to-date in master Volumio plugin view (versioning, description, etc).
You may want to routinely push PRs there to keep it current.

Fatal error

Hi, I installed the plugin and overnight Volumio crashed with this error:

/data/plugins/miscellanea/gpio-buttons/node_modules/brace-expansion/index.js:1
Aug 21 10:30:37 volumio volumio[5217]: (function (exports, require, module, __filename, __dirname) { &Ar
Aug 21 10:30:37 volumio volumio[5217]: ^
Aug 21 10:30:37 volumio volumio[5217]: SyntaxError: Unexpected token &
Aug 21 10:30:37 volumio volumio[5217]: at Object.exports.runInThisContext (vm.js:76:16)
Aug 21 10:30:37 volumio volumio[5217]: at Module._compile (module.js:513:28)
Aug 21 10:30:37 volumio volumio[5217]: at Object.Module._extensions..js (module.js:550:10)
Aug 21 10:30:37 volumio volumio[5217]: at Module.load (module.js:458:32)
Aug 21 10:30:37 volumio volumio[5217]: at tryModuleLoad (module.js:417:12)
Aug 21 10:30:37 volumio volumio[5217]: at Function.Module._load (module.js:409:3)
Aug 21 10:30:37 volumio volumio[5217]: at Module.require (module.js:468:17)
Aug 21 10:30:37 volumio volumio[5217]: at require (internal/module.js:20:19)
Aug 21 10:30:37 volumio volumio[5217]: at Object. (/data/plugins/miscellanea/gpio-buttons/node_modules/minimatch/minimatch.js:10:14)
Aug 21 10:30:37 volumio volumio[5217]: at Module._compile (module.js:541:32)

I have absolutely no idea on thiis...

GPIOs 2&3 conflict with i2s_dacs detection (ControllerI2s)

If one registers actions with GPIO 2 or 3, journalctl will show many errors like:
i2c i2c-1: transfer timed out after restart.
Indeed i2c-1 is on pins 3&5 (GPIOs 2&3) and is used by i2cDetect in here by ControllerI2s.prototype.onVolumioStart to detect i2s dacs when Volumio2 starts.

The issue is that gpio-buttons sets its triggers in GPIOButtons.prototype.onVolumioStart, so it may happen before ControllerI2s.prototype.onVolumioStart kicks-in since both are plugins...
If gpio-buttons is first in sequence, GPIOs 2 or 3 are blocked by gpio-buttons triggers, and i2s detection fails with i2c i2c-1: transfer timed out (many of them!).

How can we ensure applyConf (which sets GPIOButtons triggers) happens after Volumio i2s detection is finished?

Thanks.

PS: I'm not using any DAC in this case, so all pins are free to use.

Inactive plugin status and multiple button presses

Hi, I'm having a few issues with the plugin all of a sudden, I've tested out various different combinations of my hardware and software but nothing seems to rectify the problem 100%

I'm using a HifiBerry Amp+ connected to a Pi2 using the latest Volumio (2.141) and your plugin installed directly from inside Volumio.

My system had a 6 button remote wired into the gpio pins, (I can't remember exactly which gpio as I have now dismantled the original remote but I know to avoid 2,3,18,19,20,21.) I have a shared "ground" daisy chained around each of my 6 buttons which is connected to a HIGH gpio, with all the others having their own individual LOW gpio.

This config worked perfectly until about 3 days ago when it started suffering from multiple button clicks from each different function, the only way to stop it was to disable the plugin. I have been doing regular "volumio pull" via SSH so I wonder if there is now a conflict with the plugin. (I have also noted the plugin no longer states it is active) However I have managed to get stable responses from my remote after removing the HifiBerry.

I have also tried an rpi-update which results in kernel panic. Any help you could possibly give would be hugely welcome.

Possible shutdown action on I2C GPIO3 pin5?

Great stuff!
Would it be possible to set a shutdown action on GPIO3, like in here?
It would allow to have a simple on/off switch for Volumio2, as power-on is handled by default on that pin.

Thanks!

GPIO Buttons Plugin causes Volumio 2.411 to enter failed state

Hi there, not sure if you've seen my post on the Volumio help forum, but unfortunately I've run into an issue with the latest vesrion of Volumio and the GPIO plugin.

The plugin installs OK but never states it is active. There are no settings to configure in the settings menu and rebooting with the plugin installed results in...

Jun 17 14:37:15 volumio volumio[5374]: info: ----- Core plugins startup ----
Jun 17 14:37:15 volumio volumio[5374]: info: -------------------------------------------
Jun 17 14:37:15 volumio volumio[5374]: info: Loading plugins from folder /volumio/app/plugins/
Jun 17 14:37:15 volumio volumio[5374]: info: Loading plugins from folder /data/plugins/
Jun 17 14:37:15 volumio volumio[5374]: info: Loading plugin "system"...
Jun 17 14:37:15 volumio volumio[5374]: info: Loading plugin "appearance"...
Jun 17 14:37:17 volumio volumio[5374]: info: Loading plugin "network"...
Jun 17 14:37:17 volumio sudo[5395]: volumio : TTY=pts/0 ; PWD=/data/plugins/system_controller/gpio-buttons ; USER=root ; COMMAND=/bin/journalctl -f
Jun 17 14:37:17 volumio sudo[5395]: pam_unix(sudo:session): session opened for user root by volumio(uid=0)
Jun 17 14:37:17 volumio volumio[5374]: info: Loading plugin "services"...
Jun 17 14:37:17 volumio volumio[5374]: info: Loading plugin "alsa_controller"...
Jun 17 14:37:18 volumio volumio[5374]: info: Loading plugin "wizard"...
Jun 17 14:37:18 volumio volumio[5374]: info: Loading plugin "volumio_command_line_client"...
Jun 17 14:37:18 volumio volumio[5374]: info: CoreCommandRouter::executeOnPlugin: alsa_controller , getConfigParam
Jun 17 14:37:18 volumio volumio[5374]: info: CoreCommandRouter::executeOnPlugin: alsa_controller , getConfigParam
Jun 17 14:37:18 volumio volumio[5374]: info: CoreCommandRouter::executeOnPlugin: alsa_controller , getConfigParam
Jun 17 14:37:18 volumio volumio[5374]: info: CoreCommandRouter::executeOnPlugin: alsa_controller , getConfigParam
Jun 17 14:37:18 volumio volumio[5374]: info: Loading plugin "upnp"...
Jun 17 14:37:18 volumio volumio[5374]: info: [1529246238216] Starting Upmpd Daemon
Jun 17 14:37:18 volumio volumio[5374]: info: CoreCommandRouter::executeOnPlugin: system , registerCallback
Jun 17 14:37:18 volumio volumio[5374]: info: Loading plugin "my_music"...
Jun 17 14:37:18 volumio volumio[5374]: info: Loading plugin "mpd"...
Jun 17 14:37:18 volumio volumio[5374]: info: Loading plugin "upnp_browser"...
Jun 17 14:37:19 volumio volumio[5374]: info: Loading plugin "networkfs"...
Jun 17 14:37:19 volumio volumio[5374]: info: CoreCommandRouter::executeOnPlugin: system , registerCallback
Jun 17 14:37:19 volumio volumio[5374]: info: Loading plugin "alarm-clock"...
Jun 17 14:37:20 volumio volumio[5374]: info: Loading plugin "airplay_emulation"...
Jun 17 14:37:20 volumio volumio[5374]: info: [1529246240194] Starting Shairport Sync
Jun 17 14:37:20 volumio volumio[5374]: info: Loading plugin "last_100"...
Jun 17 14:37:20 volumio volumio[5374]: info: Loading plugin "webradio"...
Jun 17 14:37:20 volumio volumio[5374]: info: Loading plugin "i2s_dacs"...
Jun 17 14:37:20 volumio volumio[5374]: info: CoreCommandRouter::executeOnPlugin: system , getConfigParam
Jun 17 14:37:20 volumio volumio[5374]: info: Loading plugin "volumiodiscovery"...
Jun 17 14:37:20 volumio volumio[5374]: *** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
Jun 17 14:37:20 volumio node[5374]: *** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
Jun 17 14:37:20 volumio node[5374]: *** WARNING *** Please fix your application to use the native API of Avahi!
Jun 17 14:37:20 volumio node[5374]: *** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node
Jun 17 14:37:20 volumio node[5374]: *** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
Jun 17 14:37:20 volumio node[5374]: *** WARNING *** Please fix your application to use the native API of Avahi!
Jun 17 14:37:20 volumio node[5374]: *** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister
Jun 17 14:37:20 volumio volumio[5374]: *** WARNING *** Please fix your application to use the native API of Avahi!
Jun 17 14:37:20 volumio volumio[5374]: *** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node
Jun 17 14:37:20 volumio volumio[5374]: *** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
Jun 17 14:37:20 volumio volumio[5374]: *** WARNING *** Please fix your application to use the native API of Avahi!
Jun 17 14:37:20 volumio volumio[5374]: *** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister
Jun 17 14:37:20 volumio volumio[5374]: info: Applying required configuration parameters for plugin volumiodiscovery
Jun 17 14:37:20 volumio volumio[5374]: Discovery: StartAdv! undefined
Jun 17 14:37:20 volumio volumio[5374]: Discovery: Started advertising... Volumio - undefined
Jun 17 14:37:20 volumio volumio[5374]: info: CoreCommandRouter::executeOnPlugin: system , registerCallback
Jun 17 14:37:20 volumio volumio[5374]: info: Loading plugin "gpio-buttons"...
Jun 17 14:37:20 volumio volumio[5374]: /data/plugins/system_controller/gpio-buttons/node_modules/bindings/bindings.js:83
Jun 17 14:37:20 volumio volumio[5374]: throw e
Jun 17 14:37:20 volumio volumio[5374]: ^
Jun 17 14:37:20 volumio volumio[5374]: Error: The module '/data/plugins/system_controller/gpio-buttons/node_modules/epoll/build/Release/epoll.node'
Jun 17 14:37:20 volumio volumio[5374]: was compiled against a different Node.js version using
Jun 17 14:37:20 volumio volumio[5374]: NODE_MODULE_VERSION 48. This version of Node.js requires
Jun 17 14:37:20 volumio volumio[5374]: NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
Jun 17 14:37:20 volumio volumio[5374]: the module (for instance, using npm rebuild or npm install).
Jun 17 14:37:20 volumio volumio[5374]: at Object.Module._extensions..node (module.js:681:18)
Jun 17 14:37:20 volumio volumio[5374]: at Module.load (module.js:565:32)
Jun 17 14:37:20 volumio volumio[5374]: at tryModuleLoad (module.js:505:12)
Jun 17 14:37:20 volumio volumio[5374]: at Function.Module._load (module.js:497:3)
Jun 17 14:37:20 volumio volumio[5374]: at Module.require (module.js:596:17)
Jun 17 14:37:20 volumio volumio[5374]: at require (internal/module.js:11:18)
Jun 17 14:37:20 volumio volumio[5374]: at bindings (/data/plugins/system_controller/gpio-buttons/node_modules/bindings/bindings.js:76:44)
Jun 17 14:37:20 volumio volumio[5374]: at Object. (/data/plugins/system_controller/gpio-buttons/node_modules/epoll/epoll.js:1:99)
Jun 17 14:37:20 volumio volumio[5374]: at Module._compile (module.js:652:30)
Jun 17 14:37:20 volumio volumio[5374]: at Object.Module._extensions..js (module.js:663:10)
Jun 17 14:37:20 volumio volumio[5374]: at Module.load (module.js:565:32)
Jun 17 14:37:20 volumio volumio[5374]: at tryModuleLoad (module.js:505:12)
Jun 17 14:37:20 volumio volumio[5374]: at Function.Module._load (module.js:497:3)
Jun 17 14:37:20 volumio volumio[5374]: at Module.require (module.js:596:17)
Jun 17 14:37:20 volumio volumio[5374]: at require (internal/module.js:11:18)
Jun 17 14:37:20 volumio volumio[5374]: at Object. (/data/plugins/system_controller/gpio-buttons/node_modules/onoff/onoff.js:4:11)
Jun 17 14:37:20 volumio systemd[1]: volumio.service: main process exited, code=exited, status=1/FAILURE
Jun 17 14:37:20 volumio systemd[1]: Unit volumio.service entered failed state.
Jun 17 14:37:20 volumio systemd[1]: Starting dynamicswap service...
Jun 17 14:37:20 volumio systemd[1]: Started dynamicswap service.
Jun 17 14:37:21 volumio systemd[1]: volumio.service holdoff time over, scheduling restart.
Jun 17 14:37:21 volumio systemd[1]: Starting dynamicswap service...
Jun 17 14:37:21 volumio systemd[1]: Started dynamicswap service.
Jun 17 14:37:21 volumio systemd[1]: Stopping Volumio Backend Module...
Jun 17 14:37:21 volumio systemd[1]: Starting Volumio Backend Module...
Jun 17 14:37:21 volumio systemd[1]: Started Volumio Backend Module.
volumio@volumio:/data/plugins/system_controller/gpio-buttons$ sudo systemctl restart volumio.service
volumio@volumio:/data/plugins/system_controller/gpio-buttons$ cd..
volumio@volumio:/data/plugins/system_controller$ sudo volumio restart

Please let me know if there's anything I can do to help you solve this, many thanks, Jon.

Volumio restarts when saving configuration

Hello,

first of all thanks for this plugin, looks cool! Unfortunately I cannot save configuration using the volumio UI, it restarts upon hitting save.
Volumio version: 2.041
Logs reporting plugin version as 0.7.6

here is volumio's log file when I hit save:

2017-01-18T18:04:40.302Z - info: CoreCommandRouter::getUIConfigOnPlugin
2017-01-18T18:04:40.432Z - info: Received Get System Version
2017-01-18T18:04:40.435Z - info: CoreCommandRouter::executeOnPlugin: system , getSystemVersion
2017-01-18T18:04:58.881Z - info: [{"prettyName":"GPIO Buttons","name":"gpio-buttons","category":"miscellanea","version":"0.7.6","icon":"fa fa-cube","enabled":true,"active":true},{"prettyName":"Spotify","name":"spop","category":"music_service","version":"1.2.0","icon":"fa-spotify","enabled":true,"active":true}]
2017-01-18T18:05:00.920Z - info: CoreCommandRouter::getUIConfigOnPlugin
2017-01-18T18:05:00.924Z - info: GPIO-Buttons: Getting UI config
2017-01-18T18:05:00.949Z - info: GPIO-Buttons: Empty config, loading defaults...
2017-01-18T18:06:20.816Z - info: CALLMETHOD: miscellanea gpio-buttons saveTriggers [object Object]
2017-01-18T18:06:25.161Z - info: -------------------------------------------
2017-01-18T18:06:25.173Z - info: -----            Volumio2              ----
2017-01-18T18:06:25.175Z - info: -------------------------------------------
2017-01-18T18:06:25.175Z - info: -----          System startup          ----
2017-01-18T18:06:25.176Z - info: -------------------------------------------

[..]

Is there any way to edit a file for the configuration?
I have tried the config.json file but it does not seem to do anything, ie file is modified but nothing shows up on UI and button does not work.

Thanks for reading.

Vincent

Inconsistentent config read & write

It seems template config.json file (first below) is read fine at first init, and properly populates UIconfig default values.

{
  "playpause":{
    "enabled": {"value": false, "type": "boolean"},
    "pin": {"value": 17,"type":"number"},
    "value": {"value": 0, "type": "number"}
  },
  "volup":{
    "enabled": {"value": false, "type": "boolean"},
    "pin": {"value": 18,"type":"number"},
    "value": {"value": 0, "type": "number"}
  },
  "voldown":{
    "enabled": {"value": false, "type": "boolean"},
    "pin": {"value": 22,"type":"number"},
    "value": {"value": 0, "type": "number"}
  },
  "previous":{
    "enabled": {"value": false, "type": "boolean"},
    "pin": {"value": 23,"type":"number"},
    "value": {"value": 0, "type": "number"}
  },
  "next":{
    "enabled": {"value": false, "type": "boolean"},
    "pin": {"value": 24,"type":"number"},
    "value": {"value": 0, "type": "number"}
  },
  "shutdown":{
    "enabled": {"value": false, "type": "boolean"},
    "pin": {"value": 3,"type":"number"},
    "value": {"value": 0, "type": "number"}
  }
}

However once user saves config, it is then written a different format as per the one below:

{
  "playpause": {
    "enabled": {
      "value": true,
      "type": "boolean"
    },
    "pin": {
      "value": 17,
      "type": "number"
    },
    "value": {
      "value": 0,
      "type": "number"
    }
  },
  "volup": {
    "enabled": {
      "value": true,
      "type": "boolean"
    },
    "pin": {
      "value": 18,
      "type": "number"
    },
    "value": {
      "value": 0,
      "type": "number"
    }
  },
  "voldown": {
    "enabled": {
      "value": true,
      "type": "boolean"
    },
    "pin": {
      "value": 22,
      "type": "number"
    },
    "value": {
      "value": 0,
      "type": "number"
    }
  },
  "previous": {
    "enabled": {
      "value": true,
      "type": "boolean"
    },
    "pin": {
      "value": 23,
      "type": "number"
    },
    "value": {
      "value": 0,
      "type": "number"
    }
  },
  "next": {
    "enabled": {
      "value": true,
      "type": "boolean"
    },
    "pin": {
      "value": 24,
      "type": "number"
    },
    "value": {
      "value": 0,
      "type": "number"
    }
  },
  "shutdown": {
    "enabled": {
      "value": true,
      "type": "boolean"
    },
    "pin": {
      "value": 3,
      "type": "number"
    },
    "value": {
      "value": 0,
      "type": "number"
    }
  }
}

So, subsequent reads may not interpret the file properly anymore, and generate issues.
Write routine should probably be revised so that it generates config.json in the same original format (this may help); or, on opposite, config.json format be changed and read routine adapted accordingly.

Volumio restarts when editing button config

Hi,

Installed latest gpio-buttons on rpi0 running Volumio 2.016.
When editing settings, Volumio fails and restarts, as per below:

Nov 15 17:28:24 volumio volumio[1338]: info: [{"prettyName":"GPIO Buttons","name":"gpio-buttons","category":"miscellanea","version":"0.7.5","icon":"fa fa-cube","enabled":true,"active":true},{"prettyName":"Spotify","name":"spop","category":"music_service","version":"1.2.0","icon":"fa-spotify","enabled":false,"active":true},{"prettyName":"Volumio Spotify Connect","name":"volspotconnect","category":"music_service","version":"1.3.8","icon":"fa-spotify","enabled":true,"active":true}]
Nov 15 17:29:54 volumio volumio[1338]: info: CoreCommandRouter::getUIConfigOnPlugin
Nov 15 17:29:54 volumio volumio[1338]: info: GPIO-Buttons: Getting UI config
Nov 15 17:29:54 volumio volumio[1338]: info: GPIO-Buttons: Empty config, loading defaults...
Nov 15 17:29:59 volumio volumio[1338]: info: CALLMETHOD: miscellanea gpio-buttons saveTriggers [object Object]
Nov 15 17:29:59 volumio volumio[1338]: info: CoreCommandRouter::executeOnPlugin: gpio-buttons , saveTriggers
Nov 15 17:29:59 volumio volumio[1338]: info: GPIO-Buttons: Applying config file...
Nov 15 17:29:59 volumio volumio[1338]: info: GPIO-Buttons: Play/pause on pin 2
Nov 15 17:30:00 volumio volumio[1338]: fs.js:640
Nov 15 17:30:00 volumio volumio[1338]: return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
Nov 15 17:30:00 volumio volumio[1338]: ^
Nov 15 17:30:00 volumio volumio[1338]: Error: EACCES: permission denied, open '/data/configuration/miscellanea/gpio-buttons/config.json'
Nov 15 17:30:00 volumio volumio[1338]: at Error (native)
Nov 15 17:30:00 volumio volumio[1338]: at Object.fs.openSync (fs.js:640:18)
Nov 15 17:30:00 volumio volumio[1338]: at Object.fs.writeFileSync (fs.js:1333:33)
Nov 15 17:30:00 volumio volumio[1338]: at Object.writeFileSync (/data/plugins/miscellanea/gpio-buttons/node_modules/jsonfile/index.js:110:13)
Nov 15 17:30:00 volumio volumio[1338]: at GPIOButtons.setConf (/data/plugins/miscellanea/gpio-buttons/index.js:151:5)
Nov 15 17:30:00 volumio volumio[1338]: at GPIOButtons.saveTriggers (/data/plugins/miscellanea/gpio-buttons/index.js:208:7)
Nov 15 17:30:00 volumio volumio[1338]: at CoreCommandRouter.executeOnPlugin (/volumio/app/index.js:818:29)
Nov 15 17:30:00 volumio volumio[1338]: at Socket.<anonymous> (/volumio/app/plugins/user_interface/websocket/index.js:479:38)
Nov 15 17:30:00 volumio volumio[1338]: at emitTwo (events.js:106:13)
Nov 15 17:30:00 volumio volumio[1338]: at Socket.emit (events.js:191:7)
Nov 15 17:30:00 volumio mpd[609]: client: [2] closed
Nov 15 17:30:00 volumio systemd[1]: volumio.service: main process exited, code=exited, status=1/FAILURE
Nov 15 17:30:00 volumio systemd[1]: Unit volumio.service entered failed state.
Nov 15 17:30:00 volumio systemd[1]: Starting dynamicswap.service...
Nov 15 17:30:00 volumio systemd[1]: Started dynamicswap.service.
Nov 15 17:30:00 volumio volumio[1496]: 512 MB or less RAM Detected, need to enable swap
Nov 15 17:30:00 volumio volumio[1496]: Enabling Swap
Nov 15 17:30:00 volumio volumio[1496]: swapon: /data/swapfile: swapon failed: Device or resource busy
Nov 15 17:30:00 volumio systemd[1]: dynamicswap.service: main process exited, code=exited, status=255/n/a
Nov 15 17:30:00 volumio systemd[1]: Unit dynamicswap.service entered failed state.
Nov 15 17:30:00 volumio systemd[1]: volumio.service holdoff time over, scheduling restart.
Nov 15 17:30:00 volumio systemd[1]: Starting dynamicswap.service...
Nov 15 17:30:00 volumio systemd[1]: Started dynamicswap.service.
Nov 15 17:30:00 volumio systemd[1]: Stopping Volumio Backend Module...
Nov 15 17:30:00 volumio systemd[1]: Starting Volumio Backend Module...
Nov 15 17:30:00 volumio systemd[1]: Started Volumio Backend Module.
Nov 15 17:30:00 volumio volumio[1504]: 512 MB or less RAM Detected, need to enable swap
Nov 15 17:30:00 volumio volumio[1504]: Enabling Swap
Nov 15 17:30:00 volumio volumio[1504]: swapon: /data/swapfile: swapon failed: Device or resource busy
Nov 15 17:30:00 volumio systemd[1]: dynamicswap.service: main process exited, code=exited, status=255/n/a
Nov 15 17:30:00 volumio systemd[1]: Unit dynamicswap.service entered failed state.
Nov 15 17:30:09 volumio volumio[1505]: info: -------------------------------------------
Nov 15 17:30:09 volumio volumio[1505]: info: -----            Volumio2              ----
Nov 15 17:30:09 volumio volumio[1505]: info: -------------------------------------------
Nov 15 17:30:09 volumio volumio[1505]: info: -----          System startup          ----
Nov 15 17:30:09 volumio volumio[1505]: info: -------------------------------------------

Thought config.json may not have proper rights as error message suggests, indeed:
-rwxr-xr-x 1 volumio volumio 796 Nov 15 17:11 config.json
but chmoding it 777 did not fix the issue.
Thanks for any tip.

Non persistent through reboot

The buttons occasionally do not work after a reboot. The plugin is active, but to get the buttons to work, I need to ssh to the pi, run a python script I wrote that also does button input, then break out of my script, go back to the plugin and click "save" and suddenly the plugin works again.
For what it's worth, I have another script running at startup that powers a LED when music is playing, not sure if there is some kind of GPIO initialization issue or something, but the LED script is working fine.
Let me know if you want any more info, I'm happy to dump logs, or whatever.

Can't install plugin

Hi,

I have volumio 2 installed on a pi zero. Everything works great!

When I try to install gpio-buttons plugin via the webinterface, I get an error. Here is what I have:

Downloading plugin at http://127.0.0.1:3000/plugin-serve/b36982c8-f77f-4b20-abc1-3a02fc578994.zip
END DOWNLOAD: http://127.0.0.1:3000/plugin-serve/b36982c8-f77f-4b20-abc1-3a02fc578994.zip
Creating folder on disk
Unpacking plugin
Checking for duplicate plugin
Copying Plugin into location
Installing dependencies
The following error occurred when installing the plugin: Error

I succeeded installing another plugin without any error.

I installed it manually (copy the folder into the plugins folder and change the json file) and works great.

So it it just a webinterface installation problem...

Thanks again for this great plugin!

Default configuration file is not used

At this moment the default values in config.json is not used, but a iterative loop defines the default values. This makes it impossible to assign default values to functions where it makes sense.

Shutdown: GPIO3

Add support for changing playlist

Thanks for the awesome plugin.

I would like to add support for changing the playlist. I am planning to load one playlist with all my songs in my harddisk and another playlist with all my Radio stations.

So with a press of a button I just want to switch between them.

Can you tell me if there is a way to add this support ? If you don't like this feature, can you atleast tell me where to make the code change ?

Thanks in advance.

Feature request: combine buttons for action

Hi,
I want to know, is it possible to implement the possibility to combine two buttons to e.g. Pause the player?
In my example I have only two buttons on my player and I use your plugin to make volume + and volume -, but I also want to press both buttons to trigger player pause. Is this possible? Or press a button twice (double click) to trigger an other action.

Regarding
Damien

Question: GPIO for turning relay/amp on/off?

I'd love to be able to use this gpio approach to toggle a relay on/off. This way my Raspberry Pi and relay combo can be used to not only control the music, but to also turn on/off the amp. I've done this outside of volumio with PHP/Perl/NGINX but volumio uses its own web server and no php. Any suggestions are appreciated!

Play/Pause does not work properly

I have a button attached to GPIO PIN 25.
I assigned the "Play/Pause" option.

It works three times:
1 btn press: play
2 btn press: pause
3 btn press: play
4 btn press: play (at least that is what is shown in the ui.

After stopping playback in the UI, I can start the game again ;)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.