MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. wishmaster270
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    Offline
    • Profile
    • Following 0
    • Followers 6
    • Topics 16
    • Posts 340
    • Groups 2

    Posts

    Recent Best Controversial
    • [ MMM-LEDStripControl ] - Control a LED strip with optional Pong game support

      Description:

      This module controls a led strip (in my case a WS2801 strip with 160 leds or an WS2813 strip with 300 leds) with notifications that are converted to MQTT messages with help of the module MMM-MQTTbridge of sergge1 ([https://github.com/sergge1/MMM-MQTTbridge]). The led strip will be controlled with a Python based script that runs on a second Raspberry Pi which is connected to the network and registers to the MQTT topics. The different configuration options of the led strip are grouped into element groups. It is possible to hide unneeded groups. The current active element is marked with an red square. The active element can be changed either by touch or notification. Also the values can be changed by notification or touch. The touch icons provide two different steppings for up and down.

      The Python script supports the pong game. If the second button is pressed within a configured interval after the first one the pong mode starts. An running light will be initiated and the two players need to press their button in the moment the running light reaches their end of the strip. If the players hit the button to early or late the other player gets an hit. After an configurable amount of games the final result will be displayed and the strip changes back to normal mode. Each time the running light turns around it gets faster.
      This script is provided within the following repository: PythonLedControl. It currently supports all WS2801 and WS281X strips.

      Download:

      MMM-LEDStripControl
      [card:Tom-Hirschberger/MMM-LEDStripControl]


      Version 0.0.3

      • prefixed all CSS classes with the module name
      • fixed all issues reported by the new automatic module scanning script developed by @KristjanESPERAN

      Version 0.0.2

      • Multi-Instance-support
      • Fixed a issue which caused config values to be send in a wrong format
      • added examples of howto control led strips with ESP8266 or ESP32 micro controllers

      Version 0.0.1

      The initial release provides the following features

      • All elements are included to change the output state, color and pong game options of an led strip either with notifications or via touch elements
      • The to be displayed elements can be configured
      • The initial values, the steppings and the minimum values and maximum values can be configured
      • The module will react to configuration changes of the led strip
      • The layout is based on flexbox and can be changed easy in CSS

      Screenshots

      posted in Utilities
      wishmaster270W
      wishmaster270
    • RE: Is it possible to ad an Arduino?

      @Shinji0912 Hi, I wrote a module which converts messages received at serial interfaces to notifications (https://github.com/Tom-Hirschberger/MMM-Serial-Notifications). I have two Arduinos connected to my Pi with gesture and distance sensors.

      My temperature module (https://github.com/Tom-Hirschberger/MMM-Temperature) can receive notifications to update the values.
      Edit: The notification feature is only available in the development branch at the moment. I will mere it to the master the next days.
      There are examples integrated which show how to connect an esp32 board with WiFi to get temperature and humidity.
      Currently I am working on a module which should use MQTT to control an WS2801 LED Strip. But this one is in a very early state and will take a while to develop.

      posted in Troubleshooting
      wishmaster270W
      wishmaster270
    • RE: MMM-MplayerRadio

      @Bugsounet Hi, thank you for your work. I checked the code, your notifications should work as planned. Play will start with the last station played or with the first one initially.

      posted in Entertainment
      wishmaster270W
      wishmaster270
    • RE: MMM-MplayerRadio

      @Bugsounet Hi, great idea. At the moment my mirror is only controlled by sensors and touch.
      The volume control buttons of my module only send an notification to MMM-Volume that’s way there isn’t any api in this module.
      Everything else can be controlled by notifications. There is a small section about the notifications in the readme.

      posted in Entertainment
      wishmaster270W
      wishmaster270
    • RE: MMM-MplayerRadio

      Hi,

      just published an new version (0.0.3) which provides an autoplay feature. Simply add the station index you want to play to the config option “autoplay”. If you only configured one station it is 0. The station will start to play after about 1 second after the mirror started.

      posted in Entertainment
      wishmaster270W
      wishmaster270
    • RE: MMM-MplayerRadio

      @bryan_1 Hi, currently there is no autoplay feature implemented. But I will check it the next days. Maybe it is not a big deal

      posted in Entertainment
      wishmaster270W
      wishmaster270
    • RE: MMM-Temperature

      @Hadr1en Hi, the module expects an json string as output of the script it executes. There is a section in the readme which shows an example:

      {
         "humidity": 32.61236572265625,
         "temperature_c": 25.50150878906249, //Temperature in °C
         "temperature_f": 77.9027158203125, //Temperature in °F
         "error": false
      }
      

      What kind of error do you get?

      posted in Utilities
      wishmaster270W
      wishmaster270
    • RE: Gesture control with APDS-9960

      @bibi I am using an Apds sensor with other sensors on a Arduino connected to the pi via serial interface. I documented it and wrote a universal module to receive messages on the serial interface. You can find my documentation at Examples

      posted in Development
      wishmaster270W
      wishmaster270
    • RE: PIR sensor to turn monitor off. Nothing works :(

      @elleclouds Black causes the display to turn off the backlight which saves energy. But it is surely less effective than switching the display to standby mode.

      posted in Troubleshooting
      wishmaster270W
      wishmaster270
    • RE: [MMM-GPIO-Notifications] Sends notifications based on GPIO events on multiple pins

      @kash Hi, I only get the white screen if my config is broken really badly.
      Are you sure you added a “,” after the last module before the Gpio module?

      posted in Utilities
      wishmaster270W
      wishmaster270
    • RE: PIR sensor to turn monitor off. Nothing works :(

      Hi,
      it depends on your monitor. Maybe there is an option in the monitor configuration menu.
      If not you can configure the MMM-Screen-Powersave-Notification module to only hide all modules and show the black background instead of turning the hdmi off (hideInsteadShutoff option)

      posted in Troubleshooting
      wishmaster270W
      wishmaster270
    • RE: PIR sensor to turn monitor off. Nothing works :(

      @elleclouds Hi, do you see any output of the Gpio module in the log file?

      posted in Troubleshooting
      wishmaster270W
      wishmaster270
    • RE: PIR sensor to turn monitor off. Nothing works :(

      @satsatt
      Hi,
      it might be a problem with screen blanking.
      If you edit your /boot/cmdline.txt like in this description it might solve the problem.

      posted in Troubleshooting
      wishmaster270W
      wishmaster270
    • RE: PIR sensor to turn monitor off. Nothing works :(

      Hi,

      i recently wrote a tutorial of how to use two of my modules to turn on/off the display with an PIR sensor.

      English

      German

      I do not have much time to support at the moment but maybe it helps…

      posted in Troubleshooting
      wishmaster270W
      wishmaster270
    • RE: MMM-MplayerRadio

      @electros Perfect.
      I think I will check in the script into the repository so you can easy update to upcoming versions

      posted in Entertainment
      wishmaster270W
      wishmaster270
    • RE: MMM-MplayerRadio

      If you change your script to (playRadio.bash):

      #!/bin/bash
      URL=$1
      RUN=1
      exit_script() {
              echo "Stopping playback"
              xmms2 stop
              xmms2 clear
              RUN=0
      }
      
      trap exit_script SIGINT SIGTERM
      
      xmms2 stop
      xmms2 clear
      xmms2 add $URL
      xmms2 play
      
      while [ $RUN -gt 0 ]; do
              echo "Still running"
              sleep 1
      done
      

      and the config to

      		{
      			module: "MMM-MplayerRadio",
      			header: "Radio",
      			position: "top_center",
      			config: {
      				stations: [
      					{
      						title: "KissFM",
      						url: "https://live.kissfm.ro/kissfm.aacp",
      						logo: "https://upload.wikimedia.org/wikipedia/ro/8/86/Logo_Kiss_FM.png",
      						customCommand: "/home/pi/MagicMirror/modules/MMM-MplayerRadio/scripts/playRadio.bash",
      						customCommandArgs: ["###URL###"],
      					},
      				],
      			},
      		},
      

      You can then reuse the same script for different stations only by adding the url as first parameter in the config

      Edit: Added url back to the config

      posted in Entertainment
      wishmaster270W
      wishmaster270
    • RE: MMM-MplayerRadio

      Hi,

      as i wrote in the documentation you need to make sure that your script runs as long as the station is active and needs to stop the playback if it gets a kill signal.
      Maybe i will find a short tutorial about catching the kill signal.

      posted in Entertainment
      wishmaster270W
      wishmaster270
    • RE: MMM-MplayerRadio

      It pushed a new development version to the repo.
      You can change to it if you do the following commands:

      cd ~/MagicMirror/modules/MMM-MplayerRadio
      git checkout development
      git pull
      

      In the new version you can add “customCommand” and “customCommandArgs” to either the whole module or to every station.
      You then can use any script you like to play either all stations (by passing the url to it) or a special script for each station.

      Example:

      		{
      			module: "MMM-MplayerRadio",
      			header: "Radio",
      			position: "top_center",
      			config: {
      				customCommand: "/home/pi/doSomething.bash",
      				customCommandArgs: ["one", "two", "###URL###"],
      				stations: [
      					{
      						title: "Antenne.de",
      						url: "http://www.surfmusik.de/m3u/antenne-bayern,922.m3u",
      						logo: "https://upload.wikimedia.org/wikipedia/commons/a/ac/Antenne-bayern-logo.png",
      						customCommand: "/home/pi/doSomethingElse.bash",
      						customCommandArgs: ["one", "###URL###", "three"],
      					},
      				],
      			},
      		},
      

      In this example for all stations the script “/home/pi/doSomething.bash one two http://…” is called.
      But “Antenne.de” uses the script “/home/pi/doSomethingElse.bash” with different args.

      The only condition the customCommand-Script needs to meet is that it stays active as long as the station is running and stops the playback if it gets killed.

      posted in Entertainment
      wishmaster270W
      wishmaster270
    • RE: MMM-MplayerRadio

      Hi,

      my problem is that i messed up my audio configuration as i tried to configure pulseaudio to make it possible to play music either on my local HifiBerry speakers or on a bluetooth speaker.
      Mplayer still works fine but i can`t get any sound from xmms2.
      The other problem is that there are a lot of known problems of xmms2 but xmms2 is dead since 2017.
      Thats why i tried omxplayer which is still maintained.

      Currently the module supports local playlist files but not calling any other player. You can change the binary that is called but it still sets the args as mplayer will need it.

      posted in Entertainment
      wishmaster270W
      wishmaster270
    • RE: MMM-MplayerRadio

      Hi,

      gave it a new try today. But i can`t get xmms2 to run on my pi. Looks like the xmms alsa plugin has some problems with my HifiBerry.
      Also tried omxplayer but it has problems with internet streams.

      posted in Entertainment
      wishmaster270W
      wishmaster270
    • 1 / 1