Muse idevice IO Fire Alarm Automator Example
Question:
How can I take a dry closure in to an IO and trigger events in Automator?
Answer:
Import the code snippet below into Muse Automator to see an example for how to use an IO on idevice with a dry closure from an external source like a Fire Alarm system to trigger events.
[
{
"id": "9ade3afca4ed1077",
"type": "tab",
"label": "FIRE ALARM IO Example",
"disabled": false,
"info": "",
"env": []
},
{
"id": "ad9f6f3f2e92b52b",
"type": "Event",
"z": "9ade3afca4ed1077",
"name": "Event-idevice digitalInput False",
"mojo": {
"device": "idevice",
"event": "//io/1/digitalInput",
"onebased": false,
"eventKind": "Parameter",
"paramType": "Boolean",
"boolParamFilter": "false"
},
"x": 250,
"y": 300,
"wires": [
[
"9b393b9f36b1c14b"
]
]
},
{
"id": "eb58ba853f616673",
"type": "Command",
"z": "9ade3afca4ed1077",
"name": "Command-digitalInput2KPullup true",
"mojo": {
"device": "idevice",
"command": "//io/1/digitalInput2KPullup",
"onebased": false,
"args": true,
"cmdvalue": "Manual configuration"
},
"x": 560,
"y": 100,
"wires": [
[]
]
},
{
"id": "5a88b5a955d0847e",
"type": "Command",
"z": "9ade3afca4ed1077",
"name": "Command-inputMode Digital",
"mojo": {
"device": "idevice",
"command": "//io/1/inputMode",
"onebased": false,
"args": "DIGITAL",
"cmdvalue": "Manual configuration"
},
"x": 540,
"y": 140,
"wires": [
[]
]
},
{
"id": "e15d218e7ee254e5",
"type": "Command",
"z": "9ade3afca4ed1077",
"name": "Command-mode INPUT",
"mojo": {
"device": "idevice",
"command": "//io/1/mode",
"onebased": false,
"args": "INPUT",
"cmdvalue": "Manual configuration"
},
"x": 530,
"y": 180,
"wires": [
[]
]
},
{
"id": "9b393b9f36b1c14b",
"type": "debug",
"z": "9ade3afca4ed1077",
"name": "debug 7",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 560,
"y": 300,
"wires": []
},
{
"id": "194f82b312341c3c",
"type": "Event",
"z": "9ade3afca4ed1077",
"name": "Event-idevice digitalInput True",
"mojo": {
"device": "idevice",
"event": "//io/1/digitalInput",
"onebased": false,
"eventKind": "Parameter",
"paramType": "Boolean",
"boolParamFilter": "true"
},
"x": 240,
"y": 360,
"wires": [
[
"9b393b9f36b1c14b"
]
]
},
{
"id": "7a2e8daa784bb02b",
"type": "Event",
"z": "9ade3afca4ed1077",
"name": "idevice Online True",
"mojo": {
"device": "idevice",
"event": "//Online",
"onebased": false,
"eventKind": "Parameter",
"paramType": "Boolean",
"boolParamFilter": "true"
},
"x": 210,
"y": 100,
"wires": [
[
"eb58ba853f616673",
"5a88b5a955d0847e",
"e15d218e7ee254e5"
]
]
},
{
"id": "1073f20321934ad5",
"type": "Controller",
"z": "9ade3afca4ed1077",
"name": "Controller",
"mojo": {
"controller": "192.168.1.15:80",
"protocol": "http",
"host": "192.168.1.15",
"port": 80,
"username": "admin",
"password": "12rms34"
},
"x": 180,
"y": 40,
"wires": []
},
{
"id": "2778be0424a2a295",
"type": "comment",
"z": "9ade3afca4ed1077",
"name": "See inside for Event explanation",
"info": "When the IO is shorted you will get a false event\nWhen the IO is open you will get a true event\n\nThe above would apply to a normally closed Alarm system\nmeaning it is always shorting the IO\n\nIf the alarm is normally open, you would swap the events.",
"x": 390,
"y": 420,
"wires": []
}
]