-
Notifications
You must be signed in to change notification settings - Fork 20
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
Comments
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. 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. |
Hi Pete, Right I have built a system using your new code. 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. |
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. |
Hi Pete, use raspi-config to change the network name. The first two SD cards worked fine, the third did not, doing the same thing! I fixed those two items and rebooted the pi again and again. Still no webserver. 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. |
Hi Bob, Do you have the log file from the one that ended up with the web_server_enabled =false? Pete. |
Hi Pete, Bob. |
Hi Pete, 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'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. |
Hi Pete, |
Hi Bob, Just to make sure I understand it properly, so everytime MediaPlayer starts you want it to delete the playlist? Thanks, Pete. |
Hi Pete, 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 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. |
Hi Bob, 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. |
Hi Pete, I have good news and bad news. 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. |
Hi Pete, Cheers, Bob. |
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. |
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 |
Hi Pete, Cheers, |
Pete, forgot to say.. |
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 |
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: |
Hi Pete, 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. |
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: Thanks again, Pete. |
Hi Pete, |
Thanks Bob, That AVTransport looks completley different from the one I am using. 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: |
Hi Pete, Thanks. |
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.. Thanks.. |
Hi Pete, That was it. Pete don't hesitate to ask for anything just assume you're talking to some who knows next to nothing. Bob. |
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. |
Hi Pete, Bob. |
Hi Pete, |
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. |
Hi Pete, Bob. |
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. 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. Maybe because MPD uses FFMPEG and FFMPEG returns that the file is not seekable.. Jan 09 12:31 : ffmpeg: codec 'flac' 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: I'm not sure I can fix that without having to bodge the code. The Previous button now seems to work, not sure if Lumin have fixed it on their side. |
Hi Pete, 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. :-) Cheers, Bob. |
Hi Pete, I'm running the new beta V0.0.1.5_beta2 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. 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. |
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. |
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. Cheers, Bob. |
Hi Pete, I am able to move backwards and forwards within a track which I think is called "seek". 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. Cheers, Bob. |
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've attached a log file but its only near the end where the problem happaned. Cheers, Bob. |
Hi Pete, Bob. |
Hi Bob,
Sorry, it's still mad at work, I've been working this weekend..
I had a look at the log files but didn't see anything strange.
The MediaPlayer doesn't tell Kazoo/Lumin which buttons to display, instead
the Control Points register for events, and MediaPlayer sends events when
there are changes to the status, the control point then uses its own logic
to decide which buttons to display/enable/disable.
Is it just on this latest release that it does it, I haven't yet managed to
recreate it on mine which are running the latest version.
Cheers,
Pete.
…On Sun, 12 Feb 2023 at 14:50, mightyoakbob ***@***.***> wrote:
Hi Pete,
Did you manage to look at the logs you asked for, it's over a month now?
Bob.
—
Reply to this email directly, view it on GitHub
<#102 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA5RVJ5B5XJ5AIRXHHKVPK3WXD2D7ANCNFSM6AAAAAARP63XUI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hi Pete, 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. 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. |
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. |
Hi Pete, |
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. |
Hi Pete, 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. |
Hi Pete, 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. |
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.. |
Hi Pete,
Yes definitely.
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 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. |
Hi Pete, All testing here with 1. 5 beta 3.
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'm struggling here, we seem to be going backwards. Cheers, Bob. |
Hi Pete, 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. |
Pete, 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. |
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.. |
Hi Pete, 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. |
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.. |
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 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. |
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. 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.. |
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 |
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.
The text was updated successfully, but these errors were encountered: