Open unwiredtech opened 1 month ago
Product Image
Product Spec:
Name: Circuit Breaker
Material: PC
Rated vottage: 230VAC
Operation voltage: AC80V-400V(single phase)
Rated frequency: 50/60Hz
Electric current: (>A) 1-63A
Setting Ranges:
Under voltage protecting: 80V-210V adjustable
Overvoltage protecting: 120-300V adjustable
Overcurrent protecting:1.0A-63A adjustable
Reconnection time (delay time): 10s-99s adjustable
Overcurrent and leakage: 1-30 off adjustable
Leakage protecting: 10-99mA adjustable
Over temperature: 10-85 adjustable
Over current delay time: 1s-15s adjustable
Loss of current delay time: 1s-15s adjustable
This is what I sketched. partially working
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 modernExtend = require('zigbee-herdsman-converters/lib/modernExtend'); const e = exposes.presets; const ea = exposes.access; const tuya = require("zigbee-herdsman-converters/lib/tuya");
const definition = {
fingerprint: tuya.fingerprint('TS0601', ['_TZE204_lb0fsvba']),
model: 'TS0601_din_2',
vendor: 'TuYa',
description: 'Zigbee DIN energy meter',
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tuya.tz.datapoints],
configure: tuya.configureMagicPacket,
whiteLabel: [{vendor: 'XOCA', model: 'DAC2161C'}],
exposes: [tuya.exposes.switch(), e.energy(), e.power(), e.voltage(), e.current(),
exposes.enum('fault', ea.STATE, ['clear', 'over_current_threshold', 'over_power_threshold',
'over_voltage threshold', 'wrong_frequency_threshold']).withDescription('Fault status of the device (clear = nothing)'),
exposes.enum('threshold_1', ea.STATE, ['not_set', 'over_current_threshold', 'over_voltage_threshold'])
.withDescription('State of threshold_1'),
exposes.binary('threshold_1_protection', ea.STATE_SET, 'ON', 'OFF')
.withDescription('OFF - alarm only, ON - relay will be off when threshold reached'),
exposes.numeric('threshold_1_value', ea.STATE_SET)
.withDescription('Can be in Volt or Ampere depending on threshold setting. Setup the value on the device'),
exposes.enum('threshold_2', ea.STATE, ['not_set', 'over_current_threshold', 'over_voltage_threshold'])
.withDescription('State of threshold_2'),
exposes.binary('threshold_2_protection', ea.STATE, 'ON', 'OFF')
.withDescription('OFF - alarm only, ON - relay will be off when threshold reached'),
exposes.numeric('threshold_2_value', ea.STATE)
.withDescription('Setup value on the device'),
exposes.numeric('reverse_energy', ea.STATE).withUnit('kWh')
.withDescription('Reverse Energy Total'),
exposes.numeric('temperature', ea.STATE).withUnit('°C')
.withDescription('Temperature'),
exposes.binary('clear_fault', ea.STATE_SET, 'ON', 'OFF')
.withDescription('Turn ON to clear last the fault'),
exposes.text('meter_id', ea.STATE).withDescription('Meter ID (ID of device)'),
],
meta: {
tuyaDatapoints: [
[1, 'energy', tuya.valueConverter.divideBy100],
[3, null, null], // Monthly, but sends data only after request
[4, null, null], // Dayly, but sends data only after request
[6, null, tuya.valueConverter.phaseVariant2], // voltage and current
[9, 'fault', tuya.valueConverterBasic.lookup({'clear': 0, 'over_current_threshold': 1,
'over_power_threshold': 2, 'over_voltage_threshold': 4, 'wrong_frequency_threshold': 8})],
[11, null, null], // Frozen - strange function, in native app - nothing is clear
[16, 'state', tuya.valueConverter.onOff],
[17, null, tuya.valueConverter.threshold], // It's settable, but can't write converter
[103, 'temperature', tuya.valueConverter.raw],
[20, 'clear_fault', tuya.valueConverter.onOff], // Clear fault
[13, null, null], // Balance energy
[110, 'reverse_energy', tuya.valueConverter.divideBy100], // Reverse Energy Total
[23, null, null], // Forward Energy T3 - don't know what this
[24, null, null], // Forward Energy T4 - don't know what this
],
},
};
module.exports = definition;
Apologies for late reply.
I tested the definition and seems to work, but as you said some features are not working but this is better than before.
Thanks! ![Uploading zbn-dj-63.png…]()
Hey, thanks for sketch, I have the same device
I've tried it, but my circuit breaker fails with wrong_frequency_threshold
error (power is off), and I don't know how to change this threshold (or even is it real wrong_frequency_threshold
error, because multimeter says frequency in socket is 50.00 Hz)
Hi, i'm interested in tring this device to get "negative" apparent power injected to the grid from my solar setup. Is it working well / stable enough for this purpose ? thanks !
@git-greatguy do you want to measure DC or AC? I believe this module is able to measure AC only. for DC there are other devices
Sure, it's for measurin AC flow between grid and my inverter. 👍 my current zigbee module (TO-Q-SY1-JZT), send accurate values but values are not "signed". It's a bit annoying to know if i inject or pull from the grid ! This device looks promising to clear this issue.
@git-greatguy I would recommend for this another device, it works good with in/out measurement
Any ideas how to fix
I've tried it, but my circuit breaker fails with
wrong_frequency_threshold
?
Link
https://www.amazon.com.au/Intelligent-Photovoltaic-Bidirectional-Automatic-Compatible/dp/B0CYPQHVYR
Database entry
{"id":3,"type":"Router","ieeeAddr":"0xa4c138fa6becd2bf","nwkAddr":22993,"manufId":4417,"manufName":"_TZE204_lb0fsvba","powerSource":"Mains (single phase)","modelId":"TS0601","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[4,5,61184,0],"outClusterList":[>
Comments
I tested this external definition but for some reason the Z2M Frontend could not see the Exposed sensors.
External definition