Sign inSign up

zackwag/pesetech2mqtt

By zackwag

Updated 1 day ago

Image
0

568

zackwag/pesetech2mqtt repository overview

pesetech2mqtt

A lightweight Python bridge that connects Pesetech/Lepu artificial skylights over Bluetooth Mesh to Home Assistant via MQTT Discovery.

Source & full docs: https://github.com/zackwag/pesetech2mqtt

Tags

TagMeaning
latestNewest stable release
X.Y.ZExact release
X.YLatest patch of that minor line

Images are multi-arch: linux/amd64 and linux/arm64.

Quick start

Prerequisites
  1. Provision your skylights using the Telink SIG Mesh app (Android/iOS).
  2. Export the mesh configuration from the app — this is your pesetech_mesh.json.
docker run
docker run -d --name pesetech2mqtt --restart unless-stopped \
  --network host \
  --privileged \
  -v "$PWD/data:/data" \
  -v "$PWD/pesetech_mesh.json:/data/pesetech_mesh.json:ro" \
  -e MQTT_HOST=192.168.1.x \
  zackwag/pesetech2mqtt:latest
docker-compose.yml
services:
  pesetech2mqtt:
    image: zackwag/pesetech2mqtt:latest
    restart: unless-stopped
    network_mode: host
    privileged: true
    environment:
      MQTT_HOST: 192.168.1.x
    volumes:
      - ./data:/data
      - ./pesetech_mesh.json:/data/pesetech_mesh.json:ro

Configuration

PathPurpose
/dataRuntime data — config.yaml, store.yaml, mesh storage. Use a bind mount or named volume so configuration survives restarts.
/data/pesetech_mesh.jsonTelink mesh export from the provisioning app — mount read-only.
Env varDefaultPurpose
MQTT_HOST127.0.0.1MQTT broker hostname or IP
MQTT_PORT1883 / 8883Port — defaults to 8883 when MQTT_SSL=true
MQTT_USERNAMEMQTT username (optional)
MQTT_PASSWORDMQTT password (optional)
MQTT_SSLSet to true to enable TLS
LOG_LEVELINFOLog verbosity (DEBUG, INFO, WARNING, ERROR)

When using the provided docker-compose.yml, two additional variables control host-side mount locations (set in .env; not passed into the container):

VariableDefaultPurpose
PESETECH_DATA_DIR./docker/configHost directory mounted at /data
PESETECH_MESH_JSON./docker/pesetech_mesh.jsonHost path to the mesh export

On first start the gateway imports all skylights from the mesh export and writes config.yaml and store.yaml to /data. Later starts reuse the saved configuration — the mesh export is only needed for the initial import.

Notes

  • --network host and --privileged are required — bluetooth-meshd opens raw L2CAP sockets and needs direct access to the host Bluetooth adapter.
  • Off-with-transition is unreliable on these lights. Use a brightness/color transition first, then turn off separately.

Tag summary

Content type

Image

Digest

sha256:a73e05a1b

Size

469.6 MB

Last updated

1 day ago

docker pull zackwag/pesetech2mqtt