Automation for the Elderly

  • My mom is 90 with all the shortcomings that come with age. She is in an apartment on a limited income, therefore, no cable TV. The building is metal studs and stucco, which means she lives in a weak Faraday cage that robs her of TV signal, and she's on the worst side of the building relative to the source of the TV signals. No amplification of signal will help (enough). As a result her programs blink on and off all the time from fading TV signals plus she gets very few channels.

    The answer is a video box + storage + playlist. But it has to be highly automated because of her advanced age (and she's legally blind). It's hard for her to learn a 2nd remote control. So what my current idea is, is to find a way to automatically start a smartplaylist on power up, so the remote control is barely used. The smartplaylist needs to auto-start on powerup AND continue playing as if PLAY FROM HERE had been selected by the user in the playlist results.

    Requirements as stated:
    1) Power button on the video-box remote is activated.
    2) Once Kodi starts up, a particular smartplaylist is executed.
    3) The execution of the playlist will continue to play the next item from the playlist when finished, with no user intervention.

    The smartplaylist already exists, but currently I have to be there to start it for her. The playlist plays episodes from 12 TV programs playing in order (Show1 S1E1, Show2 S1E1...Show12 S1E1, Show1 S1E2, Show2 S1E2, Show3 S1E2...Show12 S1E2....). It will only play unwatched episodes. The effect is watching 12 TV shows in parallel from pilot to the last season's last episode. It would play for weeks if let alone, but we don't want that. Since it only plays unwatched episodes, the next power up of the video-box should start the playlist right where it left off.

    I saw a very old video on YT where it looked like they were using Aeon Nox skin on Kodi. That skin had the ability to autostart a playlist.

    What would it take today to make all three requirements happen?

    And now I am thinking this may have been more appropriate in a Kodi forum. My apologies, but thanks if you can help.

  • You can use "kodi-send" to send commands to Kodi, including PlayerContol() for starting a playlist. You can put individual kodi-send commands or a sequence into a bash or python script that's called from a systemd service; allowing you to schedule execution of the script once Kodi is up/running (with a small delay so background things have settled before you start playback). If you need to, you can also query DB files for the content to (re)create the playlist from.

    Things you can do with kodi-send: https://kodi.wiki/view/List_of_built-in_functions

    I'd also consider capturing essential Kodi configuration files and using another script + systemd service to schedule and restore them before Kodi starts; so when the inevitable random or accidental pressing of wrong buttons screws with Kodi config (esp. media views) you can revert to the predetermined configuration with a simple "turning it off and on again" action.

    Good luck :)

  • Things you can do with kodi-send: https://kodi.wiki/view/List_of_built-in_functions

    I went to Kodi forums to post a similar message. Now I remember why I don't go there much. Since their hack they implemented something, 2FA?, that will not allow me to log in, or register? The email they send apparently gets sent over the cell carrier to my phone, instead of over to the internet to my PC, so I never receive it. (email has been disabled on my cell for 5+ years). Kodi is not the only one pulling this. I find it elsewhere too, even medical clinics. So that why I have to ask this question in this forum. Just FYI.

    I think I can edit the scripts, but am not familiar with systemd at all. I will review your link.

    PS You were right about moving from ext HDs to a NAS. But I was right about the cost. Thank God Black Friday prices on the 6-20Tb Exos helped! (raidz2) Wish I'd have gotten 7. I am nearing the 80% mark already.

  • You can use "kodi-send" to send commands to Kodi, including PlayerContol() for starting a playlist. You can put individual kodi-send commands or a sequence into a bash or python script that's called from a systemd service; allowing you to schedule execution of the script once Kodi is up/running (with a small delay so background things have settled before you start playback). If you need to, you can also query DB files for the content to (re)create the playlist from.

    Looks powerful.

    So how does this work?

    PlayerControl(Play, path to smartplaylist)

    And that is in a python file? playlistcontrol.py

    And where does that python file go?

    Are there examples of kodi-send files around, that I could modify? Videos? Where do I learn more?

    Thanks!