### Start Zigbee2MQTT Source: https://www.zigbee2mqtt.io/guide/installation/06_freebsd_jail.html Commands to navigate to the installation directory and launch the application. ```bash cd /usr/local/opt/zigbee2mqtt pnpm start ``` -------------------------------- ### Zigbee2MQTT Startup Log Output Source: https://www.zigbee2mqtt.io/guide/installation/06_freebsd_jail.html Example of the expected output when Zigbee2MQTT starts successfully. ```text Zigbee2MQTT:info 2019-11-09T13:04:01: Logging to directory: '/opt/zigbee2mqtt/data/log/2019-11-09.14-04-01' Zigbee2MQTT:info 2019-11-09T13:04:01: Starting Zigbee2MQTT version 1.6.0 (commit #720e393) Zigbee2MQTT:info 2019-11-09T13:04:01: Starting zigbee-herdsman... Zigbee2MQTT:info 2019-11-09T13:04:03: zigbee-herdsman started Zigbee2MQTT:info 2019-11-09T13:04:03: Coordinator firmware version: '{"type":"zStack30x","meta":{"transportrev":2,"product":2,"majorrel":2,"minorrel":7,"maintrel":2,"revision":20190425}}' Zigbee2MQTT:info 2019-11-09T13:04:03: Currently 0 devices are joined: Zigbee2MQTT:info 2019-11-09T13:04:03: Connecting to MQTT server at mqtt://localhost Zigbee2MQTT:info 2019-11-09T13:04:03: Connected to MQTT server ``` -------------------------------- ### Start Zigbee2MQTT Service Source: https://www.zigbee2mqtt.io/guide/installation/01_linux.html Starts the Zigbee2MQTT application from its installation directory. On first run, it initiates onboarding on port 8080. ```bash cd /opt/zigbee2mqtt pnpm start ``` -------------------------------- ### Windows Flashing Example Source: https://www.zigbee2mqtt.io/guide/adapters/flashing/alternative_flashing_methods.html Example of the Windows flashing command for an Arduino UNO on COM7. ```bash CCLoader_x86_64.exe 7 CC2531ZNP-Prod.bin 0 ``` -------------------------------- ### Install Dependencies Source: https://www.zigbee2mqtt.io/guide/installation/05_windows.html Install project dependencies using pnpm with a frozen lockfile. ```bash pnpm install --frozen-lockfile ``` -------------------------------- ### Linux Flashing Example Source: https://www.zigbee2mqtt.io/guide/adapters/flashing/alternative_flashing_methods.html Example of the Linux flashing command for an Arduino Uno on /dev/ttyACM0. ```bash ./CCLoader /dev/ttyACM0 CC2531ZNP-Prod.bin 0 ``` -------------------------------- ### Systemd Status Output Example Source: https://www.zigbee2mqtt.io/guide/installation/01_linux.html Example output showing an active Zigbee2MQTT service. ```text pi@raspberry:/opt/zigbee2mqtt $ systemctl status zigbee2mqtt.service ● zigbee2mqtt.service - zigbee2mqtt Loaded: loaded (/etc/systemd/system/zigbee2mqtt.service; disabled; vendor preset: enabled) Active: active (running) since Thu 2018-06-07 20:27:22 BST; 3s ago Main PID: 665 (pnpm) CGroup: /system.slice/zigbee2mqtt.service └─679 /usr/bin/node index.js Jun 07 20:27:22 raspberry systemd[1]: Started zigbee2mqtt. Jun 07 20:27:23 raspberry pnpm[665]: > zigbee2mqtt@1.6.0 start /opt/zigbee2mqtt Jun 07 20:27:23 raspberry pnpm[665]: > node index.js Jun 07 20:27:24 raspberry pnpm[665]: Zigbee2MQTT:info 2019-11-09T13:04:01: Logging to directory: '/opt/zigbee2mqtt/data/log/2019-11-09.14-04-01' Jun 07 20:27:25 raspberry pnpm[665]: Zigbee2MQTT:info 2019-11-09T13:04:01: Starting Zigbee2MQTT version 1.6.0 (commit #720e393) ``` -------------------------------- ### Install Dependencies and Zigbee2MQTT Source: https://www.zigbee2mqtt.io/guide/installation/06_freebsd_jail.html Commands to install Node.js, clone the repository, and build the application within the jail. ```bash # Install Node.js and required dependencies: # - It is recommended to install Node 22 from the official Node repository. Check https://github.com/nodesource/distributions/blob/master/README.md on how to do this. # - Older i386 hardware can work with [unofficial-builds.nodejs.org](https://unofficial-builds.nodejs.org/download/release/v20.9.0/ e.g. Version 20.9.0 should work. # - Selecting `npm` also installs `node`. pkg install git gmake gcc corepack enable # Verify that the correct Node.js version has been installed node --version # Should output V20.x, V22.X # Create installation folder (/usr/local prefix is used for software not part of the base system) mkdir -p /usr/local/opt/zigbee2mqtt cd /usr/local/opt/zigbee2mqtt # Clone Zigbee2MQTT repository git clone --depth 1 https://github.com/Koenkk/zigbee2mqtt.git . # Install dependencies pnpm install --frozen-lockfile # Build Zigbee2MQTT pnpm run build ``` -------------------------------- ### Example configuration.yaml file Source: https://www.zigbee2mqtt.io/guide/configuration/zigbee-network.html A complete example configuration file for Zigbee2MQTT including MQTT, serial, and advanced settings. ```yaml version: 5 mqtt: base_topic: zigbee2mqtt server: mqtt://: serial: port: /dev/serial/by-id/ adapter: zstack advanced: channel: 11 network_key: GENERATE pan_id: GENERATE ext_pan_id: GENERATE frontend: enabled: true homeassistant: enabled: false ``` -------------------------------- ### Inverted brightness move example Source: https://www.zigbee2mqtt.io/devices/MINI-ZBDIM.html Example payload demonstrating the inverted behavior of the brightness_move command. ```json {"brightness_move": -40} ``` -------------------------------- ### Installing the TRV Source: https://www.zigbee2mqtt.io/devices/ZK03840.html Step-by-step guide for installing and pairing the Viessmann ZK03840 radiator thermostat valve. ```APIDOC ## Installing the TRV ### Description Follow these steps to install and pair the Viessmann ZK03840 radiator thermostat valve with Zigbee2MQTT. ### Steps 1. Install the correct adaptor on the valve. 2. Open the cover by pushing the clip on the bottom and sliding the front side. 3. Insert batteries (ensure `--` is displayed). 4. Press the button on the top (`--` + `((•))` should appear on the display). 5. Wait for the device to pair (approximately 2 minutes for a success message in Zigbee2MQTT). 6. Install the TRV onto the adaptor (push firmly until a click is heard, rotate until the display faces up). 7. Press the button on the top for 3 seconds (the motor will turn, and `21°` + `((•))` should be displayed). 8. Close the cover. ``` -------------------------------- ### Min Time - Zigbee2MQTT Interaction Source: https://www.zigbee2mqtt.io/devices/Presence_Sensor_v2.html Information on how to get and set the minimum time (day start) via MQTT. ```APIDOC ## Min time (text) ### Description Day start time. Value can be found in the published state on the `min_time` property. ### Method GET, SET ### Endpoint - GET: `zigbee2mqtt/FRIENDLY_NAME/get` - SET: `zigbee2mqtt/FRIENDLY_NAME/set` ### Parameters #### Query Parameters (GET) - **min_time** (string) - Required - The current day start time. #### Request Body (SET) - **min_time** (string) - Required - The desired day start time (e.g., `HH:MM:SS`). ### Request Example (SET) ```json { "min_time": "07:00:00" } ``` ### Response #### Success Response (200) - **min_time** (string) - The current day start time. ### Response Example ```json { "min_time": "07:00:00" } ``` ``` -------------------------------- ### Zigbee2MQTT Startup Log Output Source: https://www.zigbee2mqtt.io/guide/installation/05_windows.html Example of the console output upon successful service startup. ```text Zigbee2MQTT:info 2019-10-18 10:56:22 PM Logging to directory: 'D:\Documents\GitHub\zigbee2mqtt\data\log\2019-10-18.22-56-22' Zigbee2MQTT:info 2019-10-18 10:56:22 PM Starting Zigbee2MQTT version 1.6.0 (commit #e26ad2a) Zigbee2MQTT:info 2019-10-18 10:56:22 PM Starting zigbee-shepherd Zigbee2MQTT:info 2019-10-18 10:56:24 PM zigbee-shepherd started Zigbee2MQTT:info 2019-10-18 10:56:24 PM Coordinator firmware version: '20190608' ``` -------------------------------- ### Woox R9077 Light Exposes Source: https://www.zigbee2mqtt.io/devices/R9077.html Details on controlling the light features of the Woox R9077, including state, brightness, color temperature, and color XY, with examples for setting and getting values. ```APIDOC ## Exposes ### Light This light supports the following features: `state`, `brightness`, `color_temp`, `color_xy`. * `state`: To control the state publish a message to topic `zigbee2mqtt/FRIENDLY_NAME/set` with payload `{"state": "ON"}`, `{"state": "OFF"}` or `{"state": "TOGGLE"}`. To read the state send a message to `zigbee2mqtt/FRIENDLY_NAME/get` with payload `{"state": ""}`. * `brightness`: To control the brightness publish a message to topic `zigbee2mqtt/FRIENDLY_NAME/set` with payload `{"brightness": VALUE}` where `VALUE` is a number between `0` and `254`. To read the brightness send a message to `zigbee2mqtt/FRIENDLY_NAME/get` with payload `{"brightness": ""}`. * `color_temp`: To control the color temperature (in reciprocal megakelvin a.k.a. mired scale) publish a message to topic `zigbee2mqtt/FRIENDLY_NAME/set` with payload `{"color_temp": VALUE}` where `VALUE` is a number between `150` and `500`, the higher the warmer the color. To read the color temperature send a message to `zigbee2mqtt/FRIENDLY_NAME/get` with payload `{"color_temp": ""}`. Besides the numeric values the following values are accepted: `coolest`, `cool`, `neutral`, `warm`, `warmest`. * `color_xy`: To control the XY color (CIE 1931 color space) publish a message to topic `zigbee2mqtt/FRIENDLY_NAME/set` with payload `{"color": {"x": X_VALUE, "y": Y_VALUE}}` (e.g. `{"color":{"x":0.123,"y":0.123}}`). To read the XY color send a message to `zigbee2mqtt/FRIENDLY_NAME/get` with payload `{"color":{"x":"","y":""}}`. Alternatively it is possible to set the XY color via RGB: * `{"color": {"r": R, "g": G, "b": B}}` e.g. `{"color":{"r":46,"g":102,"b":150}}` * `{"color": {"rgb": "R,G,B"}}` e.g. `{"color":{"rgb":"46,102,150"}}` * `{"color": {"hex": HEX}}` e.g. `{"color":{"hex":"#547CFF"}}` ``` -------------------------------- ### Start Zigbee2MQTT Source: https://www.zigbee2mqtt.io/guide/installation/05_windows.html Launch the Zigbee2MQTT service. ```bash pnpm start ``` -------------------------------- ### Install Python and Pip (Debian) Source: https://www.zigbee2mqtt.io/guide/adapters/flashing/flashing_via_cc2538-bsl.html Installs Python 3 and pip, the package installer for Python, on Debian-based systems. This is a prerequisite for installing other Python packages. ```bash sudo apt update && sudo apt install python3 python3-pip ``` -------------------------------- ### Start One Key Pairing Source: https://www.zigbee2mqtt.io/devices/AC221.html To start the one key pairing process, publish a message with the payload 'start' to the device's set topic. ```mqtt zigbee2mqtt/FRIENDLY_NAME/set {"one_key_pairing": "start"} ``` -------------------------------- ### Install Zigbee2MQTT via Helm Source: https://www.zigbee2mqtt.io/guide/installation/08_kubernetes.html Deploy the Zigbee2MQTT chart using a custom values file. ```bash helm install -f myvalues.yaml zigbee2mqtt zigbee2mqtt/zigbee2mqtt ``` -------------------------------- ### Install Python Packages for cc2538-bsl Source: https://www.zigbee2mqtt.io/guide/adapters/flashing/flashing_via_cc2538-bsl.html Installs necessary Python packages 'pyserial' and 'intelhex' required for the cc2538-bsl script. Ensure Python 3 and pip are installed first. ```bash sudo pip3 install pyserial intelhex ``` -------------------------------- ### Start Zigbee2MQTT Docker Container Source: https://www.zigbee2mqtt.io/guide/installation/02_docker.html Use this command to start the Zigbee2MQTT container in detached mode. You can omit the service name to start all containers defined in the compose file. ```bash docker compose up -d zigbee2mqtt ``` -------------------------------- ### Enable Service on Boot Source: https://www.zigbee2mqtt.io/guide/installation/01_linux.html Command to configure the service to start automatically on system boot. ```bash sudo systemctl enable zigbee2mqtt.service ``` -------------------------------- ### Launch openHABian Configuration Utility Source: https://www.zigbee2mqtt.io/guide/installation/04_openhabian.html Command to initiate the openHABian configuration interface on a Raspberry Pi. ```bash sudo openhabian-config ``` -------------------------------- ### GET /zigbee2mqtt/FRIENDLY_NAME/get Source: https://www.zigbee2mqtt.io/devices/Icon2.html Read thermostat properties by publishing to the get topic. ```APIDOC ## GET zigbee2mqtt/FRIENDLY_NAME/get ### Description Read the current value of a thermostat property. ### Method GET ### Endpoint zigbee2mqtt/FRIENDLY_NAME/get ### Request Body - **room_status_code_3** (string) - Optional - Request room status - **room_floor_sensor_mode_3** (string) - Optional - Request floor sensor mode - **floor_min_setpoint_3** (string) - Optional - Request min floor setpoint - **floor_max_setpoint_3** (string) - Optional - Request max floor setpoint - **schedule_type_used_3** (string) - Optional - Request schedule type - **icon2_pre_heat_3** (string) - Optional - Request pre heat status - **icon2_pre_heat_status_3** (string) - Optional - Request pre heat status - **temperature_3** (string) - Optional - Request floor temperature - **humidity_3** (string) - Optional - Request humidity ### Request Example { "room_status_code_3": "" } ``` -------------------------------- ### Verify Node.js Installation Source: https://www.zigbee2mqtt.io/guide/installation/05_windows.html Check the installed version of Node.js to ensure it meets requirements. ```bash node --version ``` -------------------------------- ### Install Node.js via Snap on Ubuntu Source: https://www.zigbee2mqtt.io/guide/installation/01_linux.html Installs Node.js using the Snap package manager on Ubuntu systems. Adjust PATH if necessary. ```bash # Install latest nodejs from snap store # The --classic argument is required here as Node.js needs full access to your system in order to be useful. # You can also use the --channel=XX argument to install a legacy version where XX is the version you want to install (we need 14+). sudo snap install node --classic corepack enable # Verify node has been installed # If you encounter an error at this stage and used the snap store instructions, adjust the BIN path as follows: ## PATH=$PATH:/snap/node/current/bin # then re-verify Node.js as above node --version ``` -------------------------------- ### GET /zigbee2mqtt/FRIENDLY_NAME/get Source: https://www.zigbee2mqtt.io/devices/S4SW-001P8EU.html Retrieve device state properties by publishing a request to the get topic. ```APIDOC ## GET zigbee2mqtt/FRIENDLY_NAME/get ### Description Retrieve specific device properties such as electrical measurements or network status. ### Method GET (via MQTT publish) ### Endpoint zigbee2mqtt/FRIENDLY_NAME/get ### Request Body - **ac_frequency** (numeric) - Optional - Request AC frequency - **current** (numeric) - Optional - Request current - **energy** (numeric) - Optional - Request energy - **produced_energy** (numeric) - Optional - Request produced energy - **wifi_status** (text) - Optional - Request Wi-Fi status - **ip_address** (text) - Optional - Request IP address - **dhcp_enabled** (binary) - Optional - Request DHCP status - **wifi_config** (composite) - Optional - Request Wi-Fi configuration ### Request Example { "ac_frequency": "" } ``` -------------------------------- ### GET /zigbee2mqtt/FRIENDLY_NAME/get Source: https://www.zigbee2mqtt.io/devices/Icon2.html Read thermostat properties by publishing a JSON payload to the get topic. ```APIDOC ## GET zigbee2mqtt/FRIENDLY_NAME/get ### Description Read the current value of a specific thermostat property. ### Method PUBLISH (MQTT) ### Endpoint zigbee2mqtt/FRIENDLY_NAME/get ### Request Body - **property_name** (string) - Required - The property key to retrieve (e.g., "room_status_code_5", "floor_min_setpoint_5") ### Request Example { "room_status_code_5": "" } ``` -------------------------------- ### GET /zigbee2mqtt/FRIENDLY_NAME/get Source: https://www.zigbee2mqtt.io/devices/3RSP02064Z.html Read device properties by publishing a JSON payload to the get topic. ```APIDOC ## GET zigbee2mqtt/FRIENDLY_NAME/get ### Description Retrieve the current value of a specific device property. ### Method PUBLISH (MQTT) ### Endpoint zigbee2mqtt/FRIENDLY_NAME/get ### Request Body - **property** (string) - Required - The property name to retrieve (e.g., "ac_frequency", "power_factor", "current", "energy", "reset_total_energy", "metering_only_mode", "countdown_to_turn_off", "countdown_to_turn_on", "power_rise_threshold", "power_drop_threshold") ### Request Example { "ac_frequency": "" } ### Response #### Success Response - **property** (numeric/enum/binary) - The current value of the requested property. ``` -------------------------------- ### ShinaSystem TQM-300ZB Options Source: https://www.zigbee2mqtt.io/devices/TQM-300ZB.html Configuration options specific to the ShinaSystem TQM-300ZB device. ```APIDOC ## Device Specific Options ### `temperature_calibration` - **Description**: Calibrates the temperature value (absolute offset). Takes effect on the next report of the device. - **Type**: `number` ### `temperature_precision` - **Description**: Number of digits after the decimal point for temperature. Takes effect on the next report of the device. This option can only decrease the precision, not increase it. - **Type**: `number` - **Minimum Value**: 0 - **Maximum Value**: 3 ### `humidity_calibration` - **Description**: Calibrates the humidity value (absolute offset). Takes effect on the next report of the device. - **Type**: `number` ### `humidity_precision` - **Description**: Number of digits after the decimal point for humidity. Takes effect on the next report of the device. This option can only decrease the precision, not increase it. - **Type**: `number` - **Minimum Value**: 0 - **Maximum Value**: 3 ``` -------------------------------- ### Options Configuration Source: https://www.zigbee2mqtt.io/devices/150257.html Configure device-specific options like transition time and color synchronization. ```APIDOC ## Options Configuration ### Description Configure device-specific options like transition time and color synchronization. ### Method POST ### Endpoint zigbee2mqtt/FRIENDLY_NAME/set ### Request Body - **transition** (number) - Optional - Controls the transition time in seconds for on/off, brightness, and color changes. Defaults to `0`. - **color_sync** (boolean) - Optional - When enabled, colors will be synced between different color modes (e.g., XY and temperature). Defaults to `true`. - **state_action** (boolean) - Optional - When true, state actions will also be published as 'action'. Defaults to `false`. ### Request Example ```json { "transition": 1, "color_sync": false } ``` ### Response This endpoint does not return a specific response body for option changes. The settings will be applied to the device. ``` -------------------------------- ### Configure Options Source: https://www.zigbee2mqtt.io/devices/SQM300Z1.html This section details the configuration options available for the ShinaSystem SQM300Z1 switch. ```APIDOC ## Options ### Description Device type specific configuration options. ### `state_action` - **Type**: boolean - **Default**: `false` - **Description**: When `true`, state actions will also be published as 'action'. This allows for observing state changes as events. ``` -------------------------------- ### Set Startup Color Temperature Source: https://www.zigbee2mqtt.io/devices/046677584719.html Publish a message to configure the light's startup color temperature. To read the current setting, send a GET request. ```mqtt zigbee2mqtt/FRIENDLY_NAME/set {"color_temp_startup": VALUE} ``` ```mqtt zigbee2mqtt/FRIENDLY_NAME/get {"color_temp_startup": ""} ``` ```mqtt zigbee2mqtt/FRIENDLY_NAME/set {"color_temp_startup": "previous"} ``` -------------------------------- ### Configuration Example for ext_pan_id Source: https://www.zigbee2mqtt.io/information/zigbee2mqtt_fails_to_start.html This example demonstrates how to format the `ext_pan_id` in the configuration file when the values are provided as hexadecimal strings in the logs. Note that `ext_pan_id` should be entered as an array of hexadecimal values. ```yaml ext_pan_id: [0x39,0xaf,0x4d,0x83,0xh2,0xdc,0xb3,0x89] ``` -------------------------------- ### Error Message Example Source: https://www.zigbee2mqtt.io/devices/HG06338.html Example of an error message encountered during ZCL command execution. ```text z2m: Publish 'set' 'state' to '{friendly_name}' failed: 'Error: ZCL command {IEEE-address} genOnOff.on({}, ``` -------------------------------- ### Get Duration of Woox R7051 Source: https://www.zigbee2mqtt.io/devices/R7051.html Query the current duration setting for the siren by sending a GET request for the 'duration' attribute to the device's get topic. The result will appear in the main MQTT topic. ```mqtt zigbee2mqtt/FRIENDLY_NAME/get { "duration": "" } ``` -------------------------------- ### Control Light State and Brightness Source: https://www.zigbee2mqtt.io/devices/SMFL20W-ZB.html Examples for setting light state and brightness with optional timed shutoff and transition parameters. ```json {"state": "ON"} ``` ```json {"state": "OFF"} ``` ```json {"state": "TOGGLE"} ``` ```json {"state": ""} ``` ```json {"brightness": VALUE} ``` ```json {"brightness": ""} ``` ```json {"state" : "ON", "on_time": 300} ``` ```json {"state" : "ON", "on_time": 300, "off_wait_time": 120} ``` ```json {"brightness":156,"transition":3} ``` ```json {"color_temp":241,"transition":1} ``` -------------------------------- ### Manage transition initial brightness Source: https://www.zigbee2mqtt.io/devices/T2_E27.html Read or write the initial brightness percentage for light transitions. ```json {"transition_initial_brightness": ""} ``` ```json {"transition_initial_brightness": NEW_VALUE} ``` -------------------------------- ### Get Volume of Woox R7051 Source: https://www.zigbee2mqtt.io/devices/R7051.html Retrieve the current volume setting of the siren by publishing a GET request for the 'volume' attribute to the device's get topic. The response will be published on the main MQTT topic. ```mqtt zigbee2mqtt/FRIENDLY_NAME/get { "volume": "" } ``` -------------------------------- ### Build cc-tool on Linux Source: https://www.zigbee2mqtt.io/guide/adapters/flashing/flashing_the_cc2531.html Clone the cc-tool repository, bootstrap, configure with specific include/library paths for Boost and libusb, and then compile the tool. Ensure prerequisites are installed via your package manager. ```bash git clone https://github.com/dashesy/cc-tool.git cd cc-tool CPPFLAGS="-I/usr/local/include" \ LDFLAGS="-I/usr/local/include" \ ./bootstrap CPPFLAGS="-I/usr/local/opt/boost@1.76/include" \ CXXFLAGS="-std=c++0x" \ LDFLAGS="-L/usr/local/opt/boost@1.76/lib" \ LIBUSB_CFLAGS="-I/usr/local/include/libusb-1.0" \ ./configure make ``` -------------------------------- ### GET Electrical Measurements Source: https://www.zigbee2mqtt.io/devices/SPM01-1Z2.html Endpoints to retrieve electrical measurement data by publishing to the get topic. ```APIDOC ## GET zigbee2mqtt/FRIENDLY_NAME/get ### Description Retrieve the current value for electrical properties including power factor, current, energy, and produced energy. ### Method GET (via MQTT publish) ### Endpoint zigbee2mqtt/FRIENDLY_NAME/get ### Request Body - **power_factor** (string) - Optional - Empty string to request power factor - **current** (string) - Optional - Empty string to request current - **energy** (string) - Optional - Empty string to request energy - **produced_energy** (string) - Optional - Empty string to request produced energy ### Request Example { "power_factor": "" } ### Response #### Success Response (200) - **power_factor** (numeric) - Instantaneous measured power factor - **current** (numeric) - Instantaneous measured electrical current (A) - **energy** (numeric) - Sum of consumed energy (kWh) - **produced_energy** (numeric) - Sum of produced energy (kWh) #### Response Example { "power_factor": 0.95, "current": 1.2, "energy": 150.5, "produced_energy": 0.0 } ``` -------------------------------- ### GET /zigbee2mqtt/FRIENDLY_NAME/get Source: https://www.zigbee2mqtt.io/devices/SLACKY_DIY_CO2_SENSOR_R02.html Read sensor values by publishing a message to the device's get topic. ```APIDOC ## GET zigbee2mqtt/FRIENDLY_NAME/get ### Description Read the current value of a specific sensor property (co2, formaldehyde, voc, temperature, or humidity). ### Method PUBLISH (MQTT) ### Endpoint zigbee2mqtt/FRIENDLY_NAME/get ### Request Body - **co2** (string) - Optional - Empty string to request CO2 value - **formaldehyde** (string) - Optional - Empty string to request formaldehyde value - **voc** (string) - Optional - Empty string to request VOC value - **temperature** (string) - Optional - Empty string to request temperature value - **humidity** (string) - Optional - Empty string to request humidity value ### Request Example { "co2": "" } ### Response #### Success Response - **co2** (numeric) - Measured CO2 value in ppm - **formaldehyde** (numeric) - Measured formaldehyde value in ppm - **voc** (numeric) - Measured VOC value in ppm - **temperature** (numeric) - Measured temperature in °C - **humidity** (numeric) - Measured relative humidity in % ``` -------------------------------- ### Control Startup Color Temperature via MQTT Source: https://www.zigbee2mqtt.io/devices/046677803087.html Publish a value between 153 and 500 (or descriptive strings) to the set topic to configure startup color temperature. ```json {"color_temp_startup": VALUE} ``` ```json {"color_temp_startup": ""} ``` -------------------------------- ### Options Configuration Source: https://www.zigbee2mqtt.io/devices/AU-A1GUZB5_30.html Configure device-specific options like transition time and state action publishing. ```APIDOC ## Options Configuration API ### Description Configure device-specific options that affect how the device behaves. ### Method POST ### Endpoint zigbee2mqtt/FRIENDLY_NAME/options ### Parameters #### Request Body - **transition** (number) - Optional - Controls the transition time in seconds for on/off, brightness, and color temperature changes. Defaults to 0. - **state_action** (boolean) - Optional - If true, state actions will also be published as 'action'. Defaults to false. ### Request Example ```json { "transition": 5, "state_action": true } ``` ### Response No specific success response body is defined for options configuration. ``` -------------------------------- ### Get Version for Tuya ME202WZ Source: https://www.zigbee2mqtt.io/devices/ME202WZ.html Publish to the get topic to retrieve the current device version. ```json {"version": ""} ``` -------------------------------- ### GET /zigbee2mqtt/FRIENDLY_NAME/get Source: https://www.zigbee2mqtt.io/devices/Electricity_Meter_TLSR8258.html Retrieve current sensor values from the device by publishing a request to the get topic. ```APIDOC ## GET zigbee2mqtt/FRIENDLY_NAME/get ### Description Publish a message to this topic to request the current value of a specific sensor property. ### Endpoint zigbee2mqtt/FRIENDLY_NAME/get ### Request Body - **device_temperature** (string) - Optional - Request device temperature - **power** (string) - Optional - Request instantaneous power - **voltage** (string) - Optional - Request measured voltage - **current** (string) - Optional - Request instantaneous current - **energy** (string) - Optional - Request total energy consumption - **energy_tier_1** (string) - Optional - Request energy tier 1 consumption - **energy_tier_2** (string) - Optional - Request energy tier 2 consumption ### Request Example { "power": "" } ### Response #### Success Response (200) - **power** (numeric) - Instantaneous measured power in W ``` -------------------------------- ### Run standard Zigbee2MQTT container Source: https://www.zigbee2mqtt.io/guide/installation/02_docker.html Starts the Zigbee2MQTT container with necessary device mapping and volume mounts. ```bash $ docker run \ --name zigbee2mqtt \ --restart=unless-stopped \ --device=/dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B0018ED3DDF-if00:/dev/ttyACM0 \ -p 8080:8080 \ -v $(pwd)/data:/app/data \ -v /run/udev:/run/udev:ro \ -e TZ=Europe/Amsterdam \ ghcr.io/koenkk/zigbee2mqtt ``` -------------------------------- ### Get Power-on Behavior (Center Endpoint) Source: https://www.zigbee2mqtt.io/devices/ECW-100-A03.html Get the current power-on behavior for the center endpoint. ```mqtt zigbee2mqtt/FRIENDLY_NAME/get {"power_on_behavior_center": ""} ``` -------------------------------- ### Control Startup Color Temperature via MQTT Source: https://www.zigbee2mqtt.io/devices/HA-ZM12mw2-4K.html Configure the startup color temperature for the first channel using mired values or keywords. ```json {"color_temp_startup_l1": VALUE} ``` ```json {"color_temp_startup_l1": ""} ``` -------------------------------- ### Get Power-on Behavior (Top Endpoint) Source: https://www.zigbee2mqtt.io/devices/ECW-100-A03.html Get the current power-on behavior for the top endpoint. ```mqtt zigbee2mqtt/FRIENDLY_NAME/get {"power_on_behavior_top": ""} ``` -------------------------------- ### Automate Calibration in Home Assistant Source: https://www.zigbee2mqtt.io/devices/ZNCLDJ12LM.html Example automation to trigger the calibration sequence upon Home Assistant startup. ```yaml - alias: Calibrate curtain trigger: - platform: homeassistant event: start action: - service: mqtt.publish data: topic: zigbee2mqtt//set payload: "{ 'options': { 'reset_limits': true } }" - service: cover.close_cover entity_id: cover. - delay: seconds: 13 #wait for closure complete - service: cover.open_cover entity_id: cover. ``` -------------------------------- ### Home Assistant Automation Example Source: https://www.zigbee2mqtt.io/devices/ZNCLDJ11LM.html Example Home Assistant automation to calibrate the curtain motor. ```APIDOC ## Home Assistant automation example: ```yaml - id: "" alias: Calibrate curtain description: "Calibrate curtain" triggers: - trigger: homeassistant event: start conditions: [] actions: - action: mqtt.publish metadata: {} data: topic: zigbee2mqtt//set payload: >- {{ {'options': {'reset_limits': true}} | tojson }} - action: cover.close_cover metadata: {} data: {} target: device_id: - delay: hours: 0 minutes: 0 seconds: 13 milliseconds: 0 - action: cover.open_cover metadata: {} data: {} target: device_id: ``` ``` -------------------------------- ### Device Configuration Options Source: https://www.zigbee2mqtt.io/devices/14156506L.html Configure device-specific settings like 'transition' time, 'color_sync' for color consistency, and 'state_action' to publish state changes as 'action'. ```json {"transition": 0} ``` ```json {"color_sync": true} ``` ```json {"state_action": false} ``` -------------------------------- ### Set Startup Color Temperature via MQTT Source: https://www.zigbee2mqtt.io/devices/929003711301.html Configure the default color temperature for when the device powers on. ```json {"color_temp_startup_front": VALUE} ``` ```json {"color_temp_startup_front": ""} ``` -------------------------------- ### Configure Startup State Source: https://www.zigbee2mqtt.io/devices/SR-ZG9032A-MW.html Define the device's power-on state. Options are 'off', 'on', or 'last_state' (restore previous state). The default is 'restore previous state'. ```json { "start_up_on_off": "on" } ``` -------------------------------- ### Install Node.js and Dependencies on Linux Source: https://www.zigbee2mqtt.io/guide/installation/01_linux.html Installs Node.js LTS, Git, and build tools required for Zigbee2MQTT. Ensure Node.js version is compatible. ```bash sudo apt-get install -y curl sudo curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - sudo apt-get install -y nodejs git make g++ gcc libsystemd-dev corepack enable # Verify that the correct Node.js version has been installed node --version # Should output V20.x, V22.X # Create a directory for zigbee2mqtt and set your user as owner of it sudo mkdir /opt/zigbee2mqtt sudo chown -R ${USER}: /opt/zigbee2mqtt # Clone Zigbee2MQTT repository git clone --depth 1 https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt # Install dependencies (as user "pi") cd /opt/zigbee2mqtt pnpm install --frozen-lockfile ``` -------------------------------- ### Configure Quick Start Level Source: https://www.zigbee2mqtt.io/devices/VZM32-SN.html Set the power output level during the Quick Start Light time. ```APIDOC ## POST /api/zigbee2mqtt/set ### Description Configure the power output level during the Quick Start Light time (P23). ### Method POST ### Endpoint /api/zigbee2mqtt/set ### Parameters #### Request Body - **quickStartLevel** (numeric) - Required - The power output level during Quick Start. Minimum: 1, Maximum: 254. ### Request Example ```json { "quickStartLevel": 100 } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. #### Response Example ```json { "success": true } ``` ``` -------------------------------- ### Options Configuration Source: https://www.zigbee2mqtt.io/devices/ROB_200-025-0.html Configuration options for the ROBB ROB_200-025-0 device, specifically for simulating brightness. ```APIDOC ## Options ### Simulated Brightness - `simulated_brightness`: Simulate a brightness value. If this device provides a `brightness_move_up` or `brightness_move_down` action, it is possible to specify the update interval and delta. The `action_brightness_delta` indicates the delta for each interval. #### Example Configuration: ```yaml simulated_brightness: delta: 20 # delta per interval, default = 20 interval: 200 # interval in milliseconds, default = 200 ``` ``` -------------------------------- ### GET /zigbee2mqtt/FRIENDLY_NAME/get Source: https://www.zigbee2mqtt.io/devices/SDM01W-U01.html Retrieve specific energy metrics from a device by publishing a request payload to the get topic. ```APIDOC ## GET zigbee2mqtt/FRIENDLY_NAME/get ### Description Retrieve energy metrics such as energy_phase_a, produced_energy_phase_a, energy_phase_b, produced_energy_phase_b, or energy_phase_c by sending a request payload. ### Method GET ### Endpoint zigbee2mqtt/FRIENDLY_NAME/get ### Request Body - **energy_phase_a** (string) - Optional - Request energy phase A value - **produced_energy_phase_a** (string) - Optional - Request produced energy phase A value - **energy_phase_b** (string) - Optional - Request energy phase B value - **produced_energy_phase_b** (string) - Optional - Request produced energy phase B value - **energy_phase_c** (string) - Optional - Request energy phase C value ### Request Example { "energy_phase_a": "" } ### Response #### Success Response (200) - **energy_phase_a** (numeric) - Energy phase A in kWh - **produced_energy_phase_a** (numeric) - Produced energy phase A in kWh - **energy_phase_b** (numeric) - Energy phase B in kWh - **produced_energy_phase_b** (numeric) - Produced energy phase B in kWh - **energy_phase_c** (numeric) - Energy phase C in kWh ```