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

MidnightZA

Expert Member
Joined
Mar 9, 2013
Messages
2,452
Difficult to say that it was the upload. What is clear, the cpu was maxing out, causing the overheat.

You need to either know which process was maxing out cpu, or you should add fan+heatsink cooling to your pi.

Is there any way to see what was maxing out the CPU? Like a history of add-ons CPU usage?

I have an aluminum case that acts as a heatsink, and it works quite well compared to my old plastic case. This is the first time this has happened. My CPU usage is generally sitting around 5-7% on idle and peaks at 30% for a few min while backing up. My temp is usually below 50 degrees and goes up a bit during the back up.

Without the case I think my temps were in the 60 to 70 degree range

1638432231458.png
1638432264550.png

EDIT: Here is a post of the temp difference when I got the case

 

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
12,478
Unless you have something running on the OS that capture it, no way to get historic info that I am aware off.
 

mrb13676

Well-Known Member
Joined
Sep 30, 2007
Messages
151
Has anyone figured out how to integrate the Rieman integral platform sensor into their energy dashboard? I can create the sensors but they don't show up as options for individual devices in the energy dashboard config
 

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
12,478
Has anyone figured out how to integrate the Rieman integral platform sensor into their energy dashboard? I can create the sensors but they don't show up as options for individual devices in the energy dashboard config
Interesting, mine does. Or I use Rieman then create utility sensors based on them, and those show up.

Ie. create daily utlity_meter as I have done in https://github.com/tinuva/home-assistant-config/blob/master/packages/power_sensors.yaml

Code:
utility_meter:
  front_bathroom_geyser_daily:
    source: sensor.front_bathroom_geyser_usage
    cycle: daily
 

mrb13676

Well-Known Member
Joined
Sep 30, 2007
Messages
151
Last edited:

Leno

Expert Member
Joined
May 15, 2005
Messages
2,354
I really wish I could flash my Sonoff B05's

The ewelink home assistant integration is so buggy
Sometimes the lights just do not respond, I have to go to the ewelink plugin page, sign out and sign back in
Have created the 2nd user account as advised so its not the single login only problem :(

I suspect its when the internet goes down, and the link to the cloud is interrupted.
Unfortunately nothing comes up in the error log

I am looking for some led rgb strips for behind the tv etc (less glare than bulbs)
Any recommendations on home assistant compatible controllers that can be flashed?
If the pricing is not too bad ill use the strips instead of the bulbs and give the Sonoffs to my flatmate
 

TedLasso

Expert Member
Joined
Feb 23, 2016
Messages
3,760
Interesting, mine does. Or I use Rieman then create utility sensors based on them, and those show up.

Ie. create daily utlity_meter as I have done in https://github.com/tinuva/home-assistant-config/blob/master/packages/power_sensors.yaml

Code:
utility_meter:
  front_bathroom_geyser_daily:
    source: sensor.front_bathroom_geyser_usage
    cycle: daily

Holy moly. Checked your Github ... I have so much to learn!! Amazing... and timeous, as I just realised my Paradox Insite sub is expiring in 5 days, so I better sort out notifications for triggered alarm zones inside HASS. It's the only thing I don't seem to have setup in my instance, so I never know which zone triggered (because insite gold app on phone was telling me). Must also connect to Signal so both wife and get it faster.

Have to say it sucks not to have a dev background !!
 

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
12,478
Holy moly. Checked your Github ... I have so much to learn!! Amazing... and timeous, as I just realised my Paradox Insite sub is expiring in 5 days, so I better sort out notifications for triggered alarm zones inside HASS. It's the only thing I don't seem to have setup in my instance, so I never know which zone triggered (because insite gold app on phone was telling me). Must also connect to Signal so both wife and get it faster.

Have to say it sucks not to have a dev background !!
Thank you.

I will be honest, its still all a bit of a mess and needs a clean up, and many automations can be improved with newer features from the newer versions.

Anyways, I am sure you figured out how to do the alarm notifications.

Start with grouping your sensors into groups like I have here: https://github.com/tinuva/home-assistant-config/blob/master/packages/alarm.yaml#L94

Then the template sensors I have here: https://github.com/tinuva/home-assistant-config/blob/master/packages/alarm.yaml#L154

The groups should match which sensors will trigger the different modes you arm your alarm/partitions.
The template sensors is to allow you to see what the message will look like when you trigger a notification. Trick I learned from @xrapidx

Then when your alarm goes into triggered state, the automation use the above template sensor inside the message. I have mine here: https://github.com/tinuva/home-assistant-config/blob/master/packages/alarm_notifications.yaml#L48

It is a bit of a manual thing to set this up, but once you have it...man does it make life easier.
 

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
12,478
Btw, there is one more thing that is super useful. I have an alarm view, where I have the following cards:

Screenshot 2021-12-06 at 18.24.28.png

So if the alarm was triggered when we are not at home, the "Recent activity" page will show you if there are still or were other movement. If I only see an outside beam trigger but nothing else, I don't worry too much. But if you saw other stuff, I am for damn sure going to be on my armed response company's case.

custom:auto-entities ftw.

Code:
card:
  show_header_toggle: false
  title: Recent activity (last 60 min)
  type: entities
filter:
  exclude:
    - entity_id: input*
    - entity_id: light*
    - name: '*Battery*'
    - name: '*Mode*'
    - name: '*Connectivity*'
    - entity_id: binary_sensor.back_garage_door
    - entity_id: binary_sensor.front_garage_door_window
    - name: '*Notify*'
  include:
    - entity_id: '*beam*'
      last_changed: < 60
      options:
        secondary_info: last-changed
    - entity_id: '*pir*'
      last_changed: < 60
      options:
        secondary_info: last-changed
    - entity_id: cover*
      last_changed: < 60
      options:
        secondary_info: last-changed
    - name: '*Door'
      last_changed: < 60
      options:
        secondary_info: last-changed
    - name: '*Window'
      last_changed: < 60
      options:
        secondary_info: last-changed
    - name: '*Pet Door*'
      last_changed: < 60
      options:
        secondary_info: last-changed
    - entity_id: sensor.jessie
      last_changed: < 60
      options:
        secondary_info: last-changed
    - entity_id: sensor.ziva
      last_changed: < 60
      options:
        secondary_info: last-changed
    - entity_id: sensor.vuur
      last_changed: < 60
      options:
        secondary_info: last-changed
    - entity_id: sensor.vlam
      last_changed: < 60
      options:
        secondary_info: last-changed
show_empty: false
sort:
  method: last_changed
  reverse: true
type: custom:auto-entities
 

MidnightZA

Expert Member
Joined
Mar 9, 2013
Messages
2,452
I am looking for some led rgb strips for behind the tv etc (less glare than bulbs)
Any recommendations on home assistant compatible controllers that can be flashed?
If the pricing is not too bad ill use the strips instead of the bulbs and give the Sonoffs to my flatmate

You can use wled and a microcontroller like a D1 mini. It's a bit of a task to set it up correctly. I have the Sonoff L1 rgb controller and that also cant be flashed (it can, but I just dont have the skills to do it), and I'm considering going the wled route for my TV

Btw, there is one more thing that is super useful. I have an alarm view, where I have the following cards:

View attachment 1208110

So if the alarm was triggered when we are not at home, the "Recent activity" page will show you if there are still or were other movement. If I only see an outside beam trigger but nothing else, I don't worry too much. But if you saw other stuff, I am for damn sure going to be on my armed response company's case.

custom:auto-entities ftw.

Code:
card:
  show_header_toggle: false
  title: Recent activity (last 60 min)
  type: entities
filter:
  exclude:
    - entity_id: input*
    - entity_id: light*
    - name: '*Battery*'
    - name: '*Mode*'
    - name: '*Connectivity*'
    - entity_id: binary_sensor.back_garage_door
    - entity_id: binary_sensor.front_garage_door_window
    - name: '*Notify*'
  include:
    - entity_id: '*beam*'
      last_changed: < 60
      options:
        secondary_info: last-changed
    - entity_id: '*pir*'
      last_changed: < 60
      options:
        secondary_info: last-changed
    - entity_id: cover*
      last_changed: < 60
      options:
        secondary_info: last-changed
    - name: '*Door'
      last_changed: < 60
      options:
        secondary_info: last-changed
    - name: '*Window'
      last_changed: < 60
      options:
        secondary_info: last-changed
    - name: '*Pet Door*'
      last_changed: < 60
      options:
        secondary_info: last-changed
    - entity_id: sensor.jessie
      last_changed: < 60
      options:
        secondary_info: last-changed
    - entity_id: sensor.ziva
      last_changed: < 60
      options:
        secondary_info: last-changed
    - entity_id: sensor.vuur
      last_changed: < 60
      options:
        secondary_info: last-changed
    - entity_id: sensor.vlam
      last_changed: < 60
      options:
        secondary_info: last-changed
show_empty: false
sort:
  method: last_changed
  reverse: true
type: custom:auto-entities

That recent activity card is sweet. I know how my whole afternoon is going to be spent tomorrow
 

Grumpy Old Man

Senior Member
Joined
Nov 12, 2008
Messages
543
I really wish I could flash my Sonoff B05's

The ewelink home assistant integration is so buggy
Sometimes the lights just do not respond, I have to go to the ewelink plugin page, sign out and sign back in
Have created the 2nd user account as advised so its not the single login only problem :(

I suspect its when the internet goes down, and the link to the cloud is interrupted.
Unfortunately nothing comes up in the error log

I am looking for some led rgb strips for behind the tv etc (less glare than bulbs)
Any recommendations on home assistant compatible controllers that can be flashed?
If the pricing is not too bad ill use the strips instead of the bulbs and give the Sonoffs to my flatmate

Have a look at WLED. It runs on anything from a Sonoff Basic to any nodemcu. Dr. Zzzz has a few tutorials on YouTube for this as well. Best of all - easy intigration in Home Assistant.
 

mrb13676

Well-Known Member
Joined
Sep 30, 2007
Messages
151
Thank you.

I will be honest, its still all a bit of a mess and needs a clean up, and many automations can be improved with newer features from the newer versions.

Anyways, I am sure you figured out how to do the alarm notifications.

Start with grouping your sensors into groups like I have here: https://github.com/tinuva/home-assistant-config/blob/master/packages/alarm.yaml#L94

Then the template sensors I have here: https://github.com/tinuva/home-assistant-config/blob/master/packages/alarm.yaml#L154

The groups should match which sensors will trigger the different modes you arm your alarm/partitions.
The template sensors is to allow you to see what the message will look like when you trigger a notification. Trick I learned from @xrapidx

Then when your alarm goes into triggered state, the automation use the above template sensor inside the message. I have mine here: https://github.com/tinuva/home-assistant-config/blob/master/packages/alarm_notifications.yaml#L48

It is a bit of a manual thing to set this up, but once you have it...man does it make life easier.
This is great.. Was looking at notifications today after finally getting the ip150 to talk to HA.....
Interesting that you chose Slack - was this to get push notifications on your phone? I'm trying to figure out how to get the triggered zone to reflect in the native ios notification - suspect that when I look at it in the morning it may make more sense.....
 

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
12,478
This is great.. Was looking at notifications today after finally getting the ip150 to talk to HA.....
Interesting that you chose Slack - was this to get push notifications on your phone? I'm trying to figure out how to get the triggered zone to reflect in the native ios notification - suspect that when I look at it in the morning it may make more sense.....
Slack...

Personal choice/opinion.

Most people are happy with Telegram or the built-in home assistant app notifications.

For me, these are the reasons.
1. I like to see the history (telegram also does this)
2. Splitting different notifications into different channels with different settings. I have a #logs channel, which is muted and generally doesn't interrupt my day to day work, but I can send notifications there are log items. So if something weird happened and I know it sends updates there I can kinda figured out what happened and why it did something at the time it did.
3. Its far easier to create a new channel and just send notifications there compared to telegram where I have to go and figure out some random id for the group or contact. Annoys me.
4. Slack, like the built-in HA notifications, can do actionable notifications with custom automations. Again, you can see who pushed which button.

For point #1. If my front beam trigger while the alarm is not armed, home assistant takes a snapshot of the front camera and sends it to slack. Really useful to see why a front beam regularly trigger at 4am in the morning. Neighbor's cat.

So I really can't tell you what to use. You have to choose what you prefer and why and go with it :)
 

mrb13676

Well-Known Member
Joined
Sep 30, 2007
Messages
151
Awesome. Going to give Slack a try - it seems to be more customizable than the standard notifications…….
 

R4m80

Well-Known Member
Joined
Oct 31, 2014
Messages
370
There is an option inside the app where you can tell them not to sell your data.
 

TedLasso

Expert Member
Joined
Feb 23, 2016
Messages
3,760
@Tinuva : So I am trying your recommendations but still a bit thick in understanding how it works. Sorry:ROFL:

Looking at your code was also confusing as many of my zones have a very similar name , so I was wondering if we had the same installer then realised my guy only used to do paradox and yours is a DSC.

In my learnings, I picked up that if a zone was called 'Front O/D Beam' in the alarm and then was first brought by PAI into HA, it would be called Front_O_D_Beam .If I then renamed the zone, on the Alarm to say 'Front OD Beam', then two entities end up in HA. The old one and the new one as Front_OD_Beam. I decided to delete the whole PAI MQTT topic and bring them in again. So at least it's all cleaner now and I've fixed up all my bypass and other switches that I had to use the names, including front end.

So the first step is to group the sensors/switches for the various states, armed away, armed home into a group. Using your rule, is why I started renaming alarm zones to be more standard e.g. PIR / Door / Window at end of zone name. But I have two partitions and it's the external partition which is first put into armed home and then armed away state every night. The interior partition is only armed if no one is at home.

But I just can't work out what I should be doing to get a notification and was wondering if @xrapidx or someone with Paradox alarm could share their notification code or automation. In my case, it's simply just going to be a HA notification (don't need Signal, telegram or anything else).

Example of binary switches/sensors I currently have for every alarm zone which appear in HA and can be used.

YAML:
#Alarm Zones
    ####Carport PIR
  - platform: mqtt
    state_topic: "paradox/states/zones/Carport_PIR/open"
    name: "Carport PIR - status"
    payload_on:  "True"
    payload_off:  "False"
    device_class: motion
  - platform: mqtt
    state_topic: "paradox/states/zones/Carport_PIR/was_in_alarm"
    name: "Carport PIR- was in alarm"
    payload_on:  "True"
    payload_off:  "False"
    device_class: motion
  - platform: mqtt
    state_topic: "paradox/states/zones/Carport_PIR/alarm"
    name: "Carport PIR - Alarm!"
    payload_on:  "True"
    payload_off:  "False"
    device_class: motion

YAML:
#Alarm Zone Bypass Switches
    ####Carport PIR
  - platform: mqtt
    state_topic: "paradox/states/zones/Carport_PIR/bypassed"
    command_topic: "paradox/control/zones/Carport_PIR"
    payload_on: "bypass"
    payload_off: "clear_bypass"
    name: "Carport PIR - Bypass"
    state_on: "True"
    state_off: "False"
    ####Garage Outdoor PIR
  - platform: mqtt
    state_topic: "paradox/states/zones/Garage_OD_PIR/bypassed"
    command_topic: "paradox/control/zones/Garage_OD_PIR"
    payload_on: "bypass"
    payload_off: "clear_bypass"
    name: "Garage Outdoor PIR - Bypass"
    state_on: "True"
    state_off: "False"



My logic (poor logic) is telling me since I have the Alarm switch for each zone, I should be able to plug them all into an automation as a trigger and then send a notification if Alarm is in away/armed_home state.


YAML:
alias: ALARM - TEST NOTIFICATION
description: ''
trigger:
  - platform: state
[B]    entity_id: binary_sensor.carport_pir_alarm[/B]
    from: 'off '
    to: 'on'
    for:
      hours: 0
      minutes: 0
      seconds: 2
      milliseconds: 0
condition:
  - condition: state
    entity_id: alarm_control_panel.perimeter
    state: armed_away
action:
  - service: notify.mobiledevicesonly
    data:
      title: [B]ALARM in ZONE XXXXX[/B]
mode: single

For the above code, is what I am showing below , the correct way to add every zone into the trigger section that I am interested in receiving a notification for?

YAML:
trigger:
  - platform: state
    entity_id:
[B]     - binary_sensor.carport_pir_alarm
     - binary_sensor.front_od_beam_alarm
     - binary_sensor.xxxx_alarm[/B]
    from: 'off '
    to: 'on'
    for:
      hours: 0
      minutes: 0
      seconds: 2
      milliseconds: 0

Second and this is I guess the part, where I show how dense I really am. How do I change the message body to show the name of the zone that triggered

YAML:
action:
  - service: notify.mobiledevicesonly
    data:
      title: ALARM in ZONE[B] XXXXX[/B]
mode: single

I don't want to give up and need to sort this crap our as my insite gold app expires tomorrow and I hope not to pay them again. Even the Wife is happier to manage alarm inside HA.
 

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
12,478
@TedLasso

So if you have 2 partitions, you should have 2 alarm cards in the UI right?

So you want 4 groups of sensors.

group1: partition1armed_away (all sensors for this partition)
group2: partition1armed_home (only sensors for armed home on this partition)
group3: partition2armed_away (all sensors for this partition)
group4: partition2armed_home (only sensors for armed home on this partition)

So then you also create 4 template sensors, one for each group. It will always show which sensors for that group is triggered, but you will use it to get a snapshot at the time the group is triggered for alarm.

So then, you have 4 automations.

automation1: trigger: partition1 condition: partition1 is/was armed_away action: send notification with template1 for group1

Same for the rest.

The idea: Only send sensors that would trigger the specific partition for the mode it was triggered.
Otherwise, you get everything that is triggered but its possible they were not actually triggering the alarm itself.

Does this help?
 
Top