MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Unifi doorbell video shown on MM when bell rung

    Scheduled Pinned Locked Moved Show your Mirror
    2 Posts 2 Posters 5 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      mvrlogins
      last edited by

      Not sure which subsection to put this in, but this seemed the right place. It may be of some use to people with a MM and a video doorbell

      I wanted to have the video from my doorbells (I have 2 on different doors) temporarily show on my MM when someone rung the doorbell.

      First attempt was to use MMM-Remote-Control, MMM-Pages, go2rtc and MMM-EmbedURL to show the RTSP video (via go2rtc coverting to WebRTC) using Unifi’s Alarm Webhook feature calling for a page change - The 2 video streams on a hidden page, only shown on the page change call.

      This worked in principal, but because the modules on the hidden page kept streaming the video even when not being displayed, the RPi5 got quite hot and the network overhead of the constant 24hr streaming was unneccesary.

      The solution was to use a script to do the following:

      Unifi alarm webhook calls http://pi_ip:9500/motion
      go2rtc starts
      Wait 3 seconds for go2rtc to connect to cameras
      MagicMirror electron refreshes (/api/refresh) so iframes reconnect to go2rtc
      Wait 3 seconds for refresh to complete
      Switch to camera page (/api/notification/PAGE_CHANGED/1)
      Camera feeds display for 60 seconds via WebRTC
      Switch back to main page (/api/notification/PAGE_CHANGED/0)
      Wait 2 seconds for page to switch
      go2rtc stops

      Works perfectly now. RPi stays cool and no constant streaming from camera to MM. There is a few seconds delay before it starts, but that actually works for me because of the location of the MM, the doors and where we usually are in the house.

      Hope this helps someone who wants to do something similar.

      Happy to answer questions.

      S 1 Reply Last reply Reply Quote 1
      • S Offline
        sdetweil @mvrlogins
        last edited by

        @mvrlogins nice!!

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • 1 / 1
        • First post
          Last post
        Enjoying MagicMirror? Please consider a donation!
        MagicMirror created by Michael Teeuw.
        Forum managed by Sam, technical setup by Karsten.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy