If you've seen the Bathroom Camera project, then you might already know, that I like to play with the Meraki gear for unusual projects.
Story Time
As soon as I've heard about the MV2 Camera in a PVT session I knew that it would be perfect for me as a baby monitor. As I was a little bit nervous about the planned shipping date of the MV2 and the calculated birthdate of my child, I've contacted @MeredithW and told her about my plans with the MV2 and the timing issue. Gladly she liked the Idea and prepared the way to let me (late) join the MV2 beta program. Thanks again!
Why did I go for the MV2 and not for a real baby monitor with video?
- The flexibility of the MV2 is perfect for this job, as you can quickly change its position, angle, the room and with its mounting options you can put it almost everywhere, even in non official ways =D
- The security level of the MV2 is higher than on official baby monitor products from different vendors.
You've probably heard scary stories about hacked Wi-Fi cameras & baby monitors. - I can securely watch the stream also from the outside of the network
- I wanted a SMART baby monitor
Used Components
- MV2
- MV72X (for testing purposes, before I got my hand on the MV2)
- MX67W, MS120, MR33/36 for the network/dashboard connection (but that’s not relevant here)
- Home Assistant - Smart Home automation central, which can combine various smart home systems. It is also hosting these applications
- MotionEye - Used as an NVR for the Camera
- Node-Red - for automations & communication between the MV2 (over MQTT) and Loxone
- MQTT broker
- Loxone - The smart home system of my house
Baby monitor modes
Basically, I can run the MV2 under 2 different baby monitor modes
"normal" Baby monitor
Just start the Meraki app on the monitor or open the dashboard in a browser and watch the livestream with audio. Just like with any other MV camera.
Smart baby monitor
That way the MV is fully integrated into the house thanks to MV-Sense and the new enhanced audio sense features.
Development & Integration
I’ve started this project before I’ve got the MV2 and before the child was born. I wanted to be “ready”, when the child is here.
I had an MV72X lying around and both models can use the MV-Sense audio notifications, so this one was a perfect development device.
I’ve used some baby cry sounds from YouTube and played them over a speaker to the MV. The MV is pushing all the data to the MQTT Server. (Interesting fact: The camera determines a baby cry as a fire alarm with 98%-99% probability.)
It’s not possible to connect Loxone with MQTT directly. Loxone has “Virtual Input” devices, which can be set via UDP or over http.
So to make this work I’ve used a simple node-red flow
- Subscribing on the merakimv topic on MQTT
- Converts the json data to an object.
- A small function which converts the data to an easier parse able string on the Loxone end
- Send the converted string over UDP to Loxone
- Just a debug msg of the payload for troubleshooting purposes
The next step was to create a few “scenes” in Loxone.
- Blink lights – Home Office Room
- Blink lights – living room
- Dimming lights – bedroom, nightstand, child’s room, hallway
Loxone knows where people are in the house over different kind of sensors.
When a baby cry (= ”Fire alarm”) gets triggered Loxone will send a notification to the phones and it will play the blink lights scenes, if someone is in that specific room. This is helpful as you will also have an visual alert.
In the night it will turn on the dimming lights scene. That way you don’t have to turn them on by yourself and you can just walk to the child without bothering about the lights.
My tests with the “baby cry” sound from YouTube, did a really good job here. Sadly, the reality is always different:
First, the “fire alarm” will only be triggered, when the baby is already completely crying. So that's already too late for an alarm. For that reason, I’ve changed the detection from the fire alarm to the audio level and created a switch in Loxone to set the trigger value. Currently everything over -40 will trigger the alarm. There are some additional checks to make sure, that it won’t trigger any additional alert, when my girlfriend or I are with the baby.
Second, the baby is sleeping in the bedroom. Therefore, I currently don’t need the “dimming lights” scene
MotionEye
MotionEye is an open-source NVR solution. You must enable rtsp direct stream on the MV to make it work and that’s it.
MotionEye will connect to the stream and convert the stream and/or save it directly to the disk.
I’m using MotionEye as an alternative to Cloud Archiving for 2 simple reasons
- I have 5 cameras in total (4x MV72X and 1x MV2). For cloud archiving they would need too much upload bandwidth 24x7
- It doesn’t cost me anything extra (except for electricity & hard disk space)
What’s next?
I have some plans for a better integration:
motion-based events additionally to the audio level.
Detect the camera location -> dim (turn on) the lights in that specific room.
stream the live feed from the camera to google Chromecast on an event