https://github.com/johnf/gem-serial-to-tcp-ip-bridge
GreenEye Monitor Serial to TCP/IP Bridge
https://github.com/johnf/gem-serial-to-tcp-ip-bridge
Last synced: 15 days ago
JSON representation
GreenEye Monitor Serial to TCP/IP Bridge
- Host: GitHub
- URL: https://github.com/johnf/gem-serial-to-tcp-ip-bridge
- Owner: johnf
- Created: 2025-12-09T10:11:37.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-04-12T02:08:18.000Z (2 months ago)
- Last Synced: 2026-04-12T02:29:00.250Z (2 months ago)
- Language: TypeScript
- Size: 12.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GEM Serial to TCP/IP Bridge
A lightweight proxy that bridges serial port communication from a GreenEye
Monitor (GEM) device to a TCP/IP network connection. It reads binary data from
the serial port and forwards parsed packets to a remote host over TCP.
## Quick Start with Docker
```bash
docker run -d \
--name gem-proxy \
--device /dev/ttyUSB0:/dev/ttyUSB0 \
-e TCP_HOST=homeassistant.local \
-e TCP_PORT=8000 \
--restart unless-stopped \
ghcr.io/johnf/gem-serial-to-tcp-ip-bridge:latest
```
## Configuration
All configuration is done via environment variables:
| Variable | Default | Description |
|----------|---------|-------------|
| `SERIAL_PORT` | `/dev/ttyUSB0` | Path to the serial device |
| `BAUD_RATE` | `115200` | Serial port baud rate |
| `TCP_HOST` | `homeassistant.local` | Target TCP host |
| `TCP_PORT` | `8000` | Target TCP port |
## Docker Compose
```yaml
services:
gem-bridge:
image: ghcr.io/johnf/gem-serial-to-tcp-ip-bridge:latest
container_name: gem-bridge
restart: unless-stopped
devices:
- /dev/ttyUSB0:/dev/ttyUSB0
environment:
- TCP_HOST=homeassistant.local
- TCP_PORT=8000
```
## Hardware Requirements
- A GreenEye Monitor device connected via USB serial adapter
- The serial device must be accessible at the configured path (default: `/dev/ttyUSB0`)
- The container requires `--device` flag to access the serial port
## Building Locally
### Prerequisites
- Node.js 22+
- pnpm
### Development
```bash
# Install dependencies
pnpm install
# Run the application
pnpm start
# Lint (Biome + TypeScript + Knip)
pnpm run lint
```
### Build Docker Image Locally
```bash
docker build -t gem-proxy .
```
## Supported Architectures
The container image is built for:
- `linux/amd64` (x86_64)
- `linux/arm64` (ARM64, Raspberry Pi 4+, Apple Silicon)
## Releases
Container images are automatically built and published to GitHub Container Registry on:
- Every push to `main` branch (tagged as `latest` and `main`)
- Version tags (e.g., `v1.0.0` creates tags `1.0.0`, `1.0`, `1`)