Read the statement by Michael Teeuw here.
How can you use external device (esp32cam, etc.) In magicmirror?
-
Can someone give a detailed step-by-step manual howto use devices for example a esp32cam or esp with a pir in magicmirror. Especially when you have MM installed on something else then a Pi?
This so you can use a PIR or cam on an other location, for example the frontdoor, where’s the MM is in the hallway?
-
@MarkV there is no single set of instructions. but you would have to have some support for wifi or Bluetooth or mqtt communications w the thing, cam or pir or whatever. and then you would need some software that can use the communications to get the info from the thing…
and then you would need a MagicMirror module to get that info and present it.
maybe mmm-ipcam can handle the camera if it supports the right protocols.
remote pir I have not seen, but maybe it’s got a python script which you can use to get the data and then make a module by changing one of the other pir modules
-
@MarkV
It depends on how your device can communicate with the world.
Can your device support REST API? There are some modules for that.
MQTT? Also some modules exist.
Can the device activate IFTTT? It is probably possible.
HID keyboard simulation through USB wiring? Possible.
other ways? possible or not. Let’s check.But when your device doesn’t have any method to communicate with outside, you need to provide it first. and that is not MM’s job. So, examine what your device has.
-
@MarkV
Hi,as @MMRIZE wrote already there are plenty of ways to interact with ESP or Arduino boards.
I use a couple of them in my house to provide i.e. temperature values and control some led strips. One of them has a radar sensor connected which signals user presence to my mirror.I started by connecting two Arduinos to my Raspberry hosting the mirror by serial console and reacted to messages send by gesture sensors (turn on/off display, increase/decrease volume, play radio, etc. with MMM-Serial-Notifications).
As i started playing around with ESP boards i changed to make HTTP calls to the boards i.e. by MMM-CommandToNotification and wrote my first temperature module MMM-Temperature.
My first user presence detection used the HTTP API of MMM-Remote-Control to send notifications to my MMM-Screen-Powersave-Notification. The notification got triggered by a simple HTTP call of the ESP. My current presence detection uses MQTT to publish the values to the mirror.
I added more and more ESP boards to my setup and ended up using MQTT to both control the boards and get values of them. In consequence i took over the ownership of MMM-MQTTbridge, wrote a module to control led strips connected to ESP boards (MMM-LEDStripControl) and wrote a universal module to display values of any notification (MMM-ValuesByNotification).
As i build a house the last two years and added KNX-Bus home automation to it i now use a installation of Node-Red to control my bus devices, convert values of ESP boards, control my Christmas decoration and a lot of more stuff.
My cameras are connected to my Synology NAS thats why i build MMM-SynologySurveillance which is able to display simple MJPEG streams of ESPCams (i.e. flashed with this sketch https://github.com/arkhipenko/esp32-cam-mjpeg-multiclient), too.
As an alternative MJPEG streams can by displayed with my MMM-EmbedURL module by using aimg
embed element.
I use MMM-EmbedURL to embed my whole Node-Red dashboard at one profile/page of my mirror.
I added some touch enabled icons with my MMM-TouchButton to my mirror to be able to switch on some lights if i see movement on my camera.Soooo. As a conclusion i can say there are a lot of ways to integrate ESP boards but as there are many different ways there are no complete walk-through tutorials.
Most of my modules have some examples checked in so you maybe want to give it a try.
I strongly suggest to setup a MQTT Broker (i.e. Mosquitto) to interact with the boards. -
@wishmaster270 Wow, what a great answer. Would love to see your system in action, it sounds superb.