Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
hardware:baby-mirror [2026/07/26 22:47] Sparkyhardware:baby-mirror [2026/08/25 19:17] (current) Sparky
Line 11: Line 11:
 chest. chest.
  
-## Hardware+## Hardware and software
  
-- **Board:** Raspberry Pi 3B++- **Board:** Raspberry Pi 3B+ (1 GB RAM)
 - **Display:** monitor + display driver board behind one-way glass - **Display:** monitor + display driver board behind one-way glass
-- **OS image:** the original /dev/hack MagicMirror image (the Pi was *not* +- **OS:** Debian 13 (Trixie), 64-bit 
-  reimaged when it was donatedso paths and setup match the /dev/hack build)+**MagicMirror:** v2.37.0running under Electron 42.5.2 on Node 24 
 +- **Networking:** managed by NetworkManager
  
-## Access+Note that the Pi has been updated since it was donated. It is no longer running 
 +the original /dev/hack image, so do not assume the stock /dev/hack layout or 
 +tooling. Paths and service setup are documented below and were confirmed on the 
 +device on 2026-08-25.
  
-- **Hostname (SSH):** `smartmirror.user.dma.computer` +## Finding the mirror on the network
-- **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 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 +must be on that network to reach it. Its address comes from DHCP and changes
-connect by hostname, never hardcoded IP.+ 
 +**The hostname does not resolve.** `smartmirror.user.dma.computer` will not 
 +resolve even when you are on the user VLANbecause every VLAN's DHCP hands out 
 +public DNS (1.1.1.1 and 1.0.0.1) and the router does not run an internal 
 +resolver. Do not rely on the hostname. mDNS (`smartmirror.local`) did not answer 
 +either when this was last checked. 
 + 
 +To find its current addressuse one of: 
 + 
 +1. The router's DHCP lease table. 
 +2. A sweep of the user VLAN, then look for host answering SSH with a Debian 
 +   banner. It was at `10.20.110.92` on 2026-08-25. 
 +3. A keyboard on the Pi itself and `hostname -I`. 
 + 
 +## Access 
 + 
 +- **SSH user:** `localadmin` 
 +- **Password:** stored in the **infra Vaultwarden** (vault.dma.space) under the 
 +  `smartmirror` item. That item lived in a personal vault until 2026-08-24 and 
 +  is now shared to the org, so if you cannot find it, check that you are looking 
 +  at the org vault. *(Do not paste credentials on this page, the wiki is 
 +  public.)*
  
 ``` ```
-ssh localadmin@smartmirror.user.dma.computer+ssh localadmin@<ip>
 ``` ```
  
Line 42: Line 63:
 ``` ```
  
-## How MagicMirror is managed+All three were confirmed correct on 2026-08-25.
  
-MagicMirror runs as a **systemd user service** under the `localadmin` account +## Console access
-(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:+If the mirror is off the network, you can get a local console with a USB 
 +keyboard: 
 + 
 +- **Ctrl+Alt+F2** switches to a text console. 
 +- **Ctrl+Alt+F7** switches back to the MagicMirror display. 
 + 
 +Two things to know before you rely on this. The console keymap is not US and has 
 +dead keys, so quotes and symbols are hard to type correctly, and `loadkeys` 
 +cannot help because `/usr/share/keymaps` is not installed. Anything involving 
 +quotes or a password is much easier over SSH. Also remember to log out of the 
 +console when you are done, since the space is shared. 
 + 
 +## If the mirror is on but shows no data 
 + 
 +A module reporting "no internet connection" usually means the Pi is up but has 
 +dropped off wifi. This happened on 2026-08-25 and the device had been offline 
 +long enough that nobody noticed. 
 + 
 +Wifi is managed by **NetworkManager**, not by a `wpa_supplicant.conf` file. 
 +There is no `/etc/wpa_supplicant/wpa_supplicant.conf` on this box, and editing 
 +`wpa_cli` network blocks will not work, because NetworkManager owns the 
 +supplicant. 
 + 
 +From a console on the Pi, the fix that worked was simply restarting the service:
  
 ```bash ```bash
-# verify on device, service name is a placeholder until confirmed +sudo systemctl restart NetworkManager
-systemctl --user list-units --type=service | grep -i mirror +
-systemctl --user status <magicmirror-service-name>+
 ``` ```
  
-Restart it (e.g. after editing the config):+It reconnected and picked up a DHCP lease immediatelyIf that is not enough:
  
 ```bash ```bash
-systemctl --user restart <magicmirror-service-name>+nmcli device status 
 +sudo nmcli device wifi rescan 
 +nmcli device wifi list 
 +sudo nmcli --ask device wifi connect dma.space/hello
 ``` ```
  
-View logs:+`nmcli device wifi connect` can report that the network cannot be found when the 
 +scan cache is stale, so always rescan first. Using `--ask` prompts for the 
 +password instead of taking it on the command line, which avoids both shell 
 +quoting and the console keymap problem. 
 + 
 +## How MagicMirror is managed 
 + 
 +MagicMirror runs as a **systemd user service** under the `localadmin` account. 
 +The unit lives at `~/.config/systemd/user/magicmirror.service`, is enabled at 
 +boot, and starts `/home/localadmin/scripts/start_mm.sh`. The systemd unit and 
 +the `/dev/hack` start script are not alternatives to each other; the unit runs 
 +the script.
  
 ```bash ```bash
-journalctl --user -u <magicmirror-service-name> -f+systemctl --user status magicmirror.service 
 +systemctl --user restart magicmirror.service
 ``` ```
  
-**Verify on device:** the exact service name and that MagicMirror really is a +**Logs.** `journalctl --user` does not work on this device and reports "No 
-`systemctl --user` unitIf `systemctl --user` shows nothing, check for a +journal files were found", because the per-user journal is not persistedUse 
-> desktop autostart file at `~/.config/autostart` calling +either of these instead: 
-`~/scripts/start_mm.sh(the stock /dev/hack setup) instead.+ 
 +```bash 
 +systemctl --user status magicmirror.service --no-pager 
 +sudo journalctl _UID=1000 -n 40 --no-pager 
 +```
  
 ## Configuration ## Configuration
  
-MagicMirror config lives at (per the /dev/hack image, verify on device):+MagicMirror config lives at:
  
 ``` ```
Line 82: Line 141:
  
 Modules are configured in the `modules: [ ... ]` array in that file. Installed Modules are configured in the `modules: [ ... ]` array in that file. Installed
-modules live under `/home/localadmin/MagicMirror/modules/`. After editing +modules live under `/home/localadmin/MagicMirror/modules/`. 
-`config.js`, restart the service (aboveto apply changes.+ 
 +**Always back up and validate before restarting.** A malformed `config.js` stops 
 +MagicMirror from starting and leaves the mirror blank. 
 + 
 +```bash 
 +cd /home/localadmin/MagicMirror/config 
 +cp config.js config.js.bak-$(date +%F) 
 +# edit, then check that it parses before restarting: 
 +node -e 'require("/home/localadmin/MagicMirror/config/config.js"); console.log("OK")' 
 +systemctl --user restart magicmirror.service 
 +``` 
 + 
 +To roll back: 
 + 
 +```bash 
 +cp config.js.bak-<date> config.js 
 +systemctl --user restart magicmirror.service 
 +```
  
 ## Displaying the community quotes feed ## Displaying the community quotes feed
  
-Quotes are shown via MagicMirror's built-in +Quotes come from `#.offtopic > quotes` in Zulip, published as an Atom feed: 
-[`newsfeed`](https://docs.magicmirror.builders/modules/newsfeed.html) module+ 
-pointed at the DMA quotes RSS feed.+``
 +https://portal.dma.space/api/feeds/quotes.atom 
 +``` 
 + 
 +The feed is public and needs no token. Confirm the mirror can reach it before 
 +relying on itand **test with GET, not HEAD**. The endpoint is GET-only and 
 +`curl -I` returns 405 even when the feed is perfectly healthy: 
 + 
 +```bash 
 +curl -sS -o /dev/null -w '%{http_code}\n' https://portal.dma.space/api/feeds/quotes.atom 
 +```
  
-Add (or edit) an entry in the `modulesarray in `config.js`:+The display uses MagicMirror's built-in 
 +[`newsfeed`](https://docs.magicmirror.builders/modules/newsfeed.html) module. 
 +This is the block currently in `config.js`:
  
 ```js ```js
 { {
-  module: "newsfeed", +    module: "newsfeed", 
-  position: "bottom_bar", +    position: "bottom_bar", 
-  config: { +    config: { 
-    feeds: [ +        feeds: [ 
-      +            
-        title: "DMA Quotes", +                title: "DMA Quotes", 
-        url: "https://<quotes-feed-url>",   // set once the quotes feed ships +                url: "https://portal.dma.space/api/feeds/quotes.atom" 
-      }, +            
-    ], +        ], 
-    showSourceTitle: false, +        showSourceTitle: false, 
-    showPublishDate: false, +        showPublishDate: false, 
-    showDescription: true,   // set true if the quote text is in the RSS <description> +        showDescription: false 
-  }, +    
-}+},
 ``` ```
  
-Then restart the service to pick it up.+`showDescription` is deliberately `false`. Each entry carries the whole quote in 
 +its `<title>` and has no `<summary>` or `<content>`, so there is no description 
 +to show. For the same reason, do not add `ignoreOldItems`: quotes are posted 
 +infrequently and the newest entry is often weeks old, so filtering by age would 
 +empty the bar.
  
-> **Reachability note:** the quotes feed is served by the DMA monolith, and the +The large centred text on the mirror is the separate `compliments` modulenot 
-mirror is on the user VLAN. Before relying on thisconfirm the mirror can +the quotes feed.
-> actually reach the feed from that VLAN: +
-+
-> ```bash +
-> 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 ## Editing safely
  
 This is a **production device** on the space's network. Coordinate before making 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 +changes, back up `config.js` first, validate that it parses, and restart the 
-mirror comes up blank after a change, check the logs (above); malformed +service to apply. If the mirror comes up blank after a change, restore the 
-`config.js` will stop MagicMirror from starting.+backup and restart. 
 + 
 +## Known issues 
 + 
 +- The wifi dropout described above has not been tested across reboot. The 
 +  NetworkManager profile should persist, but a silent recurrence is possible. 
 +  If the mirror goes dark again, check wifi first.