-
-
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
Smart Sprinkler Timer water metering #22813
Comments
logs and const fz = require('zigbee-herdsman-converters/converters/fromZigbee'); const definition = {
}; module.exports = definition; |
I have the same valve and have found the tuya end point : I don't know to write the converter and need help |
ohhh .... it seems it may already exist? https://github.com/Koenkk/zigbee-herdsman-converters/blob/da65b1aeffd96527df02725b49de61e453fee059/src/devices/neo.ts#L130 |
@dominique6017 and/or @derekangl could you test if Koenkk/zigbee-herdsman-converters#7670 helps with the issue? I will be able to do it in at least a week, I cannot get to my sensor earlier :( |
Hiya, I have this valve from derekangl and came up with this converter, based on the Koenkk/zigbee-herdsman-converters#7670 Moreover, NULLS: External converter: const fz = require('zigbee-herdsman-converters/converters/fromZigbee'); const definition = module.exports = definition; |
Hi Guys, I have created that converter based on this fingerprint _TZE204_rzrrjkz2 in this pull request And actually not sure if I did it right, because I still don't have a chance to test with my own device (Guess it because the fingerprint is now _TZE204_uab532m0 and not the same as mine _TZE204_rzrrjkz2?) Anyone have any idea how to solve this? and why do we have different fingerprints on the same device? edit: FYI this is the info from my vendor: he seems to be sure that this one is Neo's with model number NAS-WV03B |
you should be able to add your fingerprint as well just change this line to something like
having multiple fingerprints is quite common for TuYa devices. Probably different vendors are just using whitelabled TuYa device. See example a few lines above if your device did not get recognized in Z2M it was probably due to the lack of the fingerprint, as TuYa makes a mess in the identifications by reusing them incorrectly. |
@xpavli44 Thanks man, And about further investigation for these errors do you have any idea where to start? |
@OgV1 unfortunately no clue :( best I can see is
maybe it will provide a little more insight into the errors? |
I got one of these off AliExpress, currently the stuff in
But nothing else is working properly. Some things I've noticed when debugging:
![]() Looking at the logs, there is also definitely something wrong with
Looking at the code in github, it looks like this might silently fail? https://github.com/Koenkk/zigbee-herdsman-converters/blob/0da0cbb88593b71f94385caeed4714d3dd0d1eb2/src/lib/tuya.ts#L192-L194 Any ideas @xpavli44 ? |
This might be a very dumb question, I can see the latest release here, but I'm not sure how I can get it to work with my device on my system? Seems like you guys can access it and test it already, I tried to research for this but cannot find anything, could you please suggest me how to get this work? |
@OgV1 by default, the version of herdsman used by z2m only updates when z2m gets a new release. I believe you can switch z2m you can either switch zg2mqtt to use the 'dev' branch, which will make it keep herdsman up to date to the latest release: https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html Personally, I've been testing using a custom external definition (using these instructions, using an adapted version of the code from |
Thanks @oliverwoodings, here's what I found according to your provided information,
The water flow unit is normally Gallon, the unit conversion to liters might be messed up. The current exposes and DP is below
The sate should be these: And yes the Child lock button is working
The current exposes and DP is below
And I found another weird behavior. Looks like after we press the button, (doesn't matter remotely or physical) the device will switch off by itself after around 30 seconds, the reason is might because that there is no water through the valve, I have to test. |
Okay, looks like I can get the Battery, Status and Current water flow (L/min) to work but somehow these ones keep showing 0 I can see from your image above that you somehow can make the "single_watering_amout" and "total water flow" to show the value, would you mind sharing how? @oliverwoodings did I missed some DPs? |
Could you share your latest code? Really intrigued how you got the battery % to work, and what you did for converting to L/min. The single watering amount and water total just randomly started working after a while, after I put a load of water through the device across a few occasions. Here's my dp's/exposes for those:
By no means complete of course. |
Hi @oliverwoodings, sorry for late reply, Sure, here's the battery and Current water flow L/min.
Not sure if this gonna work on GH |
Hello guys, Do you think this device will be available on the next release? |
Hi @eerison, Unfortunately I don't think we will, as I found the difficulties in findings the working exposes that can work with all of correct data-points, I will be happy if I could get some help from someone who are more expert than me. |
Well I don't have any idea hehehe, But I just ordered this device and when it arrives I will try to help 🤞🏼 Thank you for reply <3 |
hey guys maybe you could open a PR with the current code state, then it could help others to test or help somehow. |
@eerison that's been done ... you can use https://github.com/Koenkk/zigbee-herdsman-converters/pull/7630/files to create external converter as per https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html#_2-2-adding-converter-s-for-your-device |
ahhh I just found it: https://www.zigbee2mqtt.io/devices/NAS-WV03B.html the image looks a bit different of the original post 😄 well if the integration is done, I guess this issue could be closed, couldn't it? |
@eerison I would not close it yet.
|
thank you for clarify. |
Hello Guys. my Sprinkler finally arrived :), I am doing some tests and what works is just turn on and off using {"state": "ON"} but no water flow then I tried to activate this using {"flow_switch": "ON"} But I am getting this error
I don't know if you faced the same issue ... I didn't check yet how to debug it, I guess I can get this info here: https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html#_2-2-adding-converter-s-for-your-device (as @xpavli44 mentioned), But in case you have some tips how I could debug it "easily", I would appreciate any help :) |
Hey @oliverwoodings could you give me some idea how to tests using neo.ts when I click on But I can't click on read/write button, am I missing something? |
just to be easy to copy and past in case someone else wants to test your code :) const {} = require('zigbee-herdsman-converters/lib/modernExtend');
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 GALLON_TO_LITER = 3.78541;
const definition = {
fingerprint: tuya.fingerprint('TS0601', ['_TZE204_rzrrjkz2', '_TZE204_uab532m0']),
zigbeeModel: ['NAS-WV03B'],
model: 'NAS-WV03B',
vendor: 'Neo',
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tuya.tz.datapoints],
description: 'Smart sprinkler timer',
onEvent: tuya.onEventSetTime,
configure: tuya.configureMagicPacket,
exposes: [
e.binary('state', ea.STATE_SET, 'ON', 'OFF').withDescription('Turn the valve On or Off'),
e.enum('status', ea.STATE, ['0', '1', '2', '3']).withDescription('Status'),
e.numeric('countdown', ea.STATE_SET).withUnit('min').withValueMin(1).withValueMax(240).withDescription('Countdown'),
e.numeric('countdown_left', ea.STATE).withUnit('min').withValueMin(1).withValueMax(240).withDescription('Countdown left'),
e.numeric('water_current', ea.STATE).withUnit('L/min').withValueMin(0).withValueMax(3785.41).withValueStep(0.1)
.withDescription('Current water flow (L/min)'), // Changed to liters
e.battery(),
e.numeric('water_total', ea.STATE).withUnit('L').withValueMin(0).withValueMax(378541.0).withValueStep(0.001)
.withDescription('Total water flow (L)'), // Changed to liters
e.binary('fault', ea.STATE, 'DETECTED', 'NOT_DETECTED').withDescription('Fault status'),
e.enum('weather_delay', ea.STATE_SET, ['24h', '48h', '72h', 'cancel']).withDescription('Weather delay'),
e.text('normal_timer', ea.STATE_SET).withDescription('Normal timer'),
e.binary('switch_enabled', ea.STATE_SET, 'ON', 'OFF').withDescription('Switch enabled'),
e.numeric('smart_irrigation', ea.STATE).withDescription('Smart irrigation'),
e.binary('total_flow_reset_switch', ea.STATE_SET, 'ON', 'OFF').withDescription('Total flow reset switch'),
e.numeric('quantitative_watering', ea.STATE_SET).withUnit('L').withValueMin(0).withValueMax(10000)
.withDescription('Quantitative watering'), // Changed to liters
e.binary('flow_switch', ea.STATE_SET, 'ON', 'OFF').withDescription('Flow switch'),
e.binary('child_lock', ea.STATE_SET, 'ON', 'OFF').withDescription('Child lock'),
e.numeric('surplus_flow', ea.STATE).withDescription('Surplus flow'),
e.numeric('single_watering_duration', ea.STATE).withDescription('Single watering duration'),
e.numeric('single_watering_amount', ea.STATE).withDescription('Single watering amount'),
],
meta: {
tuyaDatapoints: [
[1, 'state', tuya.valueConverter.onOff],
[3, 'status', tuya.valueConverterBasic.lookup({'Off': 0, 'one': 1, 'Child lock activated': 2, 'On': 3, 'On_btn': 4})],
[5, 'countdown', tuya.valueConverter.raw],
[6, 'countdown_left', tuya.valueConverter.raw],
[9, 'water_current', {
from: (v) => {
convertedValue = (v * GALLON_TO_LITER / 1000).toFixed(1); // Converts the raw value from gal/min to L/min with one decimal place
console.log(`Raw value for water_current: ${v}, Converted value: ${convertedValue}`);
return convertedValue;
},
to: (v) => {
const rawValue = Math.round((parseFloat(v) / GALLON_TO_LITER) * 1000); // Converts L/min back to the raw value in gal/min
console.log(`Raw value for water_current: ${v}, Raw value: ${rawValue}`);
return rawValue;
},
}],
[11, 'battery', tuya.valueConverter.raw],
[15, 'water_total', {
from: (v) => (v * GALLON_TO_LITER / 1000).toFixed(1), // Converts the raw value from gallons to liters with one decimal place
to: (v) => Math.round((parseFloat(v) / GALLON_TO_LITER) * 1000) // Converts liters back to the raw value in gallons
}],
[19, 'fault', tuya.valueConverter.raw],
[37, 'weather_delay', tuya.valueConverter.raw],
[38, 'normal_timer', tuya.valueConverter.raw],
[42, 'switch_enabled', tuya.valueConverter.onOff],
[47, 'smart_irrigation', tuya.valueConverter.raw],
[101, 'total_flow_reset_switch', tuya.valueConverter.onOff],
[102, 'quantitative_watering', {
from: (v) => (v * GALLON_TO_LITER / 1000).toFixed(1), // Converts the raw value from gallons to liters with one decimal place
to: (v) => Math.round((parseFloat(v) / GALLON_TO_LITER) * 1000) // Converts liters back to the raw value in gallons
}],
[103, 'flow_switch', tuya.valueConverter.onOff],
[104, 'child_lock', tuya.valueConverter.onOff],
[105, 'surplus_flow', tuya.valueConverter.raw],
[106, 'single_watering_duration', tuya.valueConverter.raw],
[108, 'single_watering_amount', {
from: (v) => {
const convertedValue = (v * GALLON_TO_LITER / 1000).toFixed(1);
console.log(`Raw value for single_watering_amount: ${v}, Converted value: ${convertedValue}`);
return convertedValue;
},
to: (v) => {
const rawValue = Math.round((parseFloat(v) / GALLON_TO_LITER) * 1000);
console.log(`Value to be sent for single_watering_amount: ${v}, Raw value: ${rawValue}`);
return rawValue;
}
}],
],
},
};
module.exports = definition; |
Hey @OgV1 what did you enabled to see the |
@eerison you need to go Settings -> System -> Logs -> pick Z2M addon in upper right corner |
The problem isn't visualize the log, the problem is, the I added console.log here [103, 'flow_switch', {
from: (v) => {
console.log(`debug: [from] flow switch original value ${v}`)
return v;
},
to: (v) => {
console.log(`debug: [to] flow switch original value ${v}`)
return v;
}
}], but when I change the status, it isn't appearing :/ |
well I could get some progress at lest 😄 I tested console.debug on state and status field, and both I could see a log, But not with
what this no converter available means? because there is a converter to |
@OgV1 how do you know those fields are correct?
did you use Tuya Iot Platform? https://www.zigbee2mqtt.io/advanced/support-new-devices/03_find_tuya_data_points.html |
@dominique6017 are you sure that |
_TZE204_uab532m0 its unit is Imperial gallons. |
Yep I also saw the model was wrong :/ I am looking forward to see your PR merged 🤞🏼 |
Hi @eerison Yes, I use the same method in that link (The Automatic method on step 8.) |
The PR from @baggiowu was closed :( Could you send here the debug page, then I could see the fields and types. also the request please :) Note: this screenshot is from a wifi device that I have, as I don't have an getaway tuya I can't test the sprinkler :( Edit: maybe it was fixed on this PR: Koenkk/zigbee-herdsman-converters#7812 |
Try this Standard Status Set |
After I tried with @baggiowu version released, there looks like I still get some errors |
I have been playing with this code for the last few days - I can't get the battery to show at all. I have a Tuya account and went in and looked at the code - it says it's 11 and when connected to the Tuya cloud it reports as 100%. I have gone back and forth with the e.battery() vs e.numeric(..) and the raw vs batterypercentage to no affect. Is there a way in debug to see the report from the device? or does the topic have to be created with the correct data points for it to be published? My product name in Tuya is Zigbee 05浇灌开关 E版本 美制单位gal Which translates to Zigbee 05 watering switch E version American unit gal Here is my code just in case I've made a stupid mistake: const definition = { }; module.exports = definition; |
Yeah I also tested @baggiowu implementation, but it didn't work 😕 well nothing worked, even turn on/off :( |
I think the problem is , we are still taking the old model, I guess it should be |
My deivce is turning off after 30 seconds, any idea what is going on? |
The device will shut off if it doesn’t detect flow. Found the same thing on
mine.
Still no battery for me…
…On Mon, Sep 2, 2024 at 7:18 PM andrewcfitz ***@***.***> wrote:
And I found another weird behavior. Looks like after we press the button,
(doesn't matter remotely or physical) the device will switch off by itself
after around 30 seconds, the reason is might because that there is no water
through the valve, I have to test.
Edit: Alright, I have tested, doesn't stop by itself, there is nothing to
worry about this.
My deivce is turning off after 30 seconds, any idea what is going on?
—
Reply to this email directly, view it on GitHub
<#22813 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEIC4IC73UPVK6IJL5C6PHLZUTW5TAVCNFSM6AAAAABINOKII2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRVGM3TGNRXGA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hi @eerison so sorry for taking so long, now I'm using NAS-WV05B2 like @baggiowu mentioned in
Here's the latest code that I'm using
|
Added Changes will be available in the dev branch in a few hours from now. Note that the dev branch currently contains breaking changes, see #24198 |
Link
https://www.ebay.co.uk/itm/355700417511
Database entry
{"id":21,"type":"EndDevice","ieeeAddr":"0xa4c13869455a3642","nwkAddr":26812,"manufId":4417,"manufName":"_TZE204_uab532m0","powerSource":"Battery","modelId":"TS0601","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[0,4,5,61184],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65487":14400,"65503":"b��-fc��-\u0012","65506":56,"65508":0,"stackVersion":0,"dateCode":"","appVersion":74}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":74,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1716919405582}
Comments
hi, can you hellp me sport new device.Please.
![20240528_182911](https://private-user-images.githubusercontent.com/60069144/334527119-1a229b25-2ce2-4999-bddc-4c62527ba53a.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMjMzMDYsIm5iZiI6MTczOTMyMzAwNiwicGF0aCI6Ii82MDA2OTE0NC8zMzQ1MjcxMTktMWEyMjliMjUtMmNlMi00OTk5LWJkZGMtNGM2MjUyN2JhNTNhLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDAxMTY0NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTljNDkxMmEyNjcwNjQ5MTAzZTlhYmFhYzg1MWJhYjM2ZGFkMDU5OTA1ZWViYjkxY2U0MjEwNTRmYWQ3MzcwNWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.X1CMJx2voikFjK1ORmVH09--14a6YvM2VuZyub7aPNA)
![20240528_182853 (1)](https://private-user-images.githubusercontent.com/60069144/334527138-754098c9-204d-44ad-b645-e5b95f97cf20.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMjMzMDYsIm5iZiI6MTczOTMyMzAwNiwicGF0aCI6Ii82MDA2OTE0NC8zMzQ1MjcxMzgtNzU0MDk4YzktMjA0ZC00NGFkLWI2NDUtZTViOTVmOTdjZjIwLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDAxMTY0NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE1NzkyNzcwN2JjZGZhZmQ4YjdmYWMwOGI1YmViNjIyYmFhZWY1OWRiOGY2OTgyNzc0NWVjMmU5YTJiYmNjNzEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.vGwDJe4EBaJvrTK0uCRbWHzt4FTHS28yGd3h_4rnuWw)
const definition = {
zigbeeModel: ['TS0601'],
model: 'TS0601',
vendor: '_TZE204_uab532m0',
description: 'Automatically generated definition',
extend: [],
meta: {},
External definition
The text was updated successfully, but these errors were encountered: