• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

How to configure MMM-Buttons to start/stop MMM-Podcast2

Scheduled Pinned Locked Moved Solved Troubleshooting
2 Posts 1 Posters 1.1k Views 1 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.
  • F Offline
    Fozi Project Sponsor
    last edited by Nov 2, 2019, 2:52 PM

    Hi there!
    I’ve been lurking here for quite some time and found many helpful hints, while I’m building my first MagicMirror. Thanks for that to all!

    What do I want to accomplish?
    I have following modules installed, which all run without problems:

    • MMM-Remote-Control
    • MMM-Podcast2 (which starts the “tagesschau in 100 min.” video stream
    • MMM-PIR-Sensor (to switch my monitor on and off)

    Currently, I can start/stop the video stream when I enter http://myIP:8080/remote?action=NOTIFICATION&notification=BUTTON_PRESSED in a browser.

    Now I want to accomplish following user stories:
    Story 1:
    Press shortly a physical push-button on pin 27 to start/stop the video stream.
    This button is also a combined restart/shutdown button.
    Press > 2 sec --> Reboot
    Press > 5 sec --> Shutdown
    I am using this simple service.
    Now I want to use the same button to start/stop the video stream, when I push it for less than 2 secs.

    Story 2:
    When the PIR sensor detects motion and switches on the monitor, the video stream should start, too. Stopinfg the video by pressing shortly the physical push-button (see Story 1)

    I’ve installed MMM-Buttons, but I can’t find the right configuration of the MMM-Buttons module to at least start/stop the video.
    What is the correct payload and notification I have to use?

    I hope that some could give the hint into the right direction.

    Thanks in advance,
    Fozi

    HowTo: Replace PIR Sensor with a RCWL-0516 Microwave Sensor

    F 1 Reply Last reply Nov 7, 2019, 7:32 PM Reply Quote 0
    • F Offline
      Fozi Project Sponsor @Fozi
      last edited by Nov 7, 2019, 7:32 PM

      Alright, I found the solution myself, at least how to trigger play/stop with a push-button:

      1. I wasn’t aware that connecting GND and a GPIO Pin like BCM 27 will not trigger reliably anything as the status is floating, Thus a pull-down resistor is required to get a defined high status. Check this really comprehensive write-up:
        link text.
        So I added a resistor as gescribed, e.g. here:
        in chapter 4.2.

      2. Then I configures the MMM-Buttons module that way:

      {
      	module: 'MMM-Buttons',
      		config: {
       		buttons: [
       		{
        		pin: 27,
       		name: "podcast",
      		shortPress: {
      		notification: "BUTTON_PRESSED",
      		
      		},
      		
                 }
              ]
          }
      },
      

      That’s it!

      When I now push the button the video stream start shortly after playing, and when I push again, it stops.

      The one thing I’m still trying to accomplish is that the PIR-sensor (AM312) on pin 4 triggers the video to start.

      I home this helps some of you, when you come by.

      Cheers,
      Fozi

      HowTo: Replace PIR Sensor with a RCWL-0516 Microwave Sensor

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      1 / 1
      • First post
        2/2
        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