Zigbee2MQTT 1.35 failed to start

The new version of Zigbee2MQTT (Z2M) adds new features and improvements, but occasionally, they can break compatibility with existing devices :).

If your PTVO-based devices do not work in the latest version (Z2M shows the “Unsupported” status for your device), it seems, you should update a custom converter for it.

Option #1

You can re-create a converter in the latest version of Firmware Configurator, update it in the “data” folder, and restart Z2M.

Option #2

Or, if you cannot remember a configuration of your old device, and therefore re-create a converter, you can edit the existing file:

  1. Find your custom converter “.js” file in the “data” folder of your Z2M installation.
  2. Replace the following lines at the beginning of that file.
  3. Restart Z2M.

Replace #1


1
2
const fz = zigbeeHerdsmanConverters.fromZigbeeConverters;
const tz = zigbeeHerdsmanConverters.toZigbeeConverters;

to


1
2
const fz = zigbeeHerdsmanConverters.fromZigbeeConverters || zigbeeHerdsmanConverters.fromZigbee;
const tz = zigbeeHerdsmanConverters.toZigbeeConverters || zigbeeHerdsmanConverters.toZigbee;

Replace #2


1
const ptvo_switch = zigbeeHerdsmanConverters.findByDevice({modelID: 'ptvo.switch'});

to


1
const ptvo_switch = (zigbeeHerdsmanConverters.findByModel)?zigbeeHerdsmanConverters.findByModel('ptvo.switch'):zigbeeHerdsmanConverters.findByDevice({modelID: 'ptvo.switch'});

Replace #3


1
const exposes = zigbeeHerdsmanConverters.exposes;

to


1
const exposes = (zigbeeHerdsmanConverters.hasOwnProperty('exposes'))?zigbeeHerdsmanConverters.exposes:require("zigbee-herdsman-converters/lib/exposes");

Comments
Harvey Specter
Posted at 17:40 January 8, 2024
Rog
Reply
Author

Works for me too, thanks for the swift post on this.

Harvey Specter
Posted at 11:23 January 7, 2024
Alex
Reply
Author

works! option#2

Leave a Reply to Alex
Cancel Reply