Tuya smart water timer
Proposed change
Add support for Moes Smart Water Timer (BLE). Device has been tested while connected to a Moes BLE Mesh Gateway. Supported functions:
- Switch on/off
- Status reporting (idle, manual, auto)
- One-off countdown timer
- Set/Disable weather delay
- Battery percentage
- Total runtime reporting
- Current weather conditions for selected location
Type of change
- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [x] New feature (which adds functionality to an existing integration)
- [ ] Deprecation (breaking change to happen in the future)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
Additional information
- This PR fixes or closes issue: fixes #72029
- This PR is related to issue: #75955 which was closed because noone reviewed it and closed due to inactivity
- Link to documentation pull request:
PR contains very little code, if any. It is using the existing tuya integration and adds the device sensor, switches etc based on the tuya cloud API implementation. No new calls have been implemented, no additional dependencies, everything is achieved with the existing codebase.
Checklist
- [x] The code change is tested and works locally.
- [x] Local tests pass. Your PR cannot be merged unless tests pass
- [x] There is no commented out code in this PR.
- [x] I have followed the development checklist
- [x] The code has been formatted using Black (
black --fast homeassistant tests) - [x] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for www.home-assistant.io
If the code communicates with devices, web services, or third-party tools:
- [ ] The manifest file has all fields filled out correctly.
Updated and included derived files by running:python3 -m script.hassfest. - [ ] New or updated dependencies have been added to
requirements_all.txt.
Updated by runningpython3 -m script.gen_requirements_all. - [ ] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
- [ ] Untested files have been added to
.coveragerc.
The integration reached or maintains the following Integration Quality Scale:
- [ ] No score or internal
- [ ] 🥈 Silver
- [ ] 🥇 Gold
- [ ] 🏆 Platinum
To help with the load of incoming pull requests:
- [ ] I have reviewed two other open pull requests in this repository.
Hello @frenck , what is required from me in order for you (or someone else) to review this change?
Patience
Patience
I have plenty! Thanks for looking at the PR.
Any chance this can be reviewed before it goes into inactivity for the second time? Also, how can I get a maintainer to approve running workflows since this is my first time I contribute?
I can confirm this PR works fine with Smart Water timer branded Johgee
Hello @frenck , any chance we could get this reviewed and approved, this side of Xmas?
Roping in @Tuya @zlinoliver , please help.
Checking to see if there is any progress update here? I am eager to get this working...
I am also interested to get this working.. I have a similar device (WiFi/Bt Water Timer HCT-611 from Ningbo) currently not supported by any Tuya HA integration..
Hoping this will also work with the RainPoint/Tuya TTV103WRF Smart Hose Watering Timer with Wi-Fi hub (configured with Tuya app)
These are the PD_ID details of my product (WiFi/Bt Water Timer HCT-611 from Ningbo)
WiFi/BT Water Timer model HCT-611
Request URL curl --request GET "https://openapi.tuyaeu.com/v1.1/devices/bf6daentucppaufp/specifications" --header "sign_method: HMAC-SHA256" --header "client_id: jwk9e4nr5v37vtgf3qqv" --header "t: 1682258055227" --header "mode: cors" --header "Content-Type: application/json" --header "sign: 1476E412813E653CDE4183B75F9959ACDA019D9D26DD5BA1AF2ADCE8DC0C39B3" --header "access_token: 7d5141300a8c6c922f2979a507cfe54e" Response { "result": { "category": "sfkzq", "functions": [ { "code": "switch", "dp_id": 1, "type": "Boolean", "values": "{}" }, { "code": "weather_delay", "dp_id": 10, "type": "Enum", "values": "{"range":["cancel","24h","48h","72h"]}" }, { "code": "countdown", "dp_id": 11, "type": "Integer", "values": "{"unit":"s","min":0,"max":86400,"scale":0,"step":1}" }, { "code": "smart_weather", "dp_id": 13, "type": "Enum", "values": "{"range":["sunny","clear","cloud","cloudy","rainy","snow","fog"]}" } ], "status": [ { "code": "switch", "dp_id": 1, "type": "Boolean", "values": "{}" }, { "code": "battery_percentage", "dp_id": 7, "type": "Integer", "values": "{"unit":"%","min":0,"max":5,"scale":0,"step":1}" }, { "code": "battery_state", "dp_id": 8, "type": "Enum", "values": "{"range":["low","middle","high"]}" }, { "code": "weather_delay", "dp_id": 10, "type": "Enum", "values": "{"range":["cancel","24h","48h","72h"]}" }, { "code": "countdown", "dp_id": 11, "type": "Integer", "values": "{"unit":"s","min":0,"max":86400,"scale":0,"step":1}" }, { "code": "work_state", "dp_id": 12, "type": "Enum", "values": "{"range":["auto","manual","idle"]}" }, { "code": "smart_weather", "dp_id": 13, "type": "Enum", "values": "{"range":["sunny","clear","cloud","cloudy","rainy","snow","fog"]}" } ] }, "success": true, "t": 1682196920684, "tid": "fe7693cae14f11ed847f92e270c72120" }
Bluetooth Gateway model HCG-001-C
Request URL curl --request GET "https://openapi.tuyaeu.com/v1.1/devices/bfc857c6b09c82e72a2aeg /specifications" --header "sign_method: HMAC-SHA256" --header "client_id: jwk9e4nr5v37vtgf3qqv" --header "t: 1682258137187" --header "mode: cors" --header "Content-Type: application/json" --header "sign: 9B8234192C7909F0B3164F12A1BB12F90E6E511B984F891003C6A1C28CF5D771" --header "access_token: 7d5141300a8c6c922f2979a507cfe54e" Response { "code": 1106, "msg": "permission deny", "success": false, "t": 1682258110751, "tid": "7697f08ce1de11ed847f92e270c72120" }
I have same problem with Moes Smart Water Timer (BLE), it was shown as unsupported device, but after instaling tuya custom from HACS, I saw device and its entities as supported... but all stay unavialable :)
I'll make an attempt to rebase this change on the latest version and resubmit it with the required changes.
@athanasio Any news on this? Thanks
I past here also the screenshot of the Standard Instruction Set / Standard Status set of my device (HCT-611 Wifi Water timer).. Its gateway doesn't show (of course) and Standard Instruction Set. Again.. any chance to get it working? Thanks
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.
FYI, the "Tuya Local" custom integration in HACS (not to be confused with localtuya) now supports these water timers and hubs with fully local control. Setup can be tricky, but I've been using it for about a month and it works great.
(Close + open to retrigger CI)
@athanasio I'm setting this to draft since there are merge conflicts and unaddressed comment from January 2023. Please mark it as "ready for review" when the merge conflicts are fixed and review comments have been addressed 👍
Note: If you don't agree with a review comment, please reply to it and explain why
Just FYI, the "Tuya Local" custom integration in HACS (not to be confused with "Local Tuya" now supports these wifi hose irrigation timers. I used this integration all summer for status and control of two tuya-sources RainPoint hose timers connected to a Wifi hub (this: https://www.rainpointonline.com/collections/wi-fi-hose-timers/products/ttv103wrf-twg004wrf-3-smart-watering-timer-with-wi-fi-hub) and it has worked great. It was a little tricky to get all the needed device-id, and "sub device ids", but once sorted it has been rock solid.
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. If you are the author of this PR, please leave a comment if you want to keep it open. Also, please rebase your PR onto the latest dev branch to ensure that it's up to date with the latest changes. Thank you for your contribution!