diff --git a/server/services/zigbee2mqtt/adapters/index.js b/server/services/zigbee2mqtt/adapters/index.js index 0b2dfa3e59..3d4533511a 100644 --- a/server/services/zigbee2mqtt/adapters/index.js +++ b/server/services/zigbee2mqtt/adapters/index.js @@ -1,12 +1,12 @@ const CONFIG_KEYS = { DECONZ: 'deconz', - EZSP: 'ezsp', + EMBER: 'ember', NONE: 'none', }; const ADAPTERS_BY_CONFIG_KEY = { [CONFIG_KEYS.DECONZ]: ['ConBee', 'ConBee II', 'RaspBee', 'RaspBee II'], - [CONFIG_KEYS.EZSP]: [ + [CONFIG_KEYS.EMBER]: [ 'CoolKit ZB-GW04 USB dongle (a.k.a. easyiot stick)', 'Elelabs ELU013 and Popp ZB-STICK', 'Elelabs Zigbee Raspberry Pi Shield/Popp ZB-Shield', diff --git a/server/services/zigbee2mqtt/lib/constants.js b/server/services/zigbee2mqtt/lib/constants.js index ea82bdb578..9ffcff7524 100644 --- a/server/services/zigbee2mqtt/lib/constants.js +++ b/server/services/zigbee2mqtt/lib/constants.js @@ -36,7 +36,7 @@ const DEFAULT = { 'zigbee2mqtt/#', // Default zigbee2mqtt topic ], DOCKER_MQTT_VERSION: '4', // Last version of MQTT docker file - DOCKER_Z2M_VERSION: '4', // Last version of Z2M docker file, + DOCKER_Z2M_VERSION: '5', // Last version of Z2M docker file, CONFIGURATION_PATH: 'zigbee2mqtt/z2m/configuration.yaml', CONFIGURATION_CONTENT: { homeassistant: false, diff --git a/server/test/services/zigbee2mqtt/lib/config/z2m_adapter-ezsp_config.yaml b/server/test/services/zigbee2mqtt/lib/config/z2m_adapter-emberznet_config.yaml similarity index 96% rename from server/test/services/zigbee2mqtt/lib/config/z2m_adapter-ezsp_config.yaml rename to server/test/services/zigbee2mqtt/lib/config/z2m_adapter-emberznet_config.yaml index 5230b28e3b..76ede003c0 100644 --- a/server/test/services/zigbee2mqtt/lib/config/z2m_adapter-ezsp_config.yaml +++ b/server/test/services/zigbee2mqtt/lib/config/z2m_adapter-emberznet_config.yaml @@ -5,7 +5,7 @@ mqtt: server: mqtt://localhost:1884 serial: port: /dev/ttyACM0 - adapter: ezsp + adapter: ember map_options: graphviz: colors: diff --git a/server/test/services/zigbee2mqtt/lib/configureContainer.test.js b/server/test/services/zigbee2mqtt/lib/configureContainer.test.js index 6aa6cb4772..047c92c869 100644 --- a/server/test/services/zigbee2mqtt/lib/configureContainer.test.js +++ b/server/test/services/zigbee2mqtt/lib/configureContainer.test.js @@ -27,7 +27,7 @@ const defaultConfigFilePath = path.join(configBasePath, 'z2m_default_config.yaml const mqttConfigFilePath = path.join(configBasePath, 'z2m_mqtt_config.yaml'); const mqttOtherConfigFilePath = path.join(configBasePath, 'z2m_mqtt-other_config.yaml'); const deconzConfigFilePath = path.join(configBasePath, 'z2m_adapter-deconz_config.yaml'); -const ezspConfigFilePath = path.join(configBasePath, 'z2m_adapter-ezsp_config.yaml'); +const emberznetConfigFilePath = path.join(configBasePath, 'z2m_adapter-emberznet_config.yaml'); const portConfigFilePath = path.join(configBasePath, 'z2m_port_config.yaml'); describe('zigbee2mqtt configureContainer', () => { @@ -150,20 +150,20 @@ describe('zigbee2mqtt configureContainer', () => { it('it should only add serial adapter', async () => { // PREPARE const config = { - z2mDongleName: ADAPTERS_BY_CONFIG_KEY[CONFIG_KEYS.EZSP][0], + z2mDongleName: ADAPTERS_BY_CONFIG_KEY[CONFIG_KEYS.EMBER][0], }; // EXECUTE const changed = await zigbee2mqttManager.configureContainer(basePathOnContainer, config); // ASSERT const resultContent = fs.readFileSync(configFilePath, 'utf8'); - const expectedContent = fs.readFileSync(ezspConfigFilePath, 'utf8'); + const expectedContent = fs.readFileSync(emberznetConfigFilePath, 'utf8'); expect(resultContent).to.equal(expectedContent); expect(changed).to.be.eq(true); }); it('it should remove serial adapter (adapter is not set)', async () => { // PREPARE - fs.copyFileSync(ezspConfigFilePath, configFilePath); + fs.copyFileSync(emberznetConfigFilePath, configFilePath); const config = {}; // EXECUTE const changed = await zigbee2mqttManager.configureContainer(basePathOnContainer, config); @@ -176,7 +176,7 @@ describe('zigbee2mqtt configureContainer', () => { it('it should remove serial adapter (adapter is expliclty none)', async () => { // PREPARE - fs.copyFileSync(ezspConfigFilePath, configFilePath); + fs.copyFileSync(emberznetConfigFilePath, configFilePath); const config = { z2mDongleName: ADAPTERS_BY_CONFIG_KEY[CONFIG_KEYS.NONE][0], }; @@ -191,22 +191,22 @@ describe('zigbee2mqtt configureContainer', () => { it('it should keep serial adapter', async () => { // PREPARE - fs.copyFileSync(ezspConfigFilePath, configFilePath); + fs.copyFileSync(emberznetConfigFilePath, configFilePath); const config = { - z2mDongleName: ADAPTERS_BY_CONFIG_KEY[CONFIG_KEYS.EZSP][0], + z2mDongleName: ADAPTERS_BY_CONFIG_KEY[CONFIG_KEYS.EMBER][0], }; // EXECUTE const changed = await zigbee2mqttManager.configureContainer(basePathOnContainer, config); // ASSERT const resultContent = fs.readFileSync(configFilePath, 'utf8'); - const expectedContent = fs.readFileSync(ezspConfigFilePath, 'utf8'); + const expectedContent = fs.readFileSync(emberznetConfigFilePath, 'utf8'); expect(resultContent).to.equal(expectedContent); expect(changed).to.be.eq(false); }); it('it should override serial adapter', async () => { // PREPARE - fs.copyFileSync(ezspConfigFilePath, configFilePath); + fs.copyFileSync(emberznetConfigFilePath, configFilePath); const config = { z2mDongleName: ADAPTERS_BY_CONFIG_KEY[CONFIG_KEYS.DECONZ][0], }; @@ -221,7 +221,7 @@ describe('zigbee2mqtt configureContainer', () => { it('it should remove serial adapter (unknown adapter)', async () => { // PREPARE - fs.copyFileSync(ezspConfigFilePath, configFilePath); + fs.copyFileSync(emberznetConfigFilePath, configFilePath); const config = { z2mDongleName: 'this-is-not-a-real-adapter' }; // EXECUTE const changed = await zigbee2mqttManager.configureContainer(basePathOnContainer, config);