#Shell command pipe not processing, syntax help?

1 messages · Page 1 of 1 (latest)

prisma sleet
#

I'm looking for assistance with a shell command that isn't behaving correctly. I have others operating the same device correctly but they don't have a variable in them, for some reason the pipe isn't processing
device_volume_set: "echo -n '!vol {{ volume }}' | nc -w 1 host.fqdn port"
I also tried
device_volume_set: 'echo -n "!vol {{ volume }}" | nc -w 1 host.fqdn port'
and
device_volume_set: "printf '!vol {{ volume }}' | nc -w 1 host.fqdn port"

Any ideas? thanks!

prisma sleet
#

Shell command pipe not processing, syntax help?

untold canopy
#

The commands can be dynamic, using templates to insert values for arguments. When using templates, shell_command runs in a more secure environment which doesn’t allow any shell helpers like automatically expanding the home directory character (~), using pipe symbols (|) to run multiple commands, or operators redirecting output (such as > and >>).

#

make a shell script to do what you need to do and call that from HA