An open API service indexing awesome lists of open source software.

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

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`)