Closed cloudbr34k84 closed 1 year ago
you need to use absolute references for external converters. This should be in the format of const exposes = require('zigbee-herdsman-converters/lib/exposes');
you need to use absolute references for external converters. This should be in the format of
const exposes = require('zigbee-herdsman-converters/lib/exposes');
i have no idea about this, but im looking at other examples of converter.js files and they all have this at the top. Is that what i need?
If so how come the file doenst have it already like others do??
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const utils = require('zigbee-herdsman-converters/lib/utils');
const e = exposes.presets;
const ea = exposes.access;
const globalStore = require('zigbee-herdsman-converters/lib/store');
Looking at the above, I am not sure what you are trying to do - External Converters are usually for adding support / modifying single devices and will need to be included as a reference in your configuration.yaml
file - these are what require an absolute reference. It looks like you are trying to modify / replace the whole sonoff.js
file away from its standard directory? If you are modifiying it in place, then relative references are fine
hey sorry, i think i figured it and understand what i have to do, but do i actually understand any of this ... no lol
What happened?
Go the follow error when adding the Sonoff Converter File
What did you expect to happen?
No response
How to reproduce it (minimal and precise)
I added this file.js I restarted Z2M and this is the error im now getting. Sorry no idea how to even understand this :(
Zigbee2MQTT version
1.28.4
Adapter firmware version
20220219
Adapter
Sonoff Coordinator
Debug log
No response