Z2M error - Exception while calling fromZigbee converter: Value '5' is not allowed, expected one of 0,1,2}

I’ve just add a 2nd instance of Z2M using the trailing “/” method.

Both instances are running, im able to add devices to both instances, however, the 2nd instance has this repitive error.

“Exception while calling fromZigbee converter: Value ‘5’ is not allowed, expected one of 0,1,2}”

It only occurs when I add an mmWave sensor, I have added several of the same sensors to the first instance of Z2M.

Any ideas what it is and how to fix it?

Z2M first instance config

Z2M second instance config

if you remove the device, does the error go away ?

Yes, removing the device removes the error.

I decided to remove the second instance and install the Edge version as my second instance, works perfectly and the errors are no longer present when I add the mmWave sensor back in.

Turns out, there is a bit more to the story as well, mqtt section under Z2M config tab is ignoring the base_topic parameter, this needs to be configured in the configuraiton.yaml file for it to work properly, I wrote up a summary in another post which I will add here in case anyone needs it

Summary of what worked:

Install 1st instance of Z2M
      then go to…
           HA > Settings > Add On > Z2M > Configuration tab
      Edit the 2 sections, Options & Network as follows

Options

  • data_path - /config/zigbee2mqtt (this was the default path created for me)

  • socat - left this alone

  • mqtt - mqtt://192.168.20.15:1883 (this was my mosquitto address)

  • serial - /dev/ttyUSB0 (my first sonoff coordinator)

Network
port - 8485


Instance 1 notes

  • Mqtt, this is the section that confused me the most, I eventually stripped everything out apart from the server address, I added the details I needed later, in the configuration.yaml file as they were being ignored here.

  • This is the minimum details in the Z2M config tab that are needed to get Z2M running.


Second instance prep
You will have a folder in the HA file system for the first Z2M instance, as denoted above in the data_path.
Manually create a second folder for the second Z2M-Edge instance, this is so you can edit the configuration.yaml files independently later, I called mine, zigbee2mqtt2


Install 2nd instance of Z2M, Edge version
      then go to…
           HA > Settings > Add On > Z2M-Edge > Configuration tab
      Edit the 2 sections, Options & Network as follows

Options

  • data_path - /config/zigbee2mqtt2 (edit to point to the newly created folder)

  • socat - left this alone

  • mqtt - mqtt://192.168.20.15:1883 (same as first instance)

  • serial - /dev/ttyUSB1 (my second sonoff coordinator)

Network
port - 8486 (default is 8485, I incremented by 1 for the second Z2M-Edge instance)


Each instance will now have their own folder in the HA file system.
In each folder there will be a configuration.yaml file, we now need to edit these

Configuration.yaml - First instance

The only thing I changed was the mqtt section:
I added my username and password and most importantly of all, the base_topic, which was being ignored previously

mqtt:
  server: mqtt://192.168.20.15:1883
  base_topic: zigbee2mqtt
  user: mqttuser
  password: mqttpassword

Configuration.yaml - Second instance

I edited the same values, only this time, changing the base_topic to something different

mqtt:
  server: mqtt://192.168.20.15:1883
  base_topic: zigbee2mqtt2
  user: mqttuser
  password: mqttpassword

I made no further changes, including inside the settings section of the Z2M web UI, I just used out of the box.

1 Like

I don’t use the add- on, but nice to write your steps.

Cheers, I find there is too much expectation to know a lot of terminology and the exact location of things.

Hopefully this makes it very easy for someone to follow who is perhaps a little unfamiliar with things.

I am having the same issue with 2 presence I just received.
The model is TuYa ZY-M100-24G

Update: Was able to get it working with Z2MQTT Edge addon