Everybody is invited and welcome to contribute to Zigbee2MQTT. Zigbee2MQTT is written in JavaScript and is based upon zigbee-herdsman and zigbee-herdsman-converters. Zigbee-herdsman-converters contains all device definitions, zigbee-herdsman is responsible for handling all communication with the adapter.
- Pull requests are always created against the dev branch.
- Easiest way to start developing Zigbee2MQTT is by setting up a development environment (aka bare-metal installation). You can follow this guide to do this.
- You can run the tests locally by executing
npm test
. Zigbee2MQTT enforces 100% code coverage, in case you add new code check if your code is covered by runningnpm run test-with-coverage
. The coverage report can be found undercoverage/lcov-report/index.html
. Linting is also enforced and can be run withnpm run eslint
. - When you want to add support for a new device no changes to Zigbee2MQTT have to be made, only to zigbee-herdsman-converters. You can find a guide for it here.