diff --git a/meshmonitor/config.yaml b/meshmonitor/config.yaml index c261a07..37299b8 100644 --- a/meshmonitor/config.yaml +++ b/meshmonitor/config.yaml @@ -1,5 +1,5 @@ name: "MeshMonitor" -description: "Web tool for monitoring a Meshtastic Node Deployment over TCP/HTTP" +description: "Web tool for monitoring a Meshtastic Node Deployment" version: "3.9.5" slug: "meshmonitor" init: false @@ -10,8 +10,6 @@ startup: services boot: auto ingress: true ingress_port: 3001 -network: - 3001/tcp: 3001 panel_icon: "mdi:mesh-network" panel_title: "MeshMonitor" map: @@ -20,8 +18,6 @@ map: options: meshtastic_node_ip: "192.168.1.xxx" meshtastic_tcp_port: 4403 - enable_virtual_node: false schema: meshtastic_node_ip: "str" - meshtastic_tcp_port: "int" - enable_virtual_node: "bool" + meshtastic_tcp_port: "int" \ No newline at end of file diff --git a/meshmonitor/run.sh b/meshmonitor/run.sh index 806b280..0bc909a 100644 --- a/meshmonitor/run.sh +++ b/meshmonitor/run.sh @@ -2,20 +2,27 @@ CONFIG_PATH=/data/options.json -# Extract options from Home Assistant config +# Extract options export MESHTASTIC_NODE_IP=$(jq --raw-output '.meshtastic_node_ip' $CONFIG_PATH) export MESHTASTIC_TCP_PORT=$(jq --raw-output '.meshtastic_tcp_port // 4403' $CONFIG_PATH) -export ENABLE_VIRTUAL_NODE=$(jq --raw-output '.enable_virtual_node // false' $CONFIG_PATH) # Standard MeshMonitor variables export PORT=3001 export NODE_ENV=production -export ALLOWED_ORIGINS="http://192.168.1.101:8123,http://homeassistant.local:8123" -export TRUST_PROXY=true +# --- MANDATORY FOR INGRESS --- +# This tells the React app to use relative paths for JS/CSS export BASE_URL="./" -echo "Starting MeshMonitor connecting to $MESHTASTIC_NODE_IP:$MESHTASTIC_TCP_PORT..." +# Allow Home Assistant to proxy the connection +export TRUST_PROXY=true +export ALLOWED_ORIGINS="*" + +# Optional: Disable secure cookies if you aren't using HTTPS internally +export COOKIE_SECURE=false +# ----------------------------- + +echo "Starting MeshMonitor with Ingress support..." cd /app exec node dist/server/server.js \ No newline at end of file