Read the statement by Michael Teeuw here.
sending notification on external event
-
Hi,
I got the morror running with the help of this forum, thanks for that.
I am a (pro) user of ioBroker home automation. A shelly sensor gives me a trigger for when my doorbell is ringing, ending up as a data point in ioBroker.Also I have a webcam at the door that can show a snapshot of the door. I have a snapshot URL in ioBroker, giving me a direct URL of the cam.
I am using https://github.com/darickc/MMM-BackgroundSlideshow as a slideshow on the mirror.
I would not like to send a notification to the slideshow to show the snapshot URL once the door bell is ringing. In ioBroker I have the option to run Javascript or command line .sh or call an API when the doorbell is ringing.
Ideally that would let me trigger the notification for the slideshow above.
It has the right notificationtype “BACKGROUNDSLIDESHOW_URL” that would let me do that.
But I would like to do it via ioBroker and trigger it from there.Any suggestions? I have looked into various “helper” modules, but there does not seem to be a good solution.
Thanks,
chrga -
@chrga see my curl to notification module
Just a simple http post
https://github.com/sdetweil/MMM-CurlToNotification -
I just learned that via MMM-remote, I should be able to do it, but while I get success in the browser when entering an API url, the notification does not show up in https://github.com/darickc/MMM-BackgroundSlideshow and also does not show in the logs.
So maybe the issue is on the side of the receiving module!?Then @sdetweil your suggestion will not work either, as it basically does the same as MMM-remote, is that right?
-
@chrga MagicMirror has to be configured to allow remote access
In config.js
address:”0.0.0.0”, ipWhitelist:[], -
@chrga also, for debugging, install
MMM-ViewNotifications -
@sdetweil yes, this is allowed, as I use client server environment, but thanks, good point
-
@chrga ok. Should be nothing to stop it
Did you try my Module and the examples on the alert module
did you add the ViewNotifications module so you could see it being broadcast
The structure of the notification is exactly the same as if you were coding it in a running module
