Skip to header Skip to main navigation Skip to main content Skip to footer

Search form

Site branding

Home
What's up, home?

Main navigation

  • Home
  • Story mode
  • About
  • Features
  • Hardware list
  • Videos
  • GitHub (opens in new tab)
  • Daily AI generated stories (opens in new tab)

Part 29: The baby is crying

Breadcrumbs

Breadcrumb

  • Home
  • Part 29: The baby is crying

Main page content

By whatsuphome | 11:20 AM EET, Wed November 30, 2022

TL;DR

I used my iPhone's built-in sound recognition to detect when our baby cries, then logged each event to a text file via Apple Shortcuts. Zabbix monitors the file size changes through its agent on my MacBook, giving me a record of crying frequency over
Baby cry detection

Can you detect a crying baby with Zabbix? Of course you can! By day, I am a monitoring tech lead in a global cyber security company. By night, I monitor my home with Zabbix & Grafana and do some weird experiments with them. Welcome to my blog about the project.

Time really flies. Our little baby girl at home is already about three and a half months old, and that shows in so many ways. If during her first month or two she cried quite a lot and quite easily due gassy stomach and whatnot, she nowadays mostly is a chill mini-human just observing the world.

Which then raised the question for me -- how often she cries? Could I monitor that? Oh yes. And oh no. We'll get to no part later, but let's start with the good bits.

Hey Siri, help me

As I pretty much always have my iPhone with or near me, and wear my Apple Watch nearly 24x7, I thought I would give their sound recognition abilities a try.

To start, I opened the Settings on my iPhone and went to Accessibility --> Sound recognition --> Baby crying and enabled that.

Next, I opened Shortcuts and created a new Personal automation.

No alt text provided for this image

Here's the advanced CRYENGINE in action.

So, every time my iDevice thinks that our baby is crying, it appends to a text file stored on my iCloud account.

Zabbix time!

How to get that data to Zabbix?

I have a MacBook Pro and a Zabbix agent running on that, so the next natural step was to make it monitor that particular text file. There would be so many ways to detect if this file has been changed; as I'm appending to the text file, I just made Zabbix keep an eye on the file size.

No alt text provided for this image

How does that look like on my graphs? Not so surprisingly, the value changes.

No alt text provided for this image

I did also setup a simple trigger that screams if the file size has changed since last check.

No alt text provided for this image

The result? Well, here's some alert history.

No alt text provided for this image

Sleep Learn Adapt reporting

I also added our baby as a Service to my Zabbix, just because it was too fun to skip as the terminology involves child services, parent services and such.

No alt text provided for this image

And here's a totally inaccurate and unmeaningful SLA report about her.

No alt text provided for this image

The wobbly bits

Just like our baby is still clumsy and has lot to learn, it seems that Siri is like that too when it comes to detecting emotions. Yes, Siri can detect if our baby is crying, but it also easily gets worried whenever our baby makes loud joyful sounds. It reminds me about the golden times when T-800 practised smiling. It just doesn't know or understand the human feelings. At least, not yet.

Then the other odd part is that about one day after I enabled the cry detection on my iPhone, it's not doing it anymore. Did the detection process crash? Probably. I have not restarted my iPhone yet, because I just could not bother do that yet. But, in theory we can detect a crying baby, or many more usual sounds like doorbell, dog barking just by using Siri and Zabbix.

I have been working at Forcepoint since 2014 and I think my human skills still beat the ones Siri has.

whatsuphome
zabbix
grafana
siri
babycrydetection
baby
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
I used my iPhone's built-in sound recognition to detect when our baby cries, then logged each event to a text file via Apple Shortcuts. Zabbix monitors the file size changes through its agent on my MacBook, giving me a record of crying frequency over

Search

Who am I?

  • Janne Pikkarainen from Finland 🇫🇮
  • Began with computers in 1986 with C64
  • Doing IT for living since 1999
  • Principal Site Reliability Engineer at Forcepoint
  • A Zabbix Summit speaker every year since 2022
  • Walking, talking Zabbix commercial

Support my project

Buy me a coffee 

Footer menu

  • Contact

What's up, home? | Janne Pikkarainen | contact(at)whatsuphome.fi | 2022 - 2026

Developed and Designed by Janne Pikkarainen