Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Jul 2020
    Posts
    6

    PiCorePlayer - turning on and off in LMS via GPIO

    I've currently got a few Pis set up and powered on all the time. I turn them on and if in LMS as desired depending on where I want music.

    I'm trying to find a way to add a button to the GPIO so I can turn the player's state on and off in LMS when I enter a room. All my searches seem to throw up information on physically turning the devices on and off, which I don't really want to do and I'm not entirely sure what the correct terminology is for what LMS calls 'shutdown', since device and Squeezelite don't actually shutdown.

    I know I can use 'pcp power on' and 'pcp power off' over SSH so I guess I can fire these from a script, but I can't work out how to find a player's current state in LMS to know whether it needs turning on or off when pressed.

    Has anyone tried this and can give me any pointers?

  2. #2
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    3,252
    if all you want is a toggle, then just run

    pcp power
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •