handpose-facemesh-demos
🎥🤟 8 minimalistic templates for tfjs mediapipe handpose and facemesh
Docker-based 3D print monitoring with Home Assistant, OctoPrint, machine learning and featuring secure remote access. R…
git clone https://github.com/oliverbravery/3D-Print-Sentinel.gitoliverbravery/3D-Print-Sentinel3D-Print-Sentinel is a Docker-based solution that integrates Home Assistant, OctoPrint, and a custom AppDaemon app to automatically monitor 3D prints locally using machine learning. This project also enables secure remote access to Home Assistant via Cloudflared, allowing you to keep track of your prints from anywhere without exposing your local network. This solution can run entirely on a Raspberry Pi, making it accessible and easy to set up with minimal hardware requirements.
The machine learning and notification system can be setup as a standalone service for those who already have a homeassistant setup. It can be customised via the config file to use any entities (such as Klipper homeassistant entities) instead of Octoprint entities if that is prefered. See the standalone setup instructions for more information.
This setup works on any machine with Docker and Docker Compose installed. If you are using a Raspberry Pi, follow the specific setup guide below.
git clone https://github.com/oliverbravery/3D-Print-Sentinel.git cd 3D-Print-Sentinel
.env file with the your cloudflared tunnel token (see the Cloudflared Tunnel Setup section below for more information):
TUNNEL_TOKEN=<your cloudflared tunnel token>
docker compose up --build -d homeassistant
http://localhost:8123 and complete the setup wizard.Long-Lived Access Tokens, and create a new token.secrets.yaml file in the appdaemon/conf directory following this template, where HASS_TOKEN is the long-lived access token obtained in the previous step:
HASS_TOKEN: <the HASS long-lived access token>
HASS_HOSTNAME: <the HASS hostname (e.g. http://homeassistant:8123)>
LATITUDE: <your latitude>
LONGITUDE: <your longitude>
ELEVATION: <your elevation>
TIME_ZONE: <your time zone (e.g. GMT)>
docker compose up --build -d
Note: For some unknown reason, to connect to Home Assistant using your Cloudflare domain, you will need to use the app. The web interface will not work, giving the error 'error while loading page ...'.
The following setup shows how to install and setup just the failure detection and notification (Appdaemon) service to be connected with a HomeAssistant instance.
git clone https://github.com/oliverbravery/3D-Print-Sentinel.git cd 3D-Print-Sentinel
Long-Lived Access Tokens, and create a new token.configuration.yaml file include these lines to ensure the camera snapshots are accessible:
homeassistant: media_dirs: local: /media
secrets.yaml file in the appdaemon/conf directory following this template, where HASS_TOKEN is the long-lived access token obtained in the previous step:
HASS_TOKEN: <the HASS long-lived access token>
HASS_HOSTNAME: <the HASS hostname (e.g. http://homeassistant:8123)>
LATITUDE: <your latitude>
LONGITUDE: <your longitude>
ELEVATION: <your elevation>
TIME_ZONE: <your time zone (e.g. GMT)>
appdaemon/conf/apps/config.ini with your desired configuration variables. The default configuration of the file is for an Octoprint setup. More information on the configuration file can be found here.docker compose up --build appdaemon -d
In addition to the general Docker setup, the Raspberry Pi requires a few additional steps to optimize performance and enable the machine learning model.
It is highly recommended to use a Raspberry Pi 5 with at least 4GB of RAM for optimal performance. An M.2 SSD is also recommended as home assistant performs alot of read and write operations.
sudo nano /etc/udev/rules.d/99-usb-serial.rules # Open the file in the nano text editor SUBSYSTEM=="tty", KERNEL=="ttyACM0", ACTION=="add", RUN+="/usr/bin/docker restart octoprint appdaemon" # Add this line to the file, save and exit sudo udevadm control --reload-rules && sudo udevadm trigger # Reload the udev rules
curl -fsSL https://get.docker.com -o get-docker.sh # Download the Docker installation script
sudo sh get-docker.sh # Run the Docker installation script
sudo usermod -aG docker ${USER} # Add the current user to the Docker group
sudo su - ${USER} # Refresh the user group
docker version # Check the Docker version to verify the installation
sudo apt install docker-compose -y # Install Docker Compose
sudo systemctl enable docker # Enable Docker to start on boot
We can access homeassistant remotely through a secure Cloudflared tunnel. This requires a Cloudflare domain and a Cloudflared tunnel token. If you do not require this functionality, remove the cloudflared service from the docker-compose.yml file.
It is assumed that you already have a domain set up on Cloudflare.
Networks -> Tunnels and create a new tunnel.Cloudflared as the tunnel type and copy the tunnel token starting 'eyJh...' (from the brew install command for example). This token should be added to the .env file as TUNNEL_TOKEN.Configure. Go to the Public Hostname section and click Add hostname.Service dropdown, set the type to HTTP and the url to homeassistant:8123. Click Save.
The tunnel should now be connected to your domain.You can access homeassistant remotely at https://<subdomain>.<domain>through any of the home assistant apps! Note: For some reason you have to use the app as you can't access it through a browser using the cloudflare domain.
http://localhost:8123 to monitor your 3D prints and manage your smart home devices. If you set up the Cloudflared tunnel, you can access Home Assistant remotely at https://<subdomain>.<domain>.http://localhost:80 to manage your 3D printer and start prints.https://<subdomain>.<domain>).more like this
🎥🤟 8 minimalistic templates for tfjs mediapipe handpose and facemesh
simple generator for 3D-printed frames for a moxon rectangle antenna
search projects, people, and tags