@Cr4z33 you are composing a service that does not yet exist
button on doorbell causes window w video stream to
open
appears no one has done that w this video doorbell, welcome to the bleeding edge. u get to MAKE the sausage no one else wants to see!!
a MagicMirror module runs inside a web browser, all in javascript. it can consume info from the outside using url based apis http get or put/post
Now, sometimes, you want module A to work either data from module B. for example calendar. it reads the raw data file (ical/ics), parses all the events, gets the list of pertinent events ( dont care about 2 years ago, only next week…)
and displays them. hm id like a different display, but dont want to learn about all the file reading and parsing and selecting)
MagicMirror provides a way for one module to share its data either others, called Notifications. some identifying string, with some attached data. the mechanism is a broadcast. one send, every other module gets the same message.
if a modules doesn’t understand the identifying string, it ignores the message
if it DOES understand the identifying string, then it MUST understand the format of the attached data.
so, modules that DO participate in this data sharing must document ( in their readme.md file)
what notification strings they send (and its associated data format, if any)
AND
what notifications strings they accept (and its required data format)
nothing going outside the browser is known inside the browser,
to get that kind of info requires some module to be able to bridge the two two environments
i have a simple one
id like done way for a script running outside MagicMirror to trigger a module to fo something (receive a notification it knows about)
so i wrote MMM-CurlToNotification
from the command line outside MagicMirror you can issue the curl command to send a packet of data that turns into a notification sent to all modules
there are other modules that provide similar support (as well as others), mmm-remotecontrol for example
anyhow MMM-MqttBridge does that bridging for MQTT messages. in both directions
mqtt -> notifi(cation) and notifi(cation) to mqtt
but you need to know a bunch of stuff, and figure out how to code the file tgst foes the actual work
i work backwards
i need a video played from a url on demand
what modules can do that
and how do i setup for the on demand part
pick a module RTSPStream or Minfo, read its doc to understand what notifications it understands, and what data it needs
install and configure the selected module
now you ‘could’ use my curltonotification module to verify that the video player module works
then you back up to the MQTT bridge module config to send the same message you just tested with, and what mqtt message will trigger it
then back up, and find/setup what will send that mqtt message
and how it is triggered to to that
you can draw this all out on a piece of paper
coding is just making the computer fo the exact same thing over and over, just faster. if you dont know what, then it cant either
someone presses the doorbell button
how does something outside the doorbell know?
can that something send a msg via mqtt that the bridge is listening for? if not, can i find something that that can take the first things out and get it into our expected mqtt message
repeat along the way,
test each step