Skip to content

Instantly share code, notes, and snippets.

@BenediktNiehues
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BenediktNiehues/bb8a3abda32aab3f2538 to your computer and use it in GitHub Desktop.
Save BenediktNiehues/bb8a3abda32aab3f2538 to your computer and use it in GitHub Desktop.
Module Descriptions
//this is a ModuleDescription for an ActionModule
{
"id": "SendCommand",
"type": "action",
"label": "Send a command",
"shortcut": "command",
"description": "Sends a command to an item",
"input": [
{
"name": "itemName",
"type": "text",
"label": "Item",
"required": true
},
{
"name": "command",
"type": "text",
"label": "Command",
"required": true
},
]
}
// this is an example with config-parameters
{
"id": "SendMail",
"type": "action",
"label": "Send an email",
"shortcut": "mail",
"description": "Sends an email",
"config":[
{
"name":"smtp",
"type":"text",
"label":"SMTP-Server-URL",
"required":true
},
{
"name":"sender",
"type":"text",
"label":"sender email address",
"required":true
}
]
"input": [
{
"name": "subject",
"type": "text",
"label": "Subject",
"required": true
},
{
"name": "to",
"type": "text",
"label": "Receiver",
"required": true
},
]
}
//this is a ModuleDescription for a ConditionModule
{
"id":"Compare",
"type":"condition",
"label":"Compare",
"input":[
{
"name":"operator",
"type":"text",
"label":"operator (<,>,=)",
"description": "the compare operator",
"required":true
},
{
"name":"left",
"type":"text",
"label":"left operand",
"description": "the operand on the left hand of the compare expression",
"required":true
},
{
"name":"right",
"type":"text",
"label":"right operand",
"description": "the operand on the right hand of the compare expression",
"required":true
}
]
}
//this is a ModuleDescription for a TriggerModule
{
"id": "Timer",
"type": "trigger",
"label": "Timer",
"shortcut": "cron",
"input":
[
{
"name": "timer",
"type": "text",
"label": "Time",
"context": "cron",
"required": true
}
],
"output":
[
{
"name": "time",
"type": "datetime",
"label": "Time of the trigger"
}
]
},
//here is another TriggerModuleDescription
{
"id": "ItemUpdateEvent",
"type": "trigger",
"label": "ItemUpdate",
"shortcut": "Event",
"input":
[
{
"name":"item",
"type":"text",
"label":"Item",
"required":true
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment