Skip to content

POJFM/dmp-plant-hub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌱 PlantHub

Ultra advanced smart irrigation system.

planthub

🍔 Tech stack

🖥️ Server and main app

  • Chad GoLang
  • Postgres DB :5420
  • communication with HW modules/sensors via GPIO
  • GraphQL API for DB data
  • REST API for live data from sensors

🌿 Web app (client)

🔧 Setup on RPi

clone the repository

git clone git@github.com:POJFM/dmp-plant-hub.git
cd dmp-plant-hub

create server and docker .env files

# server .env
cp server/.env.example server/.env
# docker .env
cp docker.env.example docker.env

let docker do its thing

docker-compose up -d

📦 Build docker images for arm

create client .env file

cp client/.env.example client/.env

setup docker

# create bob the builder
docker buildx create --name bob
# switch to bob
docker buildx use bob
docker buildx inspect --bootstrap
docker login
docker buildx

build and push images or run scripts/build-docker.sh

# client image
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t tassilobalbo/planthub-client --push client/.
# server image
docker buildx build --platform linux/arm64,linux/arm/v7 -t tassilobalbo/planthub-server --push server/.

🏠 Setup local subnet

  • Install dhcp package: yay -Syu dhcpcd
  • Configure subnet in /etc/dhcpd.conf:
subnet 192.168.0.0 netmask 255.255.255.224 {
  range 192.168.0.10 192.168.0.20;
}
  • Add your network card to subnet sudo ip addr add 192.168.0.1/24 dev enp3s0
  • Restart dhcp daemon systemctl restart dhcpd4

📄 Compile XeLaTeX to pdf

  1. Add XeLaTeX config in vscode
    "latex-workshop.latex.recipe.default": "latexmk (xelatex)",
    "latex-workshop.latex.tools": [
        {
            "name": "xelatexmk",
            "command": "latexmk",
            "args": [
                "-xelatex",
                "-outdir=out",
                "final-report.tex"
            ]
        },
        {
            "name": "latexmk",
            "command": "latexmk",
            "args": [
                "-xelatex",
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "%DOC%"
            ]
        }
    ],
    "latex-workshop.latex.recipes": [
        {
            "name": "latexmk (xelatex)",
            "tools": [
                "xelatexmk"
            ]
        }
    ],
  1. Download Calibri.ttf and put it in ~/.fonts
  2. Compile with latexmk -xelatex -outdir=final-report ./final-report/final-report.tex