[PROBLEM] controlling usb device via mpd? - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7) +--- Thread: [PROBLEM] controlling usb device via mpd? (/showthread.php?tid=2716) |
controlling usb device via mpd? - tordenhaand - 06-28-2020 Hi Mooders and Tim I've finally got my RPi4 and Hifiberry dac+ pro up and running. Very proud and excited! I've set up a shared drive on my pc, that I have mounted through the moode browser UI. I can play and control that through the UI, I can stream from spotify, I can play from the shared drive through my phone (using the m.a.l.p app) and finally also stream sound from i.e. youtube played on the phone through bluetooth. (I'm trying to avoid uPnP) Now theres one more way I'd like to be able to play music: Through my old ipod classic which contains my entire music library (which i've modded with an sd-card and rockbox software, which basically turns the ipod into a 256gb flash drive with a music player and gui). The reason I want to play from the ipod instead of my pc, is that my pc doesn't have a very large harddrive (and it can't be extended). My idea is to connect the ipod to the Rpi4 via usb cable and then be able to play the music through the hifiberry dac, but while being able to control it via my phone and/or the pc. Do you have any hints on how to go about it? Maybe just some directions? Cheers and thank you all for the help you've spread across this (and other) forum(s). Bonus Q: Even when not in use, the rpi4 is running kinda hot (and I've put one of the huge heatsinks on it). Thus, have any of you figured an handy way to turn the pi off/on when not in use (that is user friendly even for the rest of the household)? RE: controlling usb device via mpd? - DRONE7 - 06-29-2020 Quote:Bonus Q: Even when not in use, the rpi4 is running kinda hot (and I've put one of the huge heatsinks on it). Thus, have any of you figured an handy way to turn the pi off/on when not in use (that is user friendly even for the rest of the household)? There are 2 parts to this question.... Firstly the heat, I and others use the superb Argon-one case. With moode usage the temperatures are very low. Thread here.. http://moodeaudio.org/forum/showthread.php?tid=2097 And installation/power control here. http://moodeaudio.org/forum/showthread.php?tid=2227 If adopting this then perhaps the second part of your question may not be needed...however, for completeness.. Secondly, by using a Flirc USB controller and any remote control you can map a button to give a safe shutdown..(and many other things as well like play pause skip etc all of which the family will find familiar ) You can use Kent's script (or Triggerhappy) to achieve this... http://moodeaudio.org/forum/showthread.php?tid=1529 You could, alternatively, just wire a button for safe shutdown (and a led indicator too perhaps)... https://howchoo.com/g/mwnlytk3zmm/how-to-add-a-power-button-to-your-raspberry-pi https://howchoo.com/g/ytzjyzy4m2e/build-a-simple-raspberry-pi-led-power-status-indicator I'm interested in your comment about the ipod classic... I have a 5th Gen one with rockbox installed (I've found it and it's charging so will investigate later) but what is the usage for 'sd-card' you mention ? RE: controlling usb device via mpd? - tordenhaand - 06-29-2020 (06-29-2020, 03:59 AM)DRONE7 Wrote: Firstly the heat, I and others use the superb Argon-one case. With moode usage the temperatures are very low.Just to make sure I get you: you're saying the temp is very low, given that you use the argon-case, right? Not just that the temp is low with moode in general (cause to me it seems to be pretty warm, although it only reached throttling temps when I was installing) (06-29-2020, 03:59 AM)DRONE7 Wrote: I'm interested in your comment about the ipod classic... I have a 5th Gen one with rockbox installed (I've found it and it's charging so will investigate later) but what is the usage for 'sd-card' you mention ? I switched the old harddisk out for a micro-SD by using Tarkan's iflash. Makes your ipod way lighter, prolongs battery life (although you can also upgrade that) and makes it possible to extend the memory all the way up to 1TB. You're welcome to pm me if you need any info. (06-29-2020, 03:59 AM)DRONE7 Wrote: You could, alternatively, just wire a button for safe shutdown (and a led indicator too perhaps)...Mhmm, as far as I understand I can't do the old wire thing because I've added a HAT (the hifiberry) on the 40-pin connection. Have I got something backwards? --- Thanks for your prompt reply and all the excellent ideas. If I simplify my question it might be easier for you or others to answer: Can I plug a USB drive with music to the RPi4 usb port (and unplug it when needed without having to do the setup again) and play/control the music on the drive through mpd/moode web ui? Cheers RE: controlling usb device via mpd? - DRONE7 - 06-29-2020 Quote:Just to make sure I get you: you're saying the temp is very low, given that you use the argon-case, right? Not just that the temp is low with moode in general (cause to me it seems to be pretty warm, although it only reached throttling temps when I was installing)Moode places very little demand on the Pi...there's no video involved and unless you're doing sox resampling then the load is minimal. Check by opening any of the config pages from the menu then return to the menu and open the system info page. The argon-one case is the gold standard for cooling a Pi4...check out the case tests in the Mag-pi magazine from the Raspberry-pi foundation. Quote:Mhmm, as far as I understand I can't do the old wire thing because I've added a HAT (the hifiberry) on the 40-pin connection. Have I got something backwards? The Hifiberry dac has a duplicate set of holes that you can solder pins into... usually a whole strip 2x40 rather than individual. This gives access to some (but not all as some are reserved for the dac use...a search of the hifiberry site details which are available) of the gpio pins for additional use. Soldering of course cancels the hifiberry warranty as they are quick to point out. So the alternative I suggested using a USB Flirc receiver would not involve using gpio pins or soldering. Quote:Can I plug a USB drive with music to the RPi4 usb port (and unplug it when needed without having to do the setup again) and play/control the music on the drive through mpd/moode web ui? Yes, you need to plug in and do a library update to index the files. There is an option to do this when the drive is plugged/unplugged in the library config tab. However, I'm unsure if the Pi will recognise the ipod running rockbox as a usb drive. Thanks for the iflash link !! that looks most interesting. RE: controlling usb device via mpd? - tordenhaand - 06-29-2020 (06-29-2020, 08:38 PM)DRONE7 Wrote:Judging on your input and reading through the two threads linked below, it seems like imy request would be easily doable if my ipod was just a normal sd-card (or sd-card in a usb adapter), but three things *might* complicate it:Quote:Can I plug a USB drive with music to the RPi4 usb port (and unplug it when needed without having to do the setup again) and play/control the music on the drive through mpd/moode web ui? 1) the rockboxed ipod might not function as a normal usb drive 2) the fact that I want to be able to plug the ipod in and out 3) power issues (not necessarily a problem) External USB drive not detected under mOode 6.4.0 [How to do instruction] Using large uSD card for OS and music Am I on the right track or should I go about this in a completely different fashion? --- And again thank you for further pointers on the power button sidetrack! RE: controlling usb device via mpd? - jonners - 06-29-2020 Plugging a USB drive in and out is not a problem provided that at the bottom of the Library Config you have the automatic update of the database set to 'NO'. I don't know whether the iPod would be recognised as a USB drive though. RE: controlling usb device via mpd? - DRONE7 - 06-29-2020 OK, I used an external powered usb hub and connected my ipod classic to my RPi4. With it running Apple it was not recognised and remained un-browseable. With it running Rockbox it was recognised as a USB drive. I was able to scan and have the files indexed and play them. (caveat.. this was using another Rpi o/s though it should be exactly the same behaviour for Moode as we are testing the ability of the (Rockbox) drive to present as a USB drive. I will try using Moode later today but expect the same result. ) Edit. I can confirm that the ipod running Rockbox is seen by Moode as a usb drive and can be added to the library with an Update Library from the main menu. Tracks can then be selected and played . As with any other usb drive connected to Moode I can also transfer files to and from the ipod using samba. RE: controlling usb device via mpd? - tordenhaand - 06-30-2020 Damn - I messed something up and now there is no audio output (not rp4 headphones nor rca). moode web gui is unresponsive, but it seems like at can play a track through "mpc play" command. I've been scouring the web for solutions, but havent found anything. If i look at the moode log (cat /var/log/moode.log) when I start, it ends with 20200630 222737 worker: -- Music sources 20200630 222737 worker: USB sources (none attached) 20200630 222739 sourceMount(): Mount error: (mount error: could not resolve address for IPOD: Unknown error) I don't know it its caused by a bad mount or because the ipod got yanked out without a eject command. Whats the first step to get back to a working moode? Bonus Q for when I get moode back in a proper state: @DRONE7 How did you mount your rockboxed ipod exactly? with a usb into the HAT or the Pi? And what commands did you mount it with? RE: controlling usb device via mpd? - DRONE7 - 06-30-2020 Run a library update. If you set a mount point for the ipod in sources then remove it and reboot. If that doesn't fix it then it may be quicker to re-image and configure than trying random fixes that only mess things up further. (you did do a backup of the Moode sd card didn't you ? nevertheless, from scratch re-imaging and config shouldn't take more than 15 minutes tops) From my earlier post... Quote:I used an external powered usb hub and connected my ipod classic to my RPi4.Ipod>Powered USB hub>Rpi4 (The default o/s that the ipod boots to is Rockbox) So I simply plugged the ipod into the powered usb hub, Rockbox showed the main menu then it's screen showed a usb plug icon to indicate it was connected. That's it...nothing needed in Moode, no mount points to configure, just plug it in and from the main menu select Update Library and wait while it is indexed. (Spinner appears top right next to the menu icon while this is happening) It's plug-n-play. Don't overthink it and try commands, mounts, etc They're not needed. ;-) |