cedbossneo / openmower-gui

28 stars 18 forks source link

OpenMower GUI

A GUI for the OpenMower project.

Demo

https://youtu.be/x45rdy4czQ0

Installation

If you are using Mowgli-Docker

If you are using mowgli-docker, you can skip this part as it's now included in the docker-compose file.

If your are using OpenMowerOS

OpenMowerOS uses podman and containers are managed by systemd.

First, create the /boot/openmower/db directory :

mkdir /boot/openmower/db

Create a gui.service file in /etc/systemd/system/ with the following content:

[Unit]
Description=Podman container - gui.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target NetworkManager.service
StartLimitInterval=120
StartLimitBurst=10

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Type=forking
Restart=always
RestartSec=15s
TimeoutStartSec=1h
TimeoutStopSec=120s

ExecStartPre=/bin/rm -f %t/container-gui.pid %t/container-gui.ctr-id

ExecStart=/usr/bin/podman run --conmon-pidfile %t/container-gui.pid --cidfile %t/container-gui.ctr-id --cgroups=no-conmon \
  --replace --detach --tty --privileged \
  --name openmower-gui \
  --network=host \
  --env MOWER_CONFIG_FILE=/config/mower_config.sh \
  --env DOCKER_HOST=unix:///run/podman/podman.sock \
  --env ROS_MASTER_URI=http://localhost:11311 \
  --volume /dev:/dev \
  --volume /run/podman/podman.sock:/run/podman/podman.sock \
  --volume /boot/openmower/db:/app/db \
  --volume /boot/openmower/mower_config.txt:/config/mower_config.sh \
  --label io.containers.autoupdate=image \
  ghcr.io/cedbossneo/openmower-gui:master

#ExecStartPost=/usr/bin/podman image prune --all --force

ExecStop=/usr/bin/podman stop --ignore --cidfile %t/container-gui.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore --force --cidfile %t/container-gui.ctr-id
PIDFile=%t/container-gui.pid

[Install]
WantedBy=multi-user.target default.target

Then enable and start the service:

sudo systemctl enable gui.service
sudo systemctl start gui.service

Usage

Once the container is running, you can access the GUI by opening a browser and going to http://<ip of the machine running the container>:4006

HomeKit

The password to use OpenMower in iOS home app is 00102003 Do not forget to set env var HOMEKIT_ENABLED to true

MQTT

MQTT server is listening on port 1883

See ros.ts for topic types

Available topics :

Available commands :

Do not forget to set env var MQTT_ENABLED to true

Env variables

Contributing

PR are welcomed :-)

You can run the gui into VSCode or WebStorm with devcontainer

Then use make deps to install dependencies, open a terminal run make run-gui for the frontend and make run-backend for the backend