More security option for IHost

Hello everyone, I come with two ideas to make the alarm system much better. The first one is the ability for the user to create more alarm modes beyond the three that are currently available, as well as the ability to activate two at a time, e.g. “Away” and a new one created by the user, such as “Smoke Detector” or some other. The creation function would include an option whether it can be activated with others or whether it changes the current one to the new one after activating it. The second idea is related to the first and consists in the possibility of detecting in scenes what type of alarm is currently triggered because currently we can only set in scenes that IHost alarms, but we do not have the option of what mode currently triggered the alarm. Thanks to this option, we could create a scene that will work in a given alarm mode, e.g. it will turn off the fans so that they do not blow out the fire and disconnect the power supply in the house when smoke is detected by a given alarm mode.

1 Like

That is a good idea. My old burglar alarm has “zones” so you can turn it on when you go to bed, if there is a dog in the living room etc. Because it is old I have to use zone B = bed and D = Dog
As regards the second point. It is because they have combined Triggers and Conditions. The same was (and may still be) the case in IFTTT. In Home Assistant, for example, there is a seperate condition section. I can see the wrgument for simplification but I prefer the Home Assistant implementation over the IFTTT one. I think they are just trying to keep things simple for us. I don’t think it would make much difference for them in terms of the code.

On the iHost I’m pretty sure you can do this if you have Node Red installed. Use the alarm status to set a variable with a change node. And then in a separate flow when the alarm is triggered, by a door sensor etc, check the status of the alarm variable you have set with a switch node.

Hi, do you think it’s possible to use ihost security in away mode to activate an external siren and other devices in case of an alarm, in addition to the poor sound of the ihost?

Yes, for reliability I would use a Zigbee switch and connect a normal siren to it. You could connect a wifi switch but then you’d need to have a wifi router than never fails. You can get mini Uninterruptible Power Supply for the iHost and Siren but then you’d need to select a Zigbee or wifi switch and Siren that is lower voltages.

but in case of alarm the only one to react is ihost, I can’t find a way to connect the alarm to a device controlled by the alarm system integrated in ihost

I would need to have a look to be 100% sure but I’m pretty sure the iHost Alarm Status can be used to trigger either and inbuilt scene or a Node Red “flow”.

Where can I find an example of how to do it?

I don’t think it exists but I will try to export a Node Red flow tomorrow. The only thing I will need to know is what a minimum on off cycle should be? Like 15seconds or something. Guessing you already have Node Red installed on a docker? Pretty sure a guide exists for that part.

Yes, I installed Node Red on Ihost, I’m not familiar with how it works, I want to create an alarm with the various Sonoff sensors that I arm and disarm manually with an alert on cell phones and a connected siren.

If you want push notifications on your phone have a look at Pushover. I think it is still $5 for a lifetime account per Operating System. You can do the same with Telegram/Discord etc. but it’s not as easy.

:+1: grazie prima devo risolvere il funzionamento della sirena

[
    {
        "id": "2e36649a594bae11",
        "type": "tab",
        "label": "extend alarm",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "da0fcd5b26544610",
        "type": "event-state",
        "z": "2e36649a594bae11",
        "name": "iHost Alarm",
        "server": "",
        "list": "",
        "category": "ihost",
        "device": "ihost",
        "state": "alarm_state",
        "x": 550,
        "y": 480,
        "wires": [
            [
                "f807007ad1c45062",
                "a26f4f534eb4d465"
            ]
        ]
    },
    {
        "id": "f807007ad1c45062",
        "type": "debug",
        "z": "2e36649a594bae11",
        "name": "iHost Alarm messages",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 800,
        "y": 440,
        "wires": []
    },
    {
        "id": "72f5e013e718702f",
        "type": "switch",
        "z": "2e36649a594bae11",
        "name": "Alarm ON or OFF",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "cont",
                "v": "{\"payload\":{\"alarm_state\":\"alarming\"}}",
                "vt": "str"
            },
            {
                "t": "cont",
                "v": "{\"payload\":{\"alarm_state\":\"no_alarm\"}}",
                "vt": "str"
            }
        ],
        "checkall": "false",
        "repair": false,
        "outputs": 2,
        "x": 1010,
        "y": 480,
        "wires": [
            [
                "888409751d08ed75",
                "3215486567d894d8"
            ],
            [
                "bf1fc29039607140",
                "1deaa90c1c2dbb7d"
            ]
        ]
    },
    {
        "id": "888409751d08ed75",
        "type": "debug",
        "z": "2e36649a594bae11",
        "name": "Alarm ON",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1260,
        "y": 420,
        "wires": []
    },
    {
        "id": "bf1fc29039607140",
        "type": "debug",
        "z": "2e36649a594bae11",
        "name": "Alarm OFF",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1270,
        "y": 580,
        "wires": []
    },
    {
        "id": "3215486567d894d8",
        "type": "delay",
        "z": "2e36649a594bae11",
        "name": "15s Message Rate Limit",
        "pauseType": "rate",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "15",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 1310,
        "y": 460,
        "wires": [
            [
                "0d6377c50fe2ebe2",
                "46f479f5254fb5e5",
                "d7ec185c88f048de"
            ]
        ]
    },
    {
        "id": "1deaa90c1c2dbb7d",
        "type": "delay",
        "z": "2e36649a594bae11",
        "name": "15s Message Rate Limit",
        "pauseType": "rate",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "15",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 1310,
        "y": 540,
        "wires": [
            [
                "57976e1c0f55064c",
                "fff30b44947e12b1"
            ]
        ]
    },
    {
        "id": "a26f4f534eb4d465",
        "type": "rbe",
        "z": "2e36649a594bae11",
        "name": "Only Changes",
        "func": "rbe",
        "gap": "",
        "start": "",
        "inout": "out",
        "septopics": true,
        "property": "payload",
        "topi": "topic",
        "x": 780,
        "y": 480,
        "wires": [
            [
                "72f5e013e718702f"
            ]
        ]
    },
    {
        "id": "0d6377c50fe2ebe2",
        "type": "debug",
        "z": "2e36649a594bae11",
        "name": "After Rate Limit",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1540,
        "y": 420,
        "wires": []
    },
    {
        "id": "57976e1c0f55064c",
        "type": "debug",
        "z": "2e36649a594bae11",
        "name": "After Rate Limit",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1540,
        "y": 580,
        "wires": []
    },
    {
        "id": "46f479f5254fb5e5",
        "type": "control-device",
        "z": "2e36649a594bae11",
        "name": "Secondary Alarm Switch ON",
        "server": "",
        "list": "",
        "category": "",
        "device": "",
        "v2Data": "{}",
        "usePageData": "false",
        "x": 1580,
        "y": 460,
        "wires": [
            [
                "ee6fd54ba4291eb9"
            ]
        ]
    },
    {
        "id": "fff30b44947e12b1",
        "type": "control-device",
        "z": "2e36649a594bae11",
        "name": "Secondary Alarm Switch OFF",
        "server": "",
        "list": "",
        "category": "",
        "device": "",
        "v2Data": "{}",
        "usePageData": "false",
        "x": 1590,
        "y": 540,
        "wires": [
            [
                "79cbd96a5559b154"
            ]
        ]
    },
    {
        "id": "ee6fd54ba4291eb9",
        "type": "debug",
        "z": "2e36649a594bae11",
        "name": "ALARM ON",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1830,
        "y": 460,
        "wires": []
    },
    {
        "id": "79cbd96a5559b154",
        "type": "debug",
        "z": "2e36649a594bae11",
        "name": "ALARM OFF",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1830,
        "y": 540,
        "wires": []
    },
    {
        "id": "55dfe58715482335",
        "type": "pushover",
        "z": "2e36649a594bae11",
        "name": "",
        "device": "",
        "title": "",
        "priority": 0,
        "sound": "",
        "url": "",
        "url_title": "",
        "html": false,
        "x": 1720,
        "y": 380,
        "wires": []
    },
    {
        "id": "d7ec185c88f048de",
        "type": "change",
        "z": "2e36649a594bae11",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "iHost Alarming",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1530,
        "y": 380,
        "wires": [
            [
                "55dfe58715482335"
            ]
        ]
    }
]

assumed using Pushover. I’m using Node-RedNode-Pushover 0.3.0 as my palette addition. Just Import the text to Node Red.

You need to

  1. set node input to iHost

2)set output to new swich on and off

  1. setup pushover node

Edit: realised the above text can look scary. That is how Node Red flows are shared. You are not supposed to read them - just copy and paste the text into the import window. It will understand. I’d add the pushover palette I mentioned first or it’ll complain.

1 Like

Grazie
:+1: