Home Assistant integration
The monitoring solution would not be complete without integrating it back into Home Assistant. I set up a simple REST sensor to query the number of alerts from Alerta’s HTTP API.
packages/health_check.yaml
sensor:
- name: alerta
platform: rest
resource: http://tower.local/api/alerts?status=open
headers:
Authorization: Key soverysecret
value_template: "{{value_json.total | int}}"
unit_of_measurement: ""
Lovelace Conditional Card
The following card is displayed if alerts exist:
type: conditional
conditions:
- entity: sensor.alerta
state: '1'
card:
type: picture-entity
tap_action:
action: url
url_path: 'http://tower.local/alerts'
image: /local/images/alert.jpg
show_state: false
name: New System Alert
entity: sensor.alerta
Advertisement Begins
Advertisement End
Dashboards monitoring dashboards monitoring people
I said before monitoring dashboards is the wrong way to go about system monitoring. This is true is you use it to manually detect problems rather than raise awareness of problems. It’s a stark difference.
The Alert image does not show unless there are actionable alerts. (99% of the time, there are none!).
Push notifications have been set up and I use those for other reasons (doorbell for example), the thing is I really couldn’t care about the Wifi connectivity of the fan in my bedroom when I am on a night out. I don’t need to be on call 24/7 and respond immediately.
These types of smart home problems can be actioned soon enough when I see the alert on the dashboard. The point is, the alert is positive alert – something definitely failed and requires me to fix it. All data analysis and dull monitoring were done in an automated manner. I am not a slave to the dashboard and am required to check it constantly, however, when something goes wrong I am made aware of it unintrusively. The image below shows the wealth of information collected in Alerta. Most notably, the host
identifying which IoT device stopped sending heartbeats.
Conclusion
MY MISSION
This blog started nearly 10 years ago to help me document my technical adventures in home automation and various side projects. Since then, my audience has grown significantly thanks to readers like you.
While blog content can be incredibly valuable to visitors, it’s difficult for bloggers to capture any of that value – and we still have to work for a living too. There are many ways to support my efforts should you choose to do so:
Consider joining my newsletter or shouting a coffee to help with research, drafting, crafting and publishing of new content or the costs of web hosting.
It would mean the world if gave my Android App a go or left a 5-star review on Google Play. You may also participate in feature voting to shape the apps future.
Alternatively, leave the gift of feedback, visit my Etsy Store or share a post you liked with someone who may be interested. All helps spread the word.
BTC network: 32jWFfkMQQ6o4dJMpiWVdZzSwjRsSUMCk6
We covered how to do system monitoring for smart homes in this post, including an introduction to Alerta as a plug-and-play solution for compiling and deduplicating alerts from dozens of sources. I look forward to feeding more heartbeats to Alerta to ensure system faults are detected immediately. Monitoring was on my to-do list for a long time and it never received the attention it deserves. Maybe my bike theft could have been avoided.
If you want to receive a push notification on a night out that your shed light has been unresponsive for 15min… it’s up to you 🙂 Personally, I would find that too intrusive considering this is for a hobby smart home and not a multi-million dollar asset management system.