Skip to content
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

add _TZE204_rzrrjkz2 Smart Sprinkler Timer #7630

Merged
merged 21 commits into from
Jun 20, 2024
Merged

add _TZE204_rzrrjkz2 Smart Sprinkler Timer #7630

merged 21 commits into from
Jun 20, 2024

Conversation

OgV1
Copy link
Contributor

@OgV1 OgV1 commented Jun 12, 2024

add _TZE204_rzrrjkz2 Smart Sprinkler Timer

OgV1 added 2 commits June 13, 2024 01:03
add _TZE204_rzrrjkz2 Smart Sprinkler Timer
Copy link
Contributor Author

@OgV1 OgV1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove some exposes

onEvent: tuya.onEventSetTime,
configure: tuya.configureMagicPacket,
exposes: [
e.switch(),
Copy link
Owner

@Koenkk Koenkk Jun 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm missing a lot of exposes here, could you add them? Every datapoint in tuyaDatapoints should have a corresponding expose.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Koenkk,

Thank you for the fast respond, really appreciated,

I must say that I'm really new to GitHub and actually have a little knowledge on how to make exposes works.
The data point IDs are extracted from the device in Tuya Cloud Project, as I'm following from this instruction
https://www.zigbee2mqtt.io/advanced/support-new-devices/02_support_new_tuya_devices.html#_3-understanding-tuya-datapoints

I tried to put a lot of exposes before but it seems to be rejected, that's why I have to remove them.

Could you please provide me any instructions on how to make exposes works?

I can see these information on Device Debugging on Tuya Cloud Project, Not sure if it should help us on developing exposes?

Code | Type | Values -- | -- | -- switch | Boolean | "{true,false}" status | Enum | { "range": [ "off", "auto", "disabled" ] } countdown | Integer | { "unit": "min", "min": 1, "max": 240, "scale": 0, "step": 1 } countdown_left | Integer | { "unit": "min", "min": 1, "max": 240, "scale": 0, "step": 1 } water_current | Integer | { "unit": "gal/min", "min": 0, "max": 1000000000, "scale": 3, "step": 1 } battery_percentage | Integer | { "unit": "%", "min": 0, "max": 100, "scale": 0, "step": 1 } water_total | Integer | { "unit": "gal", "min": 0, "max": 999999999, "scale": 3, "step": 1 } weather_delay | Enum | { "range": [ "24h", "48h", "72h", "cancel" ] } normal_timer | String | { "maxlen": 255 } weather_switch | Boolean | "{true,false}" switch_enabled | Boolean | "{true,false}"

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to put a lot of exposes before but it seems to be rejected, that's why I have to remove them.

What do you mean with "rejected" here?

For examples, please look at e.g. this:

expose

e.numeric('max_temperature_alarm', ea.STATE_SET).withUnit('°C').withValueMin(-20).withValueMax(60)

datapoint:

[10, 'max_temperature_alarm', tuya.valueConverter.divideBy10],

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Koenkk,

Thank you again for your contributing, your ZB2MQTT is absolute gold!

I tried to put a lot of exposes before but it seems to be rejected, that's why I have to remove them.

What do you mean with "rejected" here?

In the first version here (I'm still super new to GH not sure how to exact quote the version like you did)
2ef84ed

and it just not pass, then I just tried to remove them, but it's not the big deal, now I understand the concept from what you provided.

Will try to upload the new version.

Best regards

src/devices/tuya.ts Outdated Show resolved Hide resolved
src/devices/tuya.ts Outdated Show resolved Hide resolved
OgV1 and others added 3 commits June 13, 2024 18:37
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
@OgV1 OgV1 changed the title Update tuya.ts add _TZE204_rzrrjkz2 Smart Sprinkler Timer Jun 14, 2024
src/devices/tuya.ts Outdated Show resolved Hide resolved
@@ -8734,6 +8734,66 @@ const definitions: Definition[] = [
],
},
},
{
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this definition to neo.ts

Copy link
Contributor Author

@OgV1 OgV1 Jun 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I need to create a new pull request for this?

src/devices/tuya.ts Outdated Show resolved Hide resolved
src/devices/tuya.ts Outdated Show resolved Hide resolved
src/devices/tuya.ts Outdated Show resolved Hide resolved
src/devices/tuya.ts Outdated Show resolved Hide resolved
OgV1 and others added 4 commits June 15, 2024 20:00
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
@OgV1
Copy link
Contributor Author

OgV1 commented Jun 15, 2024

some how it shows

Duplicate zigbee model NAS-WV03B

  272 |                 device.zigbeeModel.forEach((m) => {
  273 |                     if (foundZigbeeModels.includes(m.toLowerCase())) {
> 274 |                         throw new Error(`Duplicate zigbee model ${m}`)

in this version 2d59044 and I'm not sure, what I do wrong?

@OgV1
Copy link
Contributor Author

OgV1 commented Jun 15, 2024

Wait, I think I figured out :)

@Koenkk Koenkk merged commit 565c8bb into Koenkk:master Jun 20, 2024
2 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Jun 20, 2024

Thanks!

Could you also submit a picture for the docs? This can be done by clicking here.

Make sure that:

  • The filename is MODEL.png (update model accordingly)
  • The size is 512x512
  • The background is transparent (use e.g. Adobe remove background)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants