-
Notifications
You must be signed in to change notification settings - Fork 6
Home
Go to the project Releases page and download ramses_esp_esp32_c6.bin.
- Open Espressif's Web Flasher
- Connect your ESP32-C6 via USB.
- Click "Connect" and select the correct serial port (use Windows Device Manager to verify the COM port if needed).
- Upload
ramses_esp_esp32_c6.bin, change the offset to0x0. Click Program.
You configure runtime settings over a simple serial command interface.
The easiest way of doing this is via the browser. E.g., with serialterminal
- Open the page.
- Click Select Serial Port... and choose the same port used for flashing.
- Click Connect.
Commands are lowercase, arguments separated by spaces. Press Enter after each line. The device echoes status or OK/ERR responses.
The device supports three communication modes: Serial, MQTT (over Wi-Fi), and Zigbee. Serial is always active. By default the device starts in MQTT/Wi-Fi mode — if that is what you want, skip ahead to sections 4.1 and 4.2. To use Zigbee instead, run the following command in the serial interface first:
network zigbee
Likewise, to switch back to MQTT, you can use:
network wifi
Set SSID first, then password (order does not strictly matter but keeps things clear):
wifi ssid <your_ssid>
wifi password <your_password>
wifi restart
Note: A
wifi restartis required after setting credentials for them to take effect.
Reliable time is required before MQTT TLS / timestamps work properly.
sntp server pool.ntp.org
timezone <tz_string>
Find supported timezone strings here: https://github.com/IndaloTech/ramses_esp/wiki/Serial-Interface#wifi-configuration
Example (Central Europe):
timezone CET-1CEST,M3.5.0/02,M10.5.0/03
If you use Home Assistant's Mosquitto add-on, create a dedicated user (e.g. ramses) first.
mqtt broker mqtt://192.168.1.49:1883 # Replace with your broker IP/port
mqtt user <your_username>
mqtt password <your_password>
Optional root/topic customization (only if you know you need it):
mqtt root RAMSES/GATEWAY
Press the EN button on the device and reconnect to the terminal.
On reboot the device should:
- Join Wi-Fi.
- Connect to MQTT and begin publishing.
Zigbee mode currently requires Zigbee Home Assistant (ZHA).
Create a custom_zha_quirks directory next to your configuration.yaml and add two files to it:
configuration.yaml
custom_zha_quirks/
├── __init__.py ← empty file
└── ramses_esp.py ← see below
Then tell ZHA where to find the folder by adding this to configuration.yaml:
zha:
custom_quirks_path: /config/custom_zha_quirksPaste the following into ramses_esp.py:
"""Device handler for RAMSES ESP32-C6 Zigbee."""
from zigpy import types
from zigpy.profiles import zha
from zigpy.quirks import CustomCluster, CustomDevice
from zigpy.zcl import foundation
from zigpy.zcl.clusters.general import Basic, Identify
from zhaquirks.const import (
ENDPOINTS,
INPUT_CLUSTERS,
MODELS_INFO,
OUTPUT_CLUSTERS,
PROFILE_ID,
)
RAMSES_RX_CLUSTER = 0xFC00
RAMSES_TX_CLUSTER = 0xFC01
class RamsesRXCluster(CustomCluster):
"""RAMSES RX cluster (RAMSES_RX_CLUSTER) — ESP32 -> ZHA (device-originated messages)."""
cluster_id = RAMSES_RX_CLUSTER
class ClientCommandDefs(foundation.BaseCommandDefs):
"""Commands that ESP32 (client) sends to coordinator (server)."""
send_text: foundation.ZCLCommandDef = foundation.ZCLCommandDef(
id=0x00,
schema={"text": types.CharacterString},
)
class ServerCommandDefs(foundation.BaseCommandDefs):
"""Server commands (ACKs) sent in response to `send_text` messages."""
ack_chunk: foundation.ZCLCommandDef = foundation.ZCLCommandDef(
id=0x01,
schema={"text": types.CharacterString},
)
class RamsesTXCluster(CustomCluster):
"""RAMSES TX cluster (RAMSES_TX_CLUSTER) — ZHA -> ESP32 (coordinator-originated messages)."""
cluster_id = RAMSES_TX_CLUSTER
class ClientCommandDefs(foundation.BaseCommandDefs):
"""Client commands (from ZHA to ESP32) — the RAMSES-II message payload."""
set_text: foundation.ZCLCommandDef = foundation.ZCLCommandDef(
id=0x00,
schema={"text": types.CharacterString},
)
class ServerCommandDefs(foundation.BaseCommandDefs):
"""Server commands (ACKs) sent by the ESP32 in response to `set_text`."""
ack_chunk: foundation.ZCLCommandDef = foundation.ZCLCommandDef(
id=0x01,
schema={"text": types.CharacterString},
)
class RamsesESP(CustomDevice):
"""Ramses ESP32-C6 Zigbee."""
signature = {
MODELS_INFO: [
("ELECRAM", "Ramses_esp32c6"),
],
ENDPOINTS: {
10: {
PROFILE_ID: zha.PROFILE_ID, # Home Automation
INPUT_CLUSTERS: [
Basic.cluster_id, # 0x0000
Identify.cluster_id, # 0x0003
RAMSES_TX_CLUSTER, # Ramses TX Cluster (server - receives commands from ZHA)
],
OUTPUT_CLUSTERS: [
RAMSES_RX_CLUSTER, # Ramses RX Cluster (client - sends commands to ZHA)
],
}
},
}
replacement = {
ENDPOINTS: {
10: {
PROFILE_ID: zha.PROFILE_ID,
INPUT_CLUSTERS: [
Basic.cluster_id,
Identify.cluster_id,
RamsesTXCluster,
],
OUTPUT_CLUSTERS: [
RamsesRXCluster,
],
}
},
}Restart Home Assistant to load the new quirk.
A freshly flashed device starts in pairing mode automatically. To re-pair an already-configured device, either hold the BOOT button for 5 seconds or run:
zigbee pair
At the same time, open ZHA and start a new device search. The interview completes automatically and the device is ready to use.