Baby Mirror

**This is an old revision of the document!**

Baby Mirror

The Baby Mirror is a MagicMirror² smart mirror: a Raspberry Pi driving a monitor mounted behind one-way glass. It was donated to DMA by /dev/hack, we use it to display info to the space, including a feed of community quotes.

Where it is

Currently sitting on top of the tool chest. Planned to be wall-mounted above the chest.

Hardware

  • Board: Raspberry Pi 3B+
  • Display: monitor + display driver board behind one-way glass
  • OS image: the original /dev/hack MagicMirror image (the Pi was not reimaged when it was donated, so paths and setup match the /dev/hack build)

Access

  • Hostname (SSH): smartmirror.user.dma.computer
  • SSH user: localadmin
  • Password: stored in the infra Vaultwarden (vault.dma.space), look up the Baby Mirror / smartmirror entry there. (Do not paste credentials on this page, the wiki is public.)

The mirror is on the DMA user VLAN (the dma.space/hello network), so you must be on that network to reach it. Its IP is assigned by DHCP and changes, so always connect by hostname, never a hardcoded IP.

ssh localadmin@smartmirror.user.dma.computer

SSH host key fingerprints (verify on first connect):

256  SHA256:3KxeMLQ0FjtB0n0XmRc0ugtDom14vmPNLxVWl/idsEA (ED25519)
256  SHA256:QubQF144eoTKvpVRUvECWkBkMP5zG7dTFgEVft/hJaU (ECDSA)
3072 SHA256:TfAb3KQ5LukzQ/dXTOH2esfB9q4QgeBNKeidXbsNLJs (RSA)

How MagicMirror is managed

MagicMirror runs as a systemd user service under the localadmin account (not pm2, not a desktop autostart file, note this differs from the stock /dev/hack docs, so confirm the unit name on the device).

Find the service name and check its status:

# verify on device, service name is a placeholder until confirmed
systemctl --user list-units --type=service | grep -i mirror
systemctl --user status <magicmirror-service-name>

Restart it (e.g. after editing the config):

systemctl --user restart <magicmirror-service-name>

View logs:

journalctl --user -u <magicmirror-service-name> -f
Verify on device: the exact service name and that MagicMirror really is a systemctl --user unit. If systemctl --user shows nothing, check for a desktop autostart file at ~/.config/autostart calling ~/scripts/start_mm.sh (the stock /dev/hack setup) instead.

Configuration

MagicMirror config lives at (per the /dev/hack image, verify on device):

/home/localadmin/MagicMirror/config/config.js

Modules are configured in the modules: [ ... ] array in that file. Installed modules live under /home/localadmin/MagicMirror/modules/. After editing config.js, restart the service (above) to apply changes.

Displaying the community quotes feed

Quotes are shown via MagicMirror's built-in ''%%newsfeed%%'' module, pointed at the DMA quotes RSS feed.

Add (or edit) an entry in the modules array in config.js:

{
  module: "newsfeed",
  position: "bottom_bar",
  config: {
    feeds: [
      {
        title: "DMA Quotes",
        url: "https://<quotes-feed-url>",   // set once the quotes feed ships
      },
    ],
    showSourceTitle: false,
    showPublishDate: false,
    showDescription: true,   // set true if the quote text is in the RSS <description>
  },
}

Then restart the service to pick it up.

Reachability note: the quotes feed is served by the DMA monolith, and the mirror is on the user VLAN. Before relying on this, confirm the mirror can actually reach the feed from that VLAN:
curl -sI https://<quotes-feed-url>

If it can't reach the monolith, the feed URL needs to be exposed on a path the user VLAN can reach.

Editing safely

This is a production device on the space's network. Coordinate before making changes, edit config.js over SSH, and restart the service to apply. If the mirror comes up blank after a change, check the logs (above); a malformed config.js will stop MagicMirror from starting.