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 18:45 June 27, 2024
Arend
Reply
Author

Thank you so much! Option #2 didn’t work, but generating a new .js file did work perfectly.

Harvey Specter
Posted at 11:45 May 18, 2024
Profruit
Reply
Author

A heartfelt thank you. I had two DIY CC2530 from the time of zigbee version 1.32. After I upgraded to zigbee version 1.37.1 they stopped working. Option 2 didn’t work. I generated new *.js files with the latest ptvo configurator (May 2024) and miraculously they worked again. Thank you and good luck.

Harvey Specter
Posted at 18:55 May 10, 2024
Chris
Reply
Author

In my case it also broke when updating to 1.36, but I fixed it by following z2m 1.36.1 release notes which is:
Due to some internal changes, some external converters will break. To fix it simply remove const extend = require(‘zigbee-herdsman-converters/lib/extend’); from the external converter.

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 to Profruit
Cancel Reply