Shell_command cant get a script to run

Hi Everyone,

really struggling to get shell_commands to run (hassbian setup)

I need to control a LED dimmer that ive built following quindorian’s awesome LED project ( that responds to commands via netcat

running the scrips via ssh terminal works perfectly fine - but I cant get HA to run them, below is from my current config

quinled_kitchen_100: /home/homeassistant/.homeassistant/shell_commands/’
quinled_kitchen_75: /home/homeassistant/.homeassistant/shell_commands/
quinled_kitchen_50: /home/homeassistant/.homeassistant/shell_commands/
quinled_kitchen_35: /home/homeassistant/.homeassistant/shell_commands/
quinled_kitchen_15: /home/homeassistant/.homeassistant/shell_commands/
quinled_kitchen_00: /home/homeassistant/.homeassistant/shell_commands/’

alias: Set Kitchen to 100% Brightness
- service: shell_command.quinled_kitchen_100

alias: Set Kitchen to 0% Brightness
- service: shell_command.quinled_kitchen_00

What errors are you getting in the log?

No errors, that’s part of the frustration - just does not seem to run.

try changing one to something like:

quinled_kitchen_100: '/bin/bash -c "/home/homeassistant/.homeassistant/shell_commands/"'

to force it to run in bash and see if it makes any difference

Also just noticed the odd single quote at the end of your line… and one not at the start on a few of the lines… assume that’s a copy/paste issue into the forum?

managed to get scripts to run by editing sudoers… not ideal, this is just a test environment at the moment. so looks like lack of permissions for homeassistant user to execute

sudo visudo
homeassistant ALL=(ALL) NOPASSWD:8ball:

You can actually do, so it’s only allowed to run that one command as sudo, and block all other sudo tries.

myusername ALL = (root) NOPASSWD: /path/to/my/program

Not too sure how it works with .sh tho.

Thanks - I will give that a try