RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    script driven message to alert user while in emulationstation

    Scheduled Pinned Locked Moved Help and Support
    terminalscript
    4 Posts 2 Posters 347 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      pinomnomnom
      last edited by pinomnomnom

      Hi all,

      I'm running some Adafruit fuel gauges with my portable project so I can monitor my battery life. I'd like to be able to create some kind of alert while I'm playing game so I can save, knowing that shutdown is around the corner, as a way of avoiding draining my batteries.

      I'll have a conditional for the shutdown based on battery life percentage, but what I'm wondering is if there's a way to create an alert.

      Side note - os.system or subprocess seems to shutdown Pi regardless of whether a conditional is met, so I have to troubleshoot this.

      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by

        For RetroArch, you can enable the network control interface [1] and send a message through SHOW_MSG command, but a general solution to show an alert message would work only if you're running a desktop env (X11 or Wayland) - playing an audio sound instead would work seamlessly.

        [1] https://docs.libretro.com/development/retroarch/network-control-interface/

        P 1 Reply Last reply Reply Quote 0
        • P
          pinomnomnom @mitu
          last edited by pinomnomnom

          @mitu said in script driven message to alert user while in emulationstation:

          For RetroArch, you can enable the network control interface [1] and send a message through SHOW_MSG command, but a general solution to show an alert message would work only if you're running a desktop env (X11 or Wayland) - playing an audio sound instead would work seamlessly.

          [1] https://docs.libretro.com/development/retroarch/network-control-interface/

          Thanks, that worked for QUIT using the example in the documentation, but where can I read more about what's needed to use SHOW_MSG?

          mituM 1 Reply Last reply Reply Quote 0
          • mituM
            mitu Global Moderator @pinomnomnom
            last edited by

            @pinomnomnom said in script driven message to alert user while in emulationstation:

            but where can I read more about what's needed to use SHOW_MSG?

            Maybe the source or the PR that added the functionality, I can't find any other reference in the Libretro docs about it.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post

            Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

            Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.