PeteManchester / MediaPlayer

61 stars 20 forks source link

plugin installation #68

Closed jcdidier closed 4 years ago

jcdidier commented 7 years ago

Hi Pete,. you gave us a great piece of software. thx a lot. I migrated my 3 rapsberrys from squeezelite to mediaplayer and its a real pleasure to use it. So now, I have 5 devices (3rpi, 1 chromecast, 1soundtouch) controled by bubbleupnp through a bubble server. hires is playing nicely up to 24/192 with hifiberry and es9023 sabre dac

I still have one problem : I can't figure out how to install plugins. I must have missed something big but I can't find any guidance. Can you help ? I'dlike to install and test the LCDdisplay on my rpi/es9023/OLED display

http://www.audiophonics.fr/fr/dac-diy/audiophonics-raspdac-kit-diy-lecteur-reseau-raspberry-pi-20-dac-sabre-v3-p-11136.html

thx again

PeteManchester commented 7 years ago

Hi,

Thanks.. That case with display looks really good!

I've updated the Wiki for the LCD Display Plugin, hopefully this will explain how to install the plugin:

https://github.com/PeteManchester/MediaPlayer/wiki/Plugin---LCD-Display

Basically you create a 'plugins' directory in the mediaplayer directory. Create a 'LCDDisplay' directory in the plugins directory. Then copy the LCD.xml and LCDDisplay.jar files to the LCDDisplay directory. Edit your LCD.xml file if needed. Restart MediaPlayer.

Hope this helps,

Pete.

jcdidier commented 7 years ago

Hi pete, thank's for the update. It's "almost" working apparently, ther's something wrong. Something is happening on the LCD but it's only garbage scrolling (cryptic caracters) ... strange I change the LCD.xml to adapt to the 16x2 display size, removing the 2 lines but the specs of my OLED may not be quite the same as yours.

Any hint on how to solve this ? is it only at the code level or in the conf somewhere ?

On Thu, Mar 2, 2017 at 3:11 PM, PeteManchester notifications@github.com wrote:

Hi,

Thanks.. That case with display looks really good!

I've updated the Wiki for the LCD Display Plugin, hopefully this will explain how to install the plugin:

https://github.com/PeteManchester/MediaPlayer/wiki/Plugin---LCD-Display

Basically you create a 'plugins' directory in the mediaplayer directory. Create a 'LCDDisplay' directory in the plugins directory. Then copy the LCD.xml and LCDDisplay.jar files to the LCDDisplay directory. Edit your LCD.xml file if needed. Restart MediaPlayer.

Hope this helps,

Pete.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

-- Jean-Christophe DIDIER GSM : +336 32 65 61 80

jcdidier commented 7 years ago

in addition to the visual symptom, there is also a major impact : the plugin killed the playback function of the PI. Somehow, the plugin wrote data at an unexpected place that killed the DAC or some other function : no sound, only a fex light clicks I deactivated the plugin but a hot restart of mediaplayer did not fully restored the hardware configuration : still no sound. I had to shutdown and restart the rpi to recover the sound.

hope this helps and there is hope ;)

On Thu, Mar 2, 2017 at 6:14 PM, Jean-Christophe DIDIER jcd.didier@gmail.com wrote:

Hi pete, thank's for the update. It's "almost" working apparently, ther's something wrong. Something is happening on the LCD but it's only garbage scrolling (cryptic caracters) ... strange I change the LCD.xml to adapt to the 16x2 display size, removing the 2 lines but the specs of my OLED may not be quite the same as yours.

Any hint on how to solve this ? is it only at the code level or in the conf somewhere ?

On Thu, Mar 2, 2017 at 3:11 PM, PeteManchester notifications@github.com wrote:

Hi,

Thanks.. That case with display looks really good!

I've updated the Wiki for the LCD Display Plugin, hopefully this will explain how to install the plugin:

https://github.com/PeteManchester/MediaPlayer/wiki/Plugin---LCD-Display

Basically you create a 'plugins' directory in the mediaplayer directory. Create a 'LCDDisplay' directory in the plugins directory. Then copy the LCD.xml and LCDDisplay.jar files to the LCDDisplay directory. Edit your LCD.xml file if needed. Restart MediaPlayer.

Hope this helps,

Pete.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

-- Jean-Christophe DIDIER GSM : +336 32 65 61 80

-- Jean-Christophe DIDIER GSM : +336 32 65 61 80

PeteManchester commented 7 years ago

It is hard to tell whether it is the code or config, other people have got their displays to work though.

Maybe try a simple test app like the one described below, that will verify that the wiring is ok. Disable the MediaPlayer plugin first (rename .jar to .test) and restart your pi, then use the test app below.

http://www.raspberrypi-spy.co.uk/2012/07/16x2-lcd-module-control-using-python/

I suspected the lock up of the playback could be due to some GPIO pin conflict between the pins used for your LCD Display and the HifiBerry DAC, but I had a look at the HifiBerry DAC documentation and it seems to suggest that only the P5 header pins are used, can you confirm this is true?

https://support.hifiberry.com/hc/en-us/articles/205376201-GPIO-usage-of-HiFiBerry-boards

Thanks,

Pete.

jcdidier commented 7 years ago

Thx for the feedback. I'll make the tests Sunday. The wiring should be OK as it is working with another configuration based on picoreplayer and a python script I wrote. Is the model of display is supposed to be working with your code ? I'll get back to you later.

Take care.

Le 3 mars 2017 11:14 AM, "PeteManchester" notifications@github.com a écrit :

It is hard to tell whether it is the code or config, other people have got their displays to work though.

Maybe try a simple test app like the one described below, that will verify that the wiring is ok. Disable the MediaPlayer plugin first (rename .jar to .test) and restart your pi, then use the test app below.

http://www.raspberrypi-spy.co.uk/2012/07/16x2-lcd-module- control-using-python/

I suspected the lock up of the playback could be due to some GPIO pin conflict between the pins used for your LCD Display and the HifiBerry DAC, but I had a look at the HifiBerry DAC documentation and it seems to suggest that only the P5 header pins are used, can you confirm this is true?

https://support.hifiberry.com/hc/en-us/articles/205376201- GPIO-usage-of-HiFiBerry-boards

Thanks,

Pete.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PeteManchester/MediaPlayer/issues/68#issuecomment-283917014, or mute the thread https://github.com/notifications/unsubscribe-auth/AY6lBWf4XKvZrQSRjmOv2DXfVYmNhhIOks5rh-f7gaJpZM4MQR7t .

PeteManchester commented 7 years ago

I haven't tested that particular model of LCD, but I've tested a 16x2 LCD Display that is based on HD44780

http://www.maplin.co.uk/p/oled-2x16-green-character-display-n04qq

My code uses the interface provided by Pi4J.

Dual01 commented 6 years ago

Hi Pete, You wrote a great software. Congratulations and respect! I am just figuring out how to install the LCD display. I use a raspi 3B+ and jessie. When I checked the GPIO pins that are used by Pi4J, it seems to me to exist a conflict as GPIO1 is used now for I2S-BCLK with the new raspi models. Maybe that is the problem why sound reproduction is distorted by the LCD plugin.

PeteManchester commented 6 years ago

Hi,

Thanks...

I just checked and I have hard coded the pins used for the LCD module, as a quick test if you want to suggest some other pins that could be used I could make the change and recompile the plugin so that you can try it.

Thanks again,

Pete.

Dual01 commented 6 years ago

Great. I suggest the following Pi4J GPIO numbers: 0 (11), 2 (13), 5 (18), 6 (22), 25 (37) and 27 (36). The numbers in brackets correspond to the pin numbers of the RPi3 header. These GPIOs should avoid any conflicts. Also, I suggest to avoid GPIO 3 and 4 (Pi4L numbering) since they are used by some DAC boards to mute the amp. best regards Dieter

Dual01 commented 6 years ago

Hi Pete,

I tried to recompile the LCDDisplayImpl.java file (which seems to contain the GPIO assignments) with the new GPIOs but it did not work, there were missing dependencies (I am a complete Java newbie).

It would be great if you can implement the new GPIOs, so that I can try whether the LCD plugin works with an Rpi3.

Thanks, best regards Dieter

PeteManchester commented 6 years ago

Hi Dieter,

Sorry I was busy over Easter. I've just pushed a new version of the LCD Plugin to here: https://github.com/PeteManchester/MediaPlayer/tree/master/com.upnp.mediaplayer/plugins/LCDDisplay

This version allows the GPIO pins to be confgured, have a look at the sample LCD.xml for an example of the config options.

If the config options are not set the default values are used:

Added Config options for GPIO Pins:

Please let me know how you go on or if you have any questions.

Thanks,

Pete.

Dual01 commented 6 years ago

Hi Pete, great, you made it configurable. I had a look at the LCD.xml file, it states now: LCD columns="20" pin_rs="11" pin_strobe="10" pin_data_1="99" pin_data_2="100" pin_data_3="101" pin_data_4="102" pin_data_5="103" pin_data_6="104" pin_data_7="105" pin_data_8="106" I am somewhat confused about the numbering, shouldn't it read for the default status: LCD columns="20" pin_rs="11" pin_strobe="10" pin_data_1="0" pin_data_2="1" pin_data_3="2" pin_data_4="3" pin_data_5="0" pin_data_6="0" pin_data_7="0" pin_data_8="0"

So, in order to change to the desired config, it should be: LCD columns="20" pin_rs="25" pin_strobe="27" pin_data_1="0" pin_data_2="2" pin_data_3="5" pin_data_4="6" pin_data_5="0" pin_data_6="0" pin_data_7="0" pin_data_8="0"

Correct? I will try it to get the plugin running on Thursday or at the weekend. Many thanks Dieter

PeteManchester commented 6 years ago

Hi Dieter,

Sorry I left the strange values in there from when I was testing, I wanted to make sure that the plugin was reading the values from the xml file and not just using the defaults...

Yes, just change the values to the values you want to use

Dual01 commented 6 years ago

Hi Pete, I installed the new LCD plugin as described on the website and made the connections but the LCD display stays dark. I checked the mediaplayer log file but did not find any hint that the plugin is installed. I use mediaplayer 0.0.9.1. Do you have any idea what could be the problem?

PeteManchester commented 6 years ago

Hi Dieter

Can you send me the full log file from start up with the log level set to debug.

What version Java are you using?

Thanks,

Pete.

On 7 April 2018 at 12:22, Dual01 notifications@github.com wrote:

Hi Pete, I installed the new LCD plugin as described on the website and made the connections but the LCD display stays dark. I checked the mediaplayer log file but did not find any hint that the plugin is installed. I use mediaplayer 0.0.9.1. Do you have any idea what could be the problem?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PeteManchester/MediaPlayer/issues/68#issuecomment-379462355, or mute the thread https://github.com/notifications/unsubscribe-auth/ADsap5OIlLnk76IhG6bTgdmROzTOpaZ4ks5tmKFdgaJpZM4MQR7t .

Dual01 commented 6 years ago

It is Java version 1.8.0_65. How do I set the log level to debug? best regards Dieter

PeteManchester commented 6 years ago

In the app.properties set the value of ' log_file_level ' to be 'debug' then restart mediaplayer

https://github.com/PeteManchester/MediaPlayer/wiki/MediaPlayer-Options

On 7 April 2018 at 17:22, Dual01 notifications@github.com wrote:

It is Java version 1.8.0_65. How do I set the log level to debug? best regards Dieter

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PeteManchester/MediaPlayer/issues/68#issuecomment-379481351, or mute the thread https://github.com/notifications/unsubscribe-auth/ADsap2YdRdOmJ5_ZgnvGFuR4z2V1ErqZks5tmOe3gaJpZM4MQR7t .

Dual01 commented 6 years ago

Thanks Pete.

Here is the log file. I saw in the debug mode that the plugin is started. Also that my GPIO-values are taken. I used the Pi4J-GPIO numbering.

I checked the LCD display with a python test script using the raw GPIO pin numbers and the display works. So the hardware and the connections are properly installed.

Best regards

Dieter

Dual01 commented 6 years ago

I saw on the Pi4J website that Pi4J version 1.1 is required to support the RPi3 board. Maybe that could be the problem.

PeteManchester commented 6 years ago

I didn't get the log files, but can you try the latest release https://github.com/PeteManchester/MediaPlayer/releases

That has Pi4J 1.2.0.Snapshot..

Bundle-Name: Pi4J :: Java Library (Core) Bundle-Version: 1.2.0.SNAPSHOT Created-By: Apache Maven Bundle Plugin Build-Jdk: 1.8.0_72

Dual01 commented 6 years ago

I tried the latest release but it did not work either. I sent the log file per email.

Dual01 commented 6 years ago

I made the following observations: with the new mediaplayer version (0.0.9.3) and the LCD plugin, there are sporadic letters on the LCD screen. Furthermore, when the mediaplayer is active with the LCD plugin, the python test app for the LCD screen does not work, without the plugin it works. Thus, the plugin seems to address the LCD screen in some way. Maybe this helps.

Dual01 commented 6 years ago

I use the RPi3+ board. I read at the Pi4J website that the Pi4J module uses WiringPi. In March, WiringPi version 2.46 was released which supports the RPi3+ board. However, the Pi4J 1.2.0 snapshot uses Wiring Pi 2.44 which does not seem to recognize the RPI3+ board. Could that be the problem that the LCD plugin does not work?

PeteManchester commented 6 years ago

Sorry about the delay I have been working abroad recently.

According to the Pi4J website Pi4J no longer includes the wiringPi libraries, these are installed separately:

http://pi4j.com/release-notes.html

2018-04-23 :: 1.2-SNAPSHOT

  • As of 2018-04-23, We have removed support for the Pi4J native library statically compiled against WiringPi. for the Raspberry Pi platform. You must now have WiringPi installed on your target Raspberry Pi system separately from Pi4J. WiringPi is now included be default in the latest Raspbian builds. We made this change in part because the WiringPi project now requests no static linking and because it would cause Pi4J to fail on newer platforms when we were not able to get a new build released in a reasonable and timely manner. This change should be of a minimal negative impact now that WiringPi is included with the OS and users will benefit from being able to take advantage of newer WirinPi builds without depending on a new Pi4J build.

You can test what version of wiringPi you have installed bu running the following command:

gpio -v

I've updated the Pi4J library to be the latest 1.2 Snapshot which also seems to include support for the pi3b+, can you give that a try.

Thanks,

Pete.

Dual01 commented 6 years ago

Hi Pete, Many thanks for the update. I tried with an RPi 3 with your latest LCD plugin now, but it still did not work. When I used the "gpio -v" command, the command was unknown. So I installed WiringPi 2.46. Then, the "gpio -v" command worked and it showed the version number 2.46. However, still no display with the mediaplayer LCD plugin installed. When I uninstall the LCD plugin, boot the RPi and use a python test script, the LCD display works, so the hardware is ok. When the LCD plugin is active, the python script does not work anymore. Question: Do I also have to install Pi4J separately from the LCD plugin?

Dual01 commented 6 years ago

I installed now the latest version of mediaplayer, WiringPi 2.46 and the latest Pi4J 1.2 snapshot. It still does not work. I have no idea what could be the problem that the LCD display does not work.

PeteManchester commented 6 years ago

Hi Dieter,

Unfortunately I can't test at the moment.

You have proved that the hardware is ok by using the test Python script.

If you can it might be worth testing with some sample code for wiringPi to prove that wiringPi works : http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-c-with-wiringpi/ https://github.com/WiringPi/WiringPi/blob/master/examples/lcd.c

and if that works then some sample code for Pi4J:

https://github.com/Pi4J/pi4j/blob/master/pi4j-example/src/main/java/WiringPiLcdExample.java

Thanks,

Pete.

Dual01 commented 6 years ago

Dear Pete, I adapted the GPIO numbering in the WiringPiLcdExample.java file to my profile, compiled it and ran it and it worked. Thus, Pi4J is also ok. Obviously the problem seems to be in the LCD plugin. When I start mediaplayer with the plugin and then run the LCD test program, the screen is dead. I have to power off the Rpi (reboot does not help) to restart the screen.

Best regards Dieter

PeteManchester commented 6 years ago

Hi Dieter,

Ok, thanks, can you upload a log file from startup where the log level is set to debug please.

Pete.

On 30 April 2018 at 21:21, Dual01 notifications@github.com wrote:

Dear Pete, I adapted the GPIO numbering in the WiringPiLcdExample.java file to my profile, compiled it and ran it and it worked. Thus, Pi4J is also ok. Obviously the problem seems to be in the LCD plugin. When I start mediaplayer with the plugin and then run the LCD test program, the screen is dead. I have to power off the Rpi (reboot does not help) to restart the screen.

Best regards Dieter

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PeteManchester/MediaPlayer/issues/68#issuecomment-385516775, or mute the thread https://github.com/notifications/unsubscribe-auth/ADsapyKkV1b0umrwq0dhdEnL2GlRUGWaks5tt3IsgaJpZM4MQR7t .

Dual01 commented 6 years ago

sent by email

Dual01 commented 6 years ago

Hi Pete, I tested a bit at the weekend. When I run a python test script without GPIO clean up at the end and then the mediaplayer with LCD plugin, the LCD screen is initialized, the python script works correctly. However, when Mediaplayer is started, I see strange signs on the screen which are renewed every 9 seconds. When I run the python script without GPIO clean up at the end, I see sporadic strange signs on the screen. When I first start the mediaplayer with the plugin and then run the python script, the LCD plugin does not work and the python script does not work anymore.

Maybe this helps

Dual01 commented 5 years ago

Hi Pete, I had time to install an old Mediaplayer version on a raspberry pi model B using wheezy and the original wiring of the LCD display. I checked the wiring with a python script and it was ok. However, the LCD display did not work, only weird letters show up from time to time. Thus, it seems to be a problem with the LCD display model, maybe an initialization problem, I use the same LCD display as jcdidier. I observed another difference between the old config and new config (raspberry pi model A/wheezy versus model 3/Jessie). Audio reproduction is not disturbed by the LCD plugin in the old config, but in the new one.

Dual01 commented 5 years ago

Update: I installed now pydPiper to show the metadata (album, title, artist, file format, elapsed time) on the LCD screen. The software displays the metadata and the status of the mpd. It works extremely nice. I have only one issue: When I stream from Tidal via the bubblupnp server and mediaplayer, the mediaplayer GUI shows all the metadata and the mediaplayer status page also indicates that it receives the information for album, title etc. but "album, title and artist" are missing on the LCD screen whereas file format and time are shown. When I stream by UPnP/ oh protocol from my local hard disk everything works. Thus, is there an issue that under Tidal streaming conditions, the metadata are not transferred to mpd by mediaplayer?