• 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. Beh
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
Offline
  • Profile
  • Following 3
  • Followers 3
  • Topics 12
  • Posts 96
  • Groups 1

Beh

@Beh

I'm Interested in Tech and Science

My Mirror: https://blog.kayuk.de/posts/2016/11/02/my-magicmirror/

36
Reputation
3.9k
Profile views
96
Posts
3
Followers
3
Following
Joined Aug 5, 2016, 8:19 AM
Last Online Apr 24, 2024, 9:10 PM
Email magicmirror@kayuk.de
Website beh.wtf
Location Berlin

Beh Unfollow Follow
Module Developer

Best posts made by Beh

  • Sync private iCloud calendar with MagicMirror

    A while ago, I posted a thread for syncing an iCloud calendar with MagicMirror. Unfortunately this solution was just a workaround and you needed to use a Mac which is also synced with your calendar. It was far from being a nice solution.

    I just found out that the tool I was using (vdirsyncer) also supports syncing with iCloud. I wrote a detailed walkthrough for this.

    I’ll re-post this part from the original post:

    Why doing it this way?

    I don’t want my calendar to be available via a public URL like mentioned in the iCloud calendar thread. Even though the public sharing address is quite long, web crawlers can still find them and your private life is publicly available. I just don’t like that scenario. So I wanted a solution that uses encryption and authentication against all services.


    So here’s a really nice solution to sync the mirror with iCloud (privately):

    Get app-specific password from iCloud

    vdirsyncer needs an app-specific password to connect to iCloud. You can create one in your AppleID settings like descibed in Apple’s support document for using app-specific passwords: https://support.apple.com/en-us/HT204397

    Create one and write it down for later.

    Install and set up vdirsyncer

    vdirsyncer needs to be installed on the machine that hosts your mirror software. On my raspbian system, vdirsyncer was not available via apt. So I hat to install it via pip.

    Installation of vdirsyncer

    Now we get vdirsyncer and it’s dependencies:

    sudo apt-get install libxml2 libxslt1.1 zlib1g python3
    pip3 install --user --ignore-installed vdirsyncer
    

    (This is the quick and easy way, it should suffice for most users. For a more clean way to install it, please refer to https://vdirsyncer.pimutils.org/en/stable/installation.html#the-clean-hard-way)

    Now, change the first line of your vdirsyncer executable to use only python3:

    nano ~/.local/bin/vdirsyncer
    

    And change the first line to #!/usr/bin/python3

    I needed to create a symlink to the vdirsyncer executable. So we’re doing this:

    sudo ln -s /home/pi/.local/bin/vdirsyncer /usr/bin/vdirsyncer
    

    Now you should be able to use the vdirsyncer command from the command line.

    Create a folder for the calendar file

    As mentioned in this post, we can put the calendar file into the modules folder to access it via the calendar module. So we create a folder for our calendars:

    mkdir /home/pi/MagicMirror/modules/calendars
    

    Configure vdirsyncer

    Create a config file in ~/.vdirsyncer/config and open it with nano:

    mkdir ~/.vdirsyncer
    touch ~/.vdirsyncer/config
    nano ~/.vdirsyncer/config
    

    Here’s an example configuration to use with iCloud. Just copy it into your opened file in nano and enter your iCloud credentials.

    # vdirsyncer configuration for MagicMirror.
    #
    # Move it to ~/.vdirsyncer/config or ~/.config/vdirsyncer/config and edit it.
    # Run `vdirsyncer --help` for CLI usage.
    #
    # Optional parameters are commented out.
    # This file doesn't document all available parameters, see
    # http://vdirsyncer.pimutils.org/ for the rest of them.
    
    [general]
    # A folder where vdirsyncer can store some metadata about each pair.
    status_path = "~/.vdirsyncer/status/"
    
    # CALDAV Sync
    [pair iCloud_to_MagicMirror]
    a = "Mirror"
    b = "iCloud"
    collections = ["HERE-GOES-THE-UUID-OF-THE-CALENDAR-YOU-WANT-TO-SYNC"]
    
    # Calendars also have a color property
    metadata = ["displayname", "color"]
    
    [storage Mirror]
    # We need a single .ics file for use with the mirror (Attention! This is really slow on big amounts of events.)
    type = "singlefile"
    # We'll put the calendar file to a readable location for the calendar module
    path = "/home/pi/MagicMirror/modules/calendars/%s.ics"
    
    [storage iCloud]
    type = "caldav"
    url = "https://caldav.icloud.com/"
    # Authentication credentials
    username = "YOUR-ICLOUD-EMAIL-ADDRESS"
    password = "HERE-GOES-YOUR-APP-SPECIFIC-ICLOUD-PASSWORD"
    # We only want to sync in the direction TO the mirror, so we make iCloud readonly
    read_only = true
    # We only want to sync events
    item_types = ["VEVENT"]
    # We need to keep the number of events low, so we'll just sync the next month
    # Adjust this to your needs
    start_date = "datetime.now() - timedelta(days=1)"
    end_date = "datetime.now() + timedelta(days=30)"
    

    Make sure, you use the start_date and end_date parameters to keep the number of calendar events low. I tried syncing with 700+ events and it is really really sloooooow! Especially when using the singlefile option for the mirror.

    Add your iCloud credentials like shown in the config file.

    Running vdirsyncer as a systemd.timer for automatic sync

    Install the vdirsyncer.service and vdirsyncer.timer files to /etc/systemd/user:

    curl https://raw.githubusercontent.com/pimutils/vdirsyncer/master/contrib/vdirsyncer.service | sudo tee /etc/systemd/user/vdirsyncer.service
    curl https://raw.githubusercontent.com/pimutils/vdirsyncer/master/contrib/vdirsyncer.timer | sudo tee /etc/systemd/user/vdirsyncer.timer
    

    By default, the syncer is started every 15 minutes. You can change it by configuring the times in the vdirsyncer.timer file:

    sudo nano /etc/systemd/user/vdirsyncer.timer
    

    Now we activate the timer in systemd:

    systemctl --user enable vdirsyncer.timer
    

    Let vdirsyncer discover the collections and do the inital sync

    Now, we have to find out, which collection we want to sync. Let vdirsyncer discover everything:

    vdirsyncer discover
    

    You should get an output like this (depending on the number of calendars you have in iCloud):

    Discovering collections for pair iCloud_to_MagicMirror
    Mirror:
    iCloud:
      - "25CB285C-E163-4E0E-B420-C3FB469B7C00" ("Calendar 1")
      - "9221FEE8-E8B4-4D07-9402-8638529919EC" ("Calendar 2")
      - "953A5477-E405-4ED6-A5C3-473444EACC95" ("Calendar 3")
    warning: No collection "HERE-GOES-THE-UUID-OF-THE-CALENDAR-YOU-WANT-TO-SYNC" found for storage Mirror.
    Should vdirsyncer attempt to create it? [y/N]:
    

    Choose N for now and press return.
    Now replace the HERE-GOES-THE-UUID-OF-THE-CALENDAR-YOU-WANT-TO-SYNC in the config with the UUID of the calendar you want to sync.
    We assume, we want to sync “Calendar 2”.

    So line 19 of your config should look like this:

    collections = ["9221FEE8-E8B4-4D07-9402-8638529919EC"]
    

    Now, we can run the discover again and make the first sync:

    vdirsyncer discover
    

    You should get something loke this:

    Discovering collections for pair iCloud_to_MagicMirror
    Mirror:
    iCloud:
      - "25CB285C-E163-4E0E-B420-C3FB469B7C00" ("Calendar 1")
      - "9221FEE8-E8B4-4D07-9402-8638529919EC" ("Calendar 2")
      - "953A5477-E405-4ED6-A5C3-473444EACC95" ("Calendar 3")
    warning: No collection "9221FEE8-E8B4-4D07-9402-8638529919EC" found for storage Mirror.
    Should vdirsyncer attempt to create it? [y/N]:
    

    Choose y and press enter. Now we can start the sync with:

    vdirsyncer sync
    

    You should find a single calendar file in /home/pi/MagicMirror/modules/calendars/ with the UUID of your calendar as filename like 221FEE8-E8B4-4D07-9402-8638529919EC.ics in this example.

    Add the calendar file to the calendar module of the mirror

    Now, we just have to add the URL to the calendar file to our calendar module of the mirror like this:

    {
        module: 'calendar',
        position: 'top_left',   // This can be any of the regions. Best results in left or right regions.
        config: {
            maximumNumberOfDays: 10,
            maximumEntries: 7,
            calendars: [
                    {
                            url: 'http://localhost:8080/modules/calendars/221FEE8-E8B4-4D07-9402-8638529919EC.ics',
                            symbol: 'calendar'
                    }
            ]
        }
    },
    

    If everything went well, your MagicMirror is now automatically syncing your iCloud calendar with it’s calendar module :)

    posted in Tutorials
    BehB
    Beh
    Oct 21, 2017, 3:31 PM
  • Beh's Mirror

    Hey guys! Here’s my mirror:

    It’s a mirror with a 27’’ display.

    I wrote a blog post about my mirror here. You can find some more pictures and a more or less detailed explanation of how I built it. :)
    I also added a detailed list of the parts to the blog post and added some links to where I bought them.

    I used WAGO connectors for the wiring - to save space in the body. Here’s a photo from the back side of my mirror:

    0_1478812694949_img_9484.jpg

    Here’s a picture of the final mirror:

    0_1478812579339_img_9493.jpg

    The mirror is right next to the entry door of my flat, so I have alle the necessary informations right there before I leave.

    For detailed information please read the blog post or ask me in this thread. ;)

    Greetings!
    B.

    posted in Show your Mirror
    BehB
    Beh
    Nov 10, 2016, 9:27 PM
  • RE: MMM-Wifi_QR-Code

    Yeah, this sounds nice! I’m currently working on a module that shows a QR-Code next to the newsfeed to get to the corresponding news article fast and convenient.

    When I’m done with that I could write such a module.

    posted in Requests
    BehB
    Beh
    Dec 31, 2017, 1:35 PM
  • RE: Sync private iCloud calendar with MagicMirror

    @bgz Please read answers carefully. If it doesn’t exist, just create it. I described the creation in my last answer.

    posted in Tutorials
    BehB
    Beh
    Dec 23, 2017, 7:13 PM
  • Independent display controller based on PIR sensor.

    This is not really a module for the MagicMirror application itself, but I wrote it for my own mirror and I want to share it, if anybody has use for it.

    I wanted a turn-off-my-display-control that is independent from the MagicMirror application. It turns off the display after a given countdown time from the last time a motion was detected by a PIR sensor.
    So every time a motion is recognized, the countdown is set to the maximum countdown time. When no motion is noticed for that time, the display is set to sleep. When then a motion is detected, the display is turned on.

    I also provide a systemd service file, if you want to use it as a service.

    If you have use for it, I put it on GitHub:
    [card:deg0nz/MagicMirror-Display-Controller]

    NOTE:
    If you’re looking for an integrated (and probably easier to use) solution, please take a look at paviro’s awesome PIR-Sensor module.

    posted in Utilities
    BehB
    Beh
    Nov 2, 2016, 3:25 PM
  • Smartphone App for configuring MagicMirror

    Hi,

    i don’t know, if this is the right thread for this, but I’ll just write it here:

    I just finished my own mirror and I almost finished coding my first module. Yaay! :) (Blog post and forum post with photos will follow soon! ;) )

    In the procedure of buildung the mirror, some of my friends and family asked, if I could build other mirrors for them. Since the configuration is quite hacky by writing into a JSON file, I had the idea, that one could create a simple smartphone app, which allows the configuration of the mirror and the modules.

    First - for our own convenience (the mirror builders) and second - for the convenience for the not-so-DIY-style people (like our parents and friends for example).

    I am willing to write a prototype app for iOS, since I am interested in learning Swift in the long way. But yet I have nearly no experience in coding smartphone apps whatsoever (I participated a 1-day Swift crash course at my university some months ago).
    Also, since I’m quite busy with studying and work, I’d see this as a long term project.

    I just wanted to know what you guys think about this and if some of you are in the mood to help me with that project. Maybe by helping me code for iOS or writing an equal app for Android or whatever…

    What do you think?

    posted in Development
    BehB
    Beh
    Oct 17, 2016, 10:45 AM
  • MMM-PublicTransportBerlin - Public transport for Berlin and Brandenburg (departures)

    Hi,

    I wrote a module that shows departures in Berlin and the surrounding state Brandenburg. The module uses a REST API that fetches data from the “Verkehrsverbund Berlin Brandenburg” (VBB). A guy named Jannis Redmann wrote it. So these credits go to him. It provides live data with departure delays. You can have a look at it here.

    You can give a delay time for like “How long does it take to my next station?”. Delay times of the lines are considered and part of the calculation for the delay. A line is drawn at the time now + delay, so the focus is on the departures you’re able to reach in the given delay time.

    It looks like this:

    example from Alexanderplatz

    You can configure how many reachable and unreachable departures should be shown and turn the fading of both parts on and off. Some more options and multiple use of the module are available.

    It’s working for now, but needs some more tests and UI tweaks.

    Download :

    [card:deg0nz/MMM-PublicTransportBerlin]

    posted in Transport
    BehB
    Beh
    Oct 19, 2016, 1:58 PM
  • RE: [ORDER CLOSED] Two way mirror order in Germany

    Damn! The mirror glass looks awesome!

    I’ll contact you for my next mirror! :D

    posted in Hardware
    BehB
    Beh
    Nov 18, 2016, 12:52 PM
  • RE: CalDAV

    Hey @poekel
    you have to use the keyword start instead of startdate.
    It’s described in the sabre/dav documentation here: http://sabre.io/dav/ics-export-plugin/

    So your request should look like this:
    http://192.168.1.xx/baikal/html/dav.php/calendars/xxxx/calendar-name?export&start=1488672000

    You can use this URL in your MM2 config file. It returns a valid .ics file. I’m using this on my mirror too.

    And please note, that your calendar-name must be the internal name in Baikal (you can look this name up in the admin settings when you edit a calendar)

    posted in Troubleshooting
    BehB
    Beh
    Mar 7, 2017, 12:16 PM
  • RE: Mobile app (bachelor thesis)

    Just did the survey!

    I’d like to beta test the app too (as you might know already :D)

    posted in Development
    BehB
    Beh
    Nov 18, 2016, 1:11 PM

Latest posts made by Beh

  • RE: *NEW LIST 29.06.2021* Two way community order for mirror glass for all european countries - Open until at least 10 people have entered

    @Goldjunge_Chriz

    Hi Chriz, long time no see! I’m building another mirror for a friend. I was one of the first ones to order your glass back in 2016 :D

    Please add another glass to the list with the following properties:

    • Size: 61 x 35,5 cm
    • Polished Edges
    • Shipping to Germany

    (Edit: Can’t remember if sub-cm measures are possible, if not, just round to 36)

    posted in Hardware
    BehB
    Beh
    Apr 12, 2022, 9:53 PM
  • MMM-EnergyMonitor - Visualize your produced and consumed (solar-) energy

    I created a module that visualizes produced, stored and consumed energy in your house in a minimalistic way.

    It is meant to be used when you have a solar plant and an energy storage system (optional) installed.

    Github Repo

    https://github.com/deg0nz/MMM-EnergyMonitor

    Screenshot

    Screenshot 2021-11-23 at 19.24.02.png

    How it works

    The module relies on other modules that provide data for it. It gets data updates via notifications from these “data source” modules.

    Depending in which direction the power flows, the arrows change and current values are updated.

    I developed MMM-VartaESS for Varta Energy Storage Systems and MMM-Fronius2 for Fronius power converters as companion modules for this to provide the necessary data.

    The README in the GitHub repo explains, how to send data updates.

    posted in Utilities
    BehB
    Beh
    Nov 23, 2021, 10:24 PM
  • RE: Sync private iCloud calendar with MagicMirror

    @Jaunney I don’t see that this has ben answered yet.

    collections = [“UUID1”, “UUID2”, “UUID3”] is what I use in my config and it works.

    Of course, you need to add a new calender to your calender module to make them visible on the mirror. You need one for every UUID. If you look into your target sync folder on the Pi, there should be 3 .ics files for each UUID. Those are, in fact, 3 separate calendars

    posted in Tutorials
    BehB
    Beh
    Nov 9, 2020, 9:01 PM
  • RE: Sync private iCloud calendar with MagicMirror

    Hi,

    I have another hint related to the systemd timer that was originally described in my tutorial.
    It is advised to download the vdirsyncer.service and vdirsyncer.timer directly from the web.

    You need to adjust the path to the executable in the vdirsyncer.service file!
    It defaults to ExecStart=/usr/bin/vdirsyncer sync, which can be wrong.

    But probably it is in ~/.local/bin. (Can be different depending on your installation. Just check location with which vdirsyncer.

    This should make the initially described automatic sync work again.

    posted in Tutorials
    BehB
    Beh
    Nov 9, 2020, 2:58 PM
  • RE: Sync private iCloud calendar with MagicMirror

    @elliot1996 I would need more information to help you debug this. Are you sure you used the right directory for the file? And you used the --user option when executing systemctl?

    Everything you need to know about systemd unit files is here: https://www.freedesktop.org/software/systemd/man/systemd.unit.html

    The file must be in one of the directories mentioned at the top of the page.

    posted in Tutorials
    BehB
    Beh
    Apr 13, 2020, 9:56 PM
  • RE: Sync private iCloud calendar with MagicMirror

    @thisistheplace I never tried syncing VTODO. All I can do here, is to refer to the vdirsyncer docs regarding this topic: https://vdirsyncer.pimutils.org/en/stable/config.html?highlight=VEVENT#storage-caldav

    Unfortunately you have to dig into that yourself, my time is very limted currently…

    posted in Tutorials
    BehB
    Beh
    Apr 13, 2020, 9:52 PM
  • RE: MMM-COVID19-SPARKLINE

    Awesome module! Thank you so much! I was just browsing around on this forum and immediately installed it. Good work.

    posted in Health
    BehB
    Beh
    Apr 13, 2020, 9:58 AM
  • RE: MMM-PublicTransportBerlin - Public transport for Berlin and Brandenburg (departures)

    @oneartur The example config only shows all the possible config values and is not meant for real world usage. There are some values in it that don‘t work.

    Please start with an minimal possible config (the only mandatory entry is the stationId) and add adjustments to your needs.

    posted in Transport
    BehB
    Beh
    Feb 10, 2020, 10:38 PM
  • RE: Sync private iCloud calendar with MagicMirror

    @mdefrancesco Sorry for the late reply.

    Hmm… that’ weird. Did you get it working by now?

    If not:
    Did you use the --user flag when activating the timer? And what does systemctl --user status vdirsyncer.timer say?
    And did you try different times in the timer file? I could imagine that setting everything to 1 minute could cause problems…

    posted in Tutorials
    BehB
    Beh
    Jan 29, 2020, 8:42 PM
  • RE: MMM-PublicTransportBerlin - Public transport for Berlin and Brandenburg (departures)

    @MZ-BER Hey! Thanks a lot! I’m happy you like it :)

    If I remember correctly, the bus lines in Berlin have no colors. Maybe @derhuerst can verify that?!
    If you can give me a source where to find the colors for each bus line, I can add this.

    What we could do though, is distinguishing normal buses, Metro-Bus and X-Bus.

    posted in Transport
    BehB
    Beh
    Jan 29, 2020, 8:26 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