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 12:16 April 17, 2024
John
Reply
Author

aparenttly 1.36 broke it again

Harvey Specter
Posted at 16:00 April 16, 2024
Diogo
Reply
Author

Apparently z2m 1.36 broke it again. I’m trying to use my custom device and all exposed attributes are shown (including unused, like link to output), but when I try to refresh or set state it always returns something like “No converter available for ‘link_to_output’ (undefined)”. Device was flashed using hex and js files created with the last version of firmware

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