Home Assistant : Q&A, Tips & Tricks, Your Configs

jdido87

Expert Member
Joined
Nov 10, 2014
Messages
1,404
Good evening all

I recently stumbled across HA and installed it to run my smart devices. I have a Sonoff basic for the pool pump, Sonoff 4ch Pro for some interior and exterior light and the Sonoff itching switch for the gate motor.

I am going to add 5 Reolink 5MP IP Cameras in the next day or two. I want to use Doods and maybe in future Blue Iris in HA.

Currently I am using my laptop to run HA and Plex Media Server. However, I want to buy a cheap standalone device the will be on permanently in a cupboard somewhere. Will the setup in the link do the trick or is it too low powered.


 

powermzii

Expert Member
Joined
Jun 4, 2007
Messages
4,860
Good evening all

I recently stumbled across HA and installed it to run my smart devices. I have a Sonoff basic for the pool pump, Sonoff 4ch Pro for some interior and exterior light and the Sonoff itching switch for the gate motor.

I am going to add 5 Reolink 5MP IP Cameras in the next day or two. I want to use Doods and maybe in future Blue Iris in HA.

Currently I am using my laptop to run HA and Plex Media Server. However, I want to buy a cheap standalone device the will be on permanently in a cupboard somewhere. Will the setup in the link do the trick or is it too low powered.


If you want to run BlueIris then you'd need at least a 4th gen Intel processor to be on the safe side. For normal Home Assistant you should be fine though.

You CAN get more for that amount though if you trawl Carbonite (for example)



 

xrapidx

Honorary Master
Joined
Feb 16, 2007
Messages
40,309
Anyone have a clean way of displaying a page full of binary sensors ?

There are well over 200...
da93c783f5facd0e96ba32897c1d8600.jpg
 

xrapidx

Honorary Master
Joined
Feb 16, 2007
Messages
40,309
Do you need to see all 200 or just some important ones based on some attribute?
Ideally - its all the network devices - I'd like to colour them according to latency, and see which ones are lagging or unavailable on one screen with limited scrolling.
 

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
12,475
Ideally - its all the network devices - I'd like to colour them according to latency, and see which ones are lagging or unavailable on one screen with limited scrolling.
I would then split that up into multiple custom:auto-entities cards.

1st card filters out everything that is available.
2nd card then order by an attribute, assuming you have a latency attribute of value.

Unfortunately this idea wont give them color. Maybe someone else have an idea for that
 

Speedster

Honorary Master
Joined
May 2, 2006
Messages
21,683
I want to set up an automation for my alarm as follows:
  • Turn on if after 8pm there is no movement downstairs for 10 min.
  • Turn off if the bottom hallway zone triggers within 30sec of the stairwell zone after 5am.
I guess Node Red is the way to go for this?
 

Steamy Tom

Executive Member
Joined
Jan 23, 2019
Messages
8,368
I want to set up an automation for my alarm as follows:
  • Turn on if after 8pm there is no movement downstairs for 10 min.
  • Turn off if the bottom hallway zone triggers within 30sec of the stairwell zone after 5am.
I guess Node Red is the way to go for this?

yep i would say so, but i would be very careful with auotmations for this, at very least consider the daily edge cases, but then also think about when you are away, when you come home late etc
 

TedLasso

Expert Member
Joined
Feb 23, 2016
Messages
3,757
I want to set up an automation for my alarm as follows:
  • Turn on if after 8pm there is no movement downstairs for 10 min.
  • Turn off if the bottom hallway zone triggers within 30sec of the stairwell zone after 5am.
I guess Node Red is the way to go for this?

Not using NodeRed, but using Location status of the primary users (me and wife) to make decisions whether to arm/disarm

1. 7pm arm outside in stay mode if alarm disarmed. Then 90 minutes later ARM are outside in full mode. Can't go into two rooms.
3. 6am disarm alarm if my wife or I am at home. Otherwise, the house stays armed.

YAML:
alias: '[ALARM] - ARM OUTSIDE IF WE AT HOME AFTER 7PM'
description: After 7PM, if both SO and IL are home, arm OUTSIDE
trigger:
  - at: '19:00:00'
    platform: time
condition:
  - condition: state
    entity_id: alarm_control_panel.OUTSIDE
    state: disarmed
action:
  - data: {}
    service: alarm_control_panel.alarm_arm_home
    target:
      entity_id: alarm_control_panel.OUTSIDE
  - data:
      message: OUTSIDE Auto-Armed in STAY MODE - You can still go into Garage/Scullery
      title: Alarm-Notice
    service: notify.mobile_app_SO
  - data:
      message: OUTSIDE Auto-Armed in STAY MODE - You can still go into Garage/Scullery
      title: Alarm-Notice
    service: notify.mobile_app_IL
  - delay: '01:30:00'
  - data: {}
    entity_id: alarm_control_panel.OUTSIDE
    service: alarm_control_panel.alarm_arm_away
  - data:
      message: OUTSIDE Auto-Armed in FULL MODE!!
      title: Alarm-Notice
    service: notify.mobile_app_SO
  - data:
      message: OUTSIDE Auto-Armed in FULL MODE!!
      title: Alarm-Notice
    service: notify.mobile_app_IL
mode: single

Disarm in the morning routine. Not the smartest rule, but works well

YAML:
alias: '[ALARM] - DISARM OUTSIDE IF SO/IL AT HOME AT 6AM'
description: >
  If OUTSIDE at 6AM is armed but INSIDE is disarmed, then disarm OUTSIDE.
  This check to see if INSIDE is disarmed is important , as it tells us
  someone is at home. If INSIDE was armed at 6AM, we can assume no-one is home
  so nothing should be disarmed.
trigger:
  - at: '06:00:00'
    platform: time
condition:
  - condition: state
    entity_id: alarm_control_panel.INSIDE
    state: disarmed
action:
  - data: {}
    entity_id: alarm_control_panel.OUTSIDE
    service: alarm_control_panel.alarm_disarm
  - data:
      Message: Alarm Auto-Disarmed
      Title: Alarm
    service: notify.mobile_app_IL
  - data:
      Message: Alarm Auto-Disarmed
      Title: Alarm
    service: notify.mobile_app_SO
mode: single
 
Last edited:

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
12,475
I want to set up an automation for my alarm as follows:
  • Turn on if after 8pm there is no movement downstairs for 10 min.
  • Turn off if the bottom hallway zone triggers within 30sec of the stairwell zone after 5am.
I guess Node Red is the way to go for this?

Can easy do this in Hass.
For arming.
1. Create a group that contain all the downstairs entities.
2. Create automation that trigger when group is off for 10min with condition time between 8pm and midnight.

For the disarming you want, the condition will be complex. That said, you can do it with a timer. Start timer of 30 seconds when stair or hallway trigger after 5am. 2nd automation also trigger and if timer is active and after 5am do disarm.

That said, auto disarming of an alarm is a bad idea for security.
 

Speedster

Honorary Master
Joined
May 2, 2006
Messages
21,683
Can easy do this in Hass.
For arming.
1. Create a group that contain all the downstairs entities.
2. Create automation that trigger when group is off for 10min with condition time between 8pm and midnight.

For the disarming you want, the condition will be complex.

That said, auto disarming of an alarm is a bad idea for security.
Thanks. I figure if the trigger is that the person has to be moving from our upstairs section downstairs for the alarm to auto-disarm it should be reasonably safe. If an intruder has got themselves upstairs without the alarm triggering, we're in deep trouble already.
 

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
12,475
Thanks. I figure if the trigger is that the person has to be moving from our upstairs section downstairs for the alarm to auto-disarm it should be reasonably safe. If an intruder has got themselves upstairs without the alarm triggering, we're in deep trouble already.
Ok cool I edited my post with an idea for the disarming in Hass.
 

Speedster

Honorary Master
Joined
May 2, 2006
Messages
21,683
@Tinuva and @InternetLuddite, would this work?

- id: "000012"
alias: "Alarm auto-arm home"
trigger:
platform: time
at: "20:00:00"
condition:
- condition: time
after: '20:00:00'
before: '05:00:00'
- condition: state
entity_id: group.onder_alarm
state: "off"
for: 10 minutes
- condition: state
entity_id: alarm_control_panel.home
state: "disarmed"
action:
- service: alarm_control_panel.alarm_arm_home
target:
entity_id: alarm_control_panel.safe_alarm_panel
mode: single
 

Speedster

Honorary Master
Joined
May 2, 2006
Messages
21,683
Trigger need to be the the group off for 10 minutes
Like so:
- id: "000012"
alias: "Alarm auto-arm home"
trigger:
platform: state
entity_id: group.onder_alarm
to: "off"
for: "00:10"
condition:
- condition: time
after: "20:00:00"
before: "05:00:00"
- condition: state
entity_id: alarm_control_panel.home
state: "disarmed"
action:
- service: alarm_control_panel.alarm_arm_home
target:
entity_id: alarm_control_panel.safe_alarm_panel
mode: single
 

Speedster

Honorary Master
Joined
May 2, 2006
Messages
21,683
Yes that looks like what you want for arming

Though I would write out the minutes. Can show later when at a pc
Thanks for the help. It worked last night :). I had the minutes specified differently but got an error as follows:

Invalid config for [automation]: offset 10 minutes should be format 'HH:MM', 'HH:MM:SS' or 'HH:MM:SS.F' for dictionary value @ data['condition'][1]['for']. Got None

I'll tackle the disarming tonight
 

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
12,475
Thanks for the help. It worked last night :). I had the minutes specified differently but got an error as follows:



I'll tackle the disarming tonight
Ok so here is how I write out the minutes, to make it obvious what I am doing. Uses 1 extra line of code but worth it when reading it afterwards.
Code:
  - alias: Turn off porch lights when front door closed for 10min
    trigger:
      - platform: state
        entity_id: binary_sensor.front_door
        to: 'off'
        for:
          minutes: 10
 

MidnightZA

Expert Member
Joined
Mar 9, 2013
Messages
2,452
Anyone update to OS 6 yet? Any issues with PAI or node red? I'm holding off doing the update for a few days
 

TedLasso

Expert Member
Joined
Feb 23, 2016
Messages
3,757
Too scared to even update MQTT to 6.0.1 or whatever that version was that broke PAI. I have a full VM so perhaps should just give it a go for the sake of the community
 
Top