Pi Plates and exec command

(Drew Brittain) #1

I bought a DAQ and relay plate from Pi Plates and I am having issues getting the scripts to run from openhab items with an exec command. I previously just used GPIO commands in my scripts and they worked fine.

An example of one of my items is:

Switch Heating { exec=“ON: python heat_on.sh,OFF: python heat_off.sh” }

heat_on.sh script is:

import piplates.RELAYplate as RELAY
RelayON(0,1)

The script works in terminal by itself but not in openhab.

0 Likes

(Rich Koshak) #2

See:

Realize that the openhab user has a limited environment with limited permissions and paths. So be sure the openhab user is a member of the right groups, has permissions to read/write/execute everything need, and use the full path to executables.

0 Likes