hi ddaniel’s suggestion way back worked for me. im renovating so my zigbee network is all over the place right now so i started getting disconnects (then shut offs) for my mercator double gpos.
i modified ddaniels external convertor for the mercator double socket (z2m) and it hasn’t shut off for me anymore. i think its something to do with reporting compatibility as mentioned in their code. switching from reporting to polling fixed it for me at least
this is my convertor. im new to this hope its helpful to someone
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 legacy = require('zigbee-herdsman-converters/lib/legacy');
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 globalStore = require('zigbee-herdsman-converters/lib/store');
const e = exposes.presets;
const ea = exposes.access;
const definition =
{
fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3210_raqjcxo5'}],
model: 'SPP02G',
vendor: 'Mercator Ikuü',
description: 'Double power point',
extend: tuya.extend.switch({powerOutageMemory: true, electricalMeasurements: true, endpoints: ['left', 'right']}),
endpoint: (device) => {
return {left: 1, right: 2};
},
exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('right'),
e.power().withEndpoint('left'), e.current().withEndpoint('left'),
e.voltage().withEndpoint('left'), e.energy(), tuya.exposes.powerOutageMemory()],
meta: {multiEndpoint: true},
configure: async (device, coordinatorEndpoint, logger) => {
await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
const endpoint1 = device.getEndpoint(1);
const endpoint2 = device.getEndpoint(2);
endpoint1.saveClusterAttributeKeyValue('haElectricalMeasurement', {acCurrentDivisor: 1000, acCurrentMultiplier: 1});
endpoint1.saveClusterAttributeKeyValue('seMetering', {divisor: 100, multiplier: 1});
device.save();
},
options: [exposes.options.measurement_poll_interval()],
onEvent: (type, data, device, settings) => tuya.onEventMeasurementPoll(type, data, device, settings)
// This device doesn't support reporting correctly.
// Koenkk/zigbee-herdsman-converters#1270
};
module.exports = definition;