• 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
  1. Home
  2. ptrk95
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
P
Offline
  • Profile
  • Following 0
  • Followers 0
  • Topics 2
  • Posts 9
  • Groups 1

ptrk95

@ptrk95

Module Developer
3
Reputation
502
Profile views
9
Posts
0
Followers
0
Following
Joined Feb 1, 2019, 9:19 AM
Last Online Nov 14, 2019, 4:46 PM

ptrk95 Unfollow Follow
Module Developer

Best posts made by ptrk95

  • Save performance when rotating screen e.g. on Raspberry Pi

    Rotating the screen through custom css (saving performance)

    Hello guys,

    if you’re running on low end hardware e.g. Raspberry Pi and want to rotate the screen you can rotate it with a custom css file, thus saving precious performance!

    Copy paste this code to your custom.css file for a screen rotation of 90degrees:

     body {
            margin: 0;
    	position: absolute;
     	transform: rotate(90deg);
     	transform-origin: bottom left;
    	width: 100vh;
    	height: 100vw;
    	object-fit: cover;
    	top: -100vw;
            visibility: visible;
     }
    

    Copy paste this code to your custom.css file for a screen rotation of -90degrees:

     body {
    	margin: 0;
    	position: absolute;
     	transform: rotate(-90deg);
     	transform-origin: top left; 
    	width: 100vh;
    	height: 100vw;
    	object-fit: cover;
    	top: 100vh;
            visibility: visible;
     }
    

    Also note that you may have to switch back framebuffer_width and framebuffer_height in your /boot/config.txt file as stated by evroom here, e.g.:

    framebuffer_width=1600
    framebuffer_height=900
    

    Drawbacks:

    • since it only rotates the magic mirror app, external apps like omxplayer have to be rotated seperately
    • you may have to edit the css file of some modules as well

    This could be added to the wiki here.

    posted in Showcase
    P
    ptrk95
    Feb 5, 2019, 4:32 PM

Latest posts made by ptrk95

  • RE: Save performance when rotating screen e.g. on Raspberry Pi

    @j-e-f-f thank you! Of course you can :)

    posted in Showcase
    P
    ptrk95
    Feb 17, 2019, 3:58 PM
  • RE: Save performance when rotating screen e.g. on Raspberry Pi

    @evroom Yes, I did rotate it counter clockwise.

    I found a solution that worked for my setup, rotating the screen 270:

     body {
    	margin: 0;
    	position: absolute;
     	transform: rotate(-90deg);
     	transform-origin: top left; 
    	width: 100vh;
    	height: 100vw;
    	
    	object-fit: cover;
    	top: 100vh;
            visibility: visible;
     }
    

    Tell me if that worked for you. Then I`ll update the post :)

    Adjusting the omxplayer orientation is one of the drawbacks.

    posted in Showcase
    P
    ptrk95
    Feb 8, 2019, 2:27 PM
  • RE: Save performance when rotating screen e.g. on Raspberry Pi

    @keyun21 Correct, just give it a go and see what happens ;) Just delete the lines if something strange occours.

    @justjim1220 Thanks for sharing! :)

    Only disadvantage here is that you may have to change the styles of other modules, for example the Snow module doesn’t work right of the bat I think.

    Also note that there might be a better way to code it, since I just googled how to rotate with CSS :D

    posted in Showcase
    P
    ptrk95
    Feb 8, 2019, 10:21 AM
  • Save performance when rotating screen e.g. on Raspberry Pi

    Rotating the screen through custom css (saving performance)

    Hello guys,

    if you’re running on low end hardware e.g. Raspberry Pi and want to rotate the screen you can rotate it with a custom css file, thus saving precious performance!

    Copy paste this code to your custom.css file for a screen rotation of 90degrees:

     body {
            margin: 0;
    	position: absolute;
     	transform: rotate(90deg);
     	transform-origin: bottom left;
    	width: 100vh;
    	height: 100vw;
    	object-fit: cover;
    	top: -100vw;
            visibility: visible;
     }
    

    Copy paste this code to your custom.css file for a screen rotation of -90degrees:

     body {
    	margin: 0;
    	position: absolute;
     	transform: rotate(-90deg);
     	transform-origin: top left; 
    	width: 100vh;
    	height: 100vw;
    	object-fit: cover;
    	top: 100vh;
            visibility: visible;
     }
    

    Also note that you may have to switch back framebuffer_width and framebuffer_height in your /boot/config.txt file as stated by evroom here, e.g.:

    framebuffer_width=1600
    framebuffer_height=900
    

    Drawbacks:

    • since it only rotates the magic mirror app, external apps like omxplayer have to be rotated seperately
    • you may have to edit the css file of some modules as well

    This could be added to the wiki here.

    posted in Showcase
    P
    ptrk95
    Feb 5, 2019, 4:32 PM
  • RE: [MMM-MusicOnDemand] - Play music from deezer with a browser in the background

    @cr4z33 that’s most likely a versioning problem with puppeteer and chromium.
    I assume you already did:

    cd ~/MagicMirror/modules/MMM-MusicOnDemand
    npm install puppeteer@1.11.0
    

    Please check your chromium version. My version is the latest one: version 65.0.3325.181.
    If it’s not, try:

    sudo apt-get install chromium-browser
    

    And check that your chromium path in the config file is “/usr/bin/chromium-browser”, which I guess it is. Because on Raspberry Pi the browser of puppeteer isn’t working.

    If that’s also not launching your browser I honestly don’t know why :/

    In the latest build I added the option “showBrowser” in the config-file. If you set it to true, you are able to see the browser and what it is doing in the browser.

    posted in Entertainment
    P
    ptrk95
    Feb 3, 2019, 5:35 PM
  • RE: [MMM-MusicOnDemand] - Play music from deezer with a browser in the background

    @cr4z33 with puppeteer you can control the browser with Javascript. But it will install a version of chromium inside the puppeteer folder which you can delete to save space if you use the preinstalled chromium of raspbian :)

    posted in Entertainment
    P
    ptrk95
    Feb 2, 2019, 5:26 PM
  • RE: [MMM-MusicOnDemand] - Play music from deezer with a browser in the background

    That’s strange.
    Try cd in the MusicOnDemand folder and then:
    npm install puppeteer@1.11.0

    posted in Entertainment
    P
    ptrk95
    Feb 2, 2019, 2:11 PM
  • RE: [MMM-MusicOnDemand] - Play music from deezer with a browser in the background

    Thanks for pointing that out! The dependencies in the package.json weren’t set. I uploaded a changed version but unfortunatley this build won’t work for me right now, so I have to do a deeper look into it.
    Edit: It`s again working on the new build, was a problem with the puppeteer version and the chromium version installed on raspbian.

    posted in Entertainment
    P
    ptrk95
    Feb 1, 2019, 9:15 PM
  • [MMM-MusicOnDemand] - Play music from deezer with a browser in the background

    Description:

    This module allows you to play music from Deezer with puppeteer. That means you need at least a free account from Deezer. It is meant to be used with a speech recognition module like MMM-AssistantMk2, but it should work with other modules as long as you send the correct notifications as described in de README of the project.
    It acutally plays the music on the machine this module is running on. So you don't have to use a other device to play music with a music on demand service e.g. on Raspberry Pi.
    Enjoy :)

    Screenshots:

    alt text

    Download:

    GitHub


    Version 1.01

    • Force installs puppeteer v1.11.0

    Version 1.0

    • Initial Release, confirmed working on Raspberry Pi 3b+
    posted in Entertainment
    P
    ptrk95
    Feb 1, 2019, 2:43 PM
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