Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
0ae9832
Belgium_Version
May 27, 2024
95ce9be
added ayes logo to start screen
May 27, 2024
3660222
edit ayes logo to home screen
May 27, 2024
533046d
WIP: seems to be running, can't see anything on windows. Let's try on…
AndreaCalabro-AYES May 29, 2024
5d7ac1c
WIP: working docker container, needed installation guide!
AndreaCalabro-AYES May 31, 2024
a7ab197
WIP: Readme file to setup the environment to develop on Windows/macOs
AndreaCalabro-AYES May 31, 2024
96db4e7
WIP: corrected last header
AndreaCalabro-AYES May 31, 2024
e711503
WIP: published docker compose
AndreaCalabro-AYES May 31, 2024
696ce76
WIP: changed gitignore to push/pull the configuration file
AndreaCalabro-AYES May 31, 2024
0a2b7e9
Update README.md
AndreaCalabro-AYES May 31, 2024
7ef6d29
Update README.md
AndreaCalabro-AYES Jun 1, 2024
8682dcc
Update README.md
AndreaCalabro-AYES Jun 1, 2024
0b500c3
Update README.md
AndreaCalabro-AYES Jun 1, 2024
9735aa9
WIP: updated gitignore file
AndreaCalabro-AYES Jun 2, 2024
7068b15
Merge branch 'master' of https://github.com/AndreaCalabro-AYES/MagicM…
AndreaCalabro-AYES Jun 2, 2024
08e3b55
WIP: dockerfile cleanup
AndreaCalabro-AYES Jun 2, 2024
7920fbf
WIP: AYES Logo added on screen
AndreaCalabro-AYES Jun 2, 2024
57e6a48
WIP: coloured temperatures
AndreaCalabro-AYES Jun 4, 2024
ee6e8b1
Update docker-compose.yaml
AndreaCalabro-AYES Jun 4, 2024
b0ec48b
Update README.md
AndreaCalabro-AYES Jun 6, 2024
993c4a7
WIP: updated docker-compose file for unix connection
AndreaCalabro-AYES Jun 6, 2024
e75e251
WIP: update docker-comoose file for unix connection
AndreaCalabro-AYES Jun 6, 2024
59505a9
WIP: docker-compose update to work on raspberry
AndreaCalabro-AYES Jun 6, 2024
2d601b8
WIP: ports not needed in docker-compose file
AndreaCalabro-AYES Jun 6, 2024
3123ef4
Update README.md for target
AndreaCalabro-AYES Jun 6, 2024
b79c369
Update README.md layout
AndreaCalabro-AYES Jun 6, 2024
85d8de7
dockerfile correction name
jensverbove Jun 7, 2024
80ee16b
CORRECT IP ADDRESS KWD
AndreaCalabro-AYES Jun 7, 2024
d6fea62
README file update
AndreaCalabro-AYES Jun 13, 2024
934264e
Update README.md to specify the container interactive mode
AndreaCalabro-AYES Jun 18, 2024
bf53400
Add the sunrise/sunset timezone
MerlinGuillaume Jun 19, 2024
3b0d926
Add a 'greetings' module
MerlinGuillaume Jun 19, 2024
3d0b224
Add the 'MMM-MQTTbridge' module
MerlinGuillaume Jun 24, 2024
cb3fe51
Fix the gap between the edges of the screen and the MM modules
MerlinGuillaume Jun 24, 2024
231e53a
Remove unneeded greetings' node helper
MerlinGuillaume Jun 24, 2024
d93790b
Change broker url to localhost
MerlinGuillaume Jun 28, 2024
631ed4d
removed network mode - host as we will develop our own network
AndreaCalabro-AYES Jul 1, 2024
e7729e9
update to use custom bridge network between dockers for MQTT communic…
AndreaCalabro-AYES Jul 2, 2024
f6a377e
BUG: Internal temperature not correctly notified, but message received!
AndreaCalabro-AYES Jul 4, 2024
09891fe
BUG: internal temperature not correctly notified upon message reveived
AndreaCalabro-AYES Jul 4, 2024
002db8f
Fetch the indoor temperature from the payload with notification
MerlinGuillaume Jul 4, 2024
462efdd
enlarged internal temperature, in case it is used, indoor temperature…
AndreaCalabro-AYES Jul 5, 2024
9f5e82b
Merge pull request #1 from AndreaCalabro-AYES/development
AndreaCalabro-AYES Jul 13, 2024
53c81ec
Revert to use host bridge network, ok for POC
AndreaCalabro-AYES Jul 14, 2024
6bc6a99
Removed entrypoint sh script
AndreaCalabro-AYES Jul 14, 2024
d68a95b
Merge pull request #2 from AndreaCalabro-AYES/development
AndreaCalabro-AYES Jul 14, 2024
158b4ba
docker compose cleanup for ip address, and removed env var for mqtt
AndreaCalabro-AYES Jul 14, 2024
13f9c1f
Merge pull request #3 from AndreaCalabro-AYES/development
AndreaCalabro-AYES Jul 14, 2024
23ed502
useless first try to increase the AYES Logo
AndreaCalabro-AYES Jul 17, 2024
e338289
Merge branch 'master' into development
AndreaCalabro-AYES Jul 17, 2024
04f7ae2
Merge pull request #4 from AndreaCalabro-AYES/development
AndreaCalabro-AYES Jul 17, 2024
14d80e8
Max-W and Max-H of AYES picture set to 80%
AndreaCalabro-AYES Jul 17, 2024
0588514
60% of AYES Logo Image to be shown
AndreaCalabro-AYES Jul 17, 2024
a8e7073
WIP: white screen version - AYES colours
AndreaCalabro-AYES Aug 7, 2024
a24bc51
Merge pull request #5 from AndreaCalabro-AYES/development
AndreaCalabro-AYES Aug 7, 2024
0b3bdb7
Correct AYES Motto
AndreaCalabro-AYES Aug 7, 2024
c144ab2
Merge pull request #6 from AndreaCalabro-AYES/development
AndreaCalabro-AYES Aug 7, 2024
dd0a619
Add indoor temperature and humidity
ErwinCornetAyes Jan 22, 2025
287774a
Add streetmap moduleg
ErwinCornetAyes Feb 14, 2025
25dbb8e
Set correct coordinates
ErwinCornetAyes Mar 27, 2025
7af91b3
Change modules order
ErwinCornetAyes Mar 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,23 @@ Temporary Items
!/modules/default/**
!/modules/README.md**

# Do not ignore greetings module.
!/modules/greetings
!/modules/greetings/**

# Do not ignore MQTT module.
!/modules/MMM-MQTTbridge
!/modules/MMM-MQTTbridge/**

# Ignore changes to the custom css files but keep the sample and main.
/css/*
!/css/custom.css.sample
!/css/main.css

# We will have a basic config file, then each branch its own?
# Ignore users config file but keep the sample.
/config/*
!/config/config.js.sample
# /config/*
# !/config/config.js.sample

# Vim
## swap
Expand All @@ -81,3 +90,6 @@ Temporary Items
*.orig
*.rej
*.bak

# Ignore the docker-compose file to avoid unwanted IP address pushing
# docker-compose.yaml
62 changes: 62 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Dockerfile for MagicMirror

# FROM node:21

FROM ubuntu:22.04

# Install Node.js and npm, keep the FROM to just one per dockerfile
RUN apt-get update && apt-get install -y curl software-properties-common
RUN curl -sL https://deb.nodesource.com/setup_21.x | bash -
RUN apt-get update && apt-get install -y nodejs

# Make sure to have x11-apps to perform screen forwarding
RUN apt-get update && apt-get install -qqy x11-apps

# Install dependencies
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
cmake \
libopenblas-dev \
liblapack-dev \
libnss3 \
libgtk-3-0 \
libx11-xcb1 \
libxcomposite1 \
libxcursor1 \
libxdamage1 \
libxi6 \
libxtst6 \
libxrandr2 \
libasound2 \
libpangocairo-1.0-0 \
libatk1.0-0 \
libcups2 \
libdbus-1-3 \
libdrm2 \
libxss1 \
libgbm1 \
libxshmfence1 \
libglu1-mesa \
&& rm -rf /var/lib/apt/lists/*

# Set working directory
WORKDIR /opt/magicmirror

COPY package.json ./package.json
COPY package-lock.json ./package-lock.json
COPY vendor/ ./vendor/
COPY fonts/ ./fonts/
RUN npm install --verbose

# Copy MagicMirror files
COPY . .

# Expose port
EXPOSE 8080

# Start MagicMirror in server mode
# CMD ["node", "serveronly"]

# Start MagicMirror in client mode
CMD ["npm", "start", "--", "--no-sandbox"]
34 changes: 34 additions & 0 deletions Old_Dockerfile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Set the default OS to Linux
ARG OS=linux

# Use the official Node.js image as base
FROM node:21

# Set the working directory in the container to /app
WORKDIR /app

# Copy package.json and package-lock.json into the container at /app
COPY package*.json ./

# Bundle the app source inside the Docker image
# (i.e., copy the rest of the application into the Docker image)
COPY . .

# Install any needed packages specified in package.json
RUN npm install

# Install dependencies in the vendor directory (only for Windows)
RUN if [ "$OS" = "windows" ]; then \
cd /app/vendor && npm install; \
fi

# Install dependencies in the font directory (only for Windows)
RUN if [ "$OS" = "windows" ]; then \
cd /app/fonts && npm install; \
fi

# Make port 8080 available to the world outside this container
EXPOSE 8080

# Run MagicMirror² when the container launches, using the server only mode
CMD ["npm", "run", "server"]
9 changes: 9 additions & 0 deletions Old_docker-compose.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: '3'
services:
magic_mirror:
build: .
image: magic_mirror
container_name: magic_mirror
ports:
- "8080:8080"
restart: unless-stopped
148 changes: 148 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,151 @@
# Docker Setup with X Server Forwarding for Windows

## Prerequisites
- Docker Desktop
- VcXsrv Windows X Server

## Installation & Configuration

1. **Install Docker Desktop for Windows**
- Download and install from the Docker [website](https://docs.docker.com/desktop/install/windows-install/).

2. **Install VcXsrv Windows X Server**
- Download [VcXsrv from SourceForge](https://sourceforge.net/projects/vcxsrv/).
- Run XLaunch, choose your display settings, and ensure "Disable access control" is checked.

3. **Configure Docker - Not always needed**
- Do this only if you have any issue on the first run
- In Docker settings, ensure "Expose daemon on tcp://localhost:2375 without TLS" is enabled.

4. **Retrieve IP Address**
- Open Command Prompt and execute `ipconfig` to find your "IPv4 Address".

5. **Firewall**
- Set the correct **Firewall Settings** to allow X server forwarding


# Docker with X Server Forwarding on macOS

This guide will walk you through the process of setting up Docker to run containers that can display GUI applications on macOS using X server forwarding.

## Step 1: Install Docker Desktop for Mac

- Download **Docker Desktop for Mac** from the Docker [website](https://docs.docker.com/desktop/install/mac-install/).
- Follow the installation instructions provided by the installer.

## Step 2: Install XQuartz

- Download **XQuartz** from the [XQuartz website](https://www.xquartz.org/).
- Install XQuartz and then restart your computer to ensure the changes take effect.

## Step 3: Configure XQuartz

- Open **XQuartz**.
- In the top menu, go to `XQuartz` > `Preferences`.
- Click on the **Security** tab.
- Check the option **"Allow connections from network clients"**.

## Step 4: Retrieve Your IP Address

- Open the **Terminal** application.
- Type `ifconfig` and press **Enter**.
- Look for the **"inet"** address associated with your active network connection (not the loopback `127.0.0.1`).

## Step 5: Firewall

- Open the **System Preferences** from the Apple menu
- Click on **Security & Privacy**
- Select the **Firewall** tab
- If the firewall is turned on, click on the lock icon and enter your admin pwd
- Click on **Firewall Options**
- Set the correct **Firewall Settings** to allow X server forwarding
- Re-lock the settings to ensure

## Step 6: Addittional - in case of extra issues

1. Add your IP address to the xhost list
- xhost +your_host_ip (replace your_host_ip with the actual IP address of your Mac machine)

# After - common steps to build, test, and run the container

## Clone the repository
1. Create a new folder
2. In the new folder git clone this repo (use the link)

**If you already downloaded the repo and built locally, you can't use the same folder**

## Building Docker Container

1. Go in the project folder

2. **Run the command**
- docker-compose build


**As of now, keep your X Server Emulator (Xserver or Qwartz) launched - as explained above**

## Test

1. **Run the container in interactive mode**
- Run the docker container as follow
docker run --rm -it <image_name>
- Use the following command
xeyes

## Play

1. **Modify the docker-compose file**
- Go to the docker-compose file
- In the line below environment
- DISPLAY=<YOUR_IP_ADDRESS_HERE>:0, put your IP address in place of YOUR_IP_ADDRESS_HERE
2. **Run the container as expected**
- Run the container as intended
- docker-compose up

# On target - the RASP

## Prepare the Raspberry Pi

1. Update the list of available packages and their version
- sudo apt-get update
2. Installs Docker and Docker-Compose
- sudo apt-get install -y docker.io docker-compose
3. Start the docker service, and ensure it will run on boot
- sudo systemctl start docker
- sudo systemctl enable docker
4. The X server manages the graphical display. To allow the Docker container to interact with it, use:
- xhost +si:localuser:root

## Optional: Use a Non-Root User for Docker
By default, Docker commands require sudo. To run Docker commands without sudo, add your user to the docker group, and later reboot:
- sudo usermod -aG docker $USER

## Start the mirror
1. Clone the repository in a local folder
2. Manually change the docker-compose file in order to have the following env variable
- DISPLAY=:0
3. Navigate to the folder
4. Run the container
- (sudo) docker-compose up

## Optional: debug and test
1. Build the container instead of running it
- (sudo) docker-compose build
2. Run the container using the following command
- docker run --rm -e DISPLAY=:0 -v /tmp/.X11-unix:/tmp/.X11-unix x11-apps xeyes
3. Check the logs
- docker-compose logs











![MagicMirror²: The open source modular smart mirror platform. ](.github/header.png)

<p style="text-align: center">
Expand Down
Loading
Loading