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

    Posts

    Recent Best Controversial
    • RE: MMM-SmartWebDisplay : display web contents (including YouTube) on your MM

      @AgP42 said in MMM-SmartWebDisplay : display web contents (including YouTube) on your MM:

      it is also possible to change it on the SWD module

      I have made some work to make this happen.
      See my pull request https://github.com/AgP42/MMM-SmartWebDisplay/pull/11/commits/38684b4349f073041983bd11bcfcbe151063fc6a

      posted in Utilities
      SergeS
      Serge
    • RE: MMM-SmartWebDisplay : display web contents (including YouTube) on your MM

      Also, as an idea for the function “continuous play”. Function will allow module to pause current video when the screen turned off by PIR and continue to play it again when screen turned on by PIR.
      Now video starts from the beginning each time the module getting an user presence notification.

      posted in Utilities
      SergeS
      Serge
    • RE: MMM-SmartWebDisplay : display web contents (including YouTube) on your MM

      @AgP42 said in MMM-SmartWebDisplay : display web contents (including YouTube) on your MM:

      Hi @Alain,

      first please remove all your apikey on your post before :winking_face:

      I see that you also use the MMM-PIR-sensor module, with a delay of 100s, this is probably the root cause of the strange behavior that you saw.

      Let me explains you my analysis :

      Good luck and let me know if you still face issues,

      Bye
      AgP42

      Exactly the same behavior that my mirror shows.
      I have a PIR sensor and i am using https://github.com/paviro/MMM-PIR-Sensor
      I have 60 sec powersaving delay for display turning-off, but user presence is translated as soon as the is detected by sensor. This cause some inconsistencies.
      Is it possible to add time delay in config.js file in order to make more easier integration of PIR modules and SWD module?
      Also, it would be good to have the ability to switch-off the Presence notification dependency.
      Sometime I just want to run youtube (say classic music) even when the display is turned off (as a background music)
      Such command/config will let do that.

      posted in Utilities
      SergeS
      Serge
    • MMM sensor+WS2812b and MM CONFIG RESET button

      This app was made to add some kind functionality to Magicmirrors run on RPis.

      App allows you to:

      • control LED strip by sensor and also
      • rreset MagicMirror’s config.js file with a hardware button connected to Raspberry (so config should be set to default values). The operation will be confirmed by three red light blinks.
        Here is short video (press on pic)
        Raspberry

      Installation

      1. Download and install the latest ws2812b library to your Raspberry:
      • sudo pip install rpi-ws281x
      1. Clone the repository : git clone https://github.com/sergge1/MMM-senorled
      2. Enter the repository: cd MMM-senorled/
      3. Edit parameters in configuration section of the *.py file: numbers of LED and GPIO pins
        5 Run the app with: sudo python sensorbtnled.py

      Hardware used:

      LED strip WS2812b https://www.aliexpress.com/item/32820628563.html

      Buttons https://www.aliexpress.com/item/33060639491.html

      Movement sensor RCWL-0516 https://www.aliexpress.com/item/32816228153.html

      Option Description
      SHUTOFF_DELAY Delay in seconds for sensor state change, e,g, how long the LED will light after no movement detected. The default value is 5.
      PIR_PIN GPIO pin number to which the sensor is connected. The default value is 11.
      LED_COUNT Number of LEDs connected to the strip. The default value is 160.
      LED_PIN GPIO pin number to which the LED data line is connected. The default value is 21
      LED_BRIGHTNESS Britness of LED lights. 0 is no light, 255 is the maximum brightness. The default value is 255.
      copy [] set of files which should be rewritten. The default value is ['/home/pi/MagicMirror/config/config.js.sample', '/home/pi/MagicMirror/config/config.js.sample'].
      writePin GPIO pin to which hardware button is conected (Other button pin is connected to any GND. The default value is 3.

      and here is description and GIT
      [card:sergge1/MMM-senorled]

      Any ideas and comments are appreciated.
      As well as your direct pull requests to the project on the github page.

      posted in System
      SergeS
      Serge
    • RE: config.js in JSON format

      @lavolp3
      @sdetweil
      @Sean
      here is a short video of what is done at the moment.
      https://youtu.be/6w6Uovy9hbE

      So what I have:

      1. Webserver which is based on the asws webserver. Updated version for MagicMirror is here. Changes made to cmd/asws.go file only.
        Download git

      2. build docker container from it (go to asws directory and run " docker build -t asws_new ."

      3. Clone to home/pi/www sample web-interface for MagicMirror clock module settings. It is bases on free SB Admin 2 bootstrap template.
        Git includes js/settings.js which is necessary for make everything works. Git is here: https://github.com/sergge1/www

      4. Run with a folloing command a docker container build in point 2 above: sudo docker run -d --restart unless-stopped -e DEBUG=true -p 80:80 -v $(pwd)/www:/www asws_new

      Sample config.js from video is located at www/config.js

      screenshot below:
      photo-2019-10-24-18-04-49

      posted in Feature Requests
      SergeS
      Serge
    • RE: config.js in JSON format

      @sdetweil said in config.js in JSON format:

      @Serge remember, this is not MagicMirror…

      I have looked throught all the code. For simplicity I will call “SmartMirror” as SM and MagicMirror as MM further.

      1. config.schema.json files in SM contain plugins’ parameters and these files have JSON format. Example is a calendar config file smart-mirror/plugins/calendar/config.schema.json
      {
          "schema": {
              "calendar": {
                  "type": "object",
                  "title": "Calendar Settings",
                  "properties": {
                      "icals": {
                          "type": "array",
                          "title": "iCal URLs",
                          "items": {
                              "type": "string"
                          }
                      },
                      "maxResults": {
                          "type": "integer",
                          "title": "Max Number of Events for all iCals",
                          "default": 9
      
      1. config.js in MagicMirror is not made in JSON format so it is not easy to make changes there as compared to SM’s config.schema.json
      var config = {
      	address: "localhost", 
      	port: 8080,
      	ipWhitelist: [],
      	language: "en",
      	timeFormat: 24,
      	units: "metric",
      	modules: [
      		{
      			module: "newsfeed",
      			position: "bottom_bar",
      			config: {
      				feeds: [
      					{
      						title: "New York Times",
      						url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
      					}
      				],
      				showSourceTitle: true,
      				showPublishDate: true,
      				broadcastNewsFeeds: true,
      				broadcastNewsUpdates: true
      	}, },	], };
      

      Maybe I think wrong, please correct me if so.

      posted in Feature Requests
      SergeS
      Serge
    • RE: config.js in JSON format

      @lavolp3 said in config.js in JSON format:

      I think I understand (and like!) what you are trying to do, but the downside is that you’re going to create one hell of a file. The module configs are in a lot of cases much bigger than what the module creator suggests users to change. The clock you’ve shown is a very good example.

      All other modules have + - the same number of parameters. config.js looks good and readable.
      Changes of module parameters do not affect functionality. They change appearence so if all parameters are inputed correctly (e.g. numbers to numbers, strings to strings) - everything will work fine.

      I would very much like to see the web interface to be limited to layers with a drop-down function
      First layer: all installed modules.
      Click on a module -> open dropdown with all config parameters for this module.

      I have some draft of the interface and it looks similar to those you have described. However, I drop off the idea of dropdowns - due to the huge amount of settings for each module. I have made a left side menu with buttons for each module: e.g. clock, calendar, weather, etc. Some current screenshot is attached.
      screen
      Screenshot from mobile phone:
      photo-2019-09-13-15-20-50

      Is there somethin on github that I can have a look at already?

      Not yet. Its a local development at this stage.

      @sdetweil said in config.js in JSON format:

      I have created modules using this capability.

      do you have your development available somewhere to look over?

      posted in Feature Requests
      SergeS
      Serge
    • RE: config.js in JSON format

      @Sean
      I am going to make external app to change all module parameters.
      What does I mean based on the “clock” module example:

      1. Сurrent config.js has the following settings for clock module:
      modules: [
      		{
      			module: "clock",
      			position: "top_left"
      		},
      ]
      
      1. I am adding all other clock’s parameters (taken from /modules/default/clock/clock.js) into config.js:
      modules: [
      {
      	    module: "clock",
                  position: "top_left"
                  config: {
                      displayType: "digital",
      		displaySeconds: true,
      		showPeriod: true,
      		showPeriodUpper: false,
      		clockBold: false,
      		showDate: true,
      		showWeek: false,
      		dateFormat: "dddd, LL",
      		analogSize: "200px",
      		analogFace: "simple", 
      		analogPlacement: "bottom",
      		analogShowDate: "top", 
      		secondsColor: "#888888",
      		timezone: null,		
      }, }, ]
      
      1. Parameters in config.js overwrites the parameters in clock.js, so it works fine in such way.
      2. I am going to make some external app (web-interface) to allow user to make changes in config.js (in file) and reload MM in order effect take place.
        This should be a similar to “MMM Remote control” module but different in functionality and in its logic - my app should change the file config.js).

      I need to consult with community how to make this in correct and simple way? At the moment I have a template based on SB Admin 2 (html bootstrap)

      posted in Feature Requests
      SergeS
      Serge
    • 1 / 1