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 338
    • Groups 2

    Posts

    Recent Best Controversial
    • RE: MMM-CalvinAndHobbes

      If you prefer scrolling from left-right than up-down animations are your friend as well:

      .MMM-CalvinAndHobbes .module-content {
        max-width: 300px;
        width: 300px;
        overflow: hidden;
      }
      
      #cahcomiccontent {
        width: 600px;
      }
      
      #cahcomiccontent {
        animation-direction: normal;
        animation-duration: 30s;
        animation-timing-function: steps(2, end);
        animation-name: slide;
        animation-iteration-count: infinite;
      }
      
      @keyframes slide {
        0% {
          margin-left: 0px;
        }
      
        50% {
          margin-left: -300px;
        }
      
        100% {
          margin-left: -600px;
        }
      }
      
      posted in Entertainment
      wishmaster270W
      wishmaster270
    • RE: MMM-CalvinAndHobbes

      @plainbroke
      Hi, i did not use the value but made a quick setup to figure out how to resize the image…

      Scrolling did not work in my browser (Firefox). I disabled the complete scrolling and sizing of the module with the config option “limitComicHeight”.
      My config looks like this:

                       {
      			module: 'MMM-CalvinAndHobbes',
      			position: 'top_center',
      			config: {
      				invertColors: false, // Optional, default: false
      				grayScale: false, // Optional, default: false
      				updateInterval: 1000 * 60 * 60 * 12, // 12 Hr
      				limitComicHeight: -1,
      			},
      		},
      

      Then you can define the height of the image in your custom.css with:

      #cahcomiccontent {
        height: 100px;
      }
      

      Edit: If you want to use sliding you can do that with CSS-Animations that should work in all modern browsers.
      Add something like the following to your custom.css will do the trick:

      .MMM-CalvinAndHobbes .module-content {
        max-height: 100px;
        height: 100px;
        overflow: hidden;
      }
      
      #cahcomiccontent {
        height: 300px;
      }
      
      #cahcomiccontent {
        animation-direction: normal;
        animation-duration: 5s;
        animation-timing-function: steps(2, end);
        animation-name: slide;
        animation-iteration-count: infinite;
      }
      
      @keyframes slide {
        0% {
          margin-top: 0px;
        }
      
        50% {
          margin-top: -100px;
        }
      
        100% {
          margin-top: -300px;
        }
      }
      

      Explanation:
      First we limit the height of the outer container “.module-content” to a specific height (100px) and hide all parts that are bigger (overflow: hidden).
      No we set the height of the inner container (the image with id cahcomiccontent) to a height that is bigger than the outer one ( height: 300px).
      In a third step we define a custom animation (@keyframes slide) and add it to the image container (the one with id cahcomiccontent).
      If you want to dive deeper to CSS animations i can suggest this page.

      posted in Entertainment
      wishmaster270W
      wishmaster270
    • RE: [MMM-TouchButton] A module to add clickable buttons to send notifications or run commands

      @Sierra0815 Great to hear that. I developed the module a view years ago to provide buttons to toggle some modules (like snowfall) and to realize user presence notifications via remote connection.

      posted in Utilities
      wishmaster270W
      wishmaster270
    • RE: More then one Grafana Chart

      @michaelJoosten
      I tried some things with Grafana the last days and developed a module called MMM-EmbedURL.

      It is able to display multiple Grafana panels in Iframes or Webviews. No matter what type of panel it can be displayed (Chart, Gauge, etc.).
      BUT: You will need to configure Grafana to allow anonymous access to the panels you like to embed. I added a HowTo of a possible Grafana configuration.
      All anonymous access will be mapped to one organization. If you configure two different organizations you can decide which panels should be visible without login and which ones require authentication.

      The module supports multi-instance. You can add it with different configuration to different positions.

      Edit: Depending of which module you use to realize the pages you may need to copy the module cause i.e. MMM-pages uses the module name as identifier. MMM-ProfileSwitcher instead uses “classes”.

      posted in Utilities
      wishmaster270W
      wishmaster270
    • RE: Using MMM-Widget for images

      @sdetweil Hi Sam, your right. Did avoid this in the past because it was a problem if someone copied the module to have multiple instances. As most of my modules provide multi instance now this shouldn’t be a problem anymore.

      I will check the css files of my modules and add prefix all CSS with MMM-ModuleName.

      posted in Utilities
      wishmaster270W
      wishmaster270
    • RE: Using MMM-Widget for images

      @N6NG I put a small section about styling to the readme.
      It is done via custom.css

      .embed .embeded {
          width: 800px;
          height: 400px;
      }
      
      posted in Utilities
      wishmaster270W
      wishmaster270
    • [MMM-TouchButton] A module to add clickable buttons to send notifications or run commands

      Description:

      If you control your mirror by mouse or with a touch panel and want to add buttons to send notifications or run commands this is your module.
      The module can be added at different locations with different configurations and supports to change the classes and/or change the icons based on the output/return code of the called commands since version 0.0.2.

      Screenshots:

      threeColoredButtons.png

      twoModules.png

      Download:

      Download
      [card:Tom-Hirschberger/MMM-TouchButton]


      Version 0.0.9

      • bumped version of jsonpath-plus library to 10.1.0

      Version 0.0.8

      • bumped version of jsonpath-plus library to 10.1.0

      Version 0.0.7

      • bumped jsonpath-plus library to version 10.0.1

      Version 0.0.6

      • classes now will be added to the title element, too
      • fixed string handling in conditions
      • it is possible to send notifications without payload now

      Version 0.0.5

      • fixed not running actions of Iconify icons
      • added support to validate the payload of notifications as condition
      • added support to parse the value of conditions with jsonpath-plus

      Version 0.0.4

      • added support of Iconify icons

      Version 0.0.3

      • fixed a bug which caused a black screen if no additional classes had been set
      • prefixed all CSS configuration with the modules main class

      Version 0.0.2

      • configure multiple instances of the module at different positions with different configuration
      • add additional classes to the elements
      • hide/show buttons based on the current active profile
      • change the icon or/and classes the the buttons based on the output and/or return code of the called commands

      Version 0.0.1

      • Add as much buttons as you like. Each with a unique css class and an Font Awesome (The build in version of MagicMirror, currently 4.7) icon assigned.
      • If a button gets pressed either a command (with arguments) can be executed on the command line or an notification (with payload) can be send.
      posted in Utilities
      wishmaster270W
      wishmaster270
    • RE: Using MMM-Widget for images

      @N6NG
      Sorry, there was a copy paste mistake in the example. The module name was wrong…

      {
        module: "MMM-EmbedURL",
        position: "top_center",
        header: "Embed-URL",
        config: {
          updateInterval: 120,
          embedElementType: "img", 
          embed: [
              "https://www.hamqsl.com/solarmuf.php" 
          ]
        },
      },
      
      posted in Utilities
      wishmaster270W
      wishmaster270
    • RE: Using MMM-Widget for images

      @N6NG Hi,

      I do not know the MMM-Widget module but you could use my MMM-EmbedURL for this job. Simply set the “embedElementType” to “img”.

      The config will look something like:

      {
        module: "MMM-MMM-EmbedURL",
        position: "top_center",
        header: "Embed-URL",
        config: {
          updateInterval: 120,
          embedElementType: "img", 
          embed: [
              "https://www.hamqsl.com/solarmuf.php" 
          ]
        },
      },
      
      posted in Utilities
      wishmaster270W
      wishmaster270
    • [MMM-EmbedURL] Embed one or multiple websites to the mirror

      Description:

      There are already a lot of modules out there that provide support to embed different other websites like MMM-EmbedYoutube or MMM-GrafanaChart. Most of them simply rebuild the URL they should display by some information the users configure and embed the content with i a IFrame.
      If the pages do not support embedding and the build in electron browser is used modules like MMM-WebView can be used to embed the content.

      BUT:
      I needed a module that allows me to embed multiple panels of my Grafana installation, maybe a Webcam that is visible on a webpage and my NodeRED dashboard at different positions and/or pages of my mirrors.
      Wherever possible i wanted to use IFrame but needed Webview for NodeRED.

      As there was module that supports embedding different sites with different parameters i created this one.

      The module supports multiple instances and is able to add css classes to the different instances. This way different styling for the instances is possible.
      As the module it self uses Flexbox-Layout styling is highly possible without fix tables.

      If you can not use webview (cause you do not use the electron browser) the Readme contains some information about extensions for Firefox and Chrome Browser that will remove the headers preventing the websites to be embedded and do an automatic cookie consent.

      Screenshots:

      SomeGrafanaPanels.png

      webcam.png

      Download:

      Download
      [card:Tom-Hirschberger/MMM-EmbedURL]


      Version 0.0.9

      • removed unused node_helper.js (thanks to @sdetweil)
      • added configs to make it possible to configure the module with MMM-Config (thanks to @sdetweil)

      Version 0.0.8

      • introducing the updateDomOnResume option. If you do not want the html elements to be recreated when the module is shown after it was hidden you can set this option to false now.

      Version 0.0.7

      • changed the way attributes get handled
      • introducing a new code style (thanks to @KristjanESPERANTO) and fixed all ESLint issues

      Version 0.0.6

      • add a new function to the module which periodically checks if the content of embedded img elements is decodeable. If not the src URL is removed and set again to reload the image. The feature can be activated by setting a interval in seconds in the configuration with the new option imgDecodeCheckInterval.
      • fixed all issues reported by the new automatic module scanning script developed by @KristjanESPERANTO

      Version 0.0.5

      • Added new option appendTimestamp which controls if a current timestamp is added to each URL. This is to avoid caching issues.

      Version 0.0.4

      • automatic refresh now can be disabled by setting updateInterval to 0 or lower
      • the default basicElementType changed from “span” to “div” as i.e. “webview” does not work properly with “span”

      Version 0.0.3

      • added support of Iconify icons
      • All CSS definitions are now prefixed with the main class of the module (MMM-EmbedURL)

      Version 0.0.2

      • Fixed attributes with value “0” being added without value in some cases

      Version 0.0.1

      • embed one or multiple other websites
      • choose how often the websites should be refreshed (all at once)
      • choose which websites should be displayed if different profiles are active
      • set custom attributes to the elements that include the websites
      • choose which HTML element should be used to embed the websites (normally iframe or webview)
      • add icons and/or titles before or after the embedded websites
      • icons can be either images or Font Awesome 4.7 icons
      • the order the icons/titles/elements will be added can be configured
      • different options can be configured for different websites by nesting embed elements
      posted in Utilities
      wishmaster270W
      wishmaster270
    • 1 / 1