MM & Home Assistant (HASS)
I am finalising my first MagicMirror and was adding the MMM-PIR-Sensor module and had an idea I thought I’d share as it works so well!
I have HASS (https://www.home-assistant.io/ ) so decided to use a microwave presence detector and add a ESPHome node (https://esphome.io/# ) so added a D1 Mini ESPHome node. The output of the microwave sensor now goes to the D1 Mini, which then sends a logic signal to the MM. The ESPHome node also has a number of temperature monitors and a humidity monitor and also gives fine-grained control over things like quiet times etc.
Not only does this give me yet more control of the PIR function of the mirror, it also allows me to use the sensor as part of my overall home presence detection, and force off times at night by programming the ESPHome node.
For those running both, it is well worth having a look at combining them.
@rgn01 If anyone is interested I’ll share the ESPHome code.
soubhik-khan last edited by
@rgn01 sounds exciting! I just got home assistant yesterday, still in the learning curve! Just wondering how to control the MM with home assistant. Currently I have a PIR sensor attached to the MM gpio which controls the display.
Is it possible to make a short video demo of your project and share? I’m very interested to learn!
@soubhik-khan Hi. With my face, I don’t do videos - and you can thank me for that!
Seriously, start with ESPHome on HASS - get an ESPHome node working with a PIR or MW sensor and an LED output. Once you’ve got that working separately to MM, you are ready to connect the two.
At that point, connect the LED output pin (the 3V3 login pin) to the MM GPIO pin and configure the PIR module on MM as normal.
That’s it - they are now connected and you can programme HASS, the ESPHome node and MM as you need.
Hope that helps.
I had this set-up for quite a while now, but I have it configured a bit different. I have a ZigBee human body detector in the bathroom integrated with HA and based on the input I remotely control MM via HA automations.
@ivanov_d due tell where did you find a zigbee human detector? I’m VERY interested!
@cowboysdude https://letyshops.com/r/aliexpress-ww-97c9f222e4cc I got it from this seller on AliExpress as I found it to be the cheapest