-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[New device support]: VA4220ZB / VA4221ZB Sinopé Smart Water Valve #15433
Comments
On the "console dev" tab you can try to poll each attribute . First select the cluster , after the attribute (there is one for battery percentage), then press read . Sorry I do not have a computer with me right now. |
@MattL0 , Thank you for taking time to answer. I did as mentioned and polled the batteryPercentageRemaining and also batteryVoltage attributes from the PowerCfg cluster and it returned a value of 0% and a battery voltage value of 65 The battery % value in the expose tab changed from ''null'' % to ''0'' % after polling. I'm positive that the batteries are good, these are 4 new AAA lithium batteries. The valve operates flawlessly with the AC adapter unplugged using only battery power. In fact, the valve make a higher pitched noise when operating from the batteries compared to AC power adapter which makes me believe the batteries are providing even a bit more power than what the AC power adapter can deliver. Here are all the attributes I was able to poll from genPowerCfg: Any ideas? |
I am not a bettery expert in zigbee2mqtt, but seems like battery voltage would be a good way to monitor the battery. you have 4 aaa 1.5volts battery so this means 6 volts in serial. Not sure if i'm right, but 65 / 10 seems to be near that number (6.5 volt). This would make your theory about the voltage of the battery higher right! You are getting theses battery_low, etc messages because of the fz.ias_siren, : { |
It seems like you also have the seMetering cluster. Could you try to poll the remainingBattLife attribute with the same method on the dev tool tab? There are ways to convert voltage to battery percentage but i am not uses to that. |
I would try with this first : 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 constants = require('zigbee-herdsman-converters/lib/constants');
const utils = require('zigbee-herdsman-converters/lib/utils');
const e = exposes.presets;
const ea = exposes.access;
const definition = {
zigbeeModel: ['VA4220ZB'], // The model ID from: Device with modelID 'lumi.sens' is not supported.
model: 'VA4220ZB', // Vendor model number, look on the device for a model number
vendor: 'Sinopé', // Vendor of the device (only used for documentation and startup logging)
description: 'Sedna smart water valve', // Description
fromZigbee: [fz.ignore_iaszone_statuschange, fz.cover_position_via_brightness, fz.cover_state_via_onoff, fz.battery, fz.metering],
toZigbee: [tz.cover_via_brightness],
exposes: [e.valve_switch(), e.valve_position(), e.battery_low(), e.battery()],
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
const binds = ['genBasic', 'genGroups', 'genOnOff', 'ssIasZone', 'genLevelCtrl', 'genPowerCfg', 'seMetering',
'manuSpecificSinope'];
await reporting.bind(endpoint, coordinatorEndpoint, binds);
await reporting.batteryPercentageRemaining(endpoint);
await reporting.onOff(endpoint);
await reporting.brightness(endpoint); // valve position
try {
await reporting.batteryVoltage(endpoint);
} catch (error) {/* Do Nothing */}
try {
await reportingbatteryAlarmState(endpoint);
} catch (error) {/* Do Nothing */}
},
};
module.exports = definition; Please post a picture of the repport tab (rapports) of the device, after this |
I replaced the external converter with the one you provided and restarted Z2M. Tried to poll seMetering remainingBattlife and the log reported an unsupported attribute error: I also polled seMetering UnitofMesure and it reported the value ''7''. I checked in the zigbee cluster librabry and according to section 10.4.2.2.4.1, value 7 is for ''Liters & l/h (Liters per Hour) in pure binary format''. Then polled MeteringDeviceType and it returned ''2' for ''Water Metering''. Sounds to me that the presence of the seMetering cluster is solely for the optional FS4220/FS4221 flow meters that can be physically connected to the valve. Another remark about battery voltage, I own a few of Sinope's water leak sensors, each are using the same AAA batteries but only 2 of them. When polling battery voltage of these sensors, they are all reporting between 2400 et 2600. I find it strange that the Sinope valve reports only a 2 digit values of 65 (well 64 now), shouldn't it be reporting a 4 digits values like the water sensors, i.e: 6500 instead of 65? I wish I knew how to multiply this value by by 100 so Z2M sees it as 6500 and then see what battery % is. |
So I'm reading the zigbee cluster library. Pwrcfg is under section 3.3
When I poll batteryVoltage it returns a value between 64 and 68. According to the specs of the Energizer lithium AAA batteries that cames with the valve, the nominal battery voltage is 1.5V but they can peak as high as 1.72V when not under load. So 4 of these batteries connected in series should provide anywhere between 6.0 and 6.88 V. Polled battery voltage of 68 would make sense since 68 * 0.100mV = 6.8V. |
With some research, it looks like the valve can't natively report battery percentage, even on the official Sinopé's app, Neviweb. batteryPercentageRemaining attribute from genPwrCfg always report 0% and remainingBattLife attribute from seMeterting is unsupported. For now, I removed e.battery from the exposed attributes list since it was useless and replaced it with batteryVoltage. I updated my first post with the external converter I'm using and updated screenshots. Everything works fine and no error in the logs. I can't test all the seMetering attributes since I do not own the external flow sensor. Would still be nice to use batteryVoltage to convert it to battery percentage but I dont know how to add this piece to my external converter. I know that:
We could use something like: But I don't know if possible and how to integrate this logic and to inject the result in the payload. I saw some example in libs/utils.js so it looks like its somehow possible. |
@alray31 Can you try this? Firs time I try a meta function 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 constants = require('zigbee-herdsman-converters/lib/constants');
const utils = require('zigbee-herdsman-converters/lib/utils');
const e = exposes.presets;
const ea = exposes.access;
const definition = {
zigbeeModel: ['VA4220ZB'], // The model ID from: Device with modelID 'lumi.sens' is not supported.
model: 'VA4220ZB', // Vendor model number, look on the device for a model number
vendor: 'Sinopé', // Vendor of the device (only used for documentation and startup logging)
description: 'Sedna smart water valve', // Description
fromZigbee: [fz.ignore_iaszone_statuschange, fz.cover_position_via_brightness, fz.cover_state_via_onoff, fz.battery, fz.metering],
toZigbee: [tz.cover_via_brightness],
meta: {battery: {voltageToPercentage: {min: 54, max: 68}}},
exposes: [e.valve_switch(), e.valve_position(), e.battery_low(), e.battery()],
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
const binds = ['genBasic', 'genGroups', 'genOnOff', 'ssIasZone', 'genLevelCtrl', 'genPowerCfg', 'seMetering',
'manuSpecificSinope'];
await reporting.bind(endpoint, coordinatorEndpoint, binds);
await reporting.batteryPercentageRemaining(endpoint);
await reporting.onOff(endpoint);
await reporting.brightness(endpoint); // valve position
try {
await reporting.batteryVoltage(endpoint);
} catch (error) {/* Do Nothing */}
try {
await reportingbatteryAlarmState(endpoint);
} catch (error) {/* Do Nothing */}
},
};
module.exports = definition; |
ok thank. I've sent the pr part. ( added it to sinope.js) |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days |
Link
https://support.sinopetech.com/en/1.5.7.3/
Database entry
{"id":3,"type":"Router","ieeeAddr":"0x500b91400003e680","nwkAddr":973,"manufId":4508,"manufName":"Sinope Technologies\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000","powerSource":"Mains (single phase)","modelId":"VA4220ZB\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":3,"inClusterList":[0,1,3,4,5,6,8,1026,1280,1794,2821,65281],"outClusterList":[3,6,25],"clusters":{"genBasic":{"attributes":{"modelId":"VA4220ZB\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000","manufacturerName":"Sinope Technologies\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000","powerSource":129,"zclVersion":2,"appVersion":12,"stackVersion":3,"hwVersion":0,"dateCode":"20201104\u0000\u0000\u0000\u0000\u0000\u0000\u0000","swBuildId":"3405\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"}},"ssIasZone":{"attributes":{"iasCieAddr":"0x00124b0026b6a0f8","zoneState":1}},"genLevelCtrl":{"attributes":{"currentLevel":254}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":12,"stackVersion":3,"hwVersion":0,"dateCode":"20201104\u0000\u0000\u0000\u0000\u0000\u0000\u0000","swBuildId":"3405\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000","zclVersion":2,"interviewCompleted":true,"meta":{},"lastSeen":1670446481691,"defaultSendRequestWhen":"immediate"}
External converter
The text was updated successfully, but these errors were encountered: