I run OSMC on my Van. I use 3.5mm out to RCA, and use the RCA out too plug it into my AUX input on the van.
I have loaded 20 movies onto a USB stick. I have auto-mounted it at boot. I have put in a script that shuffles the playlist once OSMC boots up, and plays a random title.
Everything works great… except when we ride for 45m. The kids watch half a show, and I turn off the Van. OSMC does not save the state, so when we get back in- its a new show.
Can anyone help me with a solution? I am open to using another solution if it is possible, such as RasPlex, straight Kodi, or whatever. The reason I went for OSMC is because the performance is slick on a Pi1.
I would also be open to a remote solution… the problem here is that my kids are 2 and 4, so navigating the menus of OSMC might be difficult. If I could get OSMC to boot directly into a display of movies in a list, which would be easily navigated via a remote (left, right, play, basically), it could work. The remote would need to be Bluetooth etc. Also, this would need to save progress through movies, like Plex does.
The official OSMC remote is RF based, so no need for line of sight. This will work well for you.
As long as you press Stop before turning the ignition and wait a few seconds, progress will be saved.
The fact is spontaneously pulling the power isn’t ideal, and could cause problems if done repeatedly. There are no other software solutions that will handle this gracefully.
But you could use the OSMC remote to control the device. And all the buttons are remappable, so you could repurpose one button to shut down the system gracefully. This would take about 30 seconds.
Also: you should post some pictures of the van setup. I always like to see OSMC used in creative ways.
While pressing stop would still be required but at least a clean shutdown can be ensured with the UPS. And depending on the duration of your ignition break might even buffer till your return.
I’m not sure how integrated that product is with OSMC.
The truth is that you have to be very unlucky to have issues (or be an AppleTV user ;)) to have problems with power loss. OSMC’s initramfs can correct small levels of corruption from power loss with a good degree of reliability.
If your issue is to keep track of show progress, then using a remote and pressing stop will do the trick. The UPS will keep the Pi up but you have to press Stop for progress to be recorded. So you will need some form of control.
For some reason I have a very difficult time getting OSMC to display my movies in anything but a file format. I am using the OSMC skin- what skin would you recommend for my solution? I literally just want it to boot up to a graphical list of movies, scroll, and play.
I have an android based headunit (radio, dvd, GPS, TV) in my car and powering off the car will cause occasional issues. I’ve had data corruption issues once in the year I’ve used it.
Some people who have them installed, have setup a system where the unit is powered for a short time after the key is off, to enable clean shutdown, then the power is removed after that.
Just like a UPS would handle a power failure and server shutdown, but with the car battery supplying the actual power.
People who use the Pi in an automotive environment must have a similar solution.
I’d search some automotive related forums to see what other Pi users have used.
The UPS Pico would seemingly support that function, but I don’t know if the playback state would be saved when a os shutdown command was issued.
@sam_nazarko Do you have to send a stop command or will a normal shutdown do that ?
Wouldn’t it be better if you’d use one of the GPIO inputs for sensing terminal 15 (ignition) status and write piece of code to pause/stop playback when ignition goes off?
PI would have to be hardwired to terminal 30 (constant +12V) and left like that. Amount of energy it consumes is nowhere near the amount needed to discharge yor battery even in couple of weeks .
I’m no expert in linux so can’t help with code but I can certainly help with automotive electrics/electronics.
This is the way of all electronic units are being awaken and put to sleep when you turn on/off you car.
I have a Pi 2b Set up in van, with iPassPort keyboard (here)
Run it off a usb mini power converter similar to this. Usb power plug is almost rooted.
Powered from 12V accessories.
I have a 2TB toshiba 2.5 in portable drive plugged in that on the odd occasions shows the rainbow box in top right corner on boot up.
Also a TP-Link usb wifi (TL-WN725N 150Mbps Wireless N Nano USB Adapter) to allow van to connect to home wireless for updates etc.
Standard Video out (not HDMI) connected to RCA inputs in car (correct cable requried, check here)
Did play with UPS Pico for a while, very technical, got it working, albeit, couldnt get the voltage drop sorted due to External USB HDD (Check here for details)
UPS Pico eventually had a fit, and am waiting for the new version from Europe.
All that said, most times we remember to stop the movie (X Key), and sometimes I bother to shutdown.
Lots of times I have shutdown with movie paused, or even playing.
Had this running since about July 2015 (at time of writing this, over 1.5 years.)
Only had one file corruption, but was easy to diagnose and replace.
I have had this working now since this post. The problem comes is that strange things happen when you violently stop the device by cutting power. The first instance was, boot failure. I had to rebuild the whole system and library.
The second instance is that the library files get “unmapped” from OSMC. Basically, you boot in and go to Movies and press play, and nothing happens. But then if you navigate to Videos > Files > SANDISK32 > and click on a title, they play correctly. The issue here is that since the dropdown screen is in the back for the kids, navigating menus is very difficult.
So I am looking at perhaps rebuilding this, or finding a way to make it more streamlined. This is running on an old Pi 1, and boot up is quite slow.
Do you think I would have better performance on a newer Pi 3? Was considering putting in a TFT display and running that up to the cockpit so that the car passenger could control playback with touchscreen… maybe.
Using a pi3 will not fix this which is the true problem. The pi in my truck simply runs all the time, sometimes 48hrs between running the truck. It hasn’t drained the battery yet.
I think I am going to try different approach, possibly. Plug a chromecast into an HDMI to AV converter and power both via USB. Then connect an old phone to network sent out by chromecast and use android mirroring for playback of local media stored in 60g sd card.
Would help with corruption issues, be a smaller form factor, and less configuration.