├── .devcontainer ├── README.md ├── devcontainer.json ├── docker-compose.yml ├── iobroker │ ├── Dockerfile │ ├── boot.sh │ └── node-wrapper.sh ├── mosquitto │ └── mosquitto.conf ├── nginx │ └── nginx.conf ├── scripts │ ├── postcreate.sh │ ├── postcreate_ext.sh │ ├── poststart.sh │ └── wait_for_iobroker.sh └── zigbee2mqtt │ └── configuration.yaml ├── .eslintrc.json ├── .gitattributes ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── config.yml │ ├── device_problem_report.yaml │ └── problem_report.yaml ├── auto-merge.yml ├── dependabot.yml └── workflows │ ├── codeql.yml │ ├── dependabot-auto-merge.yml │ ├── stale.yml │ └── test-and-release.yml ├── .gitignore ├── .prettierignore ├── .prettierrc.js ├── .releaseconfig.json ├── .vscode ├── extensions.json ├── launch.json └── settings.json ├── LICENSE ├── README.md ├── admin ├── i18n │ ├── de │ │ └── translations.json │ ├── en │ │ └── translations.json │ ├── es │ │ └── translations.json │ ├── fr │ │ └── translations.json │ ├── it │ │ └── translations.json │ ├── nl │ │ └── translations.json │ ├── pl │ │ └── translations.json │ ├── pt │ │ └── translations.json │ ├── ru │ │ └── translations.json │ ├── uk │ │ └── translations.json │ └── zh-cn │ │ └── translations.json ├── jsonConfig.json └── zigbee2mqtt.png ├── docs ├── DE │ ├── DE_AdapterConfig.md │ ├── DE_Instruction_Proxmox_Container.md │ ├── DE_faq.md │ ├── DE_get-started.md │ └── DE_get-started_move.md ├── EN │ ├── EN_AdapterConfig.md │ ├── EN_Instruction_Proxmox_Container.md │ ├── EN_faq.md │ ├── EN_get-started.md │ └── EN_get-started_move.md ├── img │ ├── ProxmoxContainerPerfomence.png │ ├── baseConfig.png │ ├── extendedConfig.png │ └── zigbeeAdpter.png └── wiki.md ├── eslint.config.cjs ├── io-package.json ├── lib ├── adapter-config.d.ts ├── check.js ├── colors.js ├── deviceController.js ├── exposes.js ├── imageController.js ├── messages.js ├── mqttServerController.js ├── nonGenericDevicesExtension.js ├── rgb.js ├── states.js ├── statesController.js ├── utils.js ├── websocketController.js └── z2mController.js ├── main.js ├── main.test.js ├── package-lock.json ├── package.json ├── test ├── integration.js ├── mocha.setup.js ├── mocharc.custom.json ├── package.js └── tsconfig.json ├── tsconfig.check.json └── tsconfig.json /.devcontainer/README.md: -------------------------------------------------------------------------------- 1 | # Devcontainer readme 2 | This directory allows you to develop your adapter in a dedicated Docker container. To get started and for requirements, please read the getting started section at https://code.visualstudio.com/docs/remote/containers#_getting-started 3 | 4 | Once you're done with that, VSCode will prompt you to reopen the adapter directory in a container. 5 | 6 | ## Setup 7 | This Dev Container consists of 4 containers: 8 | - iobroker: The ioBroker instance with the zigbee2mqtt adapter 9 | - zigbee2mqtt: The Zigbee2MQTT instance 10 | - mqtt: The MQTT instance for Zigbee2MQTT 11 | - nginx: The NGINX instance to access ioBroker 12 | 13 | ## Configuration Zigbee Stick 14 | 1) If the stick is attached by usb, map it in [docker-compose.yml](docker-compose.yml) in `iobroker-zigbee2mqtt` service 15 | 2) Configure the stick in Zigbee2MQTT [configuration.yaml](zigbee2mqtt/configuration.yaml) in `serial` section -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | // For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at: 2 | // https://github.com/microsoft/vscode-dev-containers/tree/v0.101.1/containers/docker-existing-docker-compose 3 | // If you want to run as a non-root user in the container, see .devcontainer/docker-compose.yml. 4 | { 5 | "name": "ioBroker.zigbee2mqtt", 6 | 7 | // Update the 'dockerComposeFile' list if you have more compose files or use different names. 8 | // The .devcontainer/docker-compose.yml file contains any overrides you need/want to make. 9 | "dockerComposeFile": ["docker-compose.yml"], 10 | 11 | // Forwarding the nginx port to access ioBroker Admin interface 12 | "forwardPorts": ["nginx:80", "zigbee2mqtt:8080", "mqtt:1883"], 13 | 14 | // Name of the forwarded port 15 | "portsAttributes": { 16 | "nginx:80": { 17 | "label": "ioBroker Admin UI" 18 | }, 19 | "zigbee2mqtt:8080": { 20 | "label": "Zigbee2MQTT Web UI" 21 | }, 22 | "mqtt:1883": { 23 | "label": "Mosquitto MQTT Broker" 24 | } 25 | }, 26 | 27 | // The 'service' property is the name of the service for the container that VS Code should 28 | // use. Update this value and .devcontainer/docker-compose.yml to the real service name. 29 | "service": "iobroker", 30 | 31 | // The optional 'workspaceFolder' property is the path VS Code should open by default when 32 | // connected. This is typically a file mount in .devcontainer/docker-compose.yml 33 | "workspaceFolder": "/workspace", 34 | 35 | "customizations": { 36 | "vscode": { 37 | // Set *default* container specific settings.json values on container create. 38 | "settings": {}, 39 | 40 | // Add the IDs of extensions you want installed when the container is created. 41 | "extensions": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"] 42 | } 43 | }, 44 | 45 | // Uncomment the next line if you want start specific services in your Docker Compose config. 46 | // "runServices": [], 47 | 48 | // Uncomment the next line if you want to keep your containers running after VS Code shuts down. 49 | // "shutdownAction": "none", 50 | 51 | // Prepare the devcontainer according to the actual adpater 52 | "postCreateCommand": "sh .devcontainer/scripts/postcreate.sh && sh .devcontainer/scripts/postcreate_ext.sh", 53 | "postStartCommand": "sh .devcontainer/scripts/poststart.sh", 54 | 55 | // Comment to connect as a root user. See https://aka.ms/vscode-remote/containers/non-root. 56 | "remoteUser": "iobroker" 57 | } 58 | -------------------------------------------------------------------------------- /.devcontainer/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | mqtt: 3 | image: eclipse-mosquitto 4 | container_name: iobroker-zigbee2mqtt-mqtt 5 | restart: unless-stopped 6 | expose: 7 | - 1883 8 | - 9001 9 | volumes: 10 | - ./mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf 11 | healthcheck: 12 | test: ['CMD', 'mosquitto_sub', '-t', '$$SYS/#', '-C', '1', '-i', 'healthcheck', '-W', '3'] 13 | interval: 30s 14 | timeout: 10s 15 | retries: 5 16 | start_period: 20s 17 | zigbee2mqtt: 18 | container_name: iobroker-zigbee2mqtt-zigbee2mqtt 19 | restart: unless-stopped 20 | image: koenkk/zigbee2mqtt 21 | depends_on: 22 | - mqtt 23 | expose: 24 | - 8080 25 | # Map the adapter here if it is attached by usb 26 | #devices: 27 | #- /dev/serial/by-id/usb-SMLIGHT_SMLIGHT_SLZB-06M_269fd606138bef118ab227ccef8776e9-if00-port0:/dev/ttyUSB0 28 | volumes: 29 | - /etc/localtime:/etc/localtime:ro 30 | - ./zigbee2mqtt/configuration.yaml:/app/data/configuration.yaml 31 | environment: 32 | - TZ=Europe/Berlin 33 | 34 | iobroker: 35 | build: ./iobroker 36 | container_name: iobroker-zigbee2mqtt 37 | hostname: iobroker-zigbee2mqtt 38 | # This port is only internal, so we can work on this while another instance of ioBroker is running on the host 39 | expose: 40 | - 8081 41 | volumes: 42 | - ..:/workspace:cached 43 | environment: 44 | # using non-default ports to not interfere with integration tests 45 | - IOB_OBJECTSDB_TYPE=jsonl 46 | - IOB_OBJECTSDB_HOST=127.0.0.1 47 | - IOB_OBJECTSDB_PORT=29001 48 | - IOB_STATESDB_TYPE=jsonl 49 | - IOB_STATESDB_HOST=127.0.0.1 50 | - IOB_STATESDB_PORT=29000 51 | - LANG=en_US.UTF-8 52 | - LANGUAGE=en_US:en 53 | - LC_ALL=en_US.UTF-8 54 | - TZ=Europe/Berlin 55 | - SETGID=1000 56 | 57 | # Reverse proxy to load up-to-date admin sources from the repo 58 | nginx: 59 | image: nginx:latest 60 | depends_on: 61 | - iobroker 62 | links: 63 | - iobroker 64 | container_name: nginx-zigbee2mqtt 65 | volumes: 66 | - ./nginx/nginx.conf:/etc/nginx/nginx.conf 67 | - ..:/workspace:cached 68 | ports: 69 | # Port will be forwarded in the devcontainer 70 | - 80 71 | -------------------------------------------------------------------------------- /.devcontainer/iobroker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM iobroker/iobroker:latest 2 | RUN ln -s /opt/iobroker/node_modules/ /node_modules 3 | 4 | # Needed to use git-ssh in devcontainer 5 | RUN apt-get update && \ 6 | apt-get -y --no-install-recommends install openssh-client 7 | 8 | COPY node-wrapper.sh /usr/bin/node-wrapper.sh 9 | RUN chmod +x /usr/bin/node-wrapper.sh && \ 10 | NODE_BIN="$(command -v node)" && \ 11 | # Move the original node binary to .real 12 | mv "$NODE_BIN" "${NODE_BIN}.real" && \ 13 | # Move the wrapper in place 14 | mv /usr/bin/node-wrapper.sh "$NODE_BIN" 15 | 16 | # Support sudo for non-root user 17 | ARG USERNAME=iobroker 18 | RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ 19 | && chmod 0440 /etc/sudoers.d/$USERNAME 20 | 21 | COPY boot.sh /opt/iobroker/boot.sh 22 | RUN chmod +x /opt/iobroker/boot.sh && \ 23 | mkdir -p /opt/iobroker/log 24 | 25 | ENTRYPOINT ["/bin/bash", "-c", "/opt/iobroker/boot.sh"] -------------------------------------------------------------------------------- /.devcontainer/iobroker/boot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # Define log file location 6 | LOG_FILE=/opt/iobroker/log/boot.log 7 | mkdir -p /opt/iobroker/log 8 | 9 | # Start logging to the file (standard output and error) 10 | exec > >(tee "$LOG_FILE") 2>&1 11 | 12 | /opt/scripts/iobroker_startup.sh -------------------------------------------------------------------------------- /.devcontainer/iobroker/node-wrapper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Wrap the Node.js binary to handle NODE_OPTIONS as command-line arguments. 4 | # This workaround addresses https://github.com/nodejs/node/issues/37588, where 5 | # NODE_OPTIONS is not respected when running Node.js with capabilities as a non-root user. 6 | # The wrapper script reads the NODE_OPTIONS environment variable and converts it into 7 | # standard command-line arguments. For example: 8 | # NODE_OPTIONS=--inspect node main.js 9 | # becomes: 10 | # node.real --inspect main.js 11 | # This ensures debugging and other features relying on NODE_OPTIONS work properly 12 | # for non-root users, such as in VS Code Remote Containers. 13 | 14 | NODE_ARGS=() 15 | 16 | if [[ -n "$NODE_OPTIONS" ]]; then 17 | eval "read -r -a NODE_ARGS <<< \"$NODE_OPTIONS\"" 18 | unset NODE_OPTIONS 19 | fi 20 | 21 | REAL_NODE="$(command -v node).real" 22 | exec "$REAL_NODE" "${NODE_ARGS[@]}" "$@" -------------------------------------------------------------------------------- /.devcontainer/mosquitto/mosquitto.conf: -------------------------------------------------------------------------------- 1 | listener 1883 0.0.0.0 2 | allow_anonymous true -------------------------------------------------------------------------------- /.devcontainer/nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | worker_processes 1; 2 | events { worker_connections 1024; } 3 | 4 | http { 5 | sendfile on; 6 | keepalive_timeout 65; 7 | 8 | server { 9 | listen 80; 10 | 11 | location / { 12 | error_page 418 = @websocket; 13 | proxy_redirect off; 14 | proxy_pass http://iobroker:8081; 15 | if ( $args ~ "sid=" ) { return 418; } 16 | } 17 | 18 | location @websocket { 19 | proxy_pass http://iobroker:8081; 20 | proxy_http_version 1.1; 21 | proxy_set_header Upgrade $http_upgrade; 22 | proxy_set_header Connection "Upgrade"; 23 | proxy_read_timeout 86400; 24 | proxy_send_timeout 86400; 25 | } 26 | 27 | location /adapter/zigbee2mqtt/ { 28 | alias /workspace/admin/; 29 | } 30 | 31 | } 32 | } -------------------------------------------------------------------------------- /.devcontainer/scripts/postcreate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # Wait for ioBroker to become ready 6 | sh .devcontainer/scripts/wait_for_iobroker.sh 7 | 8 | echo "➡️ Install dependencies" 9 | npm install 10 | 11 | echo "➡️ Packaging adapter" 12 | NPM_PACK=$(npm pack) 13 | 14 | echo "➡️ Delete discovery adapter" 15 | iob del discovery 16 | 17 | echo "➡️ Disable error reporting" 18 | iob plugin disable sentry 19 | 20 | echo "➡️ Disable sending diagnostics" 21 | iob object set system.config common.diag=false 22 | 23 | echo "➡️ Set the license as confirmed" 24 | iob object set system.config common.licenseConfirmed=true 25 | 26 | echo "➡️ Install the adapter" 27 | iob url "$(pwd)/$NPM_PACK" --debug 28 | 29 | ADAPTER_NAME=$(jq -r '.name | split(".")[1]' package.json) 30 | echo "➡️ Create a $ADAPTER_NAME instance" 31 | iob add $ADAPTER_NAME 32 | 33 | echo "➡️ Stop $ADAPTER_NAME instance" 34 | iob stop $ADAPTER_NAME 35 | 36 | echo "➡️ Delete the adapter package" 37 | rm "$NPM_PACK" 38 | 39 | touch /tmp/.postcreate_done -------------------------------------------------------------------------------- /.devcontainer/scripts/postcreate_ext.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # Load environment variables from .env file if it exists 6 | if [ -f .env ]; then 7 | export $(grep -v '^#' .env | xargs) 8 | fi 9 | 10 | iob object set system.adapter.zigbee2mqtt.0 native.wsServerIP=zigbee2mqtt 11 | iob object set system.adapter.zigbee2mqtt.0 native.webUIServer=zigbee2mqtt 12 | -------------------------------------------------------------------------------- /.devcontainer/scripts/poststart.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # execute poststart only if container was created right before 6 | if [ -e /tmp/.postcreate_done ]; then 7 | rm /tmp/.postcreate_done 8 | else 9 | # Wait for ioBroker to become ready 10 | sh .devcontainer/scripts/wait_for_iobroker.sh 11 | fi -------------------------------------------------------------------------------- /.devcontainer/scripts/wait_for_iobroker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # Start tailing the iobroker boot log and kill it when the script exits 6 | tail -f -n 100 /opt/iobroker/log/boot.log & 7 | TAIL_PID_BOOT=$! 8 | 9 | # Ensure the tail process is killed when the script exits 10 | trap "kill $TAIL_PID_BOOT" EXIT 11 | 12 | # wait for ioBroker to become ready 13 | echo "⏳ Waiting for ioBroker to become ready..." 14 | 15 | ATTEMPTS=20 16 | SLEEP=0.5 17 | i=1 18 | 19 | while [ $i -le $ATTEMPTS ]; do 20 | if iob status > /dev/null 2>&1; then 21 | echo "✅ ioBroker is ready." 22 | break 23 | else 24 | echo "⌛ Attempt $i/$ATTEMPTS: Waiting for ioBroker..." 25 | sleep $SLEEP 26 | i=$((i + 1)) 27 | fi 28 | done 29 | 30 | if ! iob status > /dev/null 2>&1; then 31 | echo "❌ Timeout: ioBroker did not become ready in time" 32 | exit 1 33 | fi -------------------------------------------------------------------------------- /.devcontainer/zigbee2mqtt/configuration.yaml: -------------------------------------------------------------------------------- 1 | homeassistant: 2 | enabled: false 3 | frontend: 4 | enabled: true 5 | port: 8080 6 | host: 0.0.0.0 7 | mqtt: 8 | base_topic: zigbee2mqtt 9 | server: mqtt://mqtt:1883 10 | serial: 11 | # Configure your serial adapter here 12 | adapter: ember 13 | port: tcp://192.168.0.17:6638 14 | baudrate: 115200 15 | disable_led: false 16 | rtscts: true 17 | advanced: 18 | pan_id: 31629 19 | ext_pan_id: 20 | - 221 21 | - 221 22 | - 221 23 | - 221 24 | - 221 25 | - 221 26 | - 221 27 | - 221 28 | channel: 11 29 | network_key: 30 | - 228 31 | - 252 32 | - 59 33 | - 28 34 | - 37 35 | - 209 36 | - 106 37 | - 54 38 | - 217 39 | - 160 40 | - 68 41 | - 82 42 | - 188 43 | - 24 44 | - 233 45 | - 81 46 | last_seen: ISO_8601_local 47 | cache_state: false 48 | output: json 49 | transmit_power: 20 50 | log_level: info 51 | device_options: {} 52 | availability: 53 | enabled: true 54 | version: 4 55 | 56 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "env": { 4 | "es6": true, 5 | "node": true, 6 | "mocha": true 7 | }, 8 | "extends": ["eslint:recommended"], 9 | "plugins": [], 10 | "rules": { 11 | "indent": [ 12 | "error", 13 | 4, 14 | { 15 | "SwitchCase": 1 16 | } 17 | ], 18 | "no-console": "off", 19 | "no-unused-vars": [ 20 | "error", 21 | { 22 | "ignoreRestSiblings": true, 23 | "argsIgnorePattern": "^_" 24 | } 25 | ], 26 | "no-var": "error", 27 | "no-trailing-spaces": "error", 28 | "prefer-const": "error", 29 | "quotes": [ 30 | "error", 31 | "single", 32 | { 33 | "avoidEscape": true, 34 | "allowTemplateLiterals": true 35 | } 36 | ], 37 | "semi": ["error", "always"] 38 | }, 39 | "parserOptions": { 40 | "ecmaVersion": 2018 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [arteck] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: ['https://paypal.me/ArthurRupp', 'https://paypal.me/IdleBit'] 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/device_problem_report.yaml: -------------------------------------------------------------------------------- 1 | name: Device problem report 2 | description: Data points or functionalities are missing 3 | title: "[Device problem]: " 4 | labels: [device problem] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | **IMPORTANT:** Before submitting: 10 | - You read the [FAQ](https://github.com/arteck/ioBroker.zigbee2mqtt/blob/main/docs/EN/EN_faq.md) 11 | - type: input 12 | id: link 13 | attributes: 14 | label: Link 15 | description: Link of this device from [Zigbee2MQTT](https://www.zigbee2mqtt.io/supported-devices/) 16 | placeholder: https://www.zigbee2mqtt.io/devices/TS130F_dual.html 17 | validations: 18 | required: true 19 | - type: input 20 | id: version 21 | attributes: 22 | label: Adapter version 23 | placeholder: 2.3.0 24 | validations: 25 | required: true 26 | - type: textarea 27 | id: notes 28 | attributes: 29 | label: What is missing or not working 30 | placeholder: I would have expected the or the data point has no function ... 31 | validations: 32 | required: true 33 | - type: textarea 34 | attributes: 35 | label: Device exposes 36 | description: You can get this information via the adapter, [How to do this](https://github.com/arteck/ioBroker.zigbee2mqtt/blob/main/docs/EN/EN_faq.md#how-do-i-get-the-exposes-from-a-device-). 37 | render: JSON 38 | validations: 39 | required: true 40 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/problem_report.yaml: -------------------------------------------------------------------------------- 1 | name: Problem report 2 | description: Create a report to help us improve 3 | labels: [problem] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | **IMPORTANT:** Before submitting: 9 | - You read the [FAQ](https://github.com/arteck/ioBroker.zigbee2mqtt/blob/main/docs/EN/EN_faq.md) 10 | - type: textarea 11 | id: what_happend 12 | attributes: 13 | label: What happened? 14 | validations: 15 | required: true 16 | - type: textarea 17 | id: expect_to_happen 18 | attributes: 19 | label: What did you expect to happen? 20 | placeholder: I expected that ... 21 | validations: 22 | required: false 23 | - type: textarea 24 | id: reproduce 25 | attributes: 26 | label: How to reproduce it (minimal and precise) 27 | placeholder: First do this, than this.. 28 | validations: 29 | required: false 30 | - type: input 31 | id: adapter_version 32 | attributes: 33 | label: Adapter version 34 | placeholder: 2.3.0 35 | validations: 36 | required: true 37 | - type: textarea 38 | id: adapterconfiglog 39 | attributes: 40 | label: Adapter Config Log 41 | placeholder: | 42 | ================================= Adapter Config ================================= 43 | || Zigbee2MQTT Frontend Scheme: http 44 | || Zigbee2MQTT Frontend Server: 192.168.0.1 45 | || Zigbee2MQTT Frontend Port: 8080 46 | || Zigbee2MQTT Connection Type: ws 47 | || Zigbee2MQTT Websocket Scheme: ws 48 | || Zigbee2MQTT Websocket Server: 192.168.0.1 49 | || Zigbee2MQTT Websocket Port: 8080 50 | || Zigbee2MQTT Websocket Auth-Token: unused 51 | || Zigbee2MQTT Websocket Dummy MQTT-Server: deactivated 52 | || Zigbee2MQTT Debug Log: deactivated 53 | || Proxy Zigbee2MQTT Logs to ioBroker Logs: activated 54 | || Use Kelvin: no 55 | || Use ColorTemperature ColorSync: yes 56 | || Use BrightnessMove OnOff: no 57 | || Use BrightnessStep OnOff: no 58 | || Use Event In Desc: yes 59 | || Use Device Icons: yes 60 | || Use Simple Hold/Release State: yes 61 | || Use Simple Move/Stop State: yes 62 | || Use Simple Press/Release State: yes 63 | || Use Automatic Coordinator Check: yes 64 | || Coordinator Check Loglevel: error 65 | || Coordinator Check Cron : 0 3 * * * 66 | ================================================================================== 67 | ============================ Zigbee2MQTT Information ============================= 68 | || Zigbee2MQTT Version: 1.33.1 69 | || Coordinator type: zStack3x0 Version: 20220219 Serial: /dev/ttyACM0 70 | || Network panid 212 channel: 15 ext_pan_id: 0x0000000000000000 71 | validations: 72 | required: true 73 | - type: textarea 74 | id: log 75 | attributes: 76 | label: Log 77 | validations: 78 | required: false 79 | -------------------------------------------------------------------------------- /.github/auto-merge.yml: -------------------------------------------------------------------------------- 1 | # Configure here which dependency updates should be merged automatically. 2 | # The recommended configuration is the following: 3 | - match: 4 | #Only merge patches for production dependencies 5 | dependency_type: production 6 | update_type: "semver:patch" 7 | - match: 8 | # Except for security fixes, here we allow minor patches 9 | dependency_type: production 10 | update_type: "security:minor" 11 | - match: 12 | # and development dependencies can have a minor update, too 13 | dependency_type: development 14 | update_type: "semver:minor" 15 | # The syntax is based on the legacy dependabot v1 automerged_updates syntax, see: 16 | # https://dependabot.com/docs/config-file/#automerged_updates 17 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: npm 4 | directory: "/" 5 | schedule: 6 | interval: monthly 7 | time: "04:00" 8 | timezone: Europe/Berlin 9 | open-pull-requests-limit: 5 10 | assignees: 11 | - arteck 12 | versioning-strategy: increase 13 | 14 | - package-ecosystem: github-actions 15 | directory: "/" 16 | schedule: 17 | interval: monthly 18 | time: "04:00" 19 | timezone: Europe/Berlin 20 | open-pull-requests-limit: 5 21 | assignees: 22 | - arteck 23 | -------------------------------------------------------------------------------- /.github/workflows/codeql.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ "main" ] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [ "main" ] 20 | schedule: 21 | - cron: '21 8 * * 2' 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: ubuntu-latest 27 | permissions: 28 | actions: read 29 | contents: read 30 | security-events: write 31 | 32 | strategy: 33 | fail-fast: false 34 | matrix: 35 | language: [ 'javascript' ] 36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] 37 | # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support 38 | 39 | steps: 40 | - name: Checkout repository 41 | uses: actions/checkout@v4 42 | 43 | # Initializes the CodeQL tools for scanning. 44 | - name: Initialize CodeQL 45 | uses: github/codeql-action/init@v3 46 | with: 47 | languages: ${{ matrix.language }} 48 | # If you wish to specify custom queries, you can do so here or in a config file. 49 | # By default, queries listed here will override any specified in a config file. 50 | # Prefix the list here with "+" to use these queries and those in the config file. 51 | 52 | # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs 53 | # queries: security-extended,security-and-quality 54 | 55 | 56 | # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). 57 | # If this step fails, then you should remove it and run the build manually (see below) 58 | - name: Autobuild 59 | uses: github/codeql-action/autobuild@v3 60 | 61 | # ℹ️ Command-line programs to run using the OS shell. 62 | # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun 63 | 64 | # If the Autobuild fails above, remove it and uncomment the following three lines. 65 | # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. 66 | 67 | # - run: | 68 | # echo "Run, Build Application using script" 69 | # ./location_of_script_within_repo/buildscript.sh 70 | 71 | - name: Perform CodeQL Analysis 72 | uses: github/codeql-action/analyze@v3 73 | with: 74 | category: "/language:${{matrix.language}}" 75 | -------------------------------------------------------------------------------- /.github/workflows/dependabot-auto-merge.yml: -------------------------------------------------------------------------------- 1 | # Automatically merge Dependabot PRs when version comparison is within the range 2 | # that is configured in .github/auto-merge.yml 3 | 4 | name: Auto-Merge Dependabot PRs 5 | 6 | on: 7 | pull_request_target: 8 | 9 | jobs: 10 | auto-merge: 11 | if: github.actor == 'dependabot[bot]' 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Checkout code 15 | uses: actions/checkout@v4 16 | 17 | - name: Check if PR should be auto-merged 18 | uses: ahmadnassri/action-dependabot-auto-merge@v2 19 | with: 20 | # This must be a personal access token with push access 21 | github-token: ${{ secrets.AUTO_MERGE_TOKEN }} 22 | # By default, squash and merge, so Github chooses nice commit messages 23 | command: squash and merge 24 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | name: "Close stale issues/pull requests" 2 | on: 3 | schedule: 4 | - cron: "0 0 * * *" 5 | workflow_dispatch: 6 | 7 | permissions: 8 | contents: read 9 | 10 | jobs: 11 | stale: 12 | permissions: 13 | issues: write # for actions/stale to close stale issues 14 | pull-requests: write # for actions/stale to close stale PRs 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/stale@v9 18 | with: 19 | stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days' 20 | stale-pr-message: 'This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days' 21 | days-before-stale: 30 22 | days-before-close: 7 23 | operations-per-run: 500 24 | exempt-issue-labels: dont-stale 25 | -------------------------------------------------------------------------------- /.github/workflows/test-and-release.yml: -------------------------------------------------------------------------------- 1 | name: Test and Release 2 | 3 | # Run this job on all pushes and pull requests 4 | # as well as tags with a semantic version 5 | on: 6 | push: 7 | branches: 8 | - "main" 9 | tags: 10 | # normal versions 11 | - "v[0-9]+.[0-9]+.[0-9]+" 12 | # pre-releases 13 | - "v[0-9]+.[0-9]+.[0-9]+-**" 14 | pull_request: {} 15 | 16 | # Cancel previous PR/branch runs when a new commit is pushed 17 | concurrency: 18 | group: ${{ github.ref }} 19 | cancel-in-progress: true 20 | 21 | jobs: 22 | # Performs quick checks before the expensive test runs 23 | check-and-lint: 24 | if: contains(github.event.head_commit.message, '[skip ci]') == false 25 | 26 | runs-on: ubuntu-latest 27 | 28 | steps: 29 | - uses: ioBroker/testing-action-check@v1 30 | with: 31 | node-version: "20.x" 32 | # Uncomment the following line if your adapter cannot be installed using 'npm ci' 33 | # install-command: 'npm install' 34 | lint: true 35 | 36 | # Runs adapter tests on all supported node versions and OSes 37 | adapter-tests: 38 | if: contains(github.event.head_commit.message, '[skip ci]') == false 39 | 40 | runs-on: ${{ matrix.os }} 41 | strategy: 42 | matrix: 43 | node-version: [20.x, 22.x, 24.x] 44 | os: [ubuntu-latest, windows-latest, macos-latest] 45 | 46 | steps: 47 | - uses: ioBroker/testing-action-adapter@v1 48 | with: 49 | node-version: ${{ matrix.node-version }} 50 | os: ${{ matrix.os }} 51 | # Uncomment the following line if your adapter cannot be installed using 'npm ci' 52 | # install-command: 'npm install' 53 | 54 | # TODO: To enable automatic npm releases, create a token on npmjs.org 55 | # Enter this token as a GitHub secret (with name NPM_TOKEN) in the repository options 56 | # Then uncomment the following block: 57 | 58 | # Deploys the final package to NPM 59 | # Deploys the final package to NPM and Github Actions 60 | deploy: 61 | # Trigger this step only when a commit on master is tagged with a version number 62 | if: | 63 | contains(github.event.head_commit.message, '[skip ci]') == false && 64 | github.event_name == 'push' && 65 | startsWith(github.ref, 'refs/tags/v') 66 | 67 | # Define which jobst must succeed before the release 68 | needs: [adapter-tests] 69 | 70 | runs-on: ubuntu-latest 71 | strategy: 72 | matrix: 73 | node-version: [20.x] 74 | 75 | steps: 76 | - name: Checkout code 77 | uses: actions/checkout@v4 78 | 79 | - name: Use Node.js ${{ matrix.node-version }} 80 | uses: actions/setup-node@v4 81 | with: 82 | node-version: ${{ matrix.node-version }} 83 | 84 | - name: Extract the version and commit body from the tag 85 | id: extract_release 86 | # The body may be multiline, therefore we need to escape some characters 87 | run: | 88 | VERSION="${{ github.ref }}" 89 | VERSION=${VERSION##*/v} 90 | echo "::set-output name=VERSION::$VERSION" 91 | BODY=$(git show -s --format=%b) 92 | BODY="${BODY//'%'/'%25'}" 93 | BODY="${BODY//$'\n'/'%0A'}" 94 | BODY="${BODY//$'\r'/'%0D'}" 95 | echo "::set-output name=BODY::$BODY" 96 | 97 | # If you are using TypeScript, additional build steps might be necessary 98 | # Run them here, e.g.: 99 | # - name: Install dependencies 100 | # run: npm ci 101 | # - name: Create a clean build 102 | # run: npx gulp build 103 | 104 | # How to release packages to npm depends on the package type. 105 | # Choose one of these possibilities and or comment out the others: 106 | # a) For normal packages (no monorepo): 107 | - name: Publish package to npm 108 | run: | 109 | npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} 110 | npm whoami 111 | npm publish 112 | # b) For monorepos managed with lerna (requires lerna to be installed globally) 113 | #- name: Publish packages to npm 114 | # run: | 115 | # npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} 116 | # npm whoami 117 | # lerna publish from-package --yes 118 | # c) For monorepos managed with yarn v3.1+ (no lerna) 119 | #- name: Publish packages to npm 120 | # run: | 121 | # yarn config set npmAuthToken "${{ secrets.NPM_TOKEN }}" 122 | # yarn npm whoami 123 | # yarn workspaces foreach -vti --no-private npm publish --tolerate-republish 124 | 125 | - name: Create Github Release 126 | uses: actions/create-release@v1 127 | env: 128 | GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} 129 | with: 130 | tag_name: ${{ github.ref }} 131 | release_name: Release v${{ steps.extract_release.outputs.VERSION }} 132 | draft: false 133 | # Prerelease versions create prereleases on Github 134 | prerelease: ${{ contains(steps.extract_release.outputs.VERSION, '-') }} 135 | body: ${{ steps.extract_release.outputs.BODY }} 136 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # No dot-directories except github/vscode 2 | .*/ 3 | !.vscode/ 4 | !.github/ 5 | !.devcontainer/ 6 | 7 | *.code-workspace 8 | node_modules 9 | nbproject 10 | 11 | # npm package files 12 | iobroker.*.tgz 13 | 14 | Thumbs.db 15 | 16 | # i18n intermediate files 17 | admin/i18n/flat.txt 18 | admin/i18n/*/flat.txt -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | package.json 2 | package-lock.json -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | semi: true, 3 | trailingComma: 'es5', 4 | singleQuote: true, 5 | printWidth: 120, 6 | useTabs: false, 7 | tabWidth: 4, 8 | endOfLine: 'auto', 9 | }; 10 | -------------------------------------------------------------------------------- /.releaseconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | "iobroker", 4 | "license", 5 | "manual-review" 6 | ] 7 | } -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"] 3 | } 4 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Launch normal", 6 | "program": "${workspaceFolder}/main.js", 7 | "args": ["--instance", "0", "--force", "--logs", "--debug"], 8 | "env": { 9 | "NODE_PATH":"${workspaceFolder}/.dev-server/default/node_modules" 10 | }, 11 | "request": "launch", 12 | "stopOnEntry": true, 13 | "console": "internalConsole", 14 | "outputCapture": "std", 15 | "skipFiles": [ 16 | "/**" 17 | ], 18 | "type": "node" 19 | }, 20 | 21 | { 22 | "name": "Launch install", 23 | "program": "${workspaceFolder}/main.js", 24 | "args": ["--instance", "0", "--force", "--logs", "--debug", "--install"], 25 | "env": { 26 | "NODE_PATH":"${workspaceFolder}/.dev-server/default/node_modules" 27 | }, 28 | "request": "launch", 29 | "stopOnEntry": true, 30 | "console": "internalConsole", 31 | "outputCapture": "std", 32 | "skipFiles": [ 33 | "/**" 34 | ], 35 | "type": "node" 36 | }, 37 | 38 | { 39 | "name": "Attach by Process ID", 40 | "processId": "${command:PickProcess}", 41 | "request": "attach", 42 | "skipFiles": [ 43 | "/**" 44 | ], 45 | "type": "node" 46 | }, 47 | 48 | { 49 | "type": "node", 50 | "request": "launch", 51 | "name": "Launch ioBroker Adapter", 52 | "skipFiles": ["/**"], 53 | "args": ["--debug", "0", "--logs"], 54 | "program": "${workspaceFolder}/main.js", 55 | "console": "integratedTerminal", 56 | }, 57 | ] 58 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "eslint.enable": true, 3 | "editor.formatOnSave": true, 4 | "editor.defaultFormatter": "esbenp.prettier-vscode", 5 | "json.schemas": [ 6 | { 7 | "fileMatch": ["io-package.json"], 8 | "url": "https://json.schemastore.org/io-package" 9 | }, 10 | { 11 | "fileMatch": ["admin/jsonConfig.json", "admin/jsonCustom.json", "admin/jsonTab.json"], 12 | "url": "https://raw.githubusercontent.com/ioBroker/adapter-react-v5/main/schemas/jsonConfig.json" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Arthur Rupp , 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # ioBroker.zigbee2mqtt 4 | 5 | [![NPM version](https://img.shields.io/npm/v/iobroker.zigbee2mqtt.svg)](https://www.npmjs.com/package/iobroker.zigbee2mqtt) 6 | [![Downloads](https://img.shields.io/npm/dm/iobroker.zigbee2mqtt.svg)](https://www.npmjs.com/package/iobroker.zigbee2mqtt) 7 | ![Number of Installations](https://iobroker.live/badges/zigbee2mqtt-installed.svg) 8 | ![Current version in stable repository](https://iobroker.live/badges/zigbee2mqtt-stable.svg) 9 | 10 | [![NPM](https://nodei.co/npm/iobroker.zigbee2mqtt.png?downloads=true)](https://nodei.co/npm/iobroker.zigbee2mqtt/) 11 | 12 | **Tests:** 13 | ![Test and Release](https://github.com/arteck/ioBroker.zigbee2mqtt/workflows/Test%20and%20Release/badge.svg) 14 | ![CodeQL](https://github.com/arteck/ioBroker.zigbee2mqtt/actions/workflows/codeql.yml/badge.svg?branch=main) 15 | 16 | ## zigbee2mqtt adapter for ioBroker 17 | 18 | This adapter allows to control the data points of the devices of a Zigbee2MQTT instance in ioBroker. 19 | 20 | ## Adapter Documentation 21 | 22 | [Adapter Documentation](https://github.com/arteck/ioBroker.zigbee2mqtt/blob/main/docs/wiki.md) 23 | 24 | ## Changelog 25 | ### 3.0.6 (2025-05-31) 26 | - (arteck) settings restructure 27 | - (arteck) fix icon not found message 28 | 29 | ### 3.0.5 (2025-05-29) 30 | - (arteck) add additional folder for some devices (like smoke detector) 31 | - (arteck) state.js cleanup 32 | - (arteck) set available State to true if device message include last_seen status 33 | 34 | ### 3.0.4 (2025-05-11) 35 | - (arteck) update admin 36 | 37 | ### 3.0.3 (2025-02-03) 38 | - (arteck) corr illuminance (del illuminance_raw) 39 | - (arteck) indicator.alarm.flood 40 | 41 | ### 3.0.2 (2025-01-06) 42 | - (simateck) corr WebSocket connection 43 | 44 | ### 3.0.1 (2025-01-04) 45 | - (arteck) corr icon download 46 | 47 | ### 3.0.0 (2025-01-04) 48 | - (arteck) adaptation z2m 2.x 49 | 50 | ### 2.13.11 (2024-10-17) 51 | - (arteck) corr package.json 52 | 53 | ### 2.13.10 (2024-09-05) 54 | - (arteck) update dependecy 55 | - (arteck) add available object for groups 56 | 57 | ### 2.13.9 (2024-05-13) 58 | - (arteck) fix lint 59 | - (arteck) update dependecy 60 | 61 | ### 2.13.9 (2024-05-13) 62 | - (arteck) fix lint 63 | - (arteck) update dependecy 64 | 65 | ### 2.13.8 (2024-05-13) 66 | - (arteck) fix icon path 67 | 68 | ### 2.13.7 (2024-04-20) 69 | - (arteck) core dependecy 70 | - (arteck) update dependecy 71 | - (pepp86) Enable occupancy to be always updated if true 72 | 73 | ### 2.13.6 (2024-03-11) 74 | - (arteck) update dependecy 75 | 76 | ### 2.13.5 (2024-02-02) 77 | - (arteck) fixed mqttClient.end() 78 | 79 | ### 2.13.4 (2023-12-17) 80 | 81 | - (o0shojo0o) fixed unnecessary warning for special value ([269](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/269)) 82 | 83 | ### 2.13.3 (2023-10-10) 84 | 85 | - (o0shojo0o) fixed devices erroneous offline indication ([#255](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/255)) 86 | 87 | ### 2.13.2 (2023-09-30) 88 | 89 | - (o0shojo0o) fixed NULL values when HASS integration is enabled in zigbee2mqtt 90 | 91 | ### 2.13.1 (2023-09-07) 92 | 93 | - (o0shojo0o) fixed storage name 94 | 95 | ### 2.13.0 (2023-09-07) 96 | 97 | - (o0shojo0o) added state `info.coordinator_check` ([#247](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/247)) 98 | - (o0shojo0o) added state `info.missing_routers` ([#247](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/247)) 99 | - (o0shojo0o) added state `info.missing_routers_count` ([#247](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/247)) 100 | - (o0shojo0o) added option `Automatic check for missing routers in the coordinator memory` ([#247](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/247)) 101 | 102 | ### 2.12.0 (2023-09-05) 103 | 104 | - (o0shojo0o) added option `Size of the object icons in pixels` 105 | 106 | ### 2.11.0 (2023-08-24) 107 | 108 | - (o0shojo0o) added automatic download of device image from zigbee2mqtt to meta-storage 109 | - (o0shojo0o) device images from Meta-Storage added to the object 110 | - (o0shojo0o) device images from Meta-Storage auto resize to 28x28 pixel for smaller object 111 | - (o0shojo0o) added option `Download device images from Zigbee2Mqtt and use them as object icons.` 112 | - (o0shojo0o) fixed Hue_Move ([#223](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/223)) 113 | - (o0shojo0o) added option `Generate simple 'Hold' and 'Release' states` 114 | - (o0shojo0o) added option `Generate simple 'Move' and 'Stop' states` 115 | - (o0shojo0o) added option `Generate simple 'Press' and 'Release' states` 116 | 117 | ### 2.10.1 (2023-08-13) 118 | 119 | - (o0shojo0o) fixed type definitions (thx @arteck) 120 | 121 | ### 2.10.0 (2023-08-12) 122 | 123 | - (o0shojo0o) optimisation for the MQTT connection 124 | - (o0shojo0o) fixed for MQTT output type: attribute_and_json ([#87](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/87)) 125 | - (o0shojo0o) added support for external MQTT-Server credentials ([#148](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/148)) 126 | - *After update, Websocket Auth-Token must be set again, if used.* 127 | 128 | ### 2.9.0 (2023-07-21) 129 | 130 | - (o0shojo0o) added state `send_payload` to send a raw json payload 131 | 132 | ### 2.8.0 (2023-07-19) 133 | 134 | - (o0shojo0o) added WSS support for websoket connection ([#191](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/191)) 135 | - (o0shojo0o) small fixes 136 | 137 | ### 2.7.5 (2023-04-08) 138 | 139 | - (o0shojo0o) added state `last_seen` contains date/time of last Zigbee message ([#131](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/131)) 140 | 141 | ### 2.7.4 (2023-03-05) 142 | 143 | - (o0shojo0o) fixed for Aqara presence detector FP1 `reset_nopresence_status` 144 | 145 | ### 2.7.3 (2023-02-18) 146 | 147 | - (o0shojo0o) hotfix for Aqara presence detector FP1 148 | 149 | ### 2.7.2 (2023-02-01) 150 | 151 | - (o0shojo0o) rework of the detection of removed devices 152 | 153 | ### 2.7.1 (2023-01-24) 154 | 155 | - (arteck) added option for use folder description 156 | - (arteck) use the iobroker device folder description for device description or events 157 | 158 | ### 2.7.0 (2023-01-18) 159 | 160 | - (o0shojo0o) added support for wildcard actions (eg. *_single) ([#116](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/116)) 161 | - (o0shojo0o) added error handling optimizations ([more](https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1382038679)) 162 | - (o0shojo0o) added option `auth_token` for websocket connection ([#112](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/112)) 163 | - (o0shojo0o) websocket timeout increased 164 | 165 | ### 2.6.0 (2023-01-10) 166 | 167 | - (o0shojo0o) added state `transition` for transition overwrite (-1 disabled overwrite) ([#101](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/101)) 168 | - (o0shojo0o) consideration of the description when creating the friendly name ([#105](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/105)) 169 | - (o0shojo0o) added state `effect` for groups ([#101](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/101)) 170 | - (o0shojo0o) fixed state contact 171 | - (o0shojo0o) added handling for disabled devices 172 | 173 | ### 2.5.0 (2023-01-02) 174 | 175 | - (o0shojo0o) added option `Brightness step should also turn the light on or off` 176 | - (o0shojo0o) added handling of `brightness_step` ([#96](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/96)) 177 | - (o0shojo0o) states processing more flexible designed ([#94](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/94)) 178 | 179 | ### 2.4.5 (2022-12-20) 180 | 181 | - (o0shojo0o) extend `text` for `action` ([#84](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/84)) 182 | 183 | ### 2.4.4 (2022-12-06) 184 | 185 | - (o0shojo0o) better state identification ([#79](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/79)) 186 | 187 | ### 2.4.3 (2022-11-23) 188 | 189 | - (o0shojo0o) fixed availability when `friendly_name` `/` contains 190 | 191 | ### 2.4.2 (2022-11-20) 192 | 193 | - (o0shojo0o) added correct handling of `move_to_saturation`, `hue_move` and `brightness_move_to_level` ([#68](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/68)) 194 | - (o0shojo0o) fixed when `friendly_name` `/` contains 195 | 196 | ### 2.4.1 (2022-11-16) 197 | 198 | - (o0shojo0o) fixed based on [review](https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1316656378) 199 | 200 | ### 2.4.0 (2022-11-08) 201 | 202 | - (o0shojo0o) fixed for devices with multiple endpoints ([#57](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/57)). 203 | - (o0shojo0o) added option `Brightness move should also turn the light on or off` 204 | - (o0shojo0o) added state toggle for groups 205 | - (o0shojo0o) more dynamic during data point creation ([#48](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/48)). 206 | 207 | ### 2.3.0 (2022-10-30) 208 | 209 | - (o0shojo0o) added support for the `toggle` of states that support this. 210 | - (o0shojo0o) added correct handling of `color_move` and `color_temperature_move` 211 | 212 | ### 2.2.1 (2022-10-25) 213 | 214 | - (o0shojo0o) fixed state roles and access 215 | - (o0shojo0o) fixed state handling 216 | - (o0shojo0o) fixed createZ2MMessage 217 | 218 | ### 2.2.0 (2022-10-20) 219 | 220 | - (o0shojo0o) added support for [Lidl HG06467 effects](https://www.zigbee2mqtt.io/devices/HG06467.html#trigger-effects) 221 | - (o0shojo0o) added support for hs color 222 | - (o0shojo0o) `simulated_brightness` data point is added only for supported devices 223 | 224 | ### 2.1.1 (2022-10-16) 225 | 226 | - (o0shojo0o) advanced detection if a device has been removed 227 | - (o0shojo0o) fixes the design error in the websocket connection 228 | 229 | ### 2.1.0 (2022-10-14) 230 | 231 | - (o0shojo0o) added option for color temperature sync with color 232 | - (o0shojo0o) fixed logfilter and debugDevices 233 | - (o0shojo0o) lots of bugfixes 234 | - (o0shojo0o) now set the correct min/max at color temp 235 | - (o0shojo0o) better error handling for the connections 236 | 237 | ### 2.0.0 (2022-10-12) 238 | 239 | **!!!BREAKING CHANGE!!!** 240 | 241 | - (o0shojo0o) added configurable connection to Zigbee2MQTT (Settings must be renewed) 242 | - Websocket 243 | - External MQTT-Server 244 | - Internal MQTT-Server 245 | - (o0shojo0o) optimized state writing performance in ioBroker 246 | - (o0shojo0o) fixed the correct set of the connection status 247 | 248 | ### 1.0.0 (2022-10-09) 249 | 250 | **!!!BREAKING CHANGE!!!** 251 | 252 | - (o0shojo0o) added options for external MQTT-Server 253 | - (o0shojo0o) connection to zigbee2mqtt completely reworked and changed to MQTT 254 | - (o0shojo0o) lots of bugfixes 255 | - (o0shojo0o) automatically set button actions back to false 256 | - (o0shojo0o) added support for Zigbee2MQTT feature simulated_brightness 257 | - (o0shojo0o) added config check 258 | - (o0shojo0o) added log output about coordinator details 259 | 260 | ### 0.2.0 (2022-10-04) 261 | 262 | - (o0shojo0o) group states corrected 263 | - (o0shojo0o) added option 'Use Kelvin instead of mired for the color temps' 264 | - (o0shojo0o) remove available logic, now will use the information from z2m 265 | - (o0shojo0o) rename noLogDevices to logfilter 266 | - (o0shojo0o) lots of bugfixes 267 | - (o0shojo0o) added noLogDevices functionality 268 | - (o0shojo0o) added debugmessage for specific device functionality 269 | - (o0shojo0o) added some states are default false 270 | - (o0shojo0o) added support for scenes defined on a device 271 | - (o0shojo0o) fixed available state role 272 | - (o0shojo0o) fixed edsubscribeWritableStates 273 | 274 | ### 0.1.0 (2022-09-29) 275 | 276 | - (o0shojo0o) first release 277 | 278 | ## License 279 | 280 | MIT License 281 | 282 | Copyright (c) 2025 Arthur Rupp , 283 | 284 | Permission is hereby granted, free of charge, to any person obtaining a copy 285 | of this software and associated documentation files (the "Software"), to deal 286 | in the Software without restriction, including without limitation the rights 287 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 288 | copies of the Software, and to permit persons to whom the Software is 289 | furnished to do so, subject to the following conditions: 290 | 291 | The above copyright notice and this permission notice shall be included in all 292 | copies or substantial portions of the Software. 293 | 294 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 295 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 296 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 297 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 298 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 299 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 300 | SOFTWARE. 301 | -------------------------------------------------------------------------------- /admin/i18n/de/translations.json: -------------------------------------------------------------------------------- 1 | { 2 | "click for Documentation": "hier geht es zur Dokumentation", 3 | "A detailed documentation with explanations and all further information can be found on this GitHub page:": "Eine ausführliche Dokumentation mit Erklärungen und allen weiteren Informationen findest Du auf dieser GitHub-Seite:", 4 | "zigbee2mqtt adapter settings": "Adaptereinstellungen für Zigbee2MQTT", 5 | "Select and configure your Zigbee2MQTT connection": "Konfiguriere die Zigbee2MQTT anbindung", 6 | "Select connection to Zigbee2MQTT": "Zigbee2MQTT Verbindung auswählen", 7 | "Websocket": "Websocket", 8 | "External MQTT-Server": "Externer MQTT-Server", 9 | "Internal MQTT-Server": "Interner MQTT-Server", 10 | "Configure your Zigbee2MQTT connection": "Konfiguriere", 11 | "Websocket IP-Address": "Websocket IP-Adresse", 12 | "Websocket Port": "Websocket Port", 13 | "Create a dummy MQTT-Server for Zigbee2MQTT": "Internen MQTT-Server für Zigbee2MQTT erstellen", 14 | "External MQTT-Server IP-Address": "IP-Adresse des externen MQTT-Servers", 15 | "External MQTT-Server Port": "Externer MQTT-Server Port", 16 | "MQTT-Server IP-Address bind": "MQTT-Server IP-Adresse binden", 17 | "MQTT-Server Port": "MQTT-Server-Port", 18 | "Configure your Zigbee2MQTT WebUi connection": "Konfiguration der Zigbee2MQTT WebUi Verbindung", 19 | "WebUi Address": "WebUi Adresse", 20 | "WebUi Port": "WebUi Port", 21 | "Color configurations": "Farbkonfigurationen", 22 | "Color temperature sync with color": "Farbtemperatur mit Farbe synchronisieren", 23 | "Use Kelvin instead of mired for the color temps": "Kelvin anstelle von Mired für die Farbtemperaturen verwenden", 24 | "Other configurations": "Andere Konfigurationen", 25 | "Proxy Zigbee2MQTT logs to ioBroker logs": "Proxy Zigbee2MQTT Protokolle zu ioBroker Protokollen", 26 | "Brightness move should also turn the light on or off": "Brightness move soll auch das Licht ein- oder ausschalten", 27 | "Brightness step should also turn the light on or off": "Brightness step soll auch das Licht ein- oder ausschalten", 28 | "Use Auth-Token": "Auth-Token verwenden", 29 | "Auth-Token (special characters are not supported)": "Auth-Token (Sonderzeichen werden nicht unterstützt)", 30 | "The events such as 'Device removed' or 'Disabled' are displayed in the description instead of in the name.": "Die Ereignisse wie „Gerät entfernt“ oder „Deaktiviert“ werden in der Beschreibung statt im Namen angezeigt.", 31 | "Scheme": "Scheme", 32 | "Use MQTT Credentials": "MQTT-Anmeldeinformationen verwenden", 33 | "MQTT Username": "MQTT-Benutzername", 34 | "MQTT Password": "MQTT-Passwort", 35 | "Download device images from Zigbee2Mqtt and use them as object icons.": "Device Bilder von Zigbee2Mqtt herunterladen und als Objektsymbole verwenden.", 36 | "Generate simple 'Hold' and 'Release' states": "Generiert einfache „Hold“ und „Release“ States", 37 | "When enabled, the 'Hold' and 'Release' states are combined and the 'Hold' data point remains true until the 'Release' event arrives.": "Bei Aktivierung werden die Datenpunkte „Hold“ und „Release“ kombiniert und der Datenpunkt „Hold“ bleibt true, bis das Ereignis „Release“ eintrifft.", 38 | "Generate simple 'Move' and 'Stop' states": "Generiert einfache „Move“ und „Stop“ States", 39 | "When enabled, the 'Move' and 'Stop' states are combined and the 'Move' data point remains true until the 'Stop' event arrives.": "Bei Aktivierung werden die Datenpunkte „Move“ und „Stop“ kombiniert und der Datenpunkt „Move“ bleibt true, bis das Ereignis „Stop“ eintrifft.", 40 | "State configurations": "State konfigurationen", 41 | "Generate simple 'Press' and 'Release' states": "Generieren einfache „Press“ und „Release“ States", 42 | "When enabled, the 'Press' and 'Release' states are combined and the 'Press' data point remains true until the 'Release' event arrives.": "Wenn diese Option aktiviert ist, werden die Zustände „Press“ und „Release“ kombiniert und der Datenpunkt „Press“ bleibt true, bis das Ereignis „Release“ eintrifft.", 43 | "If the size is later changed to a larger value, the images already downloaded must be deleted.
Please note that icons are stored in the object and should therefore not be unnecessarily large!": "Wird die Größe später auf einen größeren Wert geändert, müssen die bereits heruntergeladenen Bilder gelöscht werden.
Bitte beachten Sie, dass Icons im Objekt gespeichert werden und daher nicht unnötig groß sein sollten!", 44 | "Automatic check for missing routers in the coordinator memory.": "Automatische Prüfung auf fehlende Router im Speicher des Koordinators.", 45 | "With which log level should a negative search be logged?": "Mit welcher Loglevel soll ein negatives Suchergebnis protokolliert werden?", 46 | "Time of the automatic check": "Zeitpunkt der automatischen Prüfung", 47 | "More information": "Mehr Informationen", 48 | "Expert Settings. Please only use if you know what you're doing": "Expert Einstellungen. Bitte nur verwenden, wenn Du weisst was du machst", 49 | "Allways update state for occupancy when message arrives from zigbee2mqtt server (Only for true state). Increases load on ioBroker System" : "Aktualisiert immer den Status für die Bewegung, wenn eine Nachricht vom zigbee2mqtt-Server eintrifft (nur bei true). Erhöht die Last auf dem ioBroker", 50 | "Allways update available state when message included last_seen status": "Aktualisiert immer den available Status, wenn die Nachricht last_seen Status enthält" 51 | 52 | } 53 | -------------------------------------------------------------------------------- /admin/i18n/en/translations.json: -------------------------------------------------------------------------------- 1 | { 2 | "click for Documentation": "click for Documentation", 3 | "A detailed documentation with explanations and all further information can be found on this GitHub page:": "A detailed documentation with explanations and all further information can be found on this GitHub page:", 4 | "zigbee2mqtt adapter settings": "Adapter settings for zigbee2mqtt", 5 | "Select and configure your Zigbee2MQTT connection": "Select and configure Zigbee2MQTT connection", 6 | "Select connection to Zigbee2MQTT": "Select connection to Zigbee2MQTT", 7 | "Websocket": "Websocket", 8 | "External MQTT-Server": "External MQTT-Server", 9 | "Internal MQTT-Server": "Internal MQTT-Server", 10 | "Configure your Zigbee2MQTT connection": "Configure your Zigbee2MQTT connection", 11 | "Websocket IP-Address": "Websocket IP-Address", 12 | "Websocket Port": "Websocket Port", 13 | "Use Auth-Token": "Use Auth-Token", 14 | "Auth-Token (special characters are not supported)": "Auth-Token (special characters are not supported)", 15 | "Create a dummy MQTT-Server for Zigbee2MQTT": "Create a dummy MQTT-Server for Zigbee2MQTT", 16 | "External MQTT-Server IP-Address": "External MQTT-Server IP-Address", 17 | "External MQTT-Server Port": "External MQTT-Server Port", 18 | "MQTT-Server IP-Address bind": "MQTT-Server IP-Address bind", 19 | "MQTT-Server Port": "MQTT-Server Port", 20 | "Configure your Zigbee2MQTT WebUi connection": "Configure Zigbee2MQTT WebUi connection", 21 | "WebUi Address": "WebUi Address", 22 | "WebUi Port": "WebUi Port", 23 | "Color configurations": "Color configurations", 24 | "Color temperature sync with color": "Color temperature sync with color", 25 | "Use Kelvin instead of mired for the color temps": "Use Kelvin instead of mired for the color temps", 26 | "Other configurations": "Other configurations", 27 | "Proxy Zigbee2MQTT logs to ioBroker logs": "Proxy Zigbee2MQTT logs to ioBroker logs", 28 | "Brightness move should also turn the light on or off": "Brightness move should also turn the light on or off", 29 | "Brightness step should also turn the light on or off": "Brightness step should also turn the light on or off", 30 | "The events such as 'Device removed' or 'Disabled' are displayed in the description instead of in the name.": "The events such as 'Device removed' or 'Disabled' are displayed in the description instead of in the name.", 31 | "Scheme": "Scheme", 32 | "Use MQTT Credentials": "Use MQTT Credentials", 33 | "MQTT Username": "MQTT Username", 34 | "MQTT Password": "MQTT Password", 35 | "Download device images from Zigbee2Mqtt and use them as object icons.": "Download device images from Zigbee2Mqtt and use them as object icons.", 36 | "Generate simple 'Hold' and 'Release' states": "Generate simple 'Hold' and 'Release' states", 37 | "When enabled, the 'Hold' and 'Release' states are combined and the 'Hold' data point remains true until the 'Release' event arrives.": "When enabled, the 'Hold' and 'Release' states are combined and the 'Hold' data point remains true until the 'Release' event arrives.", 38 | "Generate simple 'Move' and 'Stop' states": "Generate simple 'Move' and 'Stop' states", 39 | "When enabled, the 'Move' and 'Stop' states are combined and the 'Move' data point remains true until the 'Stop' event arrives.": "When enabled, the 'Move' and 'Stop' states are combined and the 'Move' data point remains true until the 'Stop' event arrives.", 40 | "State configurations": "State configurations", 41 | "Generate simple 'Press' and 'Release' states": "Generate simple 'Press' and 'Release' states", 42 | "When enabled, the 'Press' and 'Release' states are combined and the 'Press' data point remains true until the 'Release' event arrives.": "When enabled, the 'Press' and 'Release' states are combined and the 'Press' data point remains true until the 'Release' event arrives.", 43 | "If the size is later changed to a larger value, the images already downloaded must be deleted.
Please note that icons are stored in the object and should therefore not be unnecessarily large!": "If the size is later changed to a larger value, the images already downloaded must be deleted.
Please note that icons are stored in the object and should therefore not be unnecessarily large!", 44 | "Automatic check for missing routers in the coordinator memory.": "Automatic check for missing routers in the coordinator memory.", 45 | "With which log level should a negative search be logged?": "With which log level should a negative search be logged?", 46 | "Time of the automatic check": "Time of the automatic check", 47 | "More information": "More information", 48 | "Expert Settings. Please only use if you know what you're doing": "Expert Settings. Please only use if you know what you're doing", 49 | "Allways update state for occupancy when message arrives from zigbee2mqtt server (Only for true state). Increases load on ioBroker System" : "Allways update state for occupancy when message arrives from zigbee2mqtt server (Only for true state). Increases load on ioBroker System", 50 | "Allways update available state when message included last_seen status": "Allways update available state when message included last_seen status" 51 | } 52 | -------------------------------------------------------------------------------- /admin/i18n/es/translations.json: -------------------------------------------------------------------------------- 1 | { 2 | "click for Documentation": "haz clic para ver la documentación", 3 | "A detailed documentation with explanations and all further information can be found on this GitHub page:": "Una documentación detallada con explicaciones y toda la información adicional se puede encontrar en esta página de GitHub:", 4 | "zigbee2mqtt adapter settings": "Configuración del adaptador para zigbee2mqtt", 5 | "Select and configure your Zigbee2MQTT connection": "Seleccionar y configurar la conexión Zigbee2MQTT", 6 | "Select connection to Zigbee2MQTT": "Seleccionar conexión a Zigbee2MQTT", 7 | "Websocket": "Websocket", 8 | "External MQTT-Server": "Servidor MQTT externo", 9 | "Internal MQTT-Server": "Servidor MQTT interno", 10 | "Configure your Zigbee2MQTT connection": "Configura tu conexión Zigbee2MQTT", 11 | "Websocket IP-Address": "Dirección IP de Websocket", 12 | "Websocket Port": "puerto websocket", 13 | "Use Auth-Token": "Usar token de autenticación", 14 | "Auth-Token (special characters are not supported)": "Auth-Token (los caracteres especiales no son compatibles)", 15 | "Create a dummy MQTT-Server for Zigbee2MQTT": "Cree un servidor MQTT ficticio para Zigbee2MQTT", 16 | "External MQTT-Server IP-Address": "Dirección IP del servidor MQTT externo", 17 | "External MQTT-Server Port": "Puerto de servidor MQTT externo", 18 | "MQTT-Server IP-Address bind": "Enlace de dirección IP del servidor MQTT", 19 | "MQTT-Server Port": "Puerto del servidor MQTT", 20 | "Configure your Zigbee2MQTT WebUi connection": "Configurar la conexión Zigbee2MQTT WebUi", 21 | "WebUi Address": "Dirección de interfaz de usuario web", 22 | "WebUi Port": "Puerto WebUi", 23 | "Color configurations": "Configuraciones de color", 24 | "Color temperature sync with color": "Sincronización de la temperatura del color con el color", 25 | "Use Kelvin instead of mired for the color temps": "Use Kelvin en lugar de mired para las temperaturas de color", 26 | "Other configurations": "Otras configuraciones", 27 | "Proxy Zigbee2MQTT logs to ioBroker logs": "Proxy de registros Zigbee2MQTT a registros de ioBroker", 28 | "Brightness move should also turn the light on or off": "El movimiento de brillo también debe encender o apagar la luz", 29 | "Brightness step should also turn the light on or off": "El paso de brillo también debe encender o apagar la luz", 30 | "The events such as 'Device removed' or 'Disabled' are displayed in the description instead of in the name.": "Los eventos como 'Dispositivo eliminado' o 'Deshabilitado' se muestran en la descripción en lugar del nombre.", 31 | "Scheme": "Esquema", 32 | "Use MQTT Credentials": "Usar credenciales MQTT", 33 | "MQTT Username": "Nombre de usuario MQTT", 34 | "MQTT Password": "Contraseña MQTT", 35 | "Download device images from Zigbee2Mqtt and use them as object icons.": "Descargue imágenes de dispositivos de Zigbee2Mqtt y utilícelas como íconos de objetos.", 36 | "Generate simple 'Hold' and 'Release' states": "Genere estados simples de 'Retener' y 'Liberar'", 37 | "When enabled, the 'Hold' and 'Release' states are combined and the 'Hold' data point remains true until the 'Release' event arrives.": "Cuando está habilitado, los estados 'Retener' y 'Liberar' se combinan y el punto de datos 'Retener' permanece verdadero hasta que llega el evento 'Liberar'.", 38 | "Generate simple 'Move' and 'Stop' states": "Genere estados simples de 'Mover' y 'Detener'", 39 | "When enabled, the 'Move' and 'Stop' states are combined and the 'Move' data point remains true until the 'Stop' event arrives.": "Cuando está habilitado, los estados 'Mover' y 'Detener' se combinan y el punto de datos 'Mover' permanece verdadero hasta que llega el evento 'Detener'.", 40 | "State configurations": "Configuraciones de estado", 41 | "Generate simple 'Press' and 'Release' states": "Genere estados simples de \"Presionar\" y \"Liberar\"", 42 | "When enabled, the 'Press' and 'Release' states are combined and the 'Press' data point remains true until the 'Release' event arrives.": "Cuando está habilitado, los estados \"Presionar\" y \"Liberar\" se combinan y el punto de datos \"Presionar\" permanece verdadero hasta que llega el evento \"Liberar\".", 43 | "If the size is later changed to a larger value, the images already downloaded must be deleted.
Please note that icons are stored in the object and should therefore not be unnecessarily large!": "Si posteriormente se cambia el tamaño a un valor mayor, se deben eliminar las imágenes ya descargadas.
¡Tenga en cuenta que los iconos se almacenan en el objeto y, por lo tanto, no deben ser innecesariamente grandes!", 44 | "Automatic check for missing routers in the coordinator memory.": "Comprobación automática de enrutadores faltantes en la memoria del coordinador.", 45 | "With which log level should a negative search be logged?": "¿Con qué nivel de registro se debe registrar una búsqueda negativa?", 46 | "Time of the automatic check": "Hora del control automático", 47 | "More information": "Más información" 48 | } 49 | -------------------------------------------------------------------------------- /admin/i18n/fr/translations.json: -------------------------------------------------------------------------------- 1 | { 2 | "click for Documentation": "cliquez pour la documentation", 3 | "A detailed documentation with explanations and all further information can be found on this GitHub page:": "Une documentation détaillée avec des explications et toutes les informations complémentaires peut être trouvée sur cette page GitHub :", 4 | "zigbee2mqtt adapter settings": "Paramètres de l'adaptateur pour zigbee2mqtt", 5 | "Select and configure your Zigbee2MQTT connection": "Sélectionnez et configurez la connexion Zigbee2MQTT", 6 | "Select connection to Zigbee2MQTT": "Sélectionnez la connexion à Zigbee2MQTT", 7 | "Websocket": "Websocket", 8 | "External MQTT-Server": "Serveur MQTT externe", 9 | "Internal MQTT-Server": "Serveur MQTT interne", 10 | "Configure your Zigbee2MQTT connection": "Configurez votre connexion Zigbee2MQTT", 11 | "Websocket IP-Address": "Adresse IP Websocket", 12 | "Websocket Port": "Port WebSocket", 13 | "Use Auth-Token": "Utiliser le jeton d'authentification", 14 | "Auth-Token (special characters are not supported)": "Auth-Token (les caractères spéciaux ne sont pas pris en charge)", 15 | "Create a dummy MQTT-Server for Zigbee2MQTT": "Créer un serveur MQTT factice pour Zigbee2MQTT", 16 | "External MQTT-Server IP-Address": "Adresse IP du serveur MQTT externe", 17 | "External MQTT-Server Port": "Port serveur MQTT externe", 18 | "MQTT-Server IP-Address bind": "Liaison d'adresse IP MQTT-Server", 19 | "MQTT-Server Port": "Port du serveur MQTT", 20 | "Configure your Zigbee2MQTT WebUi connection": "Configurer la connexion Zigbee2MQTT WebUi", 21 | "WebUi Address": "Adresse de l'interface Web", 22 | "WebUi Port": "Port WebUI", 23 | "Color configurations": "Configurations de couleur", 24 | "Color temperature sync with color": "Synchronisation de la température de couleur avec la couleur", 25 | "Use Kelvin instead of mired for the color temps": "Utilisez Kelvin au lieu de embourbé pour les températures de couleur", 26 | "Other configurations": "Autres configurations", 27 | "Proxy Zigbee2MQTT logs to ioBroker logs": "Proxy Zigbee2MQTT se connecte aux journaux ioBroker", 28 | "Brightness move should also turn the light on or off": "Le mouvement de luminosité devrait également allumer ou éteindre la lumière", 29 | "Brightness step should also turn the light on or off": "L'étape de luminosité devrait également allumer ou éteindre la lumière", 30 | "The events such as 'Device removed' or 'Disabled' are displayed in the description instead of in the name.": "Les événements tels que 'Appareil supprimé' ou 'Désactivé' sont affichés dans la description plutôt que dans le nom.", 31 | "Scheme": "Schème", 32 | "Use MQTT Credentials": "Utiliser les identifiants MQTT", 33 | "MQTT Username": "Nom d'utilisateur MQTT", 34 | "MQTT Password": "Mot de passe MQTT", 35 | "Download device images from Zigbee2Mqtt and use them as object icons.": "Téléchargez des images d'appareils à partir de Zigbee2Mqtt et utilisez-les comme icônes d'objets.", 36 | "Generate simple 'Hold' and 'Release' states": "Générer des états simples 'Hold' et 'Release'", 37 | "When enabled, the 'Hold' and 'Release' states are combined and the 'Hold' data point remains true until the 'Release' event arrives.": "Lorsqu'il est activé, les états 'Hold' et 'Release' sont combinés et le point de données 'Hold' reste vrai jusqu'à ce que l'événement 'Release' arrive.", 38 | "Generate simple 'Move' and 'Stop' states": "Générer des états simples 'Move' et 'Stop'", 39 | "When enabled, the 'Move' and 'Stop' states are combined and the 'Move' data point remains true until the 'Stop' event arrives.": "Lorsqu'il est activé, les états 'Move' et 'Stop' sont combinés et le point de données 'Move' reste vrai jusqu'à ce que l'événement 'Stop' arrive.", 40 | "State configurations": "Configurations d'état", 41 | "Generate simple 'Press' and 'Release' states": "Générer des états simples « Presser » et « Relâcher »", 42 | "When enabled, the 'Press' and 'Release' states are combined and the 'Press' data point remains true until the 'Release' event arrives.": "Lorsqu'ils sont activés, les états « Press » et « Release » sont combinés et le point de données « Press » reste vrai jusqu'à ce que l'événement « Release » arrive.", 43 | "If the size is later changed to a larger value, the images already downloaded must be deleted.
Please note that icons are stored in the object and should therefore not be unnecessarily large!": "Si la taille est ultérieurement modifiée pour une valeur plus grande, les images déjà téléchargées doivent être supprimées.
Veuillez noter que les icônes sont stockées dans l'objet et ne doivent donc pas être inutilement grandes !", 44 | "Automatic check for missing routers in the coordinator memory.": "Vérification automatique des routeurs manquants dans la mémoire du coordinateur.", 45 | "With which log level should a negative search be logged?": "Avec quel niveau de journalisation une recherche négative doit-elle être enregistrée ?", 46 | "Time of the automatic check": "Heure du contrôle automatique", 47 | "More information": "Plus d'information", 48 | "Allways update available state when message included last_seen status": "Mettre à jour l'état disponible lorsque le message inclut le statut last_seen" 49 | } 50 | -------------------------------------------------------------------------------- /admin/i18n/it/translations.json: -------------------------------------------------------------------------------- 1 | { 2 | "click for Documentation": "clicca per la documentazione", 3 | "A detailed documentation with explanations and all further information can be found on this GitHub page:": "Una documentazione dettagliata con spiegazioni e tutte le ulteriori informazioni può essere trovata su questa pagina GitHub:", 4 | "zigbee2mqtt adapter settings": "Impostazioni dell'adattatore per zigbee2mqtt", 5 | "Select and configure your Zigbee2MQTT connection": "Seleziona e configura la connessione Zigbee2MQTT", 6 | "Select connection to Zigbee2MQTT": "Seleziona la connessione a Zigbee2MQTT", 7 | "Websocket": "Presa web", 8 | "External MQTT-Server": "Server MQTT esterno", 9 | "Internal MQTT-Server": "Server MQTT interno", 10 | "Configure your Zigbee2MQTT connection": "Configura la tua connessione Zigbee2MQTT", 11 | "Websocket IP-Address": "Indirizzo IP WebSocket", 12 | "Websocket Port": "Porta websocket", 13 | "Use Auth-Token": "Usa token di autenticazione", 14 | "Auth-Token (special characters are not supported)": "Auth-Token (i caratteri speciali non sono supportati)", 15 | "Create a dummy MQTT-Server for Zigbee2MQTT": "Crea un server MQTT fittizio per Zigbee2MQTT", 16 | "External MQTT-Server IP-Address": "Indirizzo IP del server MQTT esterno", 17 | "External MQTT-Server Port": "Porta server MQTT esterna", 18 | "MQTT-Server IP-Address bind": "Binding dell'indirizzo IP del server MQTT", 19 | "MQTT-Server Port": "Porta del server MQTT", 20 | "Configure your Zigbee2MQTT WebUi connection": "Configura la connessione Zigbee2MQTT WebUi", 21 | "WebUi Address": "Indirizzo WebUi", 22 | "WebUi Port": "Porta WebUi", 23 | "Color configurations": "Configurazioni di colore", 24 | "Color temperature sync with color": "Sincronizzazione della temperatura del colore con il colore", 25 | "Use Kelvin instead of mired for the color temps": "Usa Kelvin invece di mired per le temperature del colore", 26 | "Other configurations": "Altre configurazioni", 27 | "Proxy Zigbee2MQTT logs to ioBroker logs": "Il proxy Zigbee2MQTT registra nei registri ioBroker", 28 | "Brightness move should also turn the light on or off": "Lo spostamento della luminosità dovrebbe anche accendere o spegnere la luce", 29 | "Brightness step should also turn the light on or off": "Il passo di luminosità dovrebbe anche accendere o spegnere la luce", 30 | "The events such as 'Device removed' or 'Disabled' are displayed in the description instead of in the name.": "Gli eventi come \"Dispositivo rimosso\" o \"Disabilitato\" vengono visualizzati nella descrizione anziché nel nome.", 31 | "Scheme": "schema", 32 | "Use MQTT Credentials": "Usa le credenziali MQTT", 33 | "MQTT Username": "Nome utente MQTT", 34 | "MQTT Password": "Password MQTT", 35 | "Download device images from Zigbee2Mqtt and use them as object icons.": "Scarica le immagini del dispositivo da Zigbee2Mqtt e usale come icone degli oggetti.", 36 | "Generate simple 'Hold' and 'Release' states": "Genera semplici stati \"Hold\" e \"Release\".", 37 | "When enabled, the 'Hold' and 'Release' states are combined and the 'Hold' data point remains true until the 'Release' event arrives.": "Se abilitato, gli stati \"Hold\" e \"Release\" vengono combinati e il punto dati \"Hold\" rimane vero fino all'arrivo dell'evento \"Release\".", 38 | "Generate simple 'Move' and 'Stop' states": "Genera semplici stati 'Move' e 'Stop'", 39 | "When enabled, the 'Move' and 'Stop' states are combined and the 'Move' data point remains true until the 'Stop' event arrives.": "Se abilitato, gli stati 'Move' e 'Stop' vengono combinati e il punto dati 'Move' rimane vero fino all'arrivo dell'evento 'Stop'.", 40 | "State configurations": "Configurazioni di stato", 41 | "Generate simple 'Press' and 'Release' states": "Genera semplici stati \"Stampa\" e \"Rilascio\".", 42 | "When enabled, the 'Press' and 'Release' states are combined and the 'Press' data point remains true until the 'Release' event arrives.": "Se abilitati, gli stati \"Press\" e \"Rilascio\" vengono combinati e il punto dati \"Press\" rimane vero fino all'arrivo dell'evento \"Rilascio\".", 43 | "If the size is later changed to a larger value, the images already downloaded must be deleted.
Please note that icons are stored in the object and should therefore not be unnecessarily large!": "Se la dimensione viene successivamente modificata con un valore maggiore, le immagini già scaricate dovranno essere cancellate.
Tieni presente che le icone sono memorizzate nell'oggetto e quindi non dovrebbero essere inutilmente grandi!", 44 | "Automatic check for missing routers in the coordinator memory.": "Controllo automatico della presenza di router mancanti nella memoria del coordinatore.", 45 | "With which log level should a negative search be logged?": "Con quale livello di registro deve essere registrata una ricerca negativa?", 46 | "Time of the automatic check": "Orario del controllo automatico", 47 | "More information": "Maggiori informazioni", 48 | "Allways update available state when message included last_seen status": "Aggiorna sempre lo stato disponibile quando il messaggio include lo stato last_seen" 49 | } 50 | -------------------------------------------------------------------------------- /admin/i18n/nl/translations.json: -------------------------------------------------------------------------------- 1 | { 2 | "click for Documentation": "klik voor documentatie", 3 | "A detailed documentation with explanations and all further information can be found on this GitHub page:": "Een gedetailleerde documentatie met uitleg en alle verdere informatie is te vinden op deze GitHub-pagina:", 4 | "zigbee2mqtt adapter settings": "Adapterinstellingen voor zigbee2mqtt", 5 | "Select and configure your Zigbee2MQTT connection": "Selecteer en configureer de Zigbee2MQTT-verbinding", 6 | "Select connection to Zigbee2MQTT": "Selecteer verbinding met Zigbee2MQTT", 7 | "Websocket": "Websocket", 8 | "External MQTT-Server": "Externe MQTT-server", 9 | "Internal MQTT-Server": "Interne MQTT-server", 10 | "Configure your Zigbee2MQTT connection": "Configureer je Zigbee2MQTT-verbinding", 11 | "Websocket IP-Address": "Websocket IP-adres", 12 | "Websocket Port": "Websocket-poort", 13 | "Use Auth-Token": "Gebruik Auth-Token", 14 | "Auth-Token (special characters are not supported)": "Auth-Token (speciale tekens worden niet ondersteund)", 15 | "Create a dummy MQTT-Server for Zigbee2MQTT": "Maak een dummy MQTT-server voor Zigbee2MQTT", 16 | "External MQTT-Server IP-Address": "Extern MQTT-server IP-adres", 17 | "External MQTT-Server Port": "Externe MQTT-serverpoort", 18 | "MQTT-Server IP-Address bind": "MQTT-server IP-adres binding", 19 | "MQTT-Server Port": "MQTT-serverpoort", 20 | "Configure your Zigbee2MQTT WebUi connection": "Configureer de Zigbee2MQTT WebUi-verbinding", 21 | "WebUi Address": "WebUi-adres", 22 | "WebUi Port": "WebUi-poort", 23 | "Color configurations": "Kleur configuraties", 24 | "Color temperature sync with color": "Kleurtemperatuursynchronisatie met kleur", 25 | "Use Kelvin instead of mired for the color temps": "Gebruik Kelvin in plaats van mired voor de kleurtemperaturen", 26 | "Other configurations": "Andere configuraties", 27 | "Proxy Zigbee2MQTT logs to ioBroker logs": "Proxy Zigbee2MQTT logt naar ioBroker-logboeken", 28 | "Brightness move should also turn the light on or off": "Helderheidsbeweging zou ook het licht aan of uit moeten zetten", 29 | "Brightness step should also turn the light on or off": "De helderheidsstap moet het licht ook in- of uitschakelen", 30 | "The events such as 'Device removed' or 'Disabled' are displayed in the description instead of in the name.": "De gebeurtenissen zoals 'Apparaat verwijderd' of 'Uitgeschakeld' worden weergegeven in de beschrijving in plaats van in de naam.", 31 | "Scheme": "Schema", 32 | "Use MQTT Credentials": "Gebruik MQTT-referenties", 33 | "MQTT Username": "MQTT-gebruikersnaam", 34 | "MQTT Password": "MQTT-wachtwoord", 35 | "Download device images from Zigbee2Mqtt and use them as object icons.": "Download apparaatafbeeldingen van Zigbee2Mqtt en gebruik ze als objectpictogrammen.", 36 | "Generate simple 'Hold' and 'Release' states": "Genereer eenvoudige 'Hold' en 'Release' statussen", 37 | "When enabled, the 'Hold' and 'Release' states are combined and the 'Hold' data point remains true until the 'Release' event arrives.": "Indien ingeschakeld, worden de toestanden 'Hold' en 'Release' gecombineerd en blijft het datapunt 'Hold' waar totdat de 'Release'-gebeurtenis arriveert.", 38 | "Generate simple 'Move' and 'Stop' states": "Genereer eenvoudige 'Move' en 'Stop' toestanden", 39 | "When enabled, the 'Move' and 'Stop' states are combined and the 'Move' data point remains true until the 'Stop' event arrives.": "Indien ingeschakeld, worden de toestanden 'Verplaatsen' en 'Stop' gecombineerd en blijft het gegevenspunt 'Verplaatsen' waar totdat de gebeurtenis 'Stop' arriveert.", 40 | "State configurations": "Staat configuraties", 41 | "Generate simple 'Press' and 'Release' states": "Genereer eenvoudige 'Druk'- en 'loslaat'-statussen", 42 | "When enabled, the 'Press' and 'Release' states are combined and the 'Press' data point remains true until the 'Release' event arrives.": "Indien ingeschakeld, worden de statussen 'Press' en 'Release' gecombineerd en blijft het datapunt 'Press' waar totdat de gebeurtenis 'Release' arriveert.", 43 | "If the size is later changed to a larger value, the images already downloaded must be deleted.
Please note that icons are stored in the object and should therefore not be unnecessarily large!": "Als de grootte later wordt gewijzigd naar een grotere waarde, moeten de reeds gedownloade afbeeldingen worden verwijderd.
Let op: iconen worden in het object opgeslagen en mogen dus niet onnodig groot zijn!", 44 | "Automatic check for missing routers in the coordinator memory.": "Automatische controle op ontbrekende routers in het coördinatorgeheugen.", 45 | "With which log level should a negative search be logged?": "Met welk logniveau moet een negatieve zoekopdracht worden geregistreerd?", 46 | "Time of the automatic check": "Tijdstip van de automatische controle", 47 | "More information": "Meer informatie", 48 | "Allways update available state when message included last_seen status": "Altijd de beschikbare status bijwerken wanneer het bericht de last_seen-status bevat" 49 | } 50 | -------------------------------------------------------------------------------- /admin/i18n/pl/translations.json: -------------------------------------------------------------------------------- 1 | { 2 | "click for Documentation": "kliknij, aby uzyskać dokumentację", 3 | "A detailed documentation with explanations and all further information can be found on this GitHub page:": "Szczegółowa dokumentacja z wyjaśnieniami i wszystkimi dalszymi informacjami można znaleźć na tej stronie GitHub:", 4 | "zigbee2mqtt adapter settings": "Ustawienia adaptera dla zigbee2mqtt", 5 | "Select and configure your Zigbee2MQTT connection": "Wybierz i skonfiguruj połączenie Zigbee2MQTT", 6 | "Select connection to Zigbee2MQTT": "Wybierz połączenie z Zigbee2MQTT", 7 | "Websocket": "Gniazdo sieciowe", 8 | "External MQTT-Server": "Zewnętrzny serwer MQTT", 9 | "Internal MQTT-Server": "Wewnętrzny serwer MQTT", 10 | "Configure your Zigbee2MQTT connection": "Skonfiguruj połączenie Zigbee2MQTT", 11 | "Websocket IP-Address": "Adres IP gniazda internetowego", 12 | "Websocket Port": "Gniazdo sieciowe", 13 | "Use Auth-Token": "Użyj tokena uwierzytelniającego", 14 | "Auth-Token (special characters are not supported)": "Auth-Token (znaki specjalne nie są obsługiwane)", 15 | "Create a dummy MQTT-Server for Zigbee2MQTT": "Utwórz fikcyjny serwer MQTT dla Zigbee2MQTT", 16 | "External MQTT-Server IP-Address": "Adres IP zewnętrznego serwera MQTT", 17 | "External MQTT-Server Port": "Zewnętrzny port serwera MQTT", 18 | "MQTT-Server IP-Address bind": "Powiązanie adresu IP serwera MQTT", 19 | "MQTT-Server Port": "Port serwera MQTT", 20 | "Configure your Zigbee2MQTT WebUi connection": "Skonfiguruj połączenie Zigbee2MQTT WebUi", 21 | "WebUi Address": "Adres WebUI", 22 | "WebUi Port": "Port WebUI", 23 | "Color configurations": "Konfiguracje kolorów", 24 | "Color temperature sync with color": "Synchronizacja temperatury barwowej z kolorem", 25 | "Use Kelvin instead of mired for the color temps": "Użyj Kelvina zamiast pogrążonego dla temp. kolorów", 26 | "Other configurations": "Inne konfiguracje", 27 | "Proxy Zigbee2MQTT logs to ioBroker logs": "Proxy Zigbee2MQTT loguje się do logów ioBroker", 28 | "Brightness move should also turn the light on or off": "Ruch jasności powinien również włączać lub wyłączać światło", 29 | "Brightness step should also turn the light on or off": "Krok jasności powinien również włączać lub wyłączać światło", 30 | "The events such as 'Device removed' or 'Disabled' are displayed in the description instead of in the name.": "Zdarzenia takie jak „Urządzenie usunięte” lub „Wyłączone” są wyświetlane w opisie zamiast w nazwie.", 31 | "Scheme": "Schemat", 32 | "Use MQTT Credentials": "Użyj poświadczeń MQTT", 33 | "MQTT Username": "Nazwa użytkownika MQTT", 34 | "MQTT Password": "Hasło MQTT", 35 | "Download device images from Zigbee2Mqtt and use them as object icons.": "Pobierz obrazy urządzeń z Zigbee2Mqtt i użyj ich jako ikon obiektów.", 36 | "Generate simple 'Hold' and 'Release' states": "Generuj proste stany „Wstrzymaj” i „Zwolnij”.", 37 | "When enabled, the 'Hold' and 'Release' states are combined and the 'Hold' data point remains true until the 'Release' event arrives.": "Po włączeniu stany „Wstrzymaj” i „Zwolnij” są łączone, a punkt danych „Wstrzymaj” pozostaje prawdziwy do momentu nadejścia zdarzenia „Zwolnij”.", 38 | "Generate simple 'Move' and 'Stop' states": "Generuj proste stany „Przenieś” i „Zatrzymaj”.", 39 | "When enabled, the 'Move' and 'Stop' states are combined and the 'Move' data point remains true until the 'Stop' event arrives.": "Po włączeniu stany „Przenieś” i „Zatrzymaj” są łączone, a punkt danych „Przenieś” pozostaje prawdziwy do momentu nadejścia zdarzenia „Zatrzymaj”.", 40 | "State configurations": "Konfiguracje stanów", 41 | "Generate simple 'Press' and 'Release' states": "Generuj proste stany „Naciśnij” i „Zwolnij”.", 42 | "When enabled, the 'Press' and 'Release' states are combined and the 'Press' data point remains true until the 'Release' event arrives.": "Po włączeniu stany „Naciśnij” i „Zwolnij” są łączone, a punkt danych „Naciśnij” pozostaje prawdziwy do momentu pojawienia się zdarzenia „Zwolnij”.", 43 | "If the size is later changed to a larger value, the images already downloaded must be deleted.
Please note that icons are stored in the object and should therefore not be unnecessarily large!": "Jeśli rozmiar zostanie później zmieniony na większy, już pobrane obrazy muszą zostać usunięte.
Należy pamiętać, że ikony są przechowywane w obiekcie i dlatego nie powinny być niepotrzebnie duże!", 44 | "Automatic check for missing routers in the coordinator memory.": "Automatyczne sprawdzanie brakujących routerów w pamięci koordynatora.", 45 | "With which log level should a negative search be logged?": "Na jakim poziomie rejestrowania należy rejestrować wyszukiwanie wykluczające?", 46 | "Time of the automatic check": "Czas automatycznego sprawdzenia", 47 | "More information": "Więcej informacji", 48 | "Allways update available state when message included last_seen status": "Zawsze aktualizuj available stan, gdy wiadomość zawiera status last_seen" 49 | } 50 | -------------------------------------------------------------------------------- /admin/i18n/pt/translations.json: -------------------------------------------------------------------------------- 1 | { 2 | "click for Documentation": "clique para ver a documentação", 3 | "A detailed documentation with explanations and all further information can be found on this GitHub page:": "Uma documentação detalhada com explicações e toda a informação adicional pode ser encontrada nesta pagina do GitHub:", 4 | "zigbee2mqtt adapter settings": "Configurações do adaptador para zigbee2mqtt", 5 | "Select and configure your Zigbee2MQTT connection": "Selecione e configure a conexão Zigbee2MQTT", 6 | "Select connection to Zigbee2MQTT": "Selecione a conexão com Zigbee2MQTT", 7 | "Websocket": "Websocket", 8 | "External MQTT-Server": "Servidor MQTT Externo", 9 | "Internal MQTT-Server": "Servidor MQTT Interno", 10 | "Configure your Zigbee2MQTT connection": "Configure sua conexão Zigbee2MQTT", 11 | "Websocket IP-Address": "Endereço IP do Websocket", 12 | "Websocket Port": "Porta Websocket", 13 | "Use Auth-Token": "Usar token de autenticação", 14 | "Auth-Token (special characters are not supported)": "Auth-Token (caracteres especiais não são suportados)", 15 | "Create a dummy MQTT-Server for Zigbee2MQTT": "Crie um servidor MQTT fictício para Zigbee2MQTT", 16 | "External MQTT-Server IP-Address": "Endereço IP do servidor MQTT externo", 17 | "External MQTT-Server Port": "Porta externa do servidor MQTT", 18 | "MQTT-Server IP-Address bind": "Vinculação de endereço IP do servidor MQTT", 19 | "MQTT-Server Port": "Porta do Servidor MQTT", 20 | "Configure your Zigbee2MQTT WebUi connection": "Configurar conexão Zigbee2MQTT WebUi", 21 | "WebUi Address": "Endereço WebUI", 22 | "WebUi Port": "Porta WebUI", 23 | "Color configurations": "Configurações de cores", 24 | "Color temperature sync with color": "Sincronização de temperatura de cor com cores", 25 | "Use Kelvin instead of mired for the color temps": "Use Kelvin em vez de mired para as temperaturas de cor", 26 | "Other configurations": "Outras configurações", 27 | "Proxy Zigbee2MQTT logs to ioBroker logs": "Logs proxy Zigbee2MQTT para logs ioBroker", 28 | "Brightness move should also turn the light on or off": "O movimento de brilho também deve ligar ou desligar a luz", 29 | "Brightness step should also turn the light on or off": "A etapa de brilho também deve ligar ou desligar a luz", 30 | "The events such as 'Device removed' or 'Disabled' are displayed in the description instead of in the name.": "Os eventos como 'Dispositivo removido' ou 'Desativado' são exibidos na descrição em vez de no nome.", 31 | "Scheme": "Esquema", 32 | "Use MQTT Credentials": "Usar credenciais MQTT", 33 | "MQTT Username": "Nome de usuário MQTT", 34 | "MQTT Password": "Senha do MQTT", 35 | "Download device images from Zigbee2Mqtt and use them as object icons.": "Baixe imagens de dispositivos do Zigbee2Mqtt e use-as como ícones de objetos.", 36 | "Generate simple 'Hold' and 'Release' states": "Gerar estados simples 'Hold' e 'Release'", 37 | "When enabled, the 'Hold' and 'Release' states are combined and the 'Hold' data point remains true until the 'Release' event arrives.": "Quando ativado, os estados 'Hold' e 'Release' são combinados e o ponto de dados 'Hold' permanece verdadeiro até que o evento 'Release' chegue.", 38 | "Generate simple 'Move' and 'Stop' states": "Gerar estados simples 'Mover' e 'Parar'", 39 | "When enabled, the 'Move' and 'Stop' states are combined and the 'Move' data point remains true until the 'Stop' event arrives.": "Quando ativado, os estados 'Mover' e 'Parar' são combinados e o ponto de dados 'Mover' permanece verdadeiro até que o evento 'Parar' chegue.", 40 | "State configurations": "configurações de estado", 41 | "Generate simple 'Press' and 'Release' states": "Gere estados simples de 'Pressionar' e 'Liberar'", 42 | "When enabled, the 'Press' and 'Release' states are combined and the 'Press' data point remains true until the 'Release' event arrives.": "Quando ativado, os estados 'Press' e 'Release' são combinados e o ponto de dados 'Press' permanece verdadeiro até que o evento 'Release' chegue.", 43 | "If the size is later changed to a larger value, the images already downloaded must be deleted.
Please note that icons are stored in the object and should therefore not be unnecessarily large!": "Se o tamanho for alterado posteriormente para um valor maior, as imagens já baixadas deverão ser excluídas.
Observe que os ícones são armazenados no objeto e, portanto, não devem ser desnecessariamente grandes!", 44 | "Automatic check for missing routers in the coordinator memory.": "Verificação automática de roteadores ausentes na memória do coordenador.", 45 | "With which log level should a negative search be logged?": "Com qual nível de log uma pesquisa negativa deve ser registrada?", 46 | "Time of the automatic check": "Hora da verificação automática", 47 | "More information": "Mais Informações", 48 | "Allways update available state when message included last_seen status": "Sempre atualize o estado disponível quando a mensagem incluir o status last_seen" 49 | } 50 | -------------------------------------------------------------------------------- /admin/i18n/ru/translations.json: -------------------------------------------------------------------------------- 1 | { 2 | "click for Documentation": "нажмите для документации", 3 | "A detailed documentation with explanations and all further information can be found on this GitHub page:": "Подробная документация с объяснениями и всеми дальними информаций можно найти на этом GitHub-странице:", 4 | "zigbee2mqtt adapter settings": "Настройки адаптера для zigbee2mqtt", 5 | "Select and configure your Zigbee2MQTT connection": "Выберите и настройте соединение Zigbee2MQTT", 6 | "Select connection to Zigbee2MQTT": "Выберите подключение к Zigbee2MQTT", 7 | "Websocket": "Веб-сокет", 8 | "External MQTT-Server": "Внешний MQTT-сервер", 9 | "Internal MQTT-Server": "Внутренний MQTT-сервер", 10 | "Configure your Zigbee2MQTT connection": "Настройте соединение Zigbee2MQTT", 11 | "Websocket IP-Address": "IP-адрес веб-сокета", 12 | "Websocket Port": "Порт веб-сокета", 13 | "Use Auth-Token": "Использовать авторизационный токен", 14 | "Auth-Token (special characters are not supported)": "Auth-Token (специальные символы не поддерживаются)", 15 | "Create a dummy MQTT-Server for Zigbee2MQTT": "Создайте фиктивный MQTT-сервер для Zigbee2MQTT", 16 | "External MQTT-Server IP-Address": "IP-адрес внешнего MQTT-сервера", 17 | "External MQTT-Server Port": "Порт внешнего MQTT-сервера", 18 | "MQTT-Server IP-Address bind": "Привязка IP-адреса MQTT-сервера", 19 | "MQTT-Server Port": "Порт MQTT-сервера", 20 | "Configure your Zigbee2MQTT WebUi connection": "Настроить соединение Zigbee2MQTT WebUi", 21 | "WebUi Address": "Адрес веб-интерфейса", 22 | "WebUi Port": "Порт веб-интерфейса", 23 | "Color configurations": "Цветовые конфигурации", 24 | "Color temperature sync with color": "Синхронизация цветовой температуры с цветом", 25 | "Use Kelvin instead of mired for the color temps": "Используйте шкалу Кельвина вместо майреда для цветовой температуры.", 26 | "Other configurations": "Другие конфигурации", 27 | "Proxy Zigbee2MQTT logs to ioBroker logs": "Проксировать журналы Zigbee2MQTT в журналы ioBroker", 28 | "Brightness move should also turn the light on or off": "Изменение яркости также должно включать или выключать свет.", 29 | "Brightness step should also turn the light on or off": "Шаг яркости также должен включать или выключать свет.", 30 | "The events such as 'Device removed' or 'Disabled' are displayed in the description instead of in the name.": "Такие события, как «Устройство удалено» или «Отключено», отображаются в описании, а не в названии.", 31 | "Scheme": "Схема", 32 | "Use MQTT Credentials": "Используйте учетные данные MQTT", 33 | "MQTT Username": "Имя пользователя MQTT", 34 | "MQTT Password": "MQTT-пароль", 35 | "Download device images from Zigbee2Mqtt and use them as object icons.": "Загрузите изображения устройств с Zigbee2Mqtt и используйте их в качестве значков объектов.", 36 | "Generate simple 'Hold' and 'Release' states": "Создавайте простые состояния «Hold» и «Release»", 37 | "When enabled, the 'Hold' and 'Release' states are combined and the 'Hold' data point remains true until the 'Release' event arrives.": "Когда эта функция включена, состояния «Hold» и «Release» объединяются, а точка данных «Hold» остается истинной до тех пор, пока не наступит событие «Release».", 38 | "Generate simple 'Move' and 'Stop' states": "Создавайте простые состояния «Переместить» и «Стоп»", 39 | "When enabled, the 'Move' and 'Stop' states are combined and the 'Move' data point remains true until the 'Stop' event arrives.": "Когда эта функция включена, состояния «Перемещение» и «Стоп» объединяются, и точка данных «Перемещение» остается истинной до тех пор, пока не наступит событие «Стоп».", 40 | "State configurations": "Конфигурации состояния", 41 | "Generate simple 'Press' and 'Release' states": "Создавайте простые состояния «Нажмите» и «Отпустите».", 42 | "When enabled, the 'Press' and 'Release' states are combined and the 'Press' data point remains true until the 'Release' event arrives.": "Если этот параметр включен, состояния «Нажатие» и «Отпуск» объединяются, и точка данных «Нажатие» остается истинной до тех пор, пока не произойдет событие «Отпуск».", 43 | "If the size is later changed to a larger value, the images already downloaded must be deleted.
Please note that icons are stored in the object and should therefore not be unnecessarily large!": "Если размер позже будет изменен на большее значение, уже загруженные изображения необходимо удалить.
Обратите внимание, что значки хранятся в объекте и поэтому не должны быть излишне большими!", 44 | "Automatic check for missing routers in the coordinator memory.": "Автоматическая проверка отсутствия роутеров в памяти координатора.", 45 | "With which log level should a negative search be logged?": "На каком уровне журнала следует регистрировать отрицательный поиск?", 46 | "Time of the automatic check": "Время автоматической проверки", 47 | "More information": "Больше информации", 48 | "Allways update available state when message included last_seen status": "Всегда обновляйте доступное состояние, когда сообщение включает статус last_seen" 49 | } 50 | -------------------------------------------------------------------------------- /admin/i18n/uk/translations.json: -------------------------------------------------------------------------------- 1 | { 2 | "click for Documentation": "натисніть для документації", 3 | "A detailed documentation with explanations and all further information can be found on this GitHub page:": "Детальна документація з поясненнями і всім більшою інформацією можна знайти на цій GitHub-сторінці:", 4 | "zigbee2mqtt adapter settings": "Налаштування адаптера для zigbee2mqtt", 5 | "Select and configure your Zigbee2MQTT connection": "Виберіть і налаштуйте підключення Zigbee2MQTT", 6 | "Select connection to Zigbee2MQTT": "Виберіть підключення до Zigbee2MQTT", 7 | "Websocket": "Websocket", 8 | "External MQTT-Server": "Зовнішній MQTT-сервер", 9 | "Internal MQTT-Server": "Внутрішній MQTT-сервер", 10 | "Configure your Zigbee2MQTT connection": "Налаштуйте підключення Zigbee2MQTT", 11 | "Websocket IP-Address": "IP-адреса Websocket", 12 | "Websocket Port": "Порт Websocket", 13 | "Use Auth-Token": "Використовуйте Auth-Token", 14 | "Auth-Token (special characters are not supported)": "Auth-Token (спеціальні символи не підтримуються)", 15 | "Create a dummy MQTT-Server for Zigbee2MQTT": "Створіть фіктивний MQTT-сервер для Zigbee2MQTT", 16 | "External MQTT-Server IP-Address": "IP-адреса зовнішнього MQTT-сервера", 17 | "External MQTT-Server Port": "Зовнішній порт MQTT-сервера", 18 | "MQTT-Server IP-Address bind": "Прив’язка IP-адреси MQTT-сервера", 19 | "MQTT-Server Port": "Порт MQTT-сервера", 20 | "Configure your Zigbee2MQTT WebUi connection": "Налаштуйте підключення Zigbee2MQTT WebUi", 21 | "WebUi Address": "Адреса WebUI", 22 | "WebUi Port": "Порт WebUi", 23 | "Color configurations": "Кольорові конфігурації", 24 | "Color temperature sync with color": "Синхронізація колірної температури з кольором", 25 | "Use Kelvin instead of mired for the color temps": "Використовуйте для колірних температур замість Кельвіна", 26 | "Other configurations": "Інші конфігурації", 27 | "Proxy Zigbee2MQTT logs to ioBroker logs": "Журнали проксі Zigbee2MQTT до журналів ioBroker", 28 | "Brightness move should also turn the light on or off": "Переміщення яскравості також повинно вмикати або вимикати світло", 29 | "Brightness step should also turn the light on or off": "Крок яскравості також повинен вмикати або вимикати світло", 30 | "The events such as 'Device removed' or 'Disabled' are displayed in the description instead of in the name.": "Такі події, як «Пристрій видалено» або «Вимкнено», відображаються в описі, а не в назві.", 31 | "Scheme": "Схема", 32 | "Use MQTT Credentials": "Використовуйте облікові дані MQTT", 33 | "MQTT Username": "Ім'я користувача MQTT", 34 | "MQTT Password": "Пароль MQTT", 35 | "Download device images from Zigbee2Mqtt and use them as object icons.": "Завантажуйте зображення пристроїв із Zigbee2Mqtt і використовуйте їх як значки об’єктів.", 36 | "Generate simple 'Hold' and 'Release' states": "Створюйте прості стани «Утримувати» та «Відпускати».", 37 | "When enabled, the 'Hold' and 'Release' states are combined and the 'Hold' data point remains true until the 'Release' event arrives.": "Якщо ввімкнено, стани «Утримувати» та «Вивільнити» об’єднуються, а точка даних «Утримувати» залишається істинною, доки не надійде подія «Вивільнення».", 38 | "Generate simple 'Move' and 'Stop' states": "Створення простих станів «Переміщення» та «Зупинка».", 39 | "When enabled, the 'Move' and 'Stop' states are combined and the 'Move' data point remains true until the 'Stop' event arrives.": "Якщо ввімкнено, стани «Переміщення» та «Зупинити» поєднуються, а точка даних «Переміщення» залишається істинною, доки не надійде подія «Зупинити».", 40 | "State configurations": "Конфігурації стану", 41 | "Generate simple 'Press' and 'Release' states": "Створення простих станів «Натиснути» та «Випустити».", 42 | "When enabled, the 'Press' and 'Release' states are combined and the 'Press' data point remains true until the 'Release' event arrives.": "Якщо ввімкнено, стани «Натиснути» та «Випустити» поєднуються, а точка даних «Натиснути» залишається істинною, доки не надійде подія «Випуск».", 43 | "If the size is later changed to a larger value, the images already downloaded must be deleted.
Please note that icons are stored in the object and should therefore not be unnecessarily large!": "Якщо пізніше розмір буде змінено на більше, уже завантажені зображення необхідно видалити.
Зверніть увагу, що піктограми зберігаються в об'єкті, тому вони не повинні бути надмірно великими!", 44 | "Automatic check for missing routers in the coordinator memory.": "Автоматична перевірка відсутності роутерів в пам'яті координатора.", 45 | "With which log level should a negative search be logged?": "На якому рівні журналу слід реєструвати негативний пошук?", 46 | "Time of the automatic check": "Час автоматичної перевірки", 47 | "More information": "Більше інформації", 48 | "Allways update available state when message included last_seen status": "Завжди оновлюйте доступний стан, коли повідомлення містить статус last_seen" 49 | } 50 | -------------------------------------------------------------------------------- /admin/i18n/zh-cn/translations.json: -------------------------------------------------------------------------------- 1 | { 2 | "click for Documentation": "点击查看文档", 3 | "A detailed documentation with explanations and all further information can be found on this GitHub page:": "有关更多信息,请参见 GitHub 页面上的详细说明和解释:", 4 | "zigbee2mqtt adapter settings": "zigbee2mqtt 的适配器设置", 5 | "Select and configure your Zigbee2MQTT connection": "选择并配置 Zigbee2MQTT 连接", 6 | "Select connection to Zigbee2MQTT": "选择与 Zigbee2MQTT 的连接", 7 | "Websocket": "网络套接字", 8 | "External MQTT-Server": "外部 MQTT 服务器", 9 | "Internal MQTT-Server": "内部 MQTT 服务器", 10 | "Configure your Zigbee2MQTT connection": "配置您的 Zigbee2MQTT 连接", 11 | "Websocket IP-Address": "Websocket IP 地址", 12 | "Websocket Port": "Websocket 端口", 13 | "Use Auth-Token": "使用授权令牌", 14 | "Auth-Token (special characters are not supported)": "Auth-Token(不支持特殊字符)", 15 | "Create a dummy MQTT-Server for Zigbee2MQTT": "为 Zigbee2MQTT 创建虚拟 MQTT 服务器", 16 | "External MQTT-Server IP-Address": "外部 MQTT 服务器 IP 地址", 17 | "External MQTT-Server Port": "外部 MQTT 服务器端口", 18 | "MQTT-Server IP-Address bind": "MQTT-服务器IP地址绑定", 19 | "MQTT-Server Port": "MQTT-服务器端口", 20 | "Configure your Zigbee2MQTT WebUi connection": "配置 Zigbee2MQTT WebUi 连接", 21 | "WebUi Address": "WebUi地址", 22 | "WebUi Port": "WebUi端口", 23 | "Color configurations": "颜色配置", 24 | "Color temperature sync with color": "色温与颜色同步", 25 | "Use Kelvin instead of mired for the color temps": "使用 Kelvin 而不是 mired 的色温", 26 | "Other configurations": "其他配置", 27 | "Proxy Zigbee2MQTT logs to ioBroker logs": "代理 Zigbee2MQTT 日志到 ioBroker 日志", 28 | "Brightness move should also turn the light on or off": "亮度移动也应该打开或关闭灯", 29 | "Brightness step should also turn the light on or off": "亮度步骤也应该打开或关闭灯", 30 | "The events such as 'Device removed' or 'Disabled' are displayed in the description instead of in the name.": "“设备已移除”或“已禁用”等事件显示在描述中而不是名称中。", 31 | "Scheme": "方案", 32 | "Use MQTT Credentials": "使用 MQTT 凭证", 33 | "MQTT Username": "MQTT 用户名", 34 | "MQTT Password": "MQTT 密码", 35 | "Download device images from Zigbee2Mqtt and use them as object icons.": "从 Zigbee2Mqtt 下载设备图像并将其用作对象图标。", 36 | "Generate simple 'Hold' and 'Release' states": "生成简单的“保持”和“释放”状态", 37 | "When enabled, the 'Hold' and 'Release' states are combined and the 'Hold' data point remains true until the 'Release' event arrives.": "启用后,“保持”和“释放”状态会结合在一起,并且“保持”数据点保持为真,直到“释放”事件到达。", 38 | "Generate simple 'Move' and 'Stop' states": "生成简单的“移动”和“停止”状态", 39 | "When enabled, the 'Move' and 'Stop' states are combined and the 'Move' data point remains true until the 'Stop' event arrives.": "启用后,“移动”和“停止”状态将组合在一起,并且“移动”数据点保持为真,直到“停止”事件到达。", 40 | "State configurations": "状态配置", 41 | "Generate simple 'Press' and 'Release' states": "生成简单的“按下”和“释放”状态", 42 | "When enabled, the 'Press' and 'Release' states are combined and the 'Press' data point remains true until the 'Release' event arrives.": "启用后,“按下”和“释放”状态将组合在一起,并且“按下”数据点保持为真,直到“释放”事件到达。", 43 | "If the size is later changed to a larger value, the images already downloaded must be deleted.
Please note that icons are stored in the object and should therefore not be unnecessarily large!": "如果稍后将大小更改为更大的值,则必须删除已下载的图像。
请注意,图标存储在对象中,因此不应过大!", 44 | "Automatic check for missing routers in the coordinator memory.": "自动检查协调器内存中丢失的路由器。", 45 | "With which log level should a negative search be logged?": "应该使用哪个日志级别来记录负面搜索?", 46 | "Time of the automatic check": "自动检查时间", 47 | "More information": "更多信息", 48 | "Allways update available state when message included last_seen status": "当消息包含 last_seen 状态时,总是更新可用状态", 49 | } 50 | -------------------------------------------------------------------------------- /admin/zigbee2mqtt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arteck/ioBroker.zigbee2mqtt/3bbe04a5a2ce18e117866cfd088b121d295f8f33/admin/zigbee2mqtt.png -------------------------------------------------------------------------------- /docs/DE/DE_AdapterConfig.md: -------------------------------------------------------------------------------- 1 | ### Konfiguration des Adapters 2 | | Option | Wert/Beschreibung | 3 | |--|--| 4 | |**Wählen und konfiguriere die Zigbee2MQTT Verbindung**| 5 | |Zigbee2MQTT Verbindung auswählen |Empfohlene Einstellung "Websocket" | 6 | |Scheme|Auswahl zwischen Websocket (WS) via HTTP oder HTTPS (WS SSL)| 7 | |Websocket IP-Adresse |IP oder DNS Name des Zigbee2MQTT Servers (in unserem Falle die IP des Docker Host)| 8 | | Websocket Port | 8080 Ist der Standard Port, wenn dieser in der Config von Zigbee2MQTT geändert wird, muss der hier auch geändert werden | 9 | | Auth-Token Verwenden|Aktivieren, um einen Auth-Token/Passwort zur Konfigurationsseite zu hinterlegen. !!! ACHTUNG!!! Sonderzeichen werden nicht unterstützt. Weitere Infos bei [Zigbee2MQTT](https://www.zigbee2mqtt.io/guide/configuration/frontend.html#advanced-configuration)| 10 | |Dummy MQTT-Server für Zigbee2MQTT erstellen | Da wir ja für Zigbee2MQTT einen MQTT Server brauchen können wir diesen Harken setzten dann haben wir die Möglichkeit einen solchen hier im Adapter zu erstellen. 11 | |MQTT-Server IP-Adresse binden/MQTT-Server-Port | diese Einstellungen tauchen nur auf, wenn wir den Harken für den Dummy MQTT Server gesetzt haben. Sollte auf dem ioBroker kein weiter MQTT Server vorhanden sein, können wir die Standardeinstellungen so belassen, andernfalls muss mindestens der Port geändert werden. Diese Einstellungen sollten dann auch in der Config von Zigbee2MQTT hinterlegt werden.| 12 | |Konfiguration der Zigbee2MQTT Web UI Verbindung Konfiguration|Hier kann die Verbindung konfiguriert werden, wie die Zigbee2MQTT Web UI in den ioBroker eingebunden werden soll. Wichtig ist: Wird der ioBroker via HTTPS aufgerufen, muss auch hier eine Verbindung via HTTPS aufgebaut werden. Ansonsten kommt es zu dem Fehler: (https://github.com/arteck/ioBroker.zigbee2mqtt/issues/12) 13 | |**Konfiguration der Zigbee2MQTT WebUi Verbindung**| 14 | | Farbtemperatur mit Farbe synchronisieren | Diese Einstellung sorgt dafür, dass z. B. in einer VIS wie Lovelace sich die Farbe der Lampe zur eingestellten Farbe ändert. 15 | |Verwende Kelvin Werte anstelle von Mired | Einstellung der Einheit für Farbtemperaturen für z.B. Lampen 16 | |**State Konfigurationen**| 17 | | Generiert einfache „Hold“ und „Release“ States|Bei Aktivierung werden die Datenpunkte „Hold“ und „Release“ kombiniert und der Datenpunkt „Hold“ bleibt true, bis das Ereignis „Release“ eintrifft.| 18 | | Generiert einfache „Move“ und „Stop“ States|Bei Aktivierung werden die Datenpunkte „Move“ und „Stop“ kombiniert und der Datenpunkt „Move“ bleibt true, bis das Ereignis „Stop“ eintrifft.| 19 | | Generieren einfache „Press“ und „Release“ States|Wenn diese Option aktiviert ist, werden die Zustände „Press“ und „Release“ kombiniert und der Datenpunkt „Press“ bleibt true, bis das Ereignis „Release“ eintrifft.| 20 | | Brightness move soll auch das Licht ein- oder ausschalten| Bei Aktivierung wird, wenn die Helligkeit via Brightness move bei 0 angekommen ist, die Lampe ausgeschaltet. Und wenn die Lampe aus ist, wird diese auch wieder eingeschaltet. 21 | | Brightness step soll auch das Licht ein- oder ausschalten | Bei Aktivierung wird, wenn die Helligkeit via Brightness step bei 0 angekommen ist, wird die Lampe ausgeschaltet. Und wenn die Lampe aus ist wird diese auch wieder eingeschaltet. 22 | |**Device image configurations**| 23 | |Device Bilder von Zigbee2Mqtt herunterladen und als Objektsymbole verwenden.|Mit dieser Einstellung wird das Vorschaubild von zigbee2MQTT heruntergeladen, komprimiert und anschließend im zugehörigen Objekt hinterlegt. ACHTUNG der erste Start nach setzten dieser Einstellung dauert je nach Anzahl an Geräten länger | 24 | |Size of the object icons in pixels|Größen der Bilder, 28 ist hier der Standard. Größer sollte man diese nur auf eigene Gefahr machen. | 25 | |**Andere Konfigurationen**| 26 | | Automatische Prüfung auf fehlende Router im Speicher des Koordinators. |Diese Option überprüft alle Geräte, die theoretisch Router des Zigbee-Netzwerkes sein könnten und listet alle auf, die es nicht sind. Weitere Informationen findet man unter https://www.zigbee2mqtt.io/guide/usage/mqtt_topics_and_messages.html#zigbee2mqtt-bridge-request-coordinator-check | 27 | | Proxy Zigbee2MQTT Protokolle zu ioBroker Protokolle | Übernimmt die Protokolle aus Zigbee2MQTT in das ioBroker Log| 28 | 29 | 30 | ![Zigbee2MQTT Basis Konfiguration](../img/baseConfig.png) 31 | ![Zigbee2MQTT Erweiterte Konfiguration](../img/extendedConfig.png) 32 | -------------------------------------------------------------------------------- /docs/DE/DE_Instruction_Proxmox_Container.md: -------------------------------------------------------------------------------- 1 | Eine Anleitung/ein Erfahrungsbericht vom User [Acgua](https://github.com/Acgua): 2 | 3 | Ich bin umgestiegen vom Zigbee-Adapter, mit 30+ Geräten, ConBee II Stick. 4 | Meine Vorgehensweise für Proxmox-Container in etwa: 5 | 6 | ### Proxmox-Container vorbereiten: 7 | 8 | - Debian 11 Container erstellt: 512 MB RAM, 512 MB Swap, 4 GB HD-Speicher, 1 Kern 9 | - `apt update -y && apt upgrade -y`, `apt install -y sudo usbutils curl git` (und ggf. paar mehr benötigte Pakete) 10 | - `adduser z2m`, `adduser z2m sudo`, `su z2m` (ab jetzt nur noch User `z2m` nehmen, nicht mehr root) 11 | - USB-Stick (ConBee II) durchreichen gemäß [ioBroker-Doku](https://github.com/ioBroker/ioBroker.docs/blob/master/docs/de/install/proxmox.md#proxmox---lxc-linux-containers---usb-ger%C3%A4te-durchreichen) 12 | 13 | ### Mosquitto in Container installieren: 14 | 15 | (angelehnt an [diese Anleitung](https://randomnerdtutorials.com/how-to-install-mosquitto-broker-on-raspberry-pi/)) 16 | 17 | - `sudo apt install -y mosquitto mosquitto-clients` 18 | - Auto-Start einrichten: `sudo systemctl enable mosquitto.service` 19 | - Enable Remote Access (No Authentication): `sudo nano /etc/mosquitto/mosquitto.conf` und die Zeilen `listener 1883` und `allow_anonymous true` am Ende der Datei eintragen. (Notiz an mich selbst: auf auth umstellen!) 20 | - Mosquitto neu starten: `sudo systemctl restart mosquitto` 21 | - Status prüfen: `systemctl status mosquitto` 22 | - `sudo reboot`, dann mit `systemctl status mosquitto` prüfen, ob Mosquitto automatisch startet. 23 | 24 | ### Zigbee2MQTT in Container installieren: 25 | 26 | - Vorgehensweise in etwa gemäß der [offiziellen Anleitung für Linux](https://www.zigbee2mqtt.io/guide/installation/01_linux.html). **Wichtig:** gemäß Anleitung wird NodeJS 16 installiert (`...setup_16.x`), ich habe das auf 18 geändert (wird offiziell supportet) 27 | - Konfiguration in `/opt/zigbee2mqtt/data/configuration.yaml` nach Anleitung gemacht, dabei als MQTT Server `server: 'mqtt://localhost'` eingetragen 28 | - Eingerichtet, dass Zigbee2MQTT automatisch beim Booten startet [gemäß Doku](https://www.zigbee2mqtt.io/guide/installation/01_linux.html#optional-running-as-a-daemon-with-systemctl). 29 | - `sudo reboot`, dann mit `systemctl status zigbee2mqtt.service` prüfen, ob Zigbee2MQTT automatisch startet. 30 | 31 | ### ioBroker Zigbee2MQTT-Adapter 32 | 33 | - Vorgehensweise gemäß Doku - [Installation inkl. Umzug vom ioBroker/Zigbee Adapter](https://github.com/arteck/ioBroker.zigbee2mqtt/blob/main/docs/DE/DE_get-started_move.md) 34 | - **Wichtig, falls ConBee II Stick**: `configuration.yaml` nochmal anpassen: 35 | 1. Unter `serial` eintragen: `adapter: deconz` 36 | 2. Unter `advanced` die Zeile `transmit_power: 20` löschen, das scheint der ConBee II nicht zu können und es kommen Fehler beim Start von Zigbee2MQTT 37 | 38 | ### Screenshots 39 | 40 | Proxmox (letzter Neustart war erst vor 50 Minuten). Schön geringer Ressourcenbedarf. 41 | 42 | ![Proxmox Container Perfomence](../img/ProxmoxContainerPerfomence.png) 43 | -------------------------------------------------------------------------------- /docs/DE/DE_faq.md: -------------------------------------------------------------------------------- 1 | # FAQ 2 | 3 | Hier werden die meist gestellten Fragen beantwortet. Grundsätzlich kann aber die offizielle Dokumentation von Zigbee2MQTT befragt werden. 4 | Dieses WIKI klärt primär Fragen zum Umgang mit dem Adapter und nicht mit dem Zigbee2MQTT selber. 5 | 6 | Offizielle Dokumentation: https://www.zigbee2mqtt.io/guide/getting-started 7 | 8 | # Inhaltsübersicht 9 | - [FAQ](#faq) 10 | - [Inhaltsübersicht](#inhaltsübersicht) 11 | - [Verbidung/Konfigurationsseite zu Zigbee2MQTT wird nicht angezeigt im ioBroker ](#verbidungkonfigurationsseite-zu-zigbee2mqtt-wird-nicht-angezeigt-im-iobroker-) 12 | - [Was ist der Unterschied zwischen diesem Adapter und dem ioBroker/Zigbee Adapter? ](#was-ist-der-unterschied-zwischen-diesem-adapter-und-dem-iobrokerzigbee-adapter-) 13 | - [Was genau ist Zigbee2MQTT/Z2M? ](#was-genau-ist-zigbee2mqttz2m-) 14 | - [Wie erhalte ich die Expositionsdaten eines Geräts? ](#wie-erhalte-ich-die-expositionsdaten-eines-geräts-) 15 | - [Welche Zigbee2MQTT Konfigurationsparameter werden benötigt?? ](#welche-zigbee2mqtt-konfigurationsparameter-werden-benötigt-) 16 | - [Warum werden Geräte in ioBroker nach dem löschen aus z2m nicht auch gelöscht? ](#warum-werden-geräte-in-iobroker-nach-dem-löschen-aus-z2m-nicht-auch-gelöscht-) 17 | 18 | 19 | ## Verbidung/Konfigurationsseite zu Zigbee2MQTT wird nicht angezeigt im ioBroker 20 | Ausgangssituattion: 21 | 22 | Nutzt man im ioBroker Admin eine verschlüsselte Verbindung über HTTPS lädt der Browser die eingebettete Zigbee2MQTT UI nicht. 23 | 24 | Ursache: 25 | 26 | Leider kann in Zigbee2MQTT (noch) keine Verschlüsselte Verbindung konfigurirt werden. Durch die Verwendung der HTTPS Verbindung des Admin Adapter kann leider keine unverschlüsselte iFrame Verbindung genutzt werden, was hier der Fall ist. 27 | 28 | Lösung: 29 | 1. Deaktivieren der HTTPS verbindung im Admin Adapter 30 | 2. Proxy Verbindung für die Konfigurationsseite von Zigbee2MQTT, noch ist aber nicht klar ob die Websocket Verbindung die dieser Adpter nutzt dann noch funktioniert. 31 | 32 | ## Was ist der Unterschied zwischen diesem Adapter und dem ioBroker/Zigbee Adapter? 33 | Der ioBroker/Zigbee Adapter nutzt die Datenbasis von Zigbee2MQTT, jedoch verwaltet dieser seine Geräte selber. 34 | 35 | Dieser Zigbee2MQTT Adapter lagert die Verwaltung der Geräte an die offizielle Software aus und holt sich nur die Daten aus dieser, um die Geräte via ioBroker zu steuern. 36 | Heißt, das Zigbee Netz läuft unabhängig vom ioBroker. ein aus Entwicklersicht viel größer Vorteil ist es, dass neue Funktionen nicht durch ein 1-3 Mann Team umgesetzt werden muss (sowie bei dem ioBroker/Zigbee Adapter), sondern durch ein viel größeres Team mit einigen Hundert Entwicklern und einer noch viel größeren Community, da Zigbee2MQTT auch von diversen anderen Systemen als Basis genutzt wird. 37 | 38 | ## Was genau ist Zigbee2MQTT/Z2M? 39 | Zigbee2MQTT ist ein Open-Source-Projekt (vermutlich DAS Projekt, wenn es um Zigbee im Open Source Bereich geht), mit dem Zigbee Geräte über MQTT direkt angesprochen und verwaltet werden können, ohne dass hierfür eine Bridge eines Herstellers benötigt wird. Somit ist es auch möglich Geräte mehrere Hersteller über ein System zu verwalten, ohne dass man zu Hause immer die Bridge des jeweiligen Herstellers braucht. 40 | Zigbee2MQTT ist die Basis vieler Verschiedener SmartHome Zentralen, wie FEHM, HomeAssitent und jetzt auch ioBroker, wenn es um die Verwaltung von Zigbee Geräten geht. 41 | Bedeutet aber auch das hier eine zusätzliche Software installiert, eingerichtet und gepflegt werden muss! 42 | 43 | ## Wie erhalte ich die Expositionsdaten eines Geräts? 44 | 45 | - Sie müssen die IEEE-Adresse (`0x......`) des betroffenen Geräts in den Datenpunkt `zigbee2mqtt.[X].info.debugmessages` schreiben 46 | - Anschliesed den Adapter neustarten 47 | - Nun tauchen im Log Warnmeldungen auf die ungefähr folgendes Aussehen haben: `-->> fromZ2M -> 0x...... exposes:` 48 | 49 | ## Welche Zigbee2MQTT Konfigurationsparameter werden benötigt?? 50 | 51 | Dieser Adapter basiert auf dem aktuellen JSON Payload von Zigbee2MQTT, daher wird der Legacy Modus nicht unterstützt in v1. 52 | Das bedeutet, dass die folgenden Konfigurationsparameter **zwingend notwendig** sind, damit der Adapter richtig funktioniert! 53 | 54 | ```yaml 55 | advanced: 56 | 57 | legacy_api: false 58 | legacy_availability_payload: false 59 | cache_state: false 60 | output: 'json' 61 | device_options: 62 | legacy: false 63 | availability: true 64 | ``` 65 | 66 | Ist die v2 installiert : 67 | ```yaml 68 | advanced: 69 | 70 | cache_state: false 71 | output: json 72 | availability: 73 | enabled: true 74 | ``` 75 | 76 | ## Warum werden Geräte in ioBroker nach dem löschen aus z2m nicht auch gelöscht? 77 | Da die Datenpunkte sehr dynamisch erstellt werden und um eventuellen Fehler vorzubeugen, werden die Geräte nicht gelöscht. Den sonst würden die benutzerdefinierten Einstellungen (falls vorhanden) des Datenpunktes verloren gehen. 78 | Normalerweise sollte der Name durch "Device removed!" ersetzt werden und available sollte auf "false" gesetzt werden, somit kann man dann die Datenpunkte nachträglich löschen wenn es gewünscht ist. 79 | -------------------------------------------------------------------------------- /docs/DE/DE_get-started.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | 3 | Die Installation des Adapters erfordert einige Vorarbeiten. 4 | Hier wird die grundlegende Installation inkl. aller Voraussetzungen beschrieben. Detaillierte Informationen, Anleitungen und Einstellungen findet ihr auf der Seite von [Zigbee2MQTT](https://www.zigbee2mqtt.io/guide/getting-started/). 5 | 6 | `ACHTUNG: Sollte der Koordinator vorher schon einmal woanders im Einsatz gewesen sein muss dieser zurückgesetzt werden, ansonsten kommet es hier zu Fehlern.` 7 | 8 | 9 | ## Installation 10 | 11 | In unserem Beispiel wird Zigbee2MQTT via Docker / Docker Compose eingerichtet. Weitere Einrichtungsmethoden findet ihr auf der offiziellen Dokumentation. 12 | Als Voraussetzung ist hier ein eingereichter Docker Server geben! 13 | 14 | 1. Vorhanden oder neue Docker-Compose.yml bearbeiten und um folgenden Eintrag ergänzen. 15 | Wichtig ist nur, dass diese Einstellungen an eure Umgebung angepasst werden, z.B. der Pfad zur USB Antenne unter "devices" oder der Pfad zur Konfigurationsdatei unter "volumes". 16 | 17 | ```yml 18 | zigbee2mqtt: 19 | container_name: zigbee2mqtt 20 | restart: unless-stopped 21 | image: koenkk/zigbee2mqtt 22 | ports: 23 | - 8080:8080 24 | devices: 25 | - /dev/ttyUSB0:/dev/ttyUSB0 26 | volumes: 27 | - /etc/localtime:/etc/localtime:ro 28 | - ./zigbee2mqtt/data:/app/data 29 | environment: 30 | - TZ=Europe/Berlin 31 | ``` 32 | 33 | 2. Als Nächstes sollte eine Standard-Konfiguration gebaut werden. 34 | Hier kann die Offizielle oder die für den ioBroker Optimierte Version genommen werden. 35 | Dazu unter ./zigbee2mqtt/data/ die Datei configuration.yaml anlegen - Werte mit "Your Data" müssen dabei an euere Umgebung angepasst werden 36 | 37 | Originale Konfiguration: 38 | 39 | ```yml 40 | # Let new devices join our zigbee network 41 | permit_join: true 42 | mqtt: 43 | base_topic: zigbee2mqtt 44 | server: mqtt://Your Data:Your Port (im normall Fall lautet der Port : 1885) 45 | # Zigbee Adapter path 46 | serial: 47 | port: /dev/ttyUSB0 48 | # Enable the Zigbee2MQTT frontend 49 | frontend: 50 | port: 8080 51 | # Let Zigbee2MQTT generate a new network key on first start 52 | advanced: 53 | network_key: GENERATE 54 | ``` 55 | 56 | Für den Adapter **optimierte und empfohlene** Version - Werte mit "Your Data" müssen dabei an euere Umgebung angepasst werden. 57 | 58 | ```yml 59 | homeassistant: false 60 | permit_join: true 61 | frontend: 62 | port: 8080 63 | host: 0.0.0.0 64 | mqtt: 65 | base_topic: zigbee2mqtt 66 | server: mqtt://Your Data:Your Port (im normall Fall lautet der Port : 1885) 67 | serial: 68 | port: /dev/ttyUSB0 69 | advanced: 70 | pan_id: GENERATE 71 | ext_pan_id: [0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD] 72 | channel: 11 73 | network_key: GENERATE 74 | last_seen: ISO_8601_local 75 | homeassistant_legacy_entity_attributes: false 76 | legacy_api: false 77 | legacy_availability_payload: false 78 | cache_state: false 79 | output: json 80 | transmit_power: 20 81 | log_level: warn 82 | device_options: 83 | legacy: false 84 | availability: true 85 | ``` 86 | 3. Wie zu sehen ist, wird ein MQTT Server benötigt, dieser übernimmt aktuell für diesen Adapter keine Funktion, wird aber zum Starten benötigt. 87 | Dazu kann im Adapter in ioBroker einer konfiguriert werden oder wie in der Originalen Doku ein zusätzlicher Docker Container (https://www.zigbee2mqtt.io/guide/getting-started/#_2-setup-and-start-zigbee2mqtt) genutzt werden. 88 | 89 | 4. Habt das alles erledigt, dann kann mit `docker-compose up -d` die Docker Konfiguration übernommen werden und den Container gestaltet werden. 90 | Nach einer kurzen Zeit können wir uns dann mit http://Dockerhost-IP:8080, mit dem Webinterface von Zigbee2MQTT verbunden werden. 91 | 92 | 5. Installation des Zigbee2MQTT Adapters über den Adapter Tab im ioBroker 93 | 94 | 6. Konfiguration des Adapters Siehe dazu [Adapter Konfiguration](./DE/DE_AdapterConfig.md) 95 | 96 | 7. Nun sollte alles laufen und die Geräte können angelernt werden. Dazu hier eine detaillierte Anleitung: https://www.zigbee2mqtt.io/guide/usage/pairing_devices.html 97 | -------------------------------------------------------------------------------- /docs/DE/DE_get-started_move.md: -------------------------------------------------------------------------------- 1 | # Installation inkl. Umzug vom ioBroker/Zigbee Adapter 2 | 3 | Die Installation des Adapters sowie den Umzug des ioBrocker/Zigbee Adapters erfordert einige Vorarbeiten. 4 | Hier wird die grundlegende Installation und deren Voraussetzungen beschrieben. Detaillierte Informationen, Anleitungen und Einstellungen findet ihr auf der Seite von [Zigbee2MQTT](https://www.zigbee2mqtt.io/guide/getting-started/). 5 | 6 | ## Installation 7 | 8 | In unserem Beispiel wird Zigbee2MQTT via Docker / Docker Compose eingerichtet. Weitere Einrichtungsmethoden findet ihr auf der offiziellen Dokumentation. 9 | Als Voraussetzung ist hier eine eingereichtete Docker Server Umgebung gegeben! 10 | 11 | 1. Die vorhandene oder neue Docker-Compose.yml bearbeiten und um folgenden Eintrag ergänzen. 12 | Wichtig ist , dass diese Einstellungen an eure Umgebung angepasst werden, z.B. der Pfad zur USB Antenne unter "devices" oder der Pfad zur Konfigurationsdatei unter "volumes". 13 | 14 | ```yml 15 | zigbee2mqtt: 16 | container_name: zigbee2mqtt 17 | restart: unless-stopped 18 | image: koenkk/zigbee2mqtt 19 | ports: 20 | - 8080:8080 21 | devices: 22 | - /dev/ttyUSB0:/dev/dev/ttyUSB0 23 | volumes: 24 | - /etc/localtime:/etc/localtime:ro 25 | - ./zigbee2mqtt/data:/app/data 26 | environment: 27 | - TZ=Europe/Berlin 28 | ``` 29 | 30 | 2. Als Nächstes sollte eine Standardkonfiguration gebaut werden. 31 | Hier kann die Offizielle oder die für den ioBroker Optimierte Version genommen werden. 32 | Dazu unter ./zigbee2mqtt/data/ die Datei configuration.yaml anlegen. 33 | 34 | Originale Konfiguration: 35 | 36 | ```yml 37 | # Let new devices join our zigbee network 38 | permit_join: true 39 | # Docker-Compose makes the MQTT-Server available using "mqtt" hostname 40 | mqtt: 41 | base_topic: zigbee2mqtt 42 | server: mqtt://Your Data:Your Port (im normall Fall lautet der Port : 1885) 43 | # Zigbee Adapter path 44 | serial: 45 | port: /dev/ttyUSB0 46 | # Enable the Zigbee2MQTT frontend 47 | frontend: 48 | port: 8080 49 | advanced: 50 | pan_id: Your Data 51 | ext_pan_id: Your Data 52 | channel: Your Data 53 | network_key: Your Data 54 | ``` 55 | 56 | Für den Adapter **optimierte und empfohlene** Version - Werte mit "Your Data" müssen dabei an euere Umgebung angepasst werden. 57 | 58 | für Version v1. 59 | 60 | ```yml 61 | homeassistant: false 62 | permit_join: false 63 | frontend: 64 | port: 8080 65 | host: 0.0.0.0 66 | mqtt: 67 | base_topic: zigbee2mqtt 68 | server: mqtt://Your Data:Your Port (im normall Fall lautet der Port : 1885) 69 | serial: 70 | port: /dev/ttyUSB0 71 | advanced: 72 | pan_id: Your Data 73 | ext_pan_id: Your Data 74 | channel: Your Data 75 | network_key: Your Data 76 | last_seen: ISO_8601_local 77 | homeassistant_legacy_entity_attributes: false 78 | legacy_api: false 79 | legacy_availability_payload: false 80 | cache_state: false 81 | output: json 82 | transmit_power: 10 83 | log_level: warn 84 | device_options: 85 | legacy: false 86 | availability: true 87 | ``` 88 | 89 | für Version v2. 90 | ```yml 91 | homeassistant: 92 | enabled: false 93 | permit_join: false 94 | frontend: 95 | port: 8080 96 | host: 0.0.0.0 97 | enabled: true 98 | mqtt: 99 | base_topic: zigbee2mqtt 100 | server: mqtt://Your Data:Your Port (im normall Fall lautet der Port : 1885) 101 | serial: 102 | port: /dev/ttyUSB0 103 | advanced: 104 | pan_id: Your Data 105 | ext_pan_id: Your Data 106 | channel: Your Data 107 | network_key: Your Data 108 | last_seen: ISO_8601_local 109 | cache_state: false 110 | output: json 111 | transmit_power: 10 112 | log_level: warn 113 | device_options: 114 | availability: 115 | enabled: true 116 | ``` 117 | 118 | Hier ein Beispiel aus der Konfiguration des Zigbee Adapters im ioBroker und wie diese Umgeändert eingetragen werden muss: 119 | 120 | ![Zigbee Konfiguration](../img/zigbeeAdpter.png) 121 | 122 | ```yml 123 | mqtt: 124 | base_topic: zigbee2mqtt 125 | server: mqtt://192.168.1.1:1885 # ioBroker IP-Adresse mit MQTT Adapter oder MQTT Server siehe Zigbee2MQTT Doku 126 | Serial: 127 | port: /dev/ttyACM0 #Pfad zur Zigbee Antenne 128 | advanced: 129 | pan_id: 0x1A2C #PAN ID aus dem ioBroker konvertiert zu Hex 130 | ext_pan_id: [0x00, 0x12, 0x4b, 0x02, 0x37, 0xb9, 0x88] #erweiterte PAN ID aus dem ioBroker und in der Schreibweise [0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD] 131 | channel: 15 #Kanal aus dem ioBroker 132 | network_key: [0x02, 0x03, 0x05, 0x08, 0x09, 0x0B, 0x0D, 0x0B, 0x00, 0x02, 0x04, 0x07, 0x08, 0x0A, 0x0C, 0x0D] # Netzwerkkey/Transportschlüssel und in der schreibweise [0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD] 133 | ``` 134 | Dabei ist zu bedachten, dass NUR DIE PAN_ID ins HEX Format überführt werden muss 135 | behilflich ist ein Hex Konverter wie dieser : https://www.rapidtables.com/convert/number/hex-to-decimal.html. 136 | 137 | Die Restlichen Werten liegen schon im richtigen Format, müssen nur in die richtige Schreibweise überführt werden. 138 | - also aus ext_pan_id: 139 | `00124b0237b988` 140 | - wird die ext_pan_id: 141 | `0x00`, `0x12`, `0x4b`, `0x02`, `0x37`, `0xb9`, `0x88` 142 | 143 | genau so muss auch der network_key umgeschlüsselt werden. 144 | 145 | Das ist wichtig da sonst bei falsch Konfiguration der Coordinator falsche Daten bekommt und ihr das Netz nicht wieder einfach "so" aufgebaut bekommt. 146 | 147 | 2. Wie zu sehen ist, wird ein MQTT Server benötigt, dieser übernimmt aktuell für diesen Adapter keine Funktion, wird aber zum Starten benötigt. 148 | Dazu kann im Adapter in ioBroker einer konfiguriert werden oder wie in der Originalen Doku ein zusätzlicher Docker Container (https://www.zigbee2mqtt.io/guide/getting-started/#_2-setup-and-start-zigbee2mqtt) genutzt werden. 149 | 150 | 3. Jetzt müsst ihr mit dem Umzugsvorbereitungen beginnen. Dazu geht ihr bitte wie folgt vor: 151 | - Löschen aller Gruppen im aktuellen Zigbee Adpter. Diese führen leider zu div. Fehlern beim import der Datenbank. Wenn diese hier nicht raus genommen werden müssen sie aus der Datenbank manuell gelöscht werden. Dies ist aufwendig und bei Fehlern ist die Datenbank korrupt. Ein löschen dieser Gruppen in Zigbee2MQTT ist leider nicht möglich. 152 | - ioBroker/Zigbee Adpater stoppen 153 | - Die Datenbank aus dem ioBroker in den Container kopieren und umbennen. 154 | Quelle: /opt/iobroker/iobroker-data/zigbee_/shepart.db 155 | Ziel: "Docker-Verzeichnis"/zigbee2mqtt/data/database.db 156 | 157 | 4. Habt ihr das alles erledigt, dann kann mit `docker-compose up -d` die Docker Konfiguration übernommen und der Container gestaltet werden. 158 | Nach einer kurzen Zeit können wir uns dann mit http://Dockerhost-IP:8080, mit dem Webinterface von Zigbee2MQTT verbinden. Auch sollte sich nun die Konfiguration geändert haben und die Hex Werte die wir eingetragen haben müssten umgerechnet worden sein. Sollte das Webinterface nicht hoch kommen/erreichbar sein liegt noch ein Fehler vor und wird zu 99% im Log des Containers angezeigt. 159 | 160 | 5. Installation des Zigbee2MQTT Adapters über den Adapter Tab im ioBroker 161 | 162 | 6. Konfiguration des Adapters Siehe dazu [Adapter Konfiguration](./DE/DE_AdapterConfig.md) 163 | 164 | 7. Wenn jetzt alles gut gegangen ist, haben wir unsere Zigbee Netzwerk erfolgreich umgestellt und wir können noch ein paar anpassungen machen an dem neuen System. 165 | - Gelöschte Gruppen wieder anlegen 166 | - Geräte mit einem Namen versehen 167 | - und zu guter letzt noch alle Skripte und Sonstige Adapter anpassen die auf gewisse States angewisen sind aus dem Zigbee Netzwerkes. 168 | -------------------------------------------------------------------------------- /docs/EN/EN_AdapterConfig.md: -------------------------------------------------------------------------------- 1 | ### Configuration of the adapter 2 | | Option | Value/Description | 3 | |--|--| 4 | |**Select and configure Zigbee2MQTT connection**| 5 | |Select Zigbee2MQTT connection |Recommended setting "Websocket" | 6 | |Scheme|Select between Websocket (WS) via HTTP or HTTPS (WS SSL)| 7 | |Websocket IP address |IP or DNS name of the Zigbee2MQTT server (in our case the IP of the Docker host)| 8 | | Websocket Port | 8080 Is the default port, if this is changed in the config of Zigbee2MQTT, it must be changed here as well. 9 | | Use Auth-Token|Enable to store an Auth-Token/Password to the configuration page. !!! ATTENTION !!! Special characters are not supported. More info at [Zigbee2MQTT](https://www.zigbee2mqtt.io/guide/configuration/frontend.html#advanced-configuration)| 10 | |Create dummy MQTT server for Zigbee2MQTT | Because we need a MQTT server for Zigbee2MQTT we can set this checkmark then we have the possibility to create one here in the adapter. 11 | |Bind MQTT server IP address/MQTT server port | These settings only appear if we have set the checkmark for the dummy MQTT server. If there is no other MQTT server on the ioBroker, we can leave the default settings as they are, otherwise we have to change at least the port. These settings should then also be stored in the config of Zigbee2MQTT.| 12 | |Configuration of the Zigbee2MQTT Web UI connection Configuration|Here the connection can be configured, how the Zigbee2MQTT Web UI should be integrated into the ioBroker. It is important to note: If the ioBroker is called via HTTPS, a connection via HTTPS must also be established here. Otherwise the following error will occur: (https://github.com/arteck/ioBroker.zigbee2mqtt/issues/12) 13 | |**Configuration of the Zigbee2MQTT WebUi connection**| 14 | |Synchronize color temperature with color | This setting ensures that e.g. in a VIS like Lovelace the color of the lamp changes to the set color. 15 | |Use Kelvin values instead of Mired | Setting the unit for color temperatures for e.g. lamps 16 | |**State configurations**| 17 | | Generates simple Hold and Release states|On activation, the Hold and Release data points are combined and the Hold data point remains true until the Release event occurs. 18 | | Generates simple "Move" and "Stop" states|On activation, the data points "Move" and "Stop" are combined and the data point "Move" remains true until the event "Stop" arrives. 19 | | Generate simple "Press" and "Release" states|If enabled, the "Press" and "Release" states are combined and the "Press" datapoint remains true until the "Release" event arrives.| 20 | | Brightness move should also turn the light on or off| If enabled, when the brightness has reached 0 via Brightness move, the lamp will be turned off. And when the lamp is off, it will be switched on again. 21 | | Brightness step should also switch the light on or off | When activated, when the brightness via Brightness step has reached 0, the lamp is switched off. And when the lamp is off it will be switched on again.| 22 | |**Device image configurations**| 23 | |Download device images from Zigbee2Mqtt and use them as object icons | With this setting the preview image of zigbee2MQTT is downloaded, compressed and then stored in the corresponding object. ATTENTION the first start after setting this setting takes longer depending on the number of devices. 24 | |Size of the object icons in pixels|Sizes of the images, 28 is the default here. You should make them bigger only at your own risk. | 25 | |**Other configurations**| 26 | |Automatic check for missing routers in the coordinator's memory. |This option checks all devices that could theoretically be routers of the Zigbee network and lists all that are not. More information can be found at https://www.zigbee2mqtt.io/guide/usage/mqtt_topics_and_messages.html#zigbee2mqtt-bridge-request-coordinator-check | 27 | | Proxy Zigbee2MQTT logs to ioBroker logs | Takes logs from Zigbee2MQTT to ioBroker log| 28 | 29 | ![Zigbee2MQTT Basis Konfiguration](../img/baseConfig.png) 30 | ![Zigbee2MQTT Erweiterte Konfiguration](../img/extendedConfig.png) 31 | -------------------------------------------------------------------------------- /docs/EN/EN_Instruction_Proxmox_Container.md: -------------------------------------------------------------------------------- 1 | A guide/experience report from the user [Acgua](https://github.com/Acgua): 2 | 3 | I switched from zigbee adapter, with 30+ devices, ConBee II stick. 4 | My approach for proxmox container approximately: 5 | 6 | ### Prepare proxmox container: 7 | 8 | - Debian 11 container created: 512 MB RAM, 512 MB swap, 4 GB HD memory, 1 core 9 | - `apt update -y && apt upgrade -y`, `apt install -y sudo usbutils curl git` (and possibly a few more required packages) 10 | - `adduser z2m`, `adduser z2m sudo`, `su z2m` (from now on take only user `z2m`, no longer root) 11 | - Pass USB stick (ConBee II) according to [ioBroker-Doku](https://github.com/ioBroker/ioBroker.docs/blob/master/docs/de/install/proxmox.md#proxmox---lxc-linux-containers---usb-ger%C3%A4te-durchreichen) 12 | 13 | ### Install Mosquitto in container: 14 | 15 | (adapted from [this manual](https://randomnerdtutorials.com/how-to-install-mosquitto-broker-on-raspberry-pi/)) 16 | 17 | - `sudo apt install -y mosquitto mosquitto-clients` 18 | - Set up Auto Start: `sudo systemctl enable mosquitto.service` 19 | - Enable Remote Access (No Authentication): `sudo nano /etc/mosquitto/mosquitto.conf` and add the lines `listener 1883` and `allow_anonymous true` at the end of the file. (Note to self: change to auth!). 20 | - Restart Mosquitto: `sudo systemctl restart mosquitto` 21 | - Check status: `systemctl status mosquitto` 22 | - `sudo reboot`,then check with `systemctl status mosquitto` if Mosquitto starts automatically. 23 | 24 | ### Install Zigbee2MQTT in container: 25 | 26 | - Proceed approximately according to the [official instructions for Linux](https://www.zigbee2mqtt.io/guide/installation/01_linux.html). **Important:** according to the instructions NodeJS 16 is installed (`...setup_16.x`), I changed this to 18 (officially supported) 27 | - Configuration in `/opt/zigbee2mqtt/data/configuration.yaml` according to the instructions, entering `server: 'mqtt://localhost'` as the MQTT server. 28 | - Set up to start Zigbee2MQTT automatically on boot [according to doc](https://www.zigbee2mqtt.io/guide/installation/01_linux.html#optional-running-as-a-daemon-with-systemctl). 29 | - `sudo reboot`, then use `systemctl status zigbee2mqtt.service` to check if Zigbee2MQTT starts automatically. 30 | 31 | ### ioBroker Zigbee2MQTT Adapter 32 | 33 | - Procedure according to docu - [Installation incl. moving from ioBroker/Zigbee adapter](https://github.com/arteck/ioBroker.zigbee2mqtt/blob/main/docs/EN/EN_get-started_move.md) 34 | - **Important, if ConBee II Stick**: adjust `configuration.yaml` again: 35 | 1. under `serial` enter: `adapter: deconz`. 36 | 2. under `advanced` delete the line `transmit_power: 20`, the ConBee II seems not to be able to do this and errors occur when starting Zigbee2MQTT 37 | 38 | ### Screenshots 39 | 40 | Proxmox (last restart was just 50 minutes ago). Nice low resource requirements. 41 | 42 | ![Proxmox Container Perfomence](../img/ProxmoxContainerPerfomence.png) 43 | -------------------------------------------------------------------------------- /docs/EN/EN_faq.md: -------------------------------------------------------------------------------- 1 | # FAQ 2 | 3 | Here the most frequently asked questions are answered. Basically the official documentation of Zigbee2MQTT can be consulted. 4 | This WIKI primarily clarifies questions about the handling of the adapter and not with the Zigbee2MQTT itself. 5 | 6 | Official Documentation: https://www.zigbee2mqtt.io/guide/getting-started 7 | 8 | # Table of contents 9 | - [FAQ](#faq) 10 | - [Table of contents](#table-of-contents) 11 | - [Connection/configuration page to Zigbee2MQTT is not displayed in ioBroker ](#connectionconfiguration-page-to-zigbee2mqtt-is-not-displayed-in-iobroker-) 12 | - [What is the difference between this adapter and the ioBroker/Zigbee adapter? ](#what-is-the-difference-between-this-adapter-and-the-iobrokerzigbee-adapter-) 13 | - [What exactly is Zigbee2MQTT/Z2M? ](#what-exactly-is-zigbee2mqttz2m-) 14 | - [How do I get the exposes from a device? ](#how-do-i-get-the-exposes-from-a-device-) 15 | - [Which Zigbee2MQTT configuration parameters are needed? ](#which-zigbee2mqtt-configuration-parameters-are-needed-) 16 | - [Why are devices in ioBroker not also deleted after being deleted from z2m? ](#why-are-devices-in-iobroker-not-also-deleted-after-being-deleted-from-z2m-) 17 | 18 | 19 | ## Connection/configuration page to Zigbee2MQTT is not displayed in ioBroker 20 | Initial situation: 21 | 22 | If one uses an encrypted connection over HTTPS in the ioBroker Admin, the browser does not load the embedded Zigbee2MQTT UI. 23 | 24 | Cause: 25 | 26 | Unfortunately, an encrypted connection cannot (yet) be configured in Zigbee2MQTT. By using the HTTPS connection of the Admin Adapter unfortunately no unencrypted iFrame connection can be used, which is the case here. 27 | 28 | Solution: 29 | - disable the HTTPS connection in the Admin Adapter. 30 | - proxy connection for the configuration page of Zigbee2MQTT, but it is not yet clear whether the websocket connection used by this adapter will still work. 31 | 32 | 33 | ## What is the difference between this adapter and the ioBroker/Zigbee adapter? 34 | The ioBroker/Zigbee adapter uses the data basis of Zigbee2MQTT, but manages its devices itself. 35 | 36 | This Zigbee2MQTT adapter outsources the management of the devices to the official software and only gets the data from it to control the devices via ioBroker. 37 | This means that the Zigbee network runs independently of the ioBroker. A much bigger advantage from the developer's point of view is that new functions do not have to be implemented by a 1-3 man team (as with the ioBroker/Zigbee adapter), but by a much larger team with several hundred developers and a much larger community, since Zigbee2MQTT is also used by various other systems as a basis. 38 | 39 | 40 | ## What exactly is Zigbee2MQTT/Z2M? 41 | Zigbee2MQTT ist ein Open-Source-Projekt (vermutlich DAS Projekt, wenn es um Zigbee im Open Source Bereich geht), mit dem Zigbee Geräte über MQTT direkt angesprochen und verwaltet werden können, ohne dass hierfür eine Bridge eines Herstellers benötigt wird. Somit ist es auch möglich Geräte mehrere Hersteller über ein System zu verwalten, ohne dass man zu Hause immer die Bridge des jeweiligen Herstellers braucht. 42 | Zigbee2MQTT ist die Basis vieler Verschiedener SmartHome Zentralen, wie FEHM, HomeAssitent und jetzt auch ioBroker, wenn es um die Verwaltung von Zigbee Geräten geht. 43 | Bedeutet aber auch das hier eine zusätzliche Software installiert, eingerichtet und gepflegt werden muss! 44 | 45 | 46 | ## How do I get the exposes from a device? 47 | 48 | - You must enter the IEEE address (`0x......`) from the affected device into the datapoint `zigbee2mqtt.[X].info.debugmessages` 49 | - Then restart the adapter 50 | - And now look for the warning message in the log, which starts like this: `-->> fromZ2M -> 0x...... exposes:` 51 | 52 | ## Which Zigbee2MQTT configuration parameters are needed? 53 | 54 | This adapter is based on the current JSON payload of Zigbee2MQTT, so the legacy mode is not supported in v1. 55 | This means that the following config parameters are **mandatory** for the adapter to work properly! 56 | 57 | ```yaml 58 | advanced: 59 | 60 | legacy_api: false 61 | legacy_availability_payload: false 62 | cache_state: false 63 | output: json 64 | device_options: 65 | legacy: false 66 | availability: true 67 | ``` 68 | 69 | If you install v2 70 | 71 | ```yaml 72 | advanced: 73 | 74 | cache_state: false 75 | output: json 76 | availability: 77 | enabled: true 78 | ``` 79 | 80 | ## Why are devices in ioBroker not also deleted after being deleted from z2m? 81 | Since the data points are created very dynamically and to prevent possible errors, the devices are not deleted. Otherwise the user defined settings (if available) of the datapoint would be lost. 82 | Normally the name should be replaced by "Device removed!" and available should be set to "false", so you can delete the datapoints afterwards if you want to. 83 | -------------------------------------------------------------------------------- /docs/EN/EN_get-started.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | 3 | The installation of the adapter requires some preparatory work. 4 | Here the basic installation including all requirements is described. Detailed information, instructions and settings can be found on the page of [Zigbee2MQTT](https://www.zigbee2mqtt.io/guide/getting-started/). 5 | 6 | `ATTENTION: If the coordinator has been used somewhere else before, it must be reset, otherwise errors will happen.` 7 | 8 | ## Installation 9 | 10 | In our example Zigbee2MQTT is set up via Docker / Docker Compose. You can find more setup methods on the official documentation. 11 | As a prerequisite here is a submitted Docker server give! 12 | 13 | 1. edit existing or new Docker-Compose.yml and add the following entry. 14 | It is only important that these settings are adapted to your environment, e.g. the path to the USB antenna under "devices" or the path to the configuration file under "volumes". 15 | 16 | ```yml 17 | zigbee2mqtt: 18 | container_name: zigbee2mqtt 19 | restart: unless-stopped 20 | image: koenkk/zigbee2mqtt 21 | ports: 22 | - 8080:8080 23 | devices: 24 | - /dev/ttyUSB0:/dev/ttyUSB0 25 | volumes: 26 | - /etc/localtime:/etc/localtime:ro 27 | - ./zigbee2mqtt/data:/app/data 28 | environment: 29 | - TZ=Europe/Berlin 30 | ``` 31 | 32 | 2. Next, a standard configuration should be built. 33 | Here you can use the official or the optimized version for ioBroker. 34 | Create the file configuration.yaml under ./zigbee2mqtt/data/ - values with "Your Data" must be adapted to your environment. 35 | 36 | Original configuration: 37 | 38 | ```yml 39 | # Let new devices join our zigbee network 40 | permit_join: true 41 | mqtt: 42 | base_topic: zigbee2mqtt 43 | server: mqtt://Your Data:Your Port (in the normal case the port is : 1885) 44 | # Zigbee Adapter path 45 | serial: 46 | port: /dev/ttyUSB0 47 | # Enable the Zigbee2MQTT frontend 48 | frontend: 49 | port: 8080 50 | # Let Zigbee2MQTT generate a new network key on first start 51 | advanced: 52 | network_key: GENERATE 53 | ``` 54 | 55 | For the adapter **optimized and recommended** version - values with "Your Data" must be adapted to your environment. 56 | 57 | ```yml 58 | homeassistant: false 59 | permit_join: true 60 | frontend: 61 | port: 8080 62 | host: 0.0.0.0 63 | mqtt: 64 | base_topic: zigbee2mqtt 65 | server: mqtt://Your Data:Your Port (in the normal case the port is : 1885) 66 | serial: 67 | port: /dev/ttyACM0 68 | advanced: 69 | pan_id: GENERATE 70 | ext_pan_id: [0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD] 71 | channel: 11 72 | network_key: GENERATE 73 | last_seen: ISO_8601_local 74 | homeassistant_legacy_entity_attributes: false 75 | legacy_api: false 76 | legacy_availability_payload: false 77 | cache_state: false 78 | output: json 79 | transmit_power: 20 80 | log_level: warn 81 | device_options: 82 | legacy: false 83 | availability: true 84 | ``` 85 | 3. As can be seen, an MQTT server is required, which currently has no function for this adapter, but is required for startup. 86 | For this purpose, one can be configured in the adapter in ioBroker or an additional Docker container (https://www.zigbee2mqtt.io/guide/getting-started/#_2-setup-and-start-zigbee2mqtt) can be used as in the original documentation. 87 | 88 | 4. Once all this is done, we can use `docker-compose up -d` to take over the Docker configuration and design the container. 89 | After a short time we can then connect to the web interface of Zigbee2MQTT with http://Dockerhost-IP:8080. 90 | 91 | 5. Installation of the Zigbee2MQTT adapter via the Adapter Tab in ioBroker 92 | 93 | 6. Configuration of the adapter See [Adapter configuration](./EN/EN_AdapterConfig.md) 94 | 95 | 7. Now everything should run and the devices can be tuned in. Here is a detailed instruction: https://www.zigbee2mqtt.io/guide/usage/pairing_devices.html 96 | -------------------------------------------------------------------------------- /docs/EN/EN_get-started_move.md: -------------------------------------------------------------------------------- 1 | # Installation incl. moving from ioBroker/Zigbee adapter 2 | 3 | The installation of the adapter as well as the relocation of the ioBrocker/Zigbee adapter requires some preliminary work. Here we describe the basic installation and its requirements. Detailed information, instructions and settings can be found on the page of [Zigbee2MQTT](https://www.zigbee2mqtt.io/guide/getting-started/). 4 | 5 | ## Installation 6 | 7 | In our example, Zigbee2MQTT is set up via Docker / Docker Compose. More setup methods can be found on the official documentation. As a prerequisite here is a submitted Docker Server environment! 8 | 9 | 1. Edit the existing or new Docker-Compose.yml and add the following entry. 10 | It is important that these settings are adapted to your environment, e.g. the path to the USB antenna under "devices" or the path to the configuration file under "volumes". 11 | 12 | ```yml 13 | zigbee2mqtt: 14 | container_name: zigbee2mqtt 15 | restart: unless-stopped 16 | image: koenkk/zigbee2mqtt 17 | ports: 18 | - 8080:8080 19 | devices: 20 | - /dev/ttyUSB0:/dev/dev/ttyUSB0 21 | volumes: 22 | - /etc/localtime:/etc/localtime:ro 23 | - ./zigbee2mqtt/data:/app/data 24 | environment: 25 | - TZ=Europe/Berlin 26 | ``` 27 | 28 | 2. Next, a standard configuration should be built. 29 | Here you can use the official or the optimized version for ioBroker. 30 | To do this, create the configuration.yaml file under ./zigbee2mqtt/data/. 31 | 32 | Original configuration: 33 | 34 | ```yml 35 | # Let new devices join our zigbee network 36 | permit_join: true 37 | # Docker-Compose makes the MQTT-Server available using "mqtt" hostname 38 | mqtt: 39 | base_topic: zigbee2mqtt 40 | server: mqtt://Your Data:Your Port (im normall Fall lautet der Port : 1885) 41 | # Zigbee Adapter path 42 | serial: 43 | port: /dev/ttyUSB0 44 | # Enable the Zigbee2MQTT frontend 45 | frontend: 46 | port: 8080 47 | advanced: 48 | pan_id: Your Data 49 | ext_pan_id: Your Data 50 | channel: Your Data 51 | network_key: Your Data 52 | ``` 53 | 54 | For the adapter **optimized and recommended** version - values with "Your Data" must be adapted to your environment. 55 | 56 | for Version v1. 57 | ```yml 58 | homeassistant: false 59 | permit_join: false 60 | frontend: 61 | port: 8080 62 | host: 0.0.0.0 63 | mqtt: 64 | base_topic: zigbee2mqtt 65 | server: mqtt://Your Data:Your Port (im normall Fall lautet der Port : 1885) 66 | serial: 67 | port: /dev/ttyUSB0 68 | advanced: 69 | pan_id: Your Data 70 | ext_pan_id: Your Data 71 | channel: Your Data 72 | network_key: Your Data 73 | last_seen: ISO_8601_local 74 | homeassistant_legacy_entity_attributes: false 75 | legacy_api: false 76 | legacy_availability_payload: false 77 | cache_state: false 78 | output: json 79 | transmit_power: 10 80 | log_level: warn 81 | device_options: 82 | legacy: false 83 | availability: true 84 | ``` 85 | 86 | for Version v2. 87 | ```yml 88 | homeassistant: 89 | enabled: false 90 | permit_join: false 91 | frontend: 92 | port: 8080 93 | host: 0.0.0.0 94 | enabled: true 95 | mqtt: 96 | base_topic: zigbee2mqtt 97 | server: mqtt://Your Data:Your Port (im normall Fall lautet der Port : 1885) 98 | serial: 99 | port: /dev/ttyUSB0 100 | advanced: 101 | pan_id: Your Data 102 | ext_pan_id: Your Data 103 | channel: Your Data 104 | network_key: Your Data 105 | last_seen: ISO_8601_local 106 | cache_state: false 107 | output: json 108 | transmit_power: 10 109 | log_level: warn 110 | device_options: 111 | availability: 112 | enabled: true 113 | ``` 114 | Here is an example from the configuration of the Zigbee adapter in ioBroker and how this must be changed: 115 | 116 | ![Zigbee configuration](../img/zigbeeAdpter.png) 117 | 118 | ```yml 119 | mqtt: 120 | base_topic: zigbee2mqtt 121 | server: mqtt://192.168.1.1:1885 # ioBroker IP address with MQTT adapter or MQTT server see Zigbee2MQTT docu 122 | Serial: 123 | port: /dev/ttyACM0 #Path to the Zigbee antenna 124 | advanced: 125 | pan_id: 0x1A2C #PAN ID from ioBroker converted to Hex 126 | ext_pan_id: [0x00, 0x12, 0x4b, 0x02, 0x37, 0xb9, 0x88] #extended PAN ID from the ioBroker and in the notation [0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD] 127 | channel: 15 #Channel from ioBroker 128 | network_key: [0x02, 0x03, 0x05, 0x08, 0x09, 0x0B, 0x0D, 0x0B, 0x00, 0x02, 0x04, 0x07, 0x08, 0x0A, 0x0C, 0x0D] # Network key/transport key and in the notation [0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD] 129 | ``` 130 | Please note that ONLY the PAN_ID has to be converted to HEX format. 131 | helpful is a Hex converter like this one: https://www.rapidtables.com/convert/number/hex-to-decimal.html. 132 | 133 | The remaining values are already in the correct format, they only have to be converted into the correct notation.. 134 | - so from ext_pan_id: 135 | `00124b0237b988` 136 | - to the ext_pan_id: 137 | `0x00`, `0x12`, `0x4b`, `0x02`, `0x37`, `0xb9`, `0x88` 138 | 139 | this is exactly how the network_key must be recoded. 140 | 141 | This is important because otherwise the coordinator will receive wrong data and you will not be able to rebuild the network "just like that". 142 | 143 | 3. As can be seen, an MQTT server is required, which currently has no function for this adapter, but is required for startup. For this purpose, one can be configured in the adapter in ioBroker or an additional Docker container (https://www.zigbee2mqtt.io/guide/getting-started/#_2-setup-and-start-zigbee2mqtt) can be used as in the original documentation. 144 | 145 | 4. Now you need to start preparing for the move. To do this, please proceed as following: 146 | - Delete all groups in the current Zigbee adapter. Unfortunately, these lead to various errors when importing the database. If you don't remove them here, you have to delete them manually from the database. This is time consuming and in case of errors the database is corrupt. A deletion of these groups in Zigbee2MQTT is unfortunately not possible. 147 | - Stop ioBroker/Zigbee Adpater 148 | - Copy the database from ioBroker to the container and rename it. 149 | Source: /opt/iobroker/iobroker-data/zigbee_/shepart.db 150 | Destination: "Docker directory"/zigbee2mqtt/data/database.db 151 | 152 | 153 | 5. Once you have done all this, you can use `docker-compose up -d` to apply the Docker configuration and design the container. 154 | After a short time we can connect to the web interface of Zigbee2MQTT with http://Dockerhost-IP:8080. Also the configuration should have changed now and the hex values we entered should have been converted. If the webinterface should not come up/be accessible there is still an error and it will be shown in the log of the container to 99%. 155 | 156 | 6. Installation of the Zigbee2MQTT adapter via the adapter tab in ioBroker. 157 | 158 | 7. Configuration of the adapter See [Adapter configuration](./EN/EN_AdapterConfig.md) 159 | 160 | 8. If everything went well now, we have successfully converted our Zigbee network and we can still make a few adjustments to the new system. 161 | - Create deleted groups again 162 | - give devices a name 163 | - and last but not least we can adjust all scripts and other adapters that are used for certain states from the Zigbee network. 164 | -------------------------------------------------------------------------------- /docs/img/ProxmoxContainerPerfomence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arteck/ioBroker.zigbee2mqtt/3bbe04a5a2ce18e117866cfd088b121d295f8f33/docs/img/ProxmoxContainerPerfomence.png -------------------------------------------------------------------------------- /docs/img/baseConfig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arteck/ioBroker.zigbee2mqtt/3bbe04a5a2ce18e117866cfd088b121d295f8f33/docs/img/baseConfig.png -------------------------------------------------------------------------------- /docs/img/extendedConfig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arteck/ioBroker.zigbee2mqtt/3bbe04a5a2ce18e117866cfd088b121d295f8f33/docs/img/extendedConfig.png -------------------------------------------------------------------------------- /docs/img/zigbeeAdpter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arteck/ioBroker.zigbee2mqtt/3bbe04a5a2ce18e117866cfd088b121d295f8f33/docs/img/zigbeeAdpter.png -------------------------------------------------------------------------------- /docs/wiki.md: -------------------------------------------------------------------------------- 1 | # Wiki 2 | 3 | This is a small wiki for the ioBroker adapter Zigbee2MQTT. 4 | 5 | zigbee2mqtt is an open-source project that allows zigbee devices to be accessed directly via MQTT without the need for a vendor bridge. 6 | 7 | 8 | ## Deutsche Version 9 | 10 | - [Adapter Konfiguration](./DE/DE_AdapterConfig.md) 11 | - [Frische Installation](./DE/DE_get-started.md) 12 | - [Installation inkl. Umzug vom ioBroker/Zigbee Adapter](./DE/DE_get-started_move.md) 13 | - [FAQ](./DE/DE_faq.md) 14 | - [Userbericht - Proxmox Container](./DE/DE_Instruction_Proxmox_Container.md) 15 | 16 | 17 | ## English Version 18 | 19 | - [Adapter Configuration](./EN/EN_AdapterConfig.md) 20 | - [Installation from zero](./EN/EN_get-started.md) 21 | - [Installation incl. moving from ioBroker/Zigbee adapter](./EN/EN_get-started_move.md) 22 | - [FAQ](./EN/EN_faq.md) 23 | - [User report - Proxmox Container](./EN/EN_Instruction_Proxmox_Container.md) 24 | 25 | 26 | ## Official Documentation 27 | 28 | [Zigbee2MQTT Documentation](https://www.zigbee2mqtt.io) 29 | 30 | ## Authors 31 | 32 | - [@nox309](https://www.github.com/nox309) 33 | 34 | 35 | -------------------------------------------------------------------------------- /eslint.config.cjs: -------------------------------------------------------------------------------- 1 | const globals = require('globals'); 2 | const js = require('@eslint/js'); 3 | 4 | const { FlatCompat } = require('@eslint/eslintrc'); 5 | 6 | const compat = new FlatCompat({ 7 | baseDirectory: __dirname, 8 | recommendedConfig: js.configs.recommended, 9 | allConfig: js.configs.all, 10 | }); 11 | 12 | module.exports = [ 13 | { 14 | ignores: ['.dev-server/**'], 15 | }, 16 | ...compat.extends('eslint:recommended', 'plugin:prettier/recommended'), 17 | { 18 | languageOptions: { 19 | globals: { 20 | ...globals.node, 21 | ...globals.mocha, 22 | }, 23 | 24 | ecmaVersion: 2022, 25 | sourceType: 'commonjs', 26 | 27 | parserOptions: { 28 | ecmaFeatures: { 29 | jsx: true, 30 | }, 31 | }, 32 | }, 33 | 34 | rules: { 35 | indent: ['error', 4, { SwitchCase: 1 }], 36 | 37 | 'prettier/prettier': ['off', { endOfLine: 'auto' }], 38 | 'no-unused-vars': 'off', 39 | 'no-console': 'off', 40 | 'no-var': 'error', 41 | 'no-trailing-spaces': 'error', 42 | 'prefer-const': 'warn', 43 | 44 | quotes: [ 45 | 'error', 46 | 'single', 47 | { 48 | avoidEscape: true, 49 | allowTemplateLiterals: true, 50 | }, 51 | ], 52 | }, 53 | }, 54 | ]; 55 | -------------------------------------------------------------------------------- /lib/adapter-config.d.ts: -------------------------------------------------------------------------------- 1 | // This file extends the AdapterConfig type from "@types/iobroker" 2 | // using the actual properties present in io-package.json 3 | // in order to provide typings for adapter.config properties 4 | 5 | import { native } from '../io-package.json'; 6 | 7 | type _AdapterConfig = typeof native; 8 | 9 | // Augment the globally declared type ioBroker.AdapterConfig 10 | declare global { 11 | namespace ioBroker { 12 | interface AdapterConfig extends _AdapterConfig { 13 | // Do not enter anything here! 14 | } 15 | } 16 | } 17 | 18 | // this is required so the above AdapterConfig is found by TypeScript / type checking 19 | export {}; 20 | -------------------------------------------------------------------------------- /lib/check.js: -------------------------------------------------------------------------------- 1 | function checkConfig(config, log, version) { 2 | const checkAPIOptions = { 3 | legacy_api_enabled: config.advanced.legacy_api != false, 4 | legacy_availability_payload_enabled: config.advanced.legacy_availability_payload != false, 5 | device_legacy_enabled: config.device_options.legacy != false 6 | }; 7 | 8 | const checkAPIOptionsOutput = { 9 | payload_contains_not_json: config.advanced.output != 'attribute_and_json' && config.advanced.output != 'json' 10 | }; 11 | 12 | if (version.startsWith('1.')) { // wird in version 2.x immer auf false gesetzt sein 13 | if (Object.values(checkAPIOptions).filter((x) => x == true).length > 0) { 14 | log.error('==================================================='); 15 | log.error('==================================================='); 16 | if (checkAPIOptions.legacy_api_enabled == true) { 17 | log.error('Legacy api is activated, so the adapter can not work correctly!!!'); 18 | log.error('Please add the following lines to your Zigbee2MQTT configuration.yaml:'); 19 | log.error('advanced:'); 20 | log.error(' legacy_api: false'); 21 | log.error(''); 22 | } 23 | if (checkAPIOptions.legacy_availability_payload_enabled == true) { 24 | log.error( 25 | 'Legacy Availability Payload is activated, thus the adapter cannot represent the availability of the devices!!!' 26 | ); 27 | log.error('Please add the following lines to your Zigbee2MQTT configuration.yaml:'); 28 | log.error('advanced:'); 29 | log.error('legacy_availability_payload: false'); 30 | log.error(''); 31 | } 32 | if (checkAPIOptions.device_legacy_enabled == true) { 33 | log.error( 34 | 'Device Legacy Payload is activated, therefore the adapter may process the states of the devices correctly!!!' 35 | ); 36 | log.error('Please add the following lines to your Zigbee2MQTT configuration.yaml:'); 37 | log.error('device_options:'); 38 | log.error(' legacy: false'); 39 | } 40 | log.error('==================================================='); 41 | } 42 | } 43 | if (Object.values(checkAPIOptionsOutput).filter((x) => x == true).length > 0) { 44 | if (checkAPIOptions.payload_contains_not_json == true ) { 45 | log.error('==================================================='); 46 | log.error( 47 | 'MQTT output type must "attribute_and_json" or "json" , therefore the adapter may process the states of the devices correctly!!!' 48 | ); 49 | log.error('Please add the following lines to your Zigbee2MQTT configuration.yaml:'); 50 | log.error('advanced:'); 51 | log.error(' output: json'); 52 | log.error('or'); 53 | log.error('advanced:'); 54 | log.error(' output: attribute_and_json'); 55 | log.error(''); 56 | log.error('==================================================='); 57 | } 58 | } 59 | } 60 | 61 | module.exports = { 62 | checkConfig: checkConfig, 63 | }; 64 | -------------------------------------------------------------------------------- /lib/colors.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-prototype-builtins */ 2 | 'use strict'; 3 | 4 | const namedColors = { 5 | mediumvioletred: { 6 | rgb: '#c71585', 7 | }, 8 | deeppink: { 9 | rgb: '#ff1493', 10 | }, 11 | palevioletred: { 12 | rgb: '#db7093', 13 | }, 14 | hotpink: { 15 | rgb: '#ff69b4', 16 | }, 17 | lightpink: { 18 | rgb: '#ffb6c1', 19 | }, 20 | pink: { 21 | rgb: '#ffc0cb', 22 | }, 23 | darkred: { 24 | rgb: '#8b0000', 25 | }, 26 | red: { 27 | rgb: '#ff0000', 28 | }, 29 | firebrick: { 30 | rgb: '#b22222', 31 | }, 32 | crimson: { 33 | rgb: '#dc143c', 34 | }, 35 | indianred: { 36 | rgb: '#cd5c5c', 37 | }, 38 | lightcoral: { 39 | rgb: '#f08080', 40 | }, 41 | salmon: { 42 | rgb: '#fa8072', 43 | }, 44 | darksalmon: { 45 | rgb: '#e9967a', 46 | }, 47 | lightsalmon: { 48 | rgb: '#ffa07a', 49 | }, 50 | orangered: { 51 | rgb: '#ff4500', 52 | }, 53 | tomato: { 54 | rgb: '#ff6347', 55 | }, 56 | darkorange: { 57 | rgb: '#ff8c00', 58 | }, 59 | coral: { 60 | rgb: '#ff7f50', 61 | }, 62 | orange: { 63 | rgb: '#ffa500', 64 | }, 65 | darkkhaki: { 66 | rgb: '#bdb76b', 67 | }, 68 | gold: { 69 | rgb: '#ffd700', 70 | }, 71 | khaki: { 72 | rgb: '#f0e68c', 73 | }, 74 | peachpuff: { 75 | rgb: '#ffdab9', 76 | }, 77 | yellow: { 78 | rgb: '#ffff00', 79 | }, 80 | palegoldenrod: { 81 | rgb: '#eee8aa', 82 | }, 83 | moccasin: { 84 | rgb: '#ffe4b5', 85 | }, 86 | papayawhip: { 87 | rgb: '#ffefd5', 88 | }, 89 | lightgoldenrodyellow: { 90 | rgb: '#fafad2', 91 | }, 92 | lemonchiffon: { 93 | rgb: '#fffacd', 94 | }, 95 | lightyellow: { 96 | rgb: '#ffffe0', 97 | }, 98 | maroon: { 99 | rgb: '#800000', 100 | }, 101 | brown: { 102 | rgb: '#a52a2a', 103 | }, 104 | saddlebrown: { 105 | rgb: '#8b4513', 106 | }, 107 | sienna: { 108 | rgb: '#a0522d', 109 | }, 110 | chocolate: { 111 | rgb: '#d2691e', 112 | }, 113 | darkgoldenrod: { 114 | rgb: '#b8860b', 115 | }, 116 | peru: { 117 | rgb: '#cd853f', 118 | }, 119 | rosybrown: { 120 | rgb: '#bc8f8f', 121 | }, 122 | goldenrod: { 123 | rgb: '#daa520', 124 | }, 125 | sandybrown: { 126 | rgb: '#f4a460', 127 | }, 128 | tan: { 129 | rgb: '#d2b48c', 130 | }, 131 | burlywood: { 132 | rgb: '#deb887', 133 | }, 134 | wheat: { 135 | rgb: '#f5deb3', 136 | }, 137 | navajowhite: { 138 | rgb: '#ffdead', 139 | }, 140 | bisque: { 141 | rgb: '#ffe4c4', 142 | }, 143 | blanchedalmond: { 144 | rgb: '#ffebcd', 145 | }, 146 | cornsilk: { 147 | rgb: '#fff8dc', 148 | }, 149 | darkgreen: { 150 | rgb: '#006400', 151 | }, 152 | green: { 153 | rgb: '#008000', 154 | }, 155 | darkolivegreen: { 156 | rgb: '#556b2f', 157 | }, 158 | forestgreen: { 159 | rgb: '#228b22', 160 | }, 161 | seagreen: { 162 | rgb: '#2e8b57', 163 | }, 164 | olive: { 165 | rgb: '#808000', 166 | }, 167 | olivedrab: { 168 | rgb: '#6b8e23', 169 | }, 170 | mediumseagreen: { 171 | rgb: '#3cb371', 172 | }, 173 | limegreen: { 174 | rgb: '#32cd32', 175 | }, 176 | lime: { 177 | rgb: '#00ff00', 178 | }, 179 | springgreen: { 180 | rgb: '#00ff7f', 181 | }, 182 | mediumspringgreen: { 183 | rgb: '#00fa9a', 184 | }, 185 | darkseagreen: { 186 | rgb: '#8fbc8f', 187 | }, 188 | mediumaquamarine: { 189 | rgb: '#66cdaa', 190 | }, 191 | yellowgreen: { 192 | rgb: '#9acd32', 193 | }, 194 | lawngreen: { 195 | rgb: '#7cfc00', 196 | }, 197 | chartreuse: { 198 | rgb: '#7fff00', 199 | }, 200 | lightgreen: { 201 | rgb: '#90ee90', 202 | }, 203 | greenyellow: { 204 | rgb: '#adff2f', 205 | }, 206 | palegreen: { 207 | rgb: '#98fb98', 208 | }, 209 | teal: { 210 | rgb: '#008080', 211 | }, 212 | darkcyan: { 213 | rgb: '#008b8b', 214 | }, 215 | lightseagreen: { 216 | rgb: '#20b2aa', 217 | }, 218 | cadetblue: { 219 | rgb: '#5f9ea0', 220 | }, 221 | darkturquoise: { 222 | rgb: '#00ced1', 223 | }, 224 | mediumturquoise: { 225 | rgb: '#48d1cc', 226 | }, 227 | turquoise: { 228 | rgb: '#40e0d0', 229 | }, 230 | aqua: { 231 | rgb: '#00ffff', 232 | }, 233 | cyan: { 234 | rgb: '#00ffff', 235 | }, 236 | aquamarine: { 237 | rgb: '#7fffd4', 238 | }, 239 | paleturquoise: { 240 | rgb: '#afeeee', 241 | }, 242 | lightcyan: { 243 | rgb: '#e0ffff', 244 | }, 245 | navy: { 246 | rgb: '#000080', 247 | }, 248 | darkblue: { 249 | rgb: '#00008b', 250 | }, 251 | mediumblue: { 252 | rgb: '#0000cd', 253 | }, 254 | blue: { 255 | rgb: '#0000ff', 256 | }, 257 | midnightblue: { 258 | rgb: '#191970', 259 | }, 260 | royalblue: { 261 | rgb: '#4169e1', 262 | }, 263 | steelblue: { 264 | rgb: '#4682b4', 265 | }, 266 | dodgerblue: { 267 | rgb: '#1e90ff', 268 | }, 269 | deepskyblue: { 270 | rgb: '#00bfff', 271 | }, 272 | cornflowerblue: { 273 | rgb: '#6495ed', 274 | }, 275 | skyblue: { 276 | rgb: '#87ceeb', 277 | }, 278 | lightskyblue: { 279 | rgb: '#87cefa', 280 | }, 281 | lightsteelblue: { 282 | rgb: '#b0c4de', 283 | }, 284 | lightblue: { 285 | rgb: '#add8e6', 286 | }, 287 | powderblue: { 288 | rgb: '#b0e0e6', 289 | }, 290 | indigo: { 291 | rgb: '#4b0082', 292 | }, 293 | purple: { 294 | rgb: '#800080', 295 | }, 296 | darkmagenta: { 297 | rgb: '#8b008b', 298 | }, 299 | darkviolet: { 300 | rgb: '#9400d3', 301 | }, 302 | darkslateblue: { 303 | rgb: '#483d8b', 304 | }, 305 | blueviolet: { 306 | rgb: '#8a2be2', 307 | }, 308 | darkorchid: { 309 | rgb: '#9932cc', 310 | }, 311 | fuchsia: { 312 | rgb: '#ff00ff', 313 | }, 314 | magenta: { 315 | rgb: '#ff00ff', 316 | }, 317 | slateblue: { 318 | rgb: '#6a5acd', 319 | }, 320 | mediumslateblue: { 321 | rgb: '#7b68ee', 322 | }, 323 | mediumorchid: { 324 | rgb: '#ba55d3', 325 | }, 326 | mediumpurple: { 327 | rgb: '#9370db', 328 | }, 329 | orchid: { 330 | rgb: '#da70d6', 331 | }, 332 | violet: { 333 | rgb: '#ee82ee', 334 | }, 335 | plum: { 336 | rgb: '#dda0dd', 337 | }, 338 | thistle: { 339 | rgb: '#d8bfd8', 340 | }, 341 | lavender: { 342 | rgb: '#e6e6fa', 343 | }, 344 | mistyrose: { 345 | rgb: '#ffe4e1', 346 | }, 347 | antiquewhite: { 348 | rgb: '#faebd7', 349 | }, 350 | linen: { 351 | rgb: '#faf0e6', 352 | }, 353 | beige: { 354 | rgb: '#f5f5dc', 355 | }, 356 | whitesmoke: { 357 | rgb: '#f5f5f5', 358 | }, 359 | lavenderblush: { 360 | rgb: '#fff0f5', 361 | }, 362 | oldlace: { 363 | rgb: '#fdf5e6', 364 | }, 365 | aliceblue: { 366 | rgb: '#f0f8ff', 367 | }, 368 | seashell: { 369 | rgb: '#fff5ee', 370 | }, 371 | ghostwhite: { 372 | rgb: '#f8f8ff', 373 | }, 374 | honeydew: { 375 | rgb: '#f0fff0', 376 | }, 377 | floralwhite: { 378 | rgb: '#fffaf0', 379 | }, 380 | azure: { 381 | rgb: '#f0ffff', 382 | }, 383 | mintcream: { 384 | rgb: '#f5fffa', 385 | }, 386 | snow: { 387 | rgb: '#fffafa', 388 | }, 389 | ivory: { 390 | rgb: '#fffff0', 391 | }, 392 | white: { 393 | rgb: '#ffffff', 394 | }, 395 | black: { 396 | rgb: '#000000', 397 | }, 398 | darkslategray: { 399 | rgb: '#2f4f4f', 400 | }, 401 | dimgray: { 402 | rgb: '#696969', 403 | }, 404 | slategray: { 405 | rgb: '#708090', 406 | }, 407 | gray: { 408 | rgb: '#808080', 409 | }, 410 | lightslategray: { 411 | rgb: '#778899', 412 | }, 413 | darkgray: { 414 | rgb: '#a9a9a9', 415 | }, 416 | silver: { 417 | rgb: '#c0c0c0', 418 | }, 419 | lightgray: { 420 | rgb: '#d3d3d3', 421 | }, 422 | gainsboro: { 423 | rgb: '#dcdcdc', 424 | }, 425 | }; 426 | 427 | function NamedColorToRGBstring(name) { 428 | const lowerName = name.toLowerCase(); 429 | if (namedColors.hasOwnProperty(lowerName)) return namedColors[lowerName].rgb; 430 | return '#0088FF'; 431 | } 432 | 433 | function ParseColor(rgbstring) { 434 | if (typeof rgbstring === 'string') { 435 | const lowerName = rgbstring.toLowerCase(); 436 | if (namedColors.hasOwnProperty(lowerName)) rgbstring = namedColors[lowerName].rgb; 437 | rgbstring = rgbstring.trim(); 438 | if (rgbstring.startsWith('#')) rgbstring = rgbstring.slice(1); 439 | const val = parseInt('0x' + rgbstring); 440 | const oneColor = {}; 441 | oneColor.r = Math.floor(val / (256 * 256)); 442 | oneColor.g = Math.floor((val % (256 * 256)) / 256); 443 | oneColor.b = val % 256; 444 | return oneColor; 445 | } 446 | return { r: 0, g: 128, b: 255 }; 447 | } 448 | 449 | function NamedColorToRGB(name) { 450 | if (namedColors.hasOwnProperty(name)) return ParseColor(namedColors[name].rgb); 451 | return { r: 0, g: 128, b: 255 }; 452 | } 453 | module.exports = { 454 | NamedColorToRGB, 455 | NamedColorToRGBstring, 456 | ParseColor, 457 | }; 458 | -------------------------------------------------------------------------------- /lib/imageController.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios').default; 2 | const sharp = require('sharp'); 3 | 4 | class ImageController { 5 | constructor(adapter) { 6 | this.adapter = adapter; 7 | } 8 | 9 | sanitizeModelIDForImageUrl(modelName) { 10 | const modelNameString = modelName.replace('/', '_'); 11 | // eslint-disable-next-line no-control-regex 12 | return modelNameString.replace(/\u0000/g, ''); 13 | } 14 | 15 | sanitizeZ2MDeviceName(deviceName) { 16 | const deviceNameString = deviceName.replace(/:|\s|\//g, '-'); 17 | // eslint-disable-next-line no-control-regex 18 | return deviceName ? deviceNameString.replace(/\u0000/g, '') : 'NA'; 19 | } 20 | 21 | getZ2mDeviceImageModelJPG(device) { 22 | if (device && device.definition && device.definition.model) { 23 | const icoString = `https://www.zigbee2mqtt.io/images/devices/${this.sanitizeZ2MDeviceName(device.definition.model)}.jpg`; 24 | // eslint-disable-next-line no-control-regex 25 | return icoString.replace(/\u0000/g, ''); 26 | } 27 | } 28 | 29 | getZ2mDeviceImageModelPNG(device) { 30 | if (device && device.definition && device.definition.model) { 31 | const icoString = `https://www.zigbee2mqtt.io/images/devices/${this.sanitizeZ2MDeviceName(device.definition.model)}.png`; 32 | // eslint-disable-next-line no-control-regex 33 | return icoString.replace(/\u0000/g, ''); 34 | } 35 | } 36 | 37 | 38 | getSlsDeviceImage(device) { 39 | if (device && device.model_id) { 40 | const icoString = `https://www.zigbee2mqtt.io/images/devices/${this.sanitizeModelIDForImageUrl(device.model_id)}.png`; 41 | // eslint-disable-next-line no-control-regex 42 | return icoString.replace(/\u0000/g, ''); 43 | } 44 | } 45 | 46 | async getDeviceIcon(device) { 47 | if (!this.adapter.config.useDeviceIcons) return ''; 48 | 49 | const imageSize = this.adapter.config.deviceIconsSize; 50 | 51 | const z2mIconFileNameJPG = `${this.sanitizeZ2MDeviceName(device.definition.model)}.jpg`; 52 | const z2mIconFileNamePNG = `${this.sanitizeZ2MDeviceName(device.definition.model)}.png`; 53 | const slsIconFileName = `${this.sanitizeModelIDForImageUrl(device.model_id)}.png`; 54 | 55 | let iconFileName = await this.getExistingIconFileName(z2mIconFileNameJPG, z2mIconFileNamePNG, slsIconFileName); 56 | let iconFound = true; 57 | 58 | if (!iconFileName) { 59 | const iconUrls = [ 60 | this.getZ2mDeviceImageModelJPG(device), 61 | this.getZ2mDeviceImageModelPNG(device), 62 | this.getSlsDeviceImage(device) 63 | ]; 64 | 65 | for (const iconUrl of iconUrls) { 66 | try { 67 | iconFound = await this.downloadIcon(this.adapter, iconUrl, this.adapter.namespace); 68 | if (iconFound) { 69 | iconFileName = this.getFileNameWithExtension(iconUrl); 70 | break; 71 | } 72 | } catch (ex) { 73 | // check next pic 74 | } 75 | } 76 | } 77 | 78 | if (!iconFound) { 79 | this.adapter.log.warn(`Failed to download image for device model: ${device.definition.model} - ${device.definition.description}`); 80 | return ''; 81 | } else { 82 | // Load image from the Meta-Store 83 | const icon = await this.adapter.readFileAsync(this.adapter.namespace, iconFileName); 84 | // Load Image Metadata 85 | const origIconMeta = await sharp(icon.file).metadata(); 86 | // Check whether the image needs to be resized 87 | if ( 88 | (origIconMeta.height && origIconMeta.height > imageSize) || 89 | (origIconMeta.width && origIconMeta.width > imageSize) 90 | ) { 91 | // Resize image to 28x28 pixel 92 | this.adapter.log.info( 93 | `Resize image for device model ${device.definition.model} from: ${origIconMeta.width}x${origIconMeta.height} to ${imageSize}x${imageSize}` 94 | ); 95 | icon.file = await sharp(icon.file) 96 | .resize({ 97 | width: imageSize, 98 | height: imageSize, 99 | fit: sharp.fit.cover, 100 | position: sharp.strategy.entropy, 101 | }) 102 | .toBuffer(); 103 | // Replace the original image with the resize image. 104 | await this.adapter.writeFileAsync(this.adapter.namespace, iconFileName, icon.file); 105 | } 106 | 107 | // Create and output Base64 108 | return `data:image/png;base64,${icon.file.toString('base64')}`; 109 | } 110 | } 111 | getFileNameWithExtension(url) { 112 | const path = new URL(url).pathname; 113 | const filename = path.split('/').pop(); 114 | // eslint-disable-next-line no-control-regex 115 | return filename.replace(/\u0000/g, ''); 116 | } 117 | 118 | async downloadIcon(adapter, url, namespace) { 119 | try { 120 | const res = await axios.get(url, { responseType: 'arraybuffer' }); 121 | await adapter.writeFileAsync(namespace, this.getFileNameWithExtension(url), res.data); 122 | return true; 123 | } catch (ex) { 124 | //adapter.log.warn(ex); 125 | return false; 126 | } 127 | } 128 | async getExistingIconFileName(z2mIconFileNameJPG, z2mIconFileNamePNG, slsIconFileName) { 129 | if (await this.adapter.fileExistsAsync(this.adapter.namespace, z2mIconFileNameJPG)) { 130 | return z2mIconFileNameJPG; 131 | } else if (await this.adapter.fileExistsAsync(this.adapter.namespace, z2mIconFileNamePNG)) { 132 | return z2mIconFileNamePNG; 133 | } else if (await this.adapter.fileExistsAsync(this.adapter.namespace, slsIconFileName)) { 134 | return slsIconFileName; 135 | } 136 | return null; 137 | } 138 | } 139 | module.exports = { 140 | ImageController, 141 | }; 142 | -------------------------------------------------------------------------------- /lib/messages.js: -------------------------------------------------------------------------------- 1 | async function adapterInfo(config, log) { 2 | log.info('================================= Adapter Config ================================='); 3 | log.info(`|| Zigbee2MQTT Frontend Scheme: ${config.webUIScheme}`); 4 | log.info(`|| Zigbee2MQTT Frontend Server: ${config.webUIServer}`); 5 | log.info(`|| Zigbee2MQTT Frontend Port: ${config.webUIPort}`); 6 | log.info(`|| Zigbee2MQTT Connection Type: ${config.connectionType}`); 7 | if (config.connectionType == 'ws') { 8 | log.info(`|| Zigbee2MQTT Websocket Scheme: ${config.wsScheme}`); 9 | log.info(`|| Zigbee2MQTT Websocket Server: ${config.wsServerIP}`); 10 | log.info(`|| Zigbee2MQTT Websocket Port: ${config.wsServerPort}`); 11 | log.info(`|| Zigbee2MQTT Websocket Auth-Token: ${config.wsTokenEnabled ? 'use' : 'unused'}`); 12 | log.info(`|| Zigbee2MQTT Websocket Dummy MQTT-Server: ${config.dummyMqtt ? 'activated' : 'deactivated'}`); 13 | if (config.dummyMqtt == true) { 14 | log.info(`|| Zigbee2MQTT Dummy MQTT IP-Bind: ${config.mqttServerIPBind}`); 15 | log.info(`|| Zigbee2MQTT Dummy MQTT Port: ${config.mqttServerPort}`); 16 | } 17 | } else if (config.connectionType == 'exmqtt') { 18 | log.info(`|| Zigbee2MQTT Externanl MQTT Server: ${config.externalMqttServerIP}`); 19 | log.info(`|| Zigbee2MQTT Externanl MQTT Port: ${config.externalMqttServerPort}`); 20 | log.info( 21 | `|| Zigbee2MQTT Externanl MQTT Credentials: ${config.externalMqttServerCredentials ? 'use' : 'unused'}` 22 | ); 23 | } else if (config.connectionType == 'intmqtt') { 24 | log.info(`|| Zigbee2MQTT Internal MQTT IP-Bind: ${config.mqttServerIPBind}`); 25 | log.info(`|| Zigbee2MQTT Internal MQTT Port: ${config.mqttServerPort}`); 26 | } 27 | log.info(`|| Zigbee2MQTT Debug Log: ${config.debugLogEnabled ? 'activated' : 'deactivated'}`); 28 | log.info(`|| Proxy Zigbee2MQTT Logs to ioBroker Logs: ${config.proxyZ2MLogs ? 'activated' : 'deactivated'}`); 29 | log.info(`|| Use Kelvin: ${config.useKelvin ? 'yes' : 'no'}`); 30 | log.info(`|| Use ColorTemperature ColorSync: ${config.colorTempSyncColor ? 'yes' : 'no'}`); 31 | log.info(`|| Use BrightnessMove OnOff: ${config.brightnessMoveOnOff ? 'yes' : 'no'}`); 32 | log.info(`|| Use BrightnessStep OnOff: ${config.brightnessStepOnOff ? 'yes' : 'no'}`); 33 | log.info(`|| Use Event In Desc: ${config.useEventInDesc ? 'yes' : 'no'}`); 34 | log.info(`|| Use Device Icons: ${config.useDeviceIcons ? 'yes' : 'no'}`); 35 | log.info(`|| Use Simple Hold/Release State: ${config.simpleHoldReleaseState ? 'yes' : 'no'}`); 36 | log.info(`|| Use Simple Move/Stop State: ${config.simpleMoveStopState ? 'yes' : 'no'}`); 37 | log.info(`|| Use Simple Press/Release State: ${config.simplePressReleaseState ? 'yes' : 'no'}`); 38 | log.info(`|| Use Automatic Coordinator Check: ${config.coordinatorCheck ? 'yes' : 'no'}`); 39 | log.info(`|| Coordinator Check Loglevel: ${config.coordinatorCheckLogLvl}`); 40 | log.info(`|| Coordinator Check Cron : ${config.coordinatorCheckCron}`); 41 | log.info('=================================================================================='); 42 | } 43 | 44 | async function zigbee2mqttInfo(payload, log) { 45 | log.info('============================ Zigbee2MQTT Information ============================='); 46 | log.info(`|| Zigbee2MQTT Version: ${payload.version} `); 47 | log.info( 48 | `|| Coordinator type: ${payload.coordinator.type} Version: ${payload.coordinator.meta.revision} Serial: ${payload.config.serial.port}` 49 | ); 50 | log.info( 51 | `|| Network panid ${payload.network.pan_id} channel: ${payload.network.channel} ext_pan_id: ${payload.network.extended_pan_id}` 52 | ); 53 | log.info('=================================================================================='); 54 | } 55 | 56 | module.exports = { 57 | adapterInfo, 58 | zigbee2mqttInfo, 59 | }; 60 | -------------------------------------------------------------------------------- /lib/mqttServerController.js: -------------------------------------------------------------------------------- 1 | const core = require('@iobroker/adapter-core'); 2 | const Aedes = require('aedes'); 3 | const net = require('net'); 4 | let mqttServer; 5 | 6 | class MqttServerController { 7 | constructor(adapter) { 8 | this.adapter = adapter; 9 | } 10 | 11 | async createMQTTServer() { 12 | try { 13 | const NedbPersistence = require('aedes-persistence-nedb'); 14 | const db = new NedbPersistence({ 15 | path: `${core.getAbsoluteInstanceDataDir(this.adapter)}/mqttData`, 16 | prefix: '', 17 | }); 18 | // @ts-ignore 19 | const aedes = Aedes({ persistence: db }); 20 | mqttServer = net.createServer(aedes.handle); 21 | mqttServer.listen(this.adapter.config.mqttServerPort, this.adapter.config.mqttServerIPBind, () => { 22 | this.adapter.log.info( 23 | `Statring MQTT-Server on IP ${this.adapter.config.mqttServerIPBind} and Port ${this.adapter.config.mqttServerPort}` 24 | ); 25 | }); 26 | } catch (err) { 27 | this.adapter.log.error(err); 28 | } 29 | } 30 | 31 | async createDummyMQTTServer() { 32 | try { 33 | // @ts-ignore 34 | const aedes = Aedes(); 35 | mqttServer = net.createServer(aedes.handle); 36 | mqttServer.listen(this.adapter.config.mqttServerPort, this.adapter.config.mqttServerIPBind, () => { 37 | this.adapter.log.info( 38 | `Statring DummyMQTT-Server on IP ${this.adapter.config.mqttServerIPBind} and Port ${this.adapter.config.mqttServerPort}` 39 | ); 40 | }); 41 | } catch (err) { 42 | this.adapter.log.error(err); 43 | } 44 | } 45 | 46 | closeServer() { 47 | if (mqttServer && !mqttServer.closed()) { 48 | mqttServer.close(); 49 | } 50 | } 51 | } 52 | 53 | module.exports = { 54 | MqttServerController, 55 | }; 56 | -------------------------------------------------------------------------------- /lib/nonGenericDevicesExtension.js: -------------------------------------------------------------------------------- 1 | const nonGenDevStatesDefs = { 2 | // https://www.zigbee2mqtt.io/devices/HG06467.html#trigger-effects 3 | HG06467: [ 4 | { 5 | id: 'effect', 6 | prop: 'effect', 7 | name: 'effect', 8 | icon: undefined, 9 | role: 'state', 10 | write: true, 11 | read: true, 12 | type: 'string', 13 | def: '{"effect":{"effect":"snake","speed":100,"colors":[{"r":255,"g":0,"b":0},{"r":0,"g":255,"b":0},{"r":0,"g":0,"b":255}]}}', 14 | setter: (value) => { 15 | try { 16 | const valObj = JSON.parse(value); 17 | if (valObj.effect && valObj.effect.effect) { 18 | return valObj.effect; 19 | } 20 | return valObj; 21 | } catch (error) { 22 | return undefined; 23 | } 24 | }, 25 | getter: (payload) => { 26 | if (!payload.effect) { 27 | return undefined; 28 | } 29 | return JSON.stringify(payload.effect); 30 | }, 31 | }, 32 | ], 33 | }; 34 | 35 | function getStateDefinition(model) { 36 | const stateDef = nonGenDevStatesDefs[model]; 37 | if (stateDef) { 38 | return stateDef; 39 | } else { 40 | return []; 41 | } 42 | } 43 | 44 | module.exports = { 45 | getStateDefinition, 46 | }; 47 | -------------------------------------------------------------------------------- /lib/rgb.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-prototype-builtins */ 2 | /* 3 | With these functions you can convert the CIE color space to the RGB color space and vice versa. 4 | 5 | The developer documentation for Philips Hue provides the formulas used in the code below: 6 | https://developers.meethue.com/documentation/color-conversions-rgb-xy 7 | 8 | I've used the formulas and Objective-C example code and transfered it to JavaScript. 9 | 10 | 11 | Examples: 12 | 13 | const rgb = cie_to_rgb(0.6611, 0.2936) 14 | const cie = rgb_to_cie(255, 39, 60) 15 | 16 | ------------------------------------------------------------------------------------ 17 | 18 | The MIT License (MIT) 19 | 20 | Copyright (c) 2017 www.usolved.net 21 | Published under https://github.com/usolved/cie-rgb-converter 22 | 23 | Permission is hereby granted, free of charge, to any person obtaining a copy 24 | of this software and associated documentation files (the "Software"), to deal 25 | in the Software without restriction, including without limitation the rights 26 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 27 | copies of the Software, and to permit persons to whom the Software is 28 | furnished to do so, subject to the following conditions: 29 | 30 | The above copyright notice and this permission notice shall be included in 31 | all copies or substantial portions of the Software. 32 | 33 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 34 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 35 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 36 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 37 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 38 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 39 | THE SOFTWARE. 40 | */ 41 | 'use strict'; 42 | 43 | const colors = require('./colors.js'); 44 | 45 | /** 46 | * Converts CIE color space to RGB color space 47 | * @return {Array} Array that contains the color values for red, green and blue 48 | */ 49 | function cie_to_rgb(x, y, brightness) { 50 | //Set to maximum brightness if no custom value was given (Not the slick ECMAScript 6 way for compatibility reasons) 51 | if (brightness === undefined) { 52 | brightness = 254; 53 | } 54 | 55 | const z = 1.0 - x - y; 56 | const Y = (brightness / 254).toFixed(2); 57 | // @ts-ignore 58 | const X = (Y / y) * x; 59 | // @ts-ignore 60 | const Z = (Y / y) * z; 61 | 62 | //Convert to RGB using Wide RGB D65 conversion 63 | // @ts-ignore 64 | let red = X * 1.656492 - Y * 0.354851 - Z * 0.255038; 65 | // @ts-ignore 66 | let green = -X * 0.707196 + Y * 1.655397 + Z * 0.036152; 67 | // @ts-ignore 68 | let blue = X * 0.051713 - Y * 0.121364 + Z * 1.01153; 69 | 70 | //If red, green or blue is larger than 1.0 set it back to the maximum of 1.0 71 | if (red > blue && red > green && red > 1.0) { 72 | green = green / red; 73 | blue = blue / red; 74 | red = 1.0; 75 | } else if (green > blue && green > red && green > 1.0) { 76 | red = red / green; 77 | blue = blue / green; 78 | green = 1.0; 79 | } else if (blue > red && blue > green && blue > 1.0) { 80 | red = red / blue; 81 | green = green / blue; 82 | blue = 1.0; 83 | } 84 | 85 | //Reverse gamma correction 86 | red = red <= 0.0031308 ? 12.92 * red : (1.0 + 0.055) * Math.pow(red, 1.0 / 2.4) - 0.055; 87 | green = green <= 0.0031308 ? 12.92 * green : (1.0 + 0.055) * Math.pow(green, 1.0 / 2.4) - 0.055; 88 | blue = blue <= 0.0031308 ? 12.92 * blue : (1.0 + 0.055) * Math.pow(blue, 1.0 / 2.4) - 0.055; 89 | 90 | //Convert normalized decimal to decimal 91 | red = Math.round(red * 255); 92 | green = Math.round(green * 255); 93 | blue = Math.round(blue * 255); 94 | 95 | if (isNaN(red) || red < 0) { 96 | red = 0; 97 | } 98 | 99 | if (isNaN(green) || green < 0) { 100 | green = 0; 101 | } 102 | 103 | if (isNaN(blue) || blue < 0) { 104 | blue = 0; 105 | } 106 | 107 | return [red, green, blue]; 108 | } 109 | 110 | /** 111 | * Converts RGB color space to CIE color space 112 | * @param {Number} red 113 | * @param {Number} green 114 | * @param {Number} blue 115 | * @return {Array} Array that contains the CIE color values for x and y 116 | */ 117 | function rgb_to_cie(red, green, blue) { 118 | // Apply a gamma correction to the RGB values, which makes the color more vivid and more the like the color displayed on the screen of your device 119 | red = red > 0.04045 ? Math.pow((red + 0.055) / (1.0 + 0.055), 2.4) : red / 12.92; 120 | green = green > 0.04045 ? Math.pow((green + 0.055) / (1.0 + 0.055), 2.4) : green / 12.92; 121 | blue = blue > 0.04045 ? Math.pow((blue + 0.055) / (1.0 + 0.055), 2.4) : blue / 12.92; 122 | 123 | // RGB values to XYZ using the Wide RGB D65 conversion formula 124 | const X = red * 0.664511 + green * 0.154324 + blue * 0.162028; 125 | const Y = red * 0.283881 + green * 0.668433 + blue * 0.047685; 126 | const Z = red * 0.000088 + green * 0.07231 + blue * 0.986039; 127 | 128 | // Calculate the xy values from the XYZ values 129 | let x = (X / (X + Y + Z)).toFixed(4); 130 | let y = (Y / (X + Y + Z)).toFixed(4); 131 | 132 | // @ts-ignore 133 | if (isNaN(x)) { 134 | // @ts-ignore 135 | x = 0; 136 | } 137 | 138 | // @ts-ignore 139 | if (isNaN(y)) { 140 | // @ts-ignore 141 | y = 0; 142 | } 143 | 144 | return [x, y]; 145 | } 146 | 147 | function hsvToRGB(h, s, v) { 148 | h = (h % 360) / 360; 149 | s = s / 100; 150 | v = v / 100; 151 | 152 | let r; 153 | let g; 154 | let b; 155 | if (arguments.length === 1) { 156 | (s = h.s), (v = h.v), (h = h.h); 157 | } 158 | const i = Math.floor(h * 6); 159 | const f = h * 6 - i; 160 | const p = v * (1 - s); 161 | const q = v * (1 - f * s); 162 | const t = v * (1 - (1 - f) * s); 163 | switch (i % 6) { 164 | case 0: 165 | (r = v), (g = t), (b = p); 166 | break; 167 | case 1: 168 | (r = q), (g = v), (b = p); 169 | break; 170 | case 2: 171 | (r = p), (g = v), (b = t); 172 | break; 173 | case 3: 174 | (r = p), (g = q), (b = v); 175 | break; 176 | case 4: 177 | (r = t), (g = p), (b = v); 178 | break; 179 | case 5: 180 | (r = v), (g = p), (b = q); 181 | break; 182 | } 183 | return { 184 | r: Math.round(r * 255), 185 | g: Math.round(g * 255), 186 | b: Math.round(b * 255), 187 | }; 188 | } 189 | 190 | function rgbToHSV(r, g, b, numeric) { 191 | if (arguments.length === 1) { 192 | (g = r.g), (b = r.b), (r = r.r); 193 | } 194 | const max = Math.max(r, g, b); 195 | const min = Math.min(r, g, b); 196 | const d = max - min; 197 | let h; 198 | const s = max === 0 ? 0 : d / max; 199 | const v = max / 255; 200 | 201 | switch (max) { 202 | case min: 203 | h = 0; 204 | break; 205 | case r: 206 | h = g - b + d * (g < b ? 6 : 0); 207 | h /= 6 * d; 208 | break; 209 | case g: 210 | h = b - r + d * 2; 211 | h /= 6 * d; 212 | break; 213 | case b: 214 | h = r - g + d * 4; 215 | h /= 6 * d; 216 | break; 217 | } 218 | if (numeric) 219 | return { 220 | // @ts-ignore 221 | h: Math.round(h * 360), 222 | s: Math.round(s * 100), 223 | v: Math.round(v * 100), 224 | }; 225 | return { 226 | // @ts-ignore 227 | h: (h * 360).toFixed(3), 228 | s: (s * 100).toFixed(3), 229 | v: (v * 100).toFixed(3), 230 | }; 231 | } 232 | 233 | function colorArrayFromString(value) { 234 | if (typeof value === 'string') { 235 | const rv = []; 236 | value.split(',').forEach((element) => { 237 | rv.push(colors.ParseColor(element)); 238 | }); 239 | return rv; 240 | } 241 | return [{ r: 0, g: 128, b: 255 }]; 242 | } 243 | 244 | function colorStringFromRGBArray(payload) { 245 | const rv = []; 246 | payload.forEach((element) => { 247 | rv.push(rgb_to_rgbstring(element)); 248 | }); 249 | return rv.toString(); 250 | } 251 | 252 | function hsv_to_cie(h, s, v) { 253 | const rgb = hsvToRGB(h, s, v); 254 | return rgb_to_cie(rgb.r, rgb.g, rgb.b); 255 | } 256 | 257 | function rgb_to_rgbstring(element) { 258 | let col = '#'; 259 | if (element && element.hasOwnProperty('r')) col = col + element.r.toString(16).padStart(2, '0'); 260 | else col = col + '00'; 261 | if (element && element.hasOwnProperty('g')) col = col + element.g.toString(16).padStart(2, '0'); 262 | else col = col + '00'; 263 | if (element && element.hasOwnProperty('b')) col = col + element.b.toString(16).padStart(2, '0'); 264 | else col = col + '00'; 265 | return col; 266 | } 267 | 268 | function hsbToRGB(h, s, b) { 269 | const br = Math.round(b * 2.55); 270 | if (s == 0) { 271 | return [br, br, br]; 272 | } else { 273 | const hue = h % 360; 274 | const f = hue % 60; 275 | const p = Math.round(b * (100 - s) * 0.0255); 276 | const q = Math.round(b * (6000 - s * f) * 0.000425); 277 | const t = Math.round(b * (6000 - s * (60 - f)) * 0.000425); 278 | switch (Math.floor(hue / 60)) { 279 | case 0: 280 | return [br, t, p]; 281 | case 1: 282 | return [q, br, p]; 283 | case 2: 284 | return [p, br, t]; 285 | case 3: 286 | return [p, q, br]; 287 | case 4: 288 | return [t, p, br]; 289 | case 5: 290 | return [br, p, q]; 291 | } 292 | } 293 | return false; 294 | } 295 | 296 | function hsvToRGBString(h, s, v) { 297 | return rgb_to_rgbstring(hsvToRGB(h, s, v)); 298 | } 299 | 300 | module.exports = { 301 | hsv_to_cie, 302 | rgb_to_cie, 303 | cie_to_rgb, 304 | hsvToRGB, 305 | rgbToHSV, 306 | colorArrayFromString, 307 | colorStringFromRGBArray, 308 | hsvToRGBString, 309 | hsbToRGB, 310 | }; 311 | -------------------------------------------------------------------------------- /lib/statesController.js: -------------------------------------------------------------------------------- 1 | const utils = require('./utils'); 2 | const incStatsQueue = []; 3 | const timeOutCache = {}; 4 | 5 | class StatesController { 6 | constructor(adapter, deviceCache, groupCache, logCustomizations, createCache) { 7 | this.adapter = adapter; 8 | this.groupCache = groupCache; 9 | this.deviceCache = deviceCache; 10 | this.logCustomizations = logCustomizations; 11 | this.createCache = createCache; 12 | } 13 | 14 | processDeviceMessage(messageObj) { 15 | // Is payload present? 16 | if (messageObj.payload == '') { 17 | return; 18 | } 19 | 20 | const device = this.groupCache.concat(this.deviceCache).find((x) => x.id == messageObj.topic); 21 | if (device) { 22 | try { 23 | this.setDeviceStateSafely(messageObj, device); 24 | } catch (error) { 25 | this.adapter.log.error(error); 26 | } 27 | } else { 28 | incStatsQueue[incStatsQueue.length] = messageObj; 29 | this.adapter.log.debug(`Device: ${messageObj.topic} not found, queue state in incStatsQueue!`); 30 | } 31 | } 32 | 33 | async setDeviceStateSafely(messageObj, device) { 34 | if (this.logCustomizations.debugDevices.includes(device.ieee_address)) { 35 | this.adapter.log.warn(`--->>> fromZ2M -> ${device.ieee_address} states: ${JSON.stringify(messageObj)}`); 36 | } 37 | 38 | const actionStates = []; 39 | 40 | for (let [key, value] of Object.entries(messageObj.payload)) { 41 | if (value === undefined || value === null) { 42 | continue; 43 | } 44 | 45 | let states = device.states.filter(state => { 46 | return state.prop && state.prop === key; 47 | }); 48 | 49 | if (states.length == 0) { 50 | states = device.states.filter((x) => x.id == key); 51 | } 52 | 53 | if (states.length == 0) { 54 | if (key == 'device' || device.ieee_address.includes('group')) { 55 | // do nothing 56 | } else { 57 | // some devices has addition information in payload 58 | const fullPath = `${device.ieee_address}.additional`; 59 | 60 | await this.adapter.setObjectNotExistsAsync(fullPath, { 61 | type: 'channel', 62 | common: { 63 | name: 'hidden channelstate', 64 | }, 65 | native: {}, 66 | }); 67 | await this.adapter.setObjectNotExistsAsync(`${fullPath}.${key}`, { 68 | type: 'state', 69 | common: { 70 | name: key, 71 | role: 'state', 72 | type: value !== null ? typeof value : 'mixed', 73 | write: false, 74 | read: true, 75 | }, 76 | native: {}, 77 | }); 78 | if (typeof value == 'object') { 79 | value = JSON.stringify(value); 80 | } 81 | this.adapter.setState(`${fullPath}.${key}`, value, true); 82 | } 83 | continue; 84 | } 85 | 86 | for (const state of states) { 87 | const stateName = `${device.ieee_address}.${state.id}`; 88 | 89 | // set available status if last_seen is set 90 | if (state.id === 'last_seen' && this.adapter.config.allwaysUpdateAvailableState === true) { 91 | await this.setStateSafelyAsync(`${device.ieee_address}.available`, true); 92 | } 93 | 94 | // It may be that the state has not yet been created! 95 | if (!this.createCache[device.ieee_address] 96 | || !this.createCache[device.ieee_address][state.id] 97 | || !this.createCache[device.ieee_address][state.id].created == true) { 98 | incStatsQueue[incStatsQueue.length] = messageObj; 99 | continue; 100 | } 101 | 102 | try { 103 | // Is an action 104 | if (state.prop && state.prop == 'action') { 105 | actionStates.push(state); 106 | } 107 | // Is not an action 108 | // check if its a motion sensor (occupancy state) and if configuration is set to update state every time 109 | // if yes, use setStateSafelyAsync instead of setStateChangedSafelyAsync 110 | else if ( 111 | this.adapter.config.allwaysUpdateOccupancyState === true && 112 | state.id === 'occupancy' && 113 | value === true 114 | ) { 115 | await this.setStateSafelyAsync(stateName, value); 116 | } 117 | // end section for motion sensor update 118 | else { 119 | if (state.getter) { 120 | await this.setStateChangedSafelyAsync(stateName, state.getter(messageObj.payload)); 121 | } else { 122 | await this.setStateChangedSafelyAsync(stateName, value); 123 | } 124 | } 125 | } catch (err) { 126 | incStatsQueue[incStatsQueue.length] = messageObj; 127 | this.adapter.log.debug(`Can not set ${stateName}, queue state in incStatsQueue!`); 128 | } 129 | } 130 | } 131 | 132 | for (const state of actionStates) { 133 | const stateName = `${device.ieee_address}.${state.id}`; 134 | 135 | try { 136 | if (state.isEvent && state.isEvent == true) { 137 | if (state.type == 'boolean') { 138 | await this.setStateWithTimeoutAsync(stateName, state.getter(messageObj.payload), 450); 139 | } else { 140 | await this.setStateSafelyAsync(stateName, state.getter(messageObj.payload)); 141 | } 142 | } else { 143 | await this.setStateChangedSafelyAsync(stateName, state.getter(messageObj.payload)); 144 | } 145 | } catch (err) { 146 | incStatsQueue[incStatsQueue.length] = messageObj; 147 | this.adapter.log.debug(`Can not set ${stateName}, queue state in incStatsQueue!`); 148 | } 149 | } 150 | } 151 | 152 | async setStateSafelyAsync(stateName, value) { 153 | if (value === undefined || value === null) { 154 | return; 155 | } 156 | await this.adapter.setStateAsync(stateName, value, true); 157 | } 158 | 159 | async setStateChangedSafelyAsync(stateName, value) { 160 | if (value === undefined || value === null) { 161 | return; 162 | } 163 | await this.adapter.setStateChangedAsync(stateName, value, true); 164 | } 165 | 166 | async setStateWithTimeoutAsync(stateName, value, timeout) { 167 | if (value === undefined || value === null) { 168 | return; 169 | } 170 | 171 | await this.adapter.setStateAsync(stateName, value, true); 172 | if (timeOutCache[stateName]) { 173 | clearTimeout(timeOutCache[stateName]); 174 | } 175 | timeOutCache[stateName] = setTimeout(() => { 176 | this.adapter.setStateAsync(stateName, !value, true); 177 | }, timeout); 178 | } 179 | 180 | processQueue() { 181 | const oldIncStatsQueue = []; 182 | utils.moveArray(incStatsQueue, oldIncStatsQueue); 183 | while (oldIncStatsQueue.length > 0) { 184 | this.processDeviceMessage(oldIncStatsQueue.shift()); 185 | } 186 | } 187 | 188 | async subscribeWritableStates() { 189 | await this.adapter.unsubscribeObjectsAsync('*'); 190 | for (const device of this.groupCache.concat(this.deviceCache)) { 191 | for (const state of device.states) { 192 | if (state.write == true) { 193 | this.adapter.subscribeStates(`${device.ieee_address}.${state.id}`); 194 | } 195 | } 196 | } 197 | this.adapter.subscribeStates('info.debugmessages'); 198 | this.adapter.subscribeStates('info.logfilter'); 199 | this.adapter.subscribeStates('info.coordinator_check'); 200 | } 201 | 202 | async setAllAvailableToFalse() { 203 | const availableStates = await this.adapter.getStatesAsync('*.available'); 204 | for (const availableState in availableStates) { 205 | await this.adapter.setStateChangedAsync(availableState, false, true); 206 | } 207 | } 208 | 209 | async allTimerClear() { 210 | for (const timer in timeOutCache) { 211 | clearTimeout(timeOutCache[timer]); 212 | } 213 | } 214 | } 215 | 216 | module.exports = { 217 | StatesController, 218 | }; 219 | -------------------------------------------------------------------------------- /lib/utils.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Converts a bulb level of range [0...254] to an adapter level of range [0...100] 3 | */ 4 | function bulbLevelToAdapterLevel(bulbLevel) { 5 | // Convert from bulb levels [0...254] to adapter levels [0...100]: 6 | // - Bulb level 0 is a forbidden value according to the ZigBee spec "ZigBee Cluster Library 7 | // (for ZigBee 3.0) User Guide", but some bulbs (HUE) accept this value and interpret this 8 | // value as "switch the bulb off". 9 | // - A bulb level of "1" is the "minimum possible level" which should mean "bulb off", 10 | // but there are bulbs that do not switch off (they need "0", some IKEA bulbs are affected). 11 | // - No visible difference was seen between bulb level 1 and 2 on HUE LCT012 bulbs. 12 | // 13 | // Conclusion: 14 | // - We map adapter level "0" to the (forbidden) bulb level "0" that seems to switch all 15 | // known bulbs. 16 | // - Bulb level "1" is not used, but if received nevertheless, it is converted to 17 | // adapter level "0" (off). 18 | // - Bulb level range [2...254] is linearly mapped to adapter level range [1...100]. 19 | if (bulbLevel >= 2) { 20 | // Perform linear mapping of range [2...254] to [1...100] 21 | return Math.round(((bulbLevel - 2) * 99) / 252) + 1; 22 | } else { 23 | // The bulb is considered off. Even a bulb level of "1" is considered as off. 24 | return 0; 25 | } // else 26 | } 27 | 28 | /** 29 | * Converts an adapter level of range [0...100] to a bulb level of range [0...254] 30 | */ 31 | function adapterLevelToBulbLevel(adapterLevel) { 32 | // Convert from adapter levels [0...100] to bulb levels [0...254]. 33 | // This is the inverse of function bulbLevelToAdapterLevel(). 34 | // Please read the comments there regarding the rules applied here for mapping the values. 35 | if (adapterLevel) { 36 | // Perform linear mapping of range [1...100] to [2...254] 37 | return Math.round(((adapterLevel - 1) * 252) / 99) + 2; 38 | } else { 39 | // Switch the bulb off. Some bulbs need "0" (IKEA), others "1" (HUE), and according to the 40 | // ZigBee docs "1" is the "minimum possible level"... we choose "0" here which seems to work. 41 | return 0; 42 | } // else 43 | } 44 | 45 | function bytesArrayToWordArray(ba) { 46 | const wa = []; 47 | for (let i = 0; i < ba.length; i++) { 48 | wa[(i / 2) | 0] |= ba[i] << (8 * (i % 2)); 49 | } 50 | return wa; 51 | } 52 | 53 | // If the value is greater than 1000, kelvin is assumed. 54 | // If smaller, it is assumed to be mired. 55 | function toMired(t) { 56 | let miredValue = t; 57 | if (t > 1000) { 58 | miredValue = miredKelvinConversion(t); 59 | } 60 | return miredValue; 61 | } 62 | 63 | function miredKelvinConversion(t) { 64 | return Math.round(1000000 / t); 65 | } 66 | 67 | /** 68 | * Converts a decimal number to a hex string with zero-padding 69 | */ 70 | function decimalToHex(decimal, padding) { 71 | let hex = Number(decimal).toString(16); 72 | padding = typeof padding === 'undefined' || padding === null ? (padding = 2) : padding; 73 | 74 | while (hex.length < padding) { 75 | hex = `0${hex}`; 76 | } 77 | 78 | return hex; 79 | } 80 | 81 | function getZbId(adapterDevId) { 82 | const idx = adapterDevId.indexOf('group'); 83 | if (idx > 0) return adapterDevId.substr(idx + 6); 84 | return '0x' + adapterDevId.split('.')[2]; 85 | } 86 | 87 | function getAdId(adapter, id) { 88 | return adapter.namespace + '.' + id.split('.')[2]; // iobroker device id 89 | } 90 | 91 | function clearArray(array) { 92 | while (array.length > 0) { 93 | array.pop(); 94 | } 95 | } 96 | 97 | function moveArray(source, target) { 98 | while (source.length > 0) { 99 | target.push(source.shift()); 100 | } 101 | } 102 | 103 | function isObject(item) { 104 | return typeof item === 'object' && !Array.isArray(item) && item !== null; 105 | } 106 | 107 | function isJson(item) { 108 | let value = typeof item !== 'string' ? JSON.stringify(item) : item; 109 | try { 110 | value = JSON.parse(value); 111 | } catch (e) { 112 | return false; 113 | } 114 | 115 | return typeof value === 'object' && value !== null; 116 | } 117 | 118 | module.exports = { 119 | bulbLevelToAdapterLevel, 120 | adapterLevelToBulbLevel, 121 | bytesArrayToWordArray, 122 | toMired, 123 | miredKelvinConversion, 124 | decimalToHex, 125 | getZbId, 126 | getAdId, 127 | clearArray, 128 | moveArray, 129 | isObject, 130 | isJson, 131 | }; 132 | -------------------------------------------------------------------------------- /lib/websocketController.js: -------------------------------------------------------------------------------- 1 | const WebSocket = require('ws'); 2 | let wsClient; 3 | const wsHeartbeatIntervall = 5000; 4 | const restartTimeout = 1000; 5 | let ping; 6 | let pingTimeout; 7 | let autoRestartTimeout; 8 | 9 | class WebsocketController { 10 | constructor(adapter) { 11 | this.adapter = adapter; 12 | } 13 | 14 | initWsClient() { 15 | try { 16 | let wsURL = `${this.adapter.config.wsScheme}://${this.adapter.config.wsServerIP}:${this.adapter.config.wsServerPort}/api`; 17 | 18 | if (this.adapter.config.wsTokenEnabled == true) { 19 | wsURL += `?token=${this.adapter.config.wsToken}`; 20 | } 21 | 22 | wsClient = new WebSocket(wsURL, { rejectUnauthorized: false }); 23 | 24 | wsClient.on('open', () => { 25 | // Send ping to server 26 | this.sendPingToServer(); 27 | // Start Heartbeat 28 | this.wsHeartbeat(); 29 | }); 30 | 31 | wsClient.on('pong', () => { 32 | this.wsHeartbeat(); 33 | }); 34 | 35 | wsClient.on('close', async () => { 36 | clearTimeout(pingTimeout); 37 | clearTimeout(ping); 38 | 39 | if (wsClient.readyState === WebSocket.CLOSED) { 40 | this.autoRestart(); 41 | } 42 | }); 43 | 44 | wsClient.on('message', () => {}); 45 | 46 | wsClient.on('error', (err) => { 47 | this.adapter.log.debug(err); 48 | }); 49 | 50 | return wsClient; 51 | } catch (err) { 52 | this.adapter.log.error(err); 53 | } 54 | } 55 | 56 | send(message) { 57 | if (wsClient.readyState !== WebSocket.OPEN) { 58 | this.adapter.log.warn('Cannot set State, no websocket connection to Zigbee2MQTT!'); 59 | return; 60 | } 61 | wsClient.send(message); 62 | } 63 | 64 | sendPingToServer() { 65 | //this.logDebug('Send ping to server'); 66 | wsClient.ping(); 67 | ping = setTimeout(() => { 68 | this.sendPingToServer(); 69 | }, wsHeartbeatIntervall); 70 | } 71 | 72 | wsHeartbeat() { 73 | clearTimeout(pingTimeout); 74 | pingTimeout = setTimeout(() => { 75 | this.adapter.log.warn('Websocked connection timed out'); 76 | wsClient.terminate(); 77 | }, wsHeartbeatIntervall + 3000); 78 | } 79 | 80 | async autoRestart() { 81 | this.adapter.log.warn(`Start try again in ${restartTimeout / 1000} seconds...`); 82 | autoRestartTimeout = setTimeout(() => { 83 | this.adapter.startWebsocket(); 84 | }, restartTimeout); 85 | } 86 | 87 | closeConnection() { 88 | if (wsClient && wsClient.readyState !== WebSocket.CLOSED) { 89 | wsClient.close(); 90 | } 91 | } 92 | 93 | async allTimerClear() { 94 | clearTimeout(pingTimeout); 95 | clearTimeout(ping); 96 | clearTimeout(autoRestartTimeout); 97 | } 98 | } 99 | 100 | module.exports = { 101 | WebsocketController, 102 | }; 103 | -------------------------------------------------------------------------------- /lib/z2mController.js: -------------------------------------------------------------------------------- 1 | class Z2mController { 2 | constructor(adapter, deviceCache, groupCache, logCustomizations) { 3 | this.adapter = adapter; 4 | this.groupCache = groupCache; 5 | this.deviceCache = deviceCache; 6 | this.logCustomizations = logCustomizations; 7 | } 8 | 9 | async createZ2MMessage(id, state) { 10 | const splitedID = id.split('.'); 11 | if (splitedID.length < 4) { 12 | this.adapter.log.warn(`state ${id} not valid`); 13 | return; 14 | } 15 | 16 | if (id.endsWith('info.coordinator_check')) { 17 | return { topic: 'bridge/request/coordinator_check', payload: '' }; 18 | } 19 | 20 | const ieee_address = splitedID[2]; 21 | const stateName = splitedID[3]; 22 | 23 | const device = this.groupCache.concat(this.deviceCache).find((d) => d.ieee_address == ieee_address); 24 | if (!device) { 25 | return; 26 | } 27 | 28 | const deviceState = device.states.find((s) => s.id == stateName); 29 | if (!deviceState) { 30 | return; 31 | } 32 | 33 | let stateVal = state.val; 34 | if (deviceState.setter) { 35 | stateVal = deviceState.setter(state.val); 36 | } 37 | 38 | let stateID = deviceState.id; 39 | if (deviceState.prop) { 40 | stateID = deviceState.prop; 41 | } 42 | 43 | if (deviceState.setattr) { 44 | stateID = deviceState.setattr; 45 | } 46 | 47 | const controlObj = { 48 | payload: { 49 | [stateID]: stateVal, 50 | }, 51 | topic: `${device.id}/set`, 52 | }; 53 | 54 | if (stateID == 'send_payload') { 55 | try { 56 | controlObj.payload = JSON.parse(stateVal); 57 | this.adapter.setState(id, state, true); 58 | } catch (error) { 59 | controlObj.payload = stateVal.replaceAll(' ', '').replaceAll('\n', ''); 60 | this.adapter.log.warn( 61 | `${device.ieee_address} state: ${stateID} error: value passed is not a valid JSON` 62 | ); 63 | this.adapter.log.debug(`${device.ieee_address} states: ${JSON.stringify(controlObj)} error: ${error}`); 64 | return; 65 | } 66 | } 67 | 68 | // if available read option and set payload 69 | if (deviceState.options) { 70 | for (const option of deviceState.options) { 71 | // if optionsValues not set, set it! 72 | if (!device.optionsValues[option]) { 73 | const optionValue = ( 74 | await this.adapter.getStateAsync(`${splitedID[0]}.${splitedID[1]}.${splitedID[2]}.${option}`) 75 | ).val; 76 | // optionsValues Cache 77 | device.optionsValues[option] = optionValue; 78 | } 79 | 80 | // if transition value == -1 it will be ignored. -1 stands for no overwrite! 81 | if (option == 'transition' && device.optionsValues[option] == -1) { 82 | continue; 83 | } 84 | 85 | controlObj.payload[option] = device.optionsValues[option]; 86 | } 87 | } 88 | 89 | // If an option datapoint has been set, it does not have to be sent. 90 | // This is confirmed directly by the adapter (ack = true) 91 | if (deviceState.isOption && deviceState.isOption == true) { 92 | // set optionsValues 'Cache' 93 | device.optionsValues[stateName] = state.val; 94 | this.adapter.setState(id, state, true); 95 | return; 96 | } 97 | 98 | // set stats with the mentioned roles or always immediately to ack = true, because these are not reported back by Zigbee2MQTT 99 | if (['button'].includes(deviceState.role)) { 100 | this.adapter.setState(id, state, true); 101 | } 102 | // set stats with the mentioned ids always immediately to ack = true, because these are not reported back by Zigbee2MQTT 103 | if ( 104 | ['brightness_move', 'colortemp_move', 'brightness_move', 'brightness_step', 'effect'].includes( 105 | deviceState.id 106 | ) 107 | ) { 108 | this.adapter.setState(id, state, true); 109 | } 110 | 111 | if (this.logCustomizations.debugDevices.includes(device.ieee_address)) { 112 | this.adapter.log.warn(`<<<--- toZ2M -> ${device.ieee_address} states: ${JSON.stringify(controlObj)}`); 113 | } 114 | return controlObj; 115 | } 116 | 117 | async proxyZ2MLogs(messageObj) { 118 | const logMessage = messageObj.payload.message; 119 | if (this.logCustomizations.logfilter.some((x) => logMessage.includes(x))) { 120 | return; 121 | } 122 | 123 | const logLevel = messageObj.payload.level; 124 | switch (logLevel) { 125 | case 'debug': 126 | case 'info': 127 | case 'error': 128 | this.adapter.log[logLevel](logMessage); 129 | break; 130 | case 'warning': 131 | this.adapter.log.warn(logMessage); 132 | break; 133 | } 134 | } 135 | } 136 | 137 | module.exports = { 138 | Z2mController: Z2mController, 139 | }; 140 | -------------------------------------------------------------------------------- /main.test.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * This is a dummy TypeScript test file using chai and mocha 5 | * 6 | * It's automatically excluded from npm and its build output is excluded from both git and npm. 7 | * It is advised to test all your modules with accompanying *.test.js-files 8 | */ 9 | 10 | // tslint:disable:no-unused-expression 11 | 12 | const { expect } = require('chai'); 13 | // import { functionToTest } from "./moduleToTest"; 14 | 15 | describe('module to test => function to test', () => { 16 | // initializing logic 17 | const expected = 5; 18 | 19 | it(`should return ${expected}`, () => { 20 | const result = 5; 21 | // assign result a value from functionToTest 22 | expect(result).to.equal(expected); 23 | // or using the should() syntax 24 | result.should.equal(expected); 25 | }); 26 | // ... more tests => it 27 | }); 28 | 29 | // ... more test suites => describe 30 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iobroker.zigbee2mqtt", 3 | "version": "3.0.6", 4 | "description": "Zigbee2MQTT adapter for ioBroker", 5 | "author": { 6 | "name": "Dennis Rathjen and Arthur Rupp", 7 | "email": "arteck@outlook.com" 8 | }, 9 | "homepage": "https://github.com/arteck/ioBroker.zigbee2mqtt", 10 | "license": "MIT", 11 | "keywords": [ 12 | "zigbee2mqtt", 13 | "zigbee", 14 | "ioBroker", 15 | "template", 16 | "Smart Home", 17 | "home automation" 18 | ], 19 | "repository": { 20 | "type": "git", 21 | "url": "https://github.com/arteck/ioBroker.zigbee2mqtt.git" 22 | }, 23 | "engines": { 24 | "node": ">= 20" 25 | }, 26 | "dependencies": { 27 | "@iobroker/adapter-core": "^3.2.3", 28 | "@iobroker/dm-utils": "^1.0.10", 29 | "aedes": "^0.51.3", 30 | "aedes-persistence-nedb": "^2.0.3", 31 | "mqtt": "^5.10.4", 32 | "net": "^1.0.2", 33 | "node-schedule": "^2.1.1", 34 | "sharp": "^0.33.5", 35 | "ws": "^8.18.2" 36 | }, 37 | "devDependencies": { 38 | "@alcalzone/release-script": "^3.8.0", 39 | "@alcalzone/release-script-plugin-iobroker": "^3.7.0", 40 | "@alcalzone/release-script-plugin-license": "^3.7.0", 41 | "@alcalzone/release-script-plugin-manual-review": "^3.7.0", 42 | "@iobroker/adapter-dev": "^1.4.0", 43 | "@iobroker/testing": "^5.0.4", 44 | "@tsconfig/node14": "^14.1.3", 45 | "@types/chai": "^5.2.2", 46 | "@types/chai-as-promised": "^8.0.2", 47 | "@types/mocha": "^10.0.10", 48 | "@types/node": "^22.15.29", 49 | "@types/node-schedule": "^2.1.7", 50 | "@types/proxyquire": "^1.3.31", 51 | "@types/sinon": "^17.0.3", 52 | "@types/sinon-chai": "^4.0.0", 53 | "chai": "^5.2.0", 54 | "chai-as-promised": "^8.0.1", 55 | "eslint": "^9.25.1", 56 | "eslint-config-prettier": "^10.1.5", 57 | "eslint-plugin-prettier": "^5.2.3", 58 | "mocha": "^11.0.1", 59 | "prettier": "^3.5.3", 60 | "proxyquire": "^2.1.3", 61 | "sinon": "^19.0.2", 62 | "sinon-chai": "^4.0.0", 63 | "typescript": "~5.8.2" 64 | }, 65 | "main": "main.js", 66 | "files": [ 67 | "admin{,/!(src)/**}/!(tsconfig|tsconfig.*|.eslintrc).json", 68 | "admin{,/!(src)/**}/*.{html,css,png,svg,jpg,js}", 69 | "lib/", 70 | "www/", 71 | "io-package.json", 72 | "LICENSE", 73 | "main.js" 74 | ], 75 | "scripts": { 76 | "test:js": "mocha --config test/mocharc.custom.json \"{!(node_modules|test)/**/*.test.js,*.test.js,test/**/test!(PackageFiles|Startup).js}\"", 77 | "test:package": "mocha test/package --exit", 78 | "test:integration": "mocha test/integration --exit", 79 | "test": "npm run test:js && npm run test:package", 80 | "check": "tsc --noEmit -p tsconfig.check.json", 81 | "lint": "eslint .", 82 | "translate": "translate-adapter", 83 | "release": "release-script" 84 | }, 85 | "bugs": { 86 | "url": "https://github.com/arteck/ioBroker.zigbee2mqtt/issues" 87 | }, 88 | "readmeFilename": "README.md" 89 | } 90 | -------------------------------------------------------------------------------- /test/integration.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const { tests } = require('@iobroker/testing'); 3 | 4 | // Run integration tests - See https://github.com/ioBroker/testing for a detailed explanation and further options 5 | tests.integration(path.join(__dirname, '..')); 6 | -------------------------------------------------------------------------------- /test/mocha.setup.js: -------------------------------------------------------------------------------- 1 | // Don't silently swallow unhandled rejections 2 | process.on('unhandledRejection', (e) => { 3 | throw e; 4 | }); 5 | 6 | // enable the should interface with sinon 7 | // and load chai-as-promised and sinon-chai by default 8 | const sinonChai = require('sinon-chai'); 9 | const chaiAsPromised = require('chai-as-promised'); 10 | const { should, use } = require('chai'); 11 | 12 | should(); 13 | use(sinonChai); 14 | use(chaiAsPromised); 15 | -------------------------------------------------------------------------------- /test/mocharc.custom.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": [ 3 | "test/mocha.setup.js" 4 | ], 5 | "watch-files": [ 6 | "!(node_modules|test)/**/*.test.js", 7 | "*.test.js", 8 | "test/**/test!(PackageFiles|Startup).js" 9 | ] 10 | } -------------------------------------------------------------------------------- /test/package.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const { tests } = require('@iobroker/testing'); 3 | 4 | // Validate the package files 5 | tests.packageFiles(path.join(__dirname, '..')); 6 | -------------------------------------------------------------------------------- /test/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "noImplicitAny": false 5 | }, 6 | "include": ["./**/*.js"] 7 | } 8 | -------------------------------------------------------------------------------- /tsconfig.check.json: -------------------------------------------------------------------------------- 1 | // Specialized tsconfig for type-checking js files 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": {}, 5 | "include": ["**/*.js", "**/*.d.ts"], 6 | "exclude": ["**/build", "node_modules/", "widgets/"] 7 | } 8 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | // Root tsconfig to set the settings and power editor support for all TS files 2 | { 3 | // To update the compilation target, install a different version of @tsconfig/node... and reference it here 4 | // https://github.com/tsconfig/bases#node-14-tsconfigjson 5 | "extends": "@tsconfig/node14/tsconfig.json", 6 | "compilerOptions": { 7 | // do not compile anything, this file is just to configure type checking 8 | "noEmit": true, 9 | 10 | // check JS files 11 | "allowJs": true, 12 | "checkJs": true, 13 | 14 | // This is necessary for the automatic typing of the adapter config 15 | "resolveJsonModule": true, 16 | 17 | // If you want to disable the stricter type checks (not recommended), uncomment the following line 18 | // "strict": false, 19 | // And enable some of those features for more fine-grained control 20 | // "strictNullChecks": true, 21 | // "strictPropertyInitialization": true, 22 | // "strictBindCallApply": true, 23 | "noImplicitAny": false, 24 | // "noUnusedLocals": true, 25 | // "noUnusedParameters": true, 26 | "useUnknownInCatchVariables": false 27 | }, 28 | "include": ["**/*.js", "**/*.d.ts"], 29 | "exclude": ["node_modules/**", "widgets/**"] 30 | } 31 | --------------------------------------------------------------------------------