The RunScript component allows you to run OS standard scripts.
If Gravio Server is running on Windows it can run batch files, Linux, Raspbian and macOS can run shell scripts.
If it is not Windows, you need to give execute rights to the uploaded file. The uploaded file is placed in <Gravio data folder>/actmgr/data/, so

For the Gravio Folder in your operating system, consult the documentation about Path Handling

You can also pass variable values to the scripts, for example, to pass sensor values.


Command Required The command you like to execute
Output Required The output of the command. cp.Output is set to either “stdout” or “combine”.
Timeout Required Timeout
OutputType Required Set the output type. cp.OutputType can be either “string” or “binary”.

The output of the component is passed on to the cv.Payload

Macintosh Users

Macintosh users must give Gravio HubKit 4 full harddisk access in the security settings if they want to access files outside the Gravio folder. Please find the appropriate settings in your system preferences under the Privacy and Security settings:

Example: Playing an MP3 File

Place an mp3 file in your /actmgr/data folder and use the command afplay (on mac) followed by the filename to play it:

Need more help with this?
Join our slack community for help

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.