MCPcopy Index your code
hub / github.com/Koenkk/zigbee-herdsman-converters

github.com/Koenkk/zigbee-herdsman-converters @v26.78.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v26.78.0 ↗ · + Follow
1,429 symbols 4,514 edges 444 files 63 documented · 4% 1 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

NPM

zigbee-herdsman-converters

Collection of device converters to be used with zigbee-herdsman.

Contributing

See Zigbee2MQTT how to support new devices.

Creating a pull request

Github codespaces

You can use Github codespaces to create pull requests with a fully setup editor, right from your web browser: - https://docs.github.com/en/codespaces/developing-in-a-codespace/creating-a-codespace-for-a-repository - https://docs.github.com/en/codespaces/developing-in-a-codespace/using-github-codespaces-for-pull-requests

Locally

Install the prerequisites:

npm install -g pnpm
pnpm install --frozen-lockfile

Submitting your pull request

Before you submit a pull request, you should run the following commands to ensure your changes will pass the tests:

pnpm run check --fix
pnpm run build
pnpm test

If any of those commands finish with an error your PR won't pass the tests and will likely be rejected.

Breaking changes

25.0.0

  • Changed the onEvent api, see https://github.com/Koenkk/zigbee-herdsman-converters/pull/9650 for more info.
  • A device argument has been added to postProcessConvertedFromZigbeeMessage (https://github.com/Koenkk/zigbee-herdsman-converters/pull/9693)
  • rawData now needs to be provided to Fz.Message.meta (https://github.com/Koenkk/zigbee-herdsman-converters/pull/9775)

24.0.0

  • It's not longer possible to call definition.exposes(undefined, undefined), use definition.exposes({isDummyDevice: true}, {}) instead (#9601)

23.0.0

  • A Publish now has to be passed to toZigbee converters (#8875)

22.0.0

  • addDefinition has been renamed to addExternalDefinition
  • An import of zigbee-herdsman-converters does not expose all definitions anymore. Use this instead:
(await import('zigbee-herdsman-converters/devices/index')).default.forEach((baseDefinition) => {
    const d = zhc.prepareDefinition(baseDefinition);
});

21.0.0

20.0.0

  • A toZigbee converter is now allowed to not define any key, in this case the converter should be used for any key.

19.0.0

  • Legacy extend was removed

18.0.0

  • After converting a message with a fromZigbee converter, postProcessConvertedFromZigbeeMessage should be called now (for applying calibration/precision)

17.0.0

  • Various methods in index.ts are now async and return a Promise

15.0.0

  • OTA isUpdateAvailable now returns an object instead of a boolean (e.g. {available: true, currentFileVersion: 120, otaFileVersion: 125})
  • OTA updateToLatest now returns a number (fileVersion of the new OTA) instead of a void

Extension points exported contracts — how you extend this code

State (Interface)
(no doc)
test/sonoff.test.ts
MockEndpointArgs (Interface)
(no doc)
test/utils.ts
IntegrationAssertion (Interface)
(no doc)
test/inovelli.test.ts
ManuSpecificCentraliteHumidity (Interface)
(no doc)
src/devices/centralite.ts
HeimanSpecificAirQualityCluster (Interface)
(no doc)
src/lib/heiman.ts
MqttRawPayload (Interface)
(no doc)
src/converters/actions.ts
RadarSensorHeimanZcl (Interface)
(no doc)
src/devices/heiman.ts
HeimanSpecificAirQualityShortCluster (Interface)
(no doc)
src/lib/heiman.ts

Core symbols most depended-on inside this repo

withDescription
called by 5049
src/lib/exposes.ts
withValueMin
called by 1688
src/lib/exposes.ts
withUnit
called by 1681
src/lib/exposes.ts
withValueMax
called by 1652
src/lib/exposes.ts
withEndpoint
called by 1084
src/lib/exposes.ts
withValueStep
called by 923
src/lib/exposes.ts
withCategory
called by 531
src/lib/exposes.ts
withFeature
called by 484
src/lib/exposes.ts

Shape

Function 953
Interface 313
Method 117
Class 42
Enum 4

Languages

TypeScript100%

Modules by API surface

src/lib/lumi.ts143 symbols
src/lib/exposes.ts109 symbols
src/lib/tuya.ts96 symbols
src/lib/modernExtend.ts93 symbols
src/devices/sonoff.ts85 symbols
src/lib/utils.ts65 symbols
src/lib/reporting.ts53 symbols
src/devices/shelly.ts50 symbols
src/lib/color.ts48 symbols
src/lib/legacy.ts41 symbols
src/lib/ikea.ts37 symbols
src/lib/inovelli.ts28 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add zigbee-herdsman-converters \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact