The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
HomeyScript - share your scripts - main discussion topic
Write scripts for Homey, for when the Flow Editor might not be enough.
App store link: HomeyScript App
Wiki: HomeyScript Wiki (additional examples and information can be added here)
Visit https://homeyscript.athom.com to manage your scripts.
- Run a script as a Flow 'and' or 'then' card
In HomeyScript, you can access a few global objects:
Homey- A HomeyAPI instance. https://developer.athom.com/
_- Lodash. https://lodash.com/
fetch- The Fetch API. https://developer.mozilla.org/
console- V8 Logging API's.
log(...args)- A shortcut function to append to the output log.
say(text)- A shortcut function to make Homey speak.
__filename__- The script filename.
__script_id__- The script ID.
args- An (optional) Array of script args.
It is possible to trigger a script remotely using the Homey Web API.
let HomeyScript = await Homey.apps.getApp('com.athom.homeyscript'); HomeyScript.ApiPost('script/<ScriptID>/run', [arg1, arg2]);