Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corruption of app.properties file when using web interface #102

Closed
mightyoakbob opened this issue Oct 27, 2022 · 79 comments
Closed

Corruption of app.properties file when using web interface #102

mightyoakbob opened this issue Oct 27, 2022 · 79 comments

Comments

@mightyoakbob
Copy link

Yep, me again. All is well with my builds at the moment except for the web interface. If for example, you adjust the start up volume of the system using the web interface and then save the new settings, it corrupts tha file: app.properties. In particular it removes the setting to the web_server_port and sets web_server_enabled=false sometimes it makes other changes too. I've tried this on various builds, same in each case.

Bob.

@PeteManchester
Copy link
Owner

Hi Bob,

Hope you are well...

I had a look and suspect that somehow there is one or more config items missing in your app.properties file, in that case the code didn't handle the missing parameters very well.
I've modified the code to better handle missing config items.

The new version is here:

https://github.com/PeteManchester/MediaPlayer/tree/master/com.upnp.mediaplayer/download/release

It was the web/js/MainPage.js that I modified so you will need to deploy the full zip file rather than just the .jar file

Please can you test and let me know how it goes.

Thanks,

Pete.

@mightyoakbob
Copy link
Author

Hi Pete,
I'm fine thanks, hope you're fine too.

Right I have built a system using your new code.
The same as I always do I edit the app.properties file prior to first run but all I do is change the web port number to 80 and the friendly network name. That's all I do to that file. I notice in the distribution that file has carriage return Line feed, would I be correct to assume it should only be Line feed?

I then tried the web interface and it didn't corrupt when I changed the start up volume and saved it. So things are better thank you.

Pete, how did you learn how to do all do on this project?

Thanks again.

Bob.

@PeteManchester
Copy link
Owner

Thanks for testing Bob,

If there were any missing items from the app.properties it may not have been your fault, at some time there may have been an issue saving to the app.properties file which may have caused it. I saw it on one of my boxes, but the rest were ok.

If it happens again let me know..

How I came to develop Mediaplayer, I work as a developer and at the time was playing around with the Raspi trying to find a good use for it, and then I found the Openhome library http://wiki.openhome.org/wiki/OhNet, which is really well developed and also there used to be a really helpful forum.
I chose Java because it was easy(?) to deploy on different operating systems and also at work I was moving away from using Java to other development languages and so wanted to keep my hand in with Java.
Then I started adding the other bits in like the web page to learn how to use JQuery etc..

@mightyoakbob
Copy link
Author

mightyoakbob commented Nov 3, 2022

Hi Pete,
Yesterday I created a complete image of a player and saved it disc. This morning I've burnt SD cards for 3 machines from that master. The first two worked fine, all I had to do was:

use raspi-config to change the network name.
and expand partitions to max.
Use the web interface to set the friendly name.

The first two SD cards worked fine, the third did not, doing the same thing!
The web form changed the web_server_port= (made it empty)
and the same with web_server_enabled=false.

I fixed those two items and rebooted the pi again and again. Still no webserver.
I've seen this before and the same old fix worked again and that fix is to type this..
sudo systemctl start mediaplayer.service

I've no idea why that fixes a broken webserver and reboot doesn't but I've seen this multiple times and again this morning.

Sorry about this.

Bob.

@PeteManchester
Copy link
Owner

Hi Bob,

Do you have the log file from the one that ended up with the web_server_enabled =false?
If so can you send it to me please.
Thanks,

Pete.

@mightyoakbob
Copy link
Author

Hi Pete,
I've not done anything to delete it as far as I know but I simply have no idea where it is or what it's called. I'm also ignorant of how to send it to you, I bet I can't attach it to a return email.
If you can tell me where to find it and how to send it to you, I'll do it with pleasure, thank you.

Bob.

@mightyoakbob
Copy link
Author

Hi Pete,
I spent some time googling to find out where raspi puts log files. Although I found plenty of them I didn't find one for mediaplayer. This morning, I built another pi mediaplayer system for a friend and when I ran it, I just happened to notice mediaplayer.log appear. I honestly don't think I'd ever noticed that before.

I went back to the player I had a problem with yesterday and sure enough there was a log file at home/pi/mediaplayer/mediaplayer.log
I presume that's what you meant. I oppened it and was very surprised to see dates in the log file going back to the summer. I therefore knew somehow I'm made a mistake and the build giving me problems couldn't be a new one.

I've noticed below that I can drop files into this window I'll try that. The log may tell you what was going on even if it may be fixed.

Thanks

Bob.
mediaplayer.log

@mightyoakbob
Copy link
Author

Hi Pete,
System nears perfect now.
How easy would it be to get the pi to delete the playlist (queue) on start up?
Thanks.
Bob.

@PeteManchester
Copy link
Owner

Hi Bob,

Just to make sure I understand it properly, so everytime MediaPlayer starts you want it to delete the playlist?
If so I would probably add a config option to enable or disable that because other people might not want it to delete their playlist.

Thanks,

Pete.

@mightyoakbob
Copy link
Author

Hi Pete,
Yes, that is correct.
Other players like my Linn always start up with no queue and I find that preferable otherwise the queue justs gets bigger and bigger until I think to delete it.

Over the last few days I have tried a few crude thing and one seems to work but as I say, it's crude and not at all configurable.

I cretaed a folder /home/pi/mediaplayer/Restore
In it I placed a PlayList.xml file with an empty queue.
In the file /etc/rc.local I added a line..
cp -f /home/pi/mediaplayer/Restore/PlayList.xml /home/pi/mediaplayer/

I've done limited testing but it does seem to work but some websites insist that /etc/rc.local is deprecated and it's not user configurable. But I was surprised I got anything to work.

I'm sure you would be able to do it properly or tell me how even if it's not user adjustable and that would be a helpful improvement.

I well understand that others may wish their queue to persist over a restart and therefore some form of user configuration option would be ideal. That really is way beyong my fiddling.

I'm retired and you may think I have too much time on my hands. :-)

Thanks for just thinking about it.

Cheers,

Bob.

@PeteManchester
Copy link
Owner

Hi Bob,
I've just pushed v0.0.1.4 the download directory, please can you test and let me know how it goes.

https://github.com/PeteManchester/MediaPlayer/tree/master/com.upnp.mediaplayer/download/release

There is a new option called clear_playlist_onstart_enabled in the app.properties file and this can be updated from the Config web page.

Cheers,

Pete.

@mightyoakbob
Copy link
Author

Hi Pete,
Thanks for that. Really, I much appreciate it. Far better than my nasty hack.

I have good news and bad news.
The good news is that the clear playlist option works brilliantly and I've tested it quite a bit on 5 players.
Once again thanks very much.

Linn Kazoo seems fine but the bad news is, something has once again broken Lumin. You can select music and play it and remarkably even the software volume control works. What doesn't work is 'in track' navigation. You cannot move forward or back and your can't pasue or stop the music. I've also checked that Lumin still works with a real Linn Akurate DS and it does.

The problem is, I can't be sure exactly when that change in the build occured. Something like this happened once before with Lumin and I spent a couple of days testing various releases until I found where things changed. You may recall me doing that. But now I can't go back very far becuase only fairly recent builds work at all now, I suspect something to do with Java.

Sorry about this.

If you want me to test lumin on a particular release or two from the past I'm happy to try.

Thanks again.

Bob.

@mightyoakbob
Copy link
Author

mightyoakbob commented Nov 9, 2022

Hi Pete,
I've just built a player based on your version 0.0.1.2 from June this year.
That also fails to work with Lumin.
I don't mind going back further but earlier builds seemed to stop working for me.
Java?

Cheers,

Bob.

@PeteManchester
Copy link
Owner

Hi Bob,

My initial thought is that it is something to do with a change to Lumin rather than a change I made to MediaPlayer..

Can you remember if Lumin used to work with 0.0.1.2?

Do you have any Windows PCs?

If so if you could try installing some diagnostic programs.

https://www.meshcommander.com/upnptools

Have a look here first and make sure you are ok to install the software:

https://www.meshcommander.com/upnptools/tutorial

The main one I use is Device Spy, it detects all the UPNP devices on your network and allows you to see the services that are provded by each device.
My guess is that the Linn Akurate is either providing an additional service or slightly different version of service than mediaplayer, I don't normally use Lumin but from what I have seen, it is very sensitive to the version of service provded by the device, as in the Volume control problem a few months ago.

@mightyoakbob
Copy link
Author

Hi Pete,
I have watched the video and installed the tools. it does list both my Pi players and the Linn player.
I'm unsure what to do now, would a list of services from the Akurate help you at all?
Please see attached image, can you guide me from there?

UPnP-Linn

Cheers,

Bob.

@PeteManchester
Copy link
Owner

Thanks Bob,

Let me have a think for a bit, looking at the DeviceSpy there are a few differences between the Linn and MediaPlayer, but it's a bit like finding a needle in a haystack..

The other problem I have is that on the Linn they have moved to new versions of providers (for exampe urn:linn-co-uk:service:Volume is now version 4) but these versions don't seem to be available in the Openhome repository https://github.com/openhome/ohNetGenerated/tree/master/OpenHome/Net/Device/Providers

@mightyoakbob
Copy link
Author

Hi Pete,
Thank you so much for having a look, it really is appreciated.
Be good if it can be sorted otherwise we're quite vulnerable if Kazoo also stops working.

Cheers,
Bob.

@mightyoakbob
Copy link
Author

Pete, forgot to say..
Any amount of testing or work and I'll do it to help what ever I can. If you can tell how to do anything I'll do it. I'm retired so plenty of time I just don't have the knowledge to understand the clever bits. I am worried if Kazoo goes the same way as my Akurate and Lumin, the projects is dead.
Bob.

@PeteManchester
Copy link
Owner

Thanks Bob,

In DeviceSpy would you be able to right click on the 'AVTransport:1' node for 'Linn Lounge:UPnP AV', then select 'Subscribe to Events'.

Then play just one track on your Linn using Lumin, once it is playing do you see new events happening every 1 second or so?

On the events view if you can right mouse click on there and select 'Copy Event Log to Clipboard' please, then paste it to a file and let me have the file please (or paste straight into here).

The events should look something like:

16:42 Pete Test Player2/urn:upnp-org:serviceId:AVTransport LastChange

@PeteManchester
Copy link
Owner

I don't think pasting straight into here will work, it's truncated my example, so it would be pasting into a txt file like this:

Example AVTransport Log.txt

@mightyoakbob
Copy link
Author

Hi Pete,
I've tried this but I don't think it has gone as you expected perhaps you can tell me what I'm doing wrong.

I didn't see reapeating events when the music was playing, I just get one event when you subscribe - then nothing.

I enclose (hopefully) an image of the screen and a zipped event if it gets through..

The data in the zip is a very long line of text with no C/R or L/F chars at all.

I know it's not right but I hope you can tell me how to do it right.

Thanks for trying to do this Pete.

Bob.

window
data.zip

@PeteManchester
Copy link
Owner

Thanks Bob,

I don't think you did anything wrong, as long as the track was playing when you subscribed, the other way might be to subscribe and then play a track using Lumin.

Also, would you be able to subscribe to the urn:av-openhome-org:service:Product:3 please, and then send me the results from the event log.

And could you send me a screen shot of the Product3 node when it is expanded:

image

Thanks again,

Pete.

@mightyoakbob
Copy link
Author

Hi Pete,
I've done that. No sign of play controls though...
Bob.
Product3
Product3text.zip

@mightyoakbob
Copy link
Author

Hi Pete,
I've continued to try to get what I think you want. Does this help...
again

@PeteManchester
Copy link
Owner

PeteManchester commented Nov 17, 2022

Thanks Bob,

That AVTransport looks completley different from the one I am using.
The Linn is using: DvProviderAvOpenhomeOrgTransport1
And I am using: DvProviderUpnpOrgAVTransport1.

Looks like they provide completley different events.

It's going to take a lot of work to create a new AVTransport class, and as yet I don't know if that's the reason but let me work on it..

By the way the Product3text.zip seems to be corrupted, the idea of getting that log was to see which Attributes were provided on the Linn.

Sorry, just realised the DvProviderAvOpenhomeOrgTransport1, is separate from the DvProviderUpnpOrgAVTransport1.

Maybe if you can send me a log of the Product subscription I can get more info on the additional DvProviderAvOpenhomeOrgTransport1 that I don't seem to have..

And also if you can expand the Node of Transport so that I can see what methods it provides please:

image

@mightyoakbob
Copy link
Author

mightyoakbob commented Nov 17, 2022

Hi Pete,
Sorry about the corrupt info, please find another attempt for that.
Also the expanded Transport 1, both versions.
The other item.. log of the Product subscription I'm afraid I'm going to return an error for that as I no idea what that means and can't see anything listed that looks even similar. Can you expand on that please.

Thanks.
Bob.
Product3V2.zip
transport1
OtherTransport

@PeteManchester
Copy link
Owner

Sorry Bob, the log of the Product subscription is ok now, it was the same as the zip file you attached again, which this time was ok..

Another ask, if you right click on the Modes nodes in Transport:1 and right mouse click, then in the popup window press 'Invoke' can you show me which value(s) you get please. Also is it the same value if you are stopped, playing, paused etc..

image

Thanks..

@mightyoakbob
Copy link
Author

Hi Pete,
I've done that and I could see no differnece when playing or not...
I got this string.
["SpeakerTest","Playlist","Radio","Radio-Single","Mix","UpnpAv","Receiver","RAOP","Spotify","Exakt1","Exakt2","SCD"]

That was it.

Pete don't hesitate to ask for anything just assume you're talking to some who knows next to nothing.

Bob.

@PeteManchester
Copy link
Owner

Hi Bob,

Please can you test this Beta version, I've added a very basic version of the Transport provider

https://github.com/PeteManchester/MediaPlayer/tree/master/com.upnp.mediaplayer/download/beta

I'm away until Monday so no rush..

Thanks,

Pete.

@mightyoakbob
Copy link
Author

Hi Pete,
Wow. I didn't see that coming.
I have built a system from that. You can send music to the device and it plays but the pause button doesn't function so I don't see a way to test the play button.
Enjoy your break.

Bob.

@mightyoakbob
Copy link
Author

Hi Pete,
Sorry you're so busy. Is there anything, anything at all I can do to help move us forward. You have all the knowledge and I have all the time.
Bob.

@PeteManchester
Copy link
Owner

Hi Bob,

Sorry I'm still busy at work, normally it goes quiet at this time of year as companies have freezes on any IT projects, but for some reason that hasn't happened this year.

The Repeat button in Lumin is just not right, for some reason it makes a request to both repeat and shuffle and it only toggles that values, it doesn't bother to pass in a boolean value to say if Repeat or Shuffle is enabled or disabled, it just expects you to get the current value and then change to the opposite.

Cheers,

Pete.

@mightyoakbob
Copy link
Author

Hi Pete,
Season's greetings to you.
Sorry you're very busy at this time but I'm happy now I know you still want to sort these issues out when you can.
Thanks for all you've done and your return is something to look forward to..

Bob.

@PeteManchester
Copy link
Owner

Hi Bob,

Happy New Year!!

I've done a bit more work and have attempted to fix the 'Seek' functionality.

As it is now MediaPlayer will send the request to MPD, but from the testing I have done there is a problem on MPD with certain file formats, the Seek seems to work on MPD with MP3 files, but does not work with FLAC.
The version of MPD I have is v0.21.5.

This can be recreated by installing mpc on your raspi (apt-get update, apt-get install mpc), then from the command window 'mpc seek ' where is a value in seconds.
For FLAC files it aways seems to go back to the beginning.

Maybe because MPD uses FFMPEG and FFMPEG returns that the file is not seekable..

Jan 09 12:31 : ffmpeg: codec 'flac'
Jan 09 12:31 : decoder: audio_format=44100:16:2, seekable=false

The new vesion of MediaPlayer is here:

https://github.com/PeteManchester/MediaPlayer/tree/master/com.upnp.mediaplayer/download/beta

For the Repeat/Shuffle problem, Lumin is just seems wrong for a number of reasons:
It uses the wrong request, it seems to use the request to get the value of the repeat/shuffle rather then setting the value.
it always sends a 'Shuffle' request when sending a 'Repeat' request,

I'm not sure I can fix that without having to bodge the code.
In DeviceSpy can you subscribe to the PlayList Provider and Transport Provider for your Linn and then use Lumin to toggle repeat on and off and see what events you get.

The Previous button now seems to work, not sure if Lumin have fixed it on their side.

@mightyoakbob
Copy link
Author

Hi Pete,
Happy New Year to you and thanks for all the work you do.

Right I've gone for giving you information first. I've tried to get the repeat button events you asked for. please see attached and don't be afraid to tell me I've got it wrong again. :-)
Lumin-repeat-key.zip
I'll be building the beta version next..

Cheers,

Bob.

@mightyoakbob
Copy link
Author

Hi Pete,

I'm running the new beta V0.0.1.5_beta2
Incidentally, is there anywhere easy to get at where that version number can be found without building a system. The only place I've seen it is on the web interface.

Some very good news and some not so good news.

Very good is that Lumin and the new Mediaplayer, 'seek' works fine on flac. Ive tried it at both CD quality and at 192K/24 and both work very well. You can move backwards and forwards within a track it didn't fail once in testing. I don't understand why I have different results to you on this. I'm also confused by your comment that mpd uses ffmpeg, I didn't know that.
My mpd version has been the same for many, many months it is 0.22.6. It is the version I've been getting when I issue the command - sudo apt-get install mpd

As you suggested, the repeat and shuffle buttons are still broken but somehow they work fine with the Linnplayer.

The worrying bit is the play/pause button. This now fails on Kazoo and only works sometimes on Lumin, something not good there.

I think you're edging ever closer to cracking this intactable problem.

Thank you.

Cheers,

Bob.

@PeteManchester
Copy link
Owner

That's wierd, I tested the Pause/Resume for Kazoo and Lumin before I sent it and it worked, just tested again and it's still working for me.

Can you try a reboot and if it's still a problem can you send the mediaplayer.log ( with the log file level set to debug) that covers the period when you are attempting to pause/resume.

@mightyoakbob
Copy link
Author

Just rebooted the pi. The play/pause worked fine on both Lumin and Kazoo for about 3 minutes. Then it stopped again, both apps unable to stop the music and both displaying the play triangle. I set the log level to debug and rebooted.
Of course, now it just will not fail and then it did.. Had a period again where neither app worked for play/pause.
Hope you can spot it, it's just after I changed to The alan P project.

Cheers,

Bob.

logfile.zip

@mightyoakbob
Copy link
Author

mightyoakbob commented Jan 17, 2023

Hi Pete,
I've been doing more Lumin testing. I'm starting to think that the pause/play problems I saw were in fact due to using both Kazoo and Lumin at the same time. I've been using Lumin alone for a while and it seems much more stable on that play/pause button.

I am able to move backwards and forwards within a track which I think is called "seek".
Next track and last track buttons seem fine.

Did you manage to get anything useful from the data I sent to you showing what signals the Linn gets for the repeat and shuffle buttons? Can I provide anything else to help with that?

So close now to having this fixed. Thanks for all you've done.

I'm trying to better document my copies of mediaplayer I've downloaded. I've been trying to find a way to get the version number without having to build a system. After a long search I have managed to find a file that contains the version number. I found it in the mediaplayer.jar file that when decompressed I opened to: /org/rpi/config/Config.class. In that file at offset 0x14B8.
Is there anywhere easier to navigate to?

Cheers,

Bob.

@mightyoakbob
Copy link
Author

Hi Pete,

Sorry Pete, there is a problem with Play/Pause certainly on Lumin.

Using it this morming it was great for a good time and then it happened. The track "I drove all night" was playing and all I had was a play triangle and no way to pause the music. This was not anything to do with Kazoo I'd been entirely on Lumin.

I then fired up a PC and tried Kazoo from that but it too was in the same situation.
I presume that the player tells the control point software if it should display the double bar pause or the triangle play icon. If so, then it's getting mixed up and sending the play icon when it's already playing.

I've attached a log file but its only near the end where the problem happaned.

mediaplayer-log2.zip

Cheers,

Bob.

@mightyoakbob
Copy link
Author

Hi Pete,
Did you manage to look at the logs you asked for, it's over a month now?

Bob.

@PeteManchester
Copy link
Owner

PeteManchester commented Feb 12, 2023 via email

@mightyoakbob
Copy link
Author

Hi Pete,
I'm sorry you're so pushed at work.

I had an idea this morning, always dangerous. In addition to a Linn Player and Pi players I also have a couple of Sonos speakers. I wouldn't recommend them for a number of reasons but they're here to play with.
Sonos will not play hi-res music directly but there is some software "BubbleUPnP" which runs on the NAS and in conjunction with ffmpeg can make a Sonos speaker appear as an open home player and it will even play hi-res. I think BubbleUPnP creates a virtual player which interacts with the control points and then passes the translated commands to the sonos. Surprisingly, it works and this morning I tried it again with both Kazoo and Lumin and both work fine, even including the repeat and shuffle function buttons. So this must be fixable!

I also tried Lumin again with v1.4 of mediaplayer. I knew not much would work, I didn't expect it to but again I had the wrong button available, I got play and I wanted pause.

Is there anything I can do to help any further?

Hope your work load calms down soon, just glad you haven't walked away, I feared you might have..

Cheers,

Bob.

@PeteManchester
Copy link
Owner

Thanks Bob,

If Lumin works with BubbleUPnP then that gives me an idea, when I get time I can install BubbleUPnP and look at how that works, to see if that gives me any ideas of what needs to be done.

@mightyoakbob
Copy link
Author

Hi Pete,
Yes Lumin does seem happy with BubbleUPnP. Linn have just announced that they are going to retire Kazoo and remove it from the app store, so Lumin is really needed now.

@PeteManchester
Copy link
Owner

Hi Bob,

Have Linn said if they are going to replace Kazoo with anything else?

I've done a bit of work trying to fix the repeat, shuffle and also the player status (playing, paused etc..).

The new version is in the beta folder, please can you test and let me know how it is.

Thanks,

Pete.

@mightyoakbob
Copy link
Author

mightyoakbob commented Mar 4, 2023

Hi Pete,
I built this last night when we got home and have been doing some testing this morning.
I'm almost at the point of saying you've cracked this. The repeat and shuffle buttons work perfectly now as does the "in track seek". The next and previous button also work fine. The pause/play button is my one area of question. Last night I did get the wrong icon just once but it was when I first switched to Lumin from Kazoo. It could be a case that things get confused when using two different control points. More testing needed and I intend to test more over the weekend.

Linn are dropping Kazoo, they say you can carry on using it but it will be withdrawn from the App Store. The app we're supposed to use is simply called "Linn" now.

As you've cracked the shuffle/repeat issue I guess a penny must have dropped somewhere, may I ask what was it?

Thanks Pete for all the work.

Bob.

@mightyoakbob
Copy link
Author

Hi Pete,
After a considerble amount of testing it seems that using Lumin 8.5.1 ...

The shuffle and repeat buttons are fixed, they work great.

Intermttently, the Play/Pause button still has an issue with the button offered being wrong for the situation. You can spend some time tapping the button and all is well and then suddenly the issue pops up. Once that's happened it's very difficult to clear the issue and if you do clear it, it will trigger again almost immediately. Probably not correct but it seems to fail more often playing the second track of the queue. I'll continue to test to see if I can find a magic sequence to trigger this.

I'll mention another issue but I think this is a Lumin issue not anything for you. The time counter will stop but the music continues. Oddly, you can still move backwards and forwards within the track using the slider but the time does not start working again. At the same time, the bits per second read out also stops. Recovery for this is closing the iPad smart cover and reopening it. Bit rate and time count start to work again. As I say, I think that's Lumin.

Could I ask you to have another look at Play/Pause please? I would appreciate that if you would.

Thanks again for great work.

Bob.

@PeteManchester
Copy link
Owner

Hi Bob,

Thanks for testing...

For the Play/Pause button, when you get this problem in Lumin, if you open Kazoo does that have the same problem?

One thing to try is when you have the problem in Lumin if you use Device Spy and then if you subscribe for the PlayList and Transport provider, do you see TransportState events when the track changes etc, you should see an event on both providers.

I'm wondering if somehow Lumin is losing it's subscription to one/both of the providers and so no longer receives the TransportState events it needs to maintain the correct status for the Play/Pause buttons.

That could also explain why the time counter stops, if Lumin loses it's subscription for the Time provider..

image

@mightyoakbob
Copy link
Author

Hi Pete,

For the Play/Pause button, when you get this problem in Lumin, if you open Kazoo does that have the same problem?

Yes definitely.

One thing to try is when you have the problem in Lumin if you use Device Spy and then if you subscribe for the PlayList and Transport provider, do you see TransportState events when the track changes etc, you should see an event on both providers.

I'll do just that when/if I can reproduce the problem. For some reason it has gone into hiding, I've not seen it for a day or two.

I'm wondering if somehow Lumin is losing it's subscription to one/both of the providers and so no longer receives the TransportState events it needs to maintain the correct status for the Play/Pause buttons.

That could also explain why the time counter stops, if Lumin loses it's subscription for the Time provider..

I understand and it sounds good though I should remind you that the time counter issue can be cleared simply by closing and opening the smart cover but the play/pause cannot.

Thanks for all your work.

Bob.

@mightyoakbob
Copy link
Author

mightyoakbob commented Apr 7, 2023

Hi Pete,
Happy Easter.
I'm afraid I don't have much in the way of good news but unfortunately the issues are growing.

All testing here with 1. 5 beta 3.

  1. Using Lumin is still fine except for the play/pause issue which is just on-going and it seems to be the same on Kazoo. I'm going to have another go at getting you more info on this but it's not easy.

  2. Unfortunately, I've noticed that moving the play point within a track (seek?) doesn't work at all with any of the Linn control apps but oddly works fine with Lumin. (With MediaPlayer version 1.4 Linn players were fine but Lumin didn't work). The shuffle play and continuous loop buttons work fine with Lumin and Linn players in 1.5b3 so that bit is cracked I think.

  3. I noticed there is a new OS release Raspberry PI OS Lite, 32 bit, February 21st 2023.
    Found here.. https://www.raspberrypi.com/software/operating-systems/

To make sure we were still okay I built a system based on this and 1.5beta3 from you. There is a problem in that when you boot up the player for the second time it plays music played before it was last shutdown without being told to and none of the controls work and so you cannot stop it. It matters not if the music got to the end of the playlist or you stopped it before the power down, as soon as it boots up again it will start playing again without controls. Control does return when it has finished.
I've rebuilt from scratch twice to make sure I've not made a mistake.
It looks to me like some buffer or variable is no longer getting flushed at boot up as it did in previous verions.
The version of mpd that gets installed is the same as we've had for a long time 0.22.6. So it's something in the OS.

I'm struggling here, we seem to be going backwards.

Cheers,

Bob.

@mightyoakbob
Copy link
Author

mightyoakbob commented May 7, 2023

Hi Pete,
I think I've found a solution for problem 3. This is music playing the moment the pie starts up. This seems to be an MPD thing. There is a setting in /etc/mpd.conf which defaults to #restore_paused "no". Left like this, the music should start again on boot up or at least start up where it left off. This never worked until recent OS versions but for some reason both the February and the May 2023 releases started it working. The fix for me I think is to change the setting to: restore_paused "yes". Music no longer plays at start up.

Pete, it's been many weeks since you last commented, sorry to ask the question but have you had enough of this project?

Cheers,

Bob.

@mightyoakbob
Copy link
Author

Pete,
Spent ages today trying to get the captures you asked for during a period with the wrong play/pause button displayed.
I did manage it I think. The problem was "on" at the start of the capture and at the end.

One thing I hadn't noticed before is that when it happens playing music from a queue, when the next track starts it clears the problem and the correct button is displayed again.

It is also very hard to find a reliable method to trigger the fault but I ound that randomly tapping tracks in the queue and then the pause/play it will trigger before long.

The other remaining problem is the drag within track (seek?) not working with Kazoo and v1.5beta but does work with 1.4. With Lumin the other way around drags work in 1.5b and not in 1.4. That must be fixable surely.

Please respond if only to tell me to naff off.

Thanks.

Bob.
DataRequested.zip

@PeteManchester
Copy link
Owner

Hi Bob,

Sorry, didn't see your Easter post.

As you have found out the music playing at startup is most likely due to MPD rather the MediaPlayer.

I had a look through the log you sent, but I don't see anything obvious, each time the track status changes there are two events being sent, one on the Transport Provider and one on the Playlist provider, I've not many new ideas on how to fix this one.

The Track seek not working on Kazoo should be an easy fix, sounds like Lumin and Kazoo work differently for track seek, just need to handle both of them.

I don't have much time available at the momet, but will have a look when I can..

@mightyoakbob
Copy link
Author

Hi Pete,
Very good indeed to hear from you, I thought for a while it was game over.

You can forget the music playing at startup it's dealt with and as you say it is fixed in mpd.conf.

The track seek with kazoo and your 1.5b, is the more worrying issue IF you can fix that to work with both apps then we're very nearly there.

The play/pause issue can be lived with annoying though it is.

Thanks for trying to fix it.

BTW, did you ever work for BT back in the day? I did, I worked for them from 1971 to 1993 for some reason I thought you might have.

Thanks again.

Bob.

@PeteManchester
Copy link
Owner

Hi Bob,

Here is a version that should fix the track seek on Kazoo https://github.com/PeteManchester/MediaPlayer/tree/master/com.upnp.mediaplayer/download/beta

I did work for BT, from 1980 - 1989, small world..

@mightyoakbob
Copy link
Author

Hi Pete,

I can confirm that V0.0.1.5beta4 track seek works fine with Lumin, Kazoo and the new Linn app.

Thank you so much.
I shall do more extensive testing as I get time but the Play/Pause issue does still persist, I fell over it in seconds when trying your latest beta.

I know that Lumin didn't work at all with V0.0.1.4 but may I remind you, there was no Play/Pause issue at that point. Don't know if that helps, probably not.

I'm building a player for my cousin, she's going to collect it when she gets back from her holidays. She's coming up on 30 June and she lives in darkest monmouthshire and it's a good journey so I only see her once or twice a year. I now have a choice, build with 1.4 and it works fine with just kazoo or 1.5b4 and all control apps work all be it with the Play/Pause niggle.

I spent the last 8 years of my time in BT writing software in assembler to remote control TXE2 an TXK exchanges. Happy days.

Thanks again

Bob.

@PeteManchester
Copy link
Owner

Hi Bob,

Looking at the difference between v0.0.1.4 and v0.0.1.5 the main differnce is that in v0.0.1.5 I added the Transport Provider, which the thing the latest version of Lumin needed.

I've probably asked you before, but if you just use the Linn Apps (Kazoo or the newer Linn App for Apple) does the problem happen.
I haven't yet seen it happen in my environment, but then again I don't normally use Lumin..

Nothing so exciting for me at BT, I was just on Customer Apps, so anything from the top of the pole into the customers house, mostly just renewing old drop wires..

@mightyoakbob
Copy link
Author

Hi Pete,

My gut reaction to your question is yes Kazoo also has the same Play/Pause issue. But before rushing to answer your question I did some testing. I found that I was able to trigger the problem with Kazoo but it was reversed. By that I mean I often got the pause icon whilst the music was paused but closing the ipad cover and opening it again cleared the problem. It was as if the ipad was not updating and closing the cover woke it up.

It's not like that with Lumin. Lumin gives you the play button when it's playing and closing the cover does not recover the situation.

Interestingly, I also tried the new Linn App and honestly I was unable to trigger the problem with that app at all.

At least that's what I'm seeing today but I'm sure I've seen Kazoo in the same pickle as Lumin in the past.

I'll test some more over the bank holiday along with decorating the hall and stairs - yuk.

Bob

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants