{"id":23752496,"url":"https://github.com/rwbl/make-volumio-nowplaying","last_synced_at":"2025-08-11T18:08:50.821Z","repository":{"id":156024076,"uuid":"171253185","full_name":"rwbl/make-volumio-nowplaying","owner":"rwbl","description":"To show on an LCD display, the current played song information Title, Artist, Album, Duration by Volumio","archived":false,"fork":false,"pushed_at":"2020-01-24T08:57:41.000Z","size":360,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-25T00:21:57.902Z","etag":null,"topics":["b4a","b4j","pine64","raspberry-pi","volumio"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rwbl.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-02-18T09:24:28.000Z","updated_at":"2021-12-18T08:00:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"109c039d-385f-4eeb-916d-5bf39ac7185b","html_url":"https://github.com/rwbl/make-volumio-nowplaying","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rwbl/make-volumio-nowplaying","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwbl%2Fmake-volumio-nowplaying","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwbl%2Fmake-volumio-nowplaying/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwbl%2Fmake-volumio-nowplaying/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwbl%2Fmake-volumio-nowplaying/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rwbl","download_url":"https://codeload.github.com/rwbl/make-volumio-nowplaying/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwbl%2Fmake-volumio-nowplaying/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269931473,"owners_count":24498722,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["b4a","b4j","pine64","raspberry-pi","volumio"],"created_at":"2024-12-31T17:53:06.533Z","updated_at":"2025-08-11T18:08:50.812Z","avatar_url":"https://github.com/rwbl.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# make-volumio-nowplaying\n\n# Objectives\nTo show on an LCD 20x4 display, the [Volumio](http://www.volumio.org/) played song information Title, Artist, Album, Duration.\nThis make project is a prototype - building a final solution with a hardware case not planned (yet).\n\n![volumionowplaying-p](https://user-images.githubusercontent.com/47274144/52941292-b6eb4c80-3368-11e9-82fe-24bb5baf4868.png)\n\n![volumionowplaying-a](https://user-images.githubusercontent.com/47274144/52941291-b6eb4c80-3368-11e9-8ede-d3680569ec95.png)\n\n## Functionality\nRasberry Pi NowPlaying Program [B4J Non-UI]:\n* Connect to Volumio server and request (in regular intervals, default 10s) song information, via the Music Player Daemon (MPD).\n* Display song information on an LCD 20x4 display with the last requested time.\n* Autostart and run as a process. Request interval in ms set as parameter.\n* Android App showing song information [B4A].\n* Windows LCD Display program showing song information in LCD like display [B4J UI].\n* Windows MPD Command program to test the Music Player Daemon commands to remote control Volumio [B4J UI].\n\n## Hardware Parts\n* 1x Raspberry Pi 3\n* 1x LCD 20x4 Display - used a SainSmart IIC/I2C/TWI Serial 2004 20x4 LCD\n* 1x Breadboard\n\n## Software\nMin software versions required:\n* Volumio v.2.041 for the Raspberry Pi\n* B4X B4J v4.70 and B4A v6.50\n\n## Credits\nLCD display controlled by B4J Library jLCD_I2C which is converted from https://www.b4x.com/android/forum/threads/raspberry-b4j-i2c-hd44780-lcd-driver.61123/ classes (a BIG thanks to the author for developing).\n\n## Wiring\n![volumionowplaying_bb](https://user-images.githubusercontent.com/47274144/52941289-b652b600-3368-11e9-88bf-78a0b6c04a6c.png)\n```\nLCD 2004a = Raspberry Pi (WireColors)\nVCC = 5v (red)\nGND = GND (black)\nSDA = Pin 3 - SDA (blue)\nSCL = Pin 5 - SCL (green)\n```\n## Additional Information\nTo get started follow the Volumio information.\nDownload the Volumio Raspberry Pi image from here, create the image, place in the RPi and boot.\n\n### Volumio Hints\nHints collected whilst developing:\n* Playlist Location: /data/playlist. The playlist files have JSON format.\n* Running Plugin Scripts Example:\"node /volumio/app/plugins/system_controller/volumio_command_line_client/commands/setvolume.js 80\" to set the volume to 80%.\n* Volumio documentation: https://volumio.github.io/docs/ .\n* WebSocket API commands https://volumio.github.io/docs/API/WebSocket_APIs.html .\n* When issues with recognizing connected USB device, consider to reset Volumio to factory settings.\n\n### Java\nTo develop \u0026 run B4J apps on the Raspberry Pi, Java is required. Java is not part of the Volumio image.\nExample installing Java 1.8.0_121 on the Raspberry Pi:\n* Download the tar file from the Oracle Website in a folder like /data/javainstall\n* cd /data/javainstall\n* sudo tar zxvf jdk-8u121-linux-arm32-vfp-hflt.tar.gz -C /opt\n* sudo update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_121/bin/javac 1\n* sudo update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_121/bin/java 1\n* sudo update-alternatives --config javac\n* sudo update-alternatives --config java\n* java -version\n* javac -version\n* Delete the downloaded tar file\n\nThe application has been created for **personal use**  only. If planned for commercial use, ensure to comply to the [Oracle JDK License Agreement](https://www.oracle.com/technetwork/java/javase/terms/license/javase-license.html). \n\n### B4J Non-UI Application NowPlaying\nNote: Recommend to read the various documented source codes for more details.\n\n### Raspberry Pi B4J-Bridge\nThe B4J application has been developed on a PC and tested using the B4J-Bridge running in a terminal on the Raspberry Pi. In brief:\nOpen a terminal (using f.e. Putty), create a folder /home/volumio/b4j, download the B4J-Bridge (wget http://www.b4x.com/b4j/files/b4j-bridge.jarhttp://www.b4x.com/b4j/files/b4j-bridge.jar), start sudo java -jar b4j-bridge.jar and connect from the B4J IDE.\n\n### Raspberry Pi NowPlaying.jar\nCreate a folder /home/volumio/b4j and copy nowplaying.jar to that folder.\nFor tests, open a terminal and run java -jar /home/volumio/b4j/nowplaying.jar 10000\nThe parameter 10000 is the request interval, in msecs, for song information from the Volumio server.\n\n### Development Hints\nWhen NowPlaying is running as a process (see next) and changes to the app are made then\n* stop the process first\n* start the b4j-bridge\n* connect from the B4J IDE\n* make changes\n* run\n\nWhen finished, copy nowplaying.jar to /home/volumio/b4j folder.\n\n```\ncd b4j\nps -ef | grep nowplaying\nroot 516 1 0 14:39 ? 00:00:00 sudo java -jar /home/volumio/b4j/nowplaying.jar 10000\nroot 612 516 0 14:39 ? 00:00:15 java -jar /home/volumio/b4j/nowplaying.jar 10000\nvolumio 1886 1879 0 15:15 pts/0 00:00:00 grep nowplaying\nsudo kill 612\nsudo java -jar b4j-bridge.jar\nB4J-Bridge v1.20\nWaiting for connections (port=6790)...\nMy IP address is: 169.254.nnn.nn\nFTP Server started: ftp://169.254.nnn.nn:NNNN\nStart B4J-Bridge with -disableftp to disable.\nConnected!\n```\n\n-Raspberry Pi Autostart NowPlaying\nTo autostart nowplaying, add start information to rc.local for nowplaying.jar stored in folder /home/volumio/b4j.\nEdit rc.local:\n```\nsudo nano /etc/rc.local\n```\n\nAdd these lines - Note that nowplaying is started as a process by adding the ampersand \u0026 sign:\n\n```\n#B4J NowPlaying with request interval 10000ms\nsudo java -jar /home/volumio/b4j/nowplaying.jar 10000 \u0026\nexit 0\n```\n\nSave rc.local followed by a reboot to check if ok.\nThe LCD display should state NowPlaying About.\nNote: The Raspberry Pi Volumio setup does not include crontab, therefor rc.local is used.\n\n### Music Player Deamon (MPD)\nThe MPD Protocol is used to obtain song information.\nExample to request current song information by sending a command sequence:\n```\ncurrentsong\nclose\n```\nIn B4J, the class AsyncstreamsText is used to send strings to the Volumio Server.\nExample:\n```\nPrivate RequestSongCmd As String = $\"currentsong${CRLF}close${CRLF}\"$\nastreams.Write(RequestSongCmd)\n```\n\nImportant to write CRLF after each command line and close off with CRLF!\n\nThe information returned contains Tags from which Artist, Title, Album, Time are used.\nThese tags are stored into a map from which the tags are obtained via RequestSongMap.Get(\"Title\") etc.\nA small Windows application, written with B4J, to test MPD commands is included (with some example commands).\n\n## Soure Code\nThe source code and required libraries can be found in archive __nowplaying.zip__. The code is well documented.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwbl%2Fmake-volumio-nowplaying","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frwbl%2Fmake-volumio-nowplaying","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwbl%2Fmake-volumio-nowplaying/lists"}