core: Shell Command Stopped Working Post 2022.7 Core Upgrade

The problem

After upgrading to Core 2022.7 last night from 2022.6.7, Shell Commands are not working anymore. The same command runs fine manually from the Terminal window. However, if called from an automation it throws this error.

Error running command: paplay /media/sound_files/back_door.wav, return code: 127

What version of Home Assistant Core has the issue?

2022.7

What was the last working version of Home Assistant Core?

2022.6.7

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Shell Commands

Link to integration documentation on our website

https://www.home-assistant.io/integrations/shell_command/

Diagnostics information

No response

Example YAML snippet

shell_command:
  back_door: "paplay --volume 60000 /media/sound_files/siren.wav"

Anything in the logs that might be useful for us?

Core logs throw:

> Error running command: paplay /media/sound_files/back_door.wav, return code: 127

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 27 (4 by maintainers)

Most upvoted comments

2022.7.1 is out. I took my instance back to 2022.6.7 until this is resolved. Can someone with 2022.7.1 check if the issue is resolved?

2022.7.1 is not OK.

In my case it’s still not working on 2022.7.1

Same here with:

shell_command: copy_photo: “cp /local/images/photo129.jpg /local/images/photo_show.jpg”

This doesn’t work either in devtools/services:

service: shell_command.copy_photo data: copy_photo: “cp /local/images/photo95.jpg /local/images/photo_show.jpg”

I have a similar Problem. In my case i use shell commands to send ssh commands to other devices via “ssh -i /config/.ssh/id_rsa -o StrictHostKeyChecking=no %user%@%device%”. Before the update it worked fine but now it wants me to enter a password everytime even though the ssh key from home assistant is in the authorized_keys file on the devices.