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

Adding Water Valve Accessory #88

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Conversation

nitaybz
Copy link

@nitaybz nitaybz commented Sep 25, 2019

No description provided.

@nitaybz
Copy link
Author

nitaybz commented Sep 25, 2019

Still haven't done the Wiki... I'll create it and push again

@nitaybz
Copy link
Author

nitaybz commented Sep 26, 2019

actually I saw that the Wiki contains the information on the parameters so I'll supply the information here so if you pull the request you can copy this data to the Wiki:

{
      "name": "Sprinklers",
      "type": "waterValve",
      "manufacturer": "Tuya",
      "model": "Smart Wifi Water Valve",,
      "id": "xxxxxxxxxxxxxx",
       "key": "#############",

    /* Water Valve Configurations */

    /* Additional parameters to override defaults only if needed */

    /* Change the Valve Types (homekit icon), default: GENERIC_VALVE, options: IRRIGATION / SHOWER_HEAD / WATER_FAUCET */
    "valveType": "IRRIGATION",

    /*  set to true when you want to CANCEL homekit timer on the valve */
    "noTimer": false,

    /*  Default duration for the valve timer in seconds for when homebridge restarts (can be set from the home app afterwards), default is 600 (10 minutes) */
    "defaultDuration": 600,

    /* Override the default datapoint identifier for power */
    "dpPower": 1
}

@AMoo-Miki
Copy link
Owner

AMoo-Miki commented Sep 29, 2019

Thanks a lot for this. I presume you have this device and have gotten to test your code. I will pull it in shortly.

Just to educate me, can you please share the schema and signature of the device?

@nitaybz
Copy link
Author

nitaybz commented Oct 6, 2019

sorry for the wait... here is the schema:

{
    name: 'Sprinklers',
    id: 'XXXXXXXXX',
    key: 'XXXXXXXX',
    def: {
      schema: '[{"mode":"rw","code":"switch_1","name":"\\u5f00\\u51731","property":{"type":"bool"},"iconname":"icon-dp_power2","id":1,"type":"obj","desc":""},{"mode":"rw","code":"countdown_1","name":"\\u5f00\\u51731\\u5012\\u8ba1\\u65f6","property":{"unit":"s","min":0,"max":86400,"scale":0,"step":1,"type":"value"},"iconname":"icon-dp_time2","id":9,"type":"obj","desc":""}]',
      extras: '[{"id":1,"inputStyle":"","inputType":"plain"},{"id":9,"inputStyle":"","inputType":"plain"}]',
    },
  },

There is a way to create a countdown timer within the tuya app which is great for the sprinkler timer in Homekit but I didn't know how to handle with it so I did the timer internally the plugin itself.

@chemicalsam
Copy link

I have two Tuya water valves and want to connect them to home bridge. None of the plugins I’ve found support this type of device. I’m kind of a noob here. How can I add your plugin to homebridge (HOOBS)

@vitaliy-kozlov
Copy link

Hi, Any news about adding support for valve device yet?

@nitaybz
Copy link
Author

nitaybz commented Nov 23, 2020

there is in the homebridge-tuya plugin... you can add valve via 'waterValve' type

@chemicalsam
Copy link

there is in the homebridge-tuya plugin... you can add valve via 'waterValve' type

There are a lot of plugins with that name. Are you referring to this one? https://plugins.hoobs.org/plugin/@newbishme/homebridge-tuya

@asolako
Copy link

asolako commented Jan 15, 2021

there is in the homebridge-tuya plugin... you can add valve via 'waterValve' type

There are a lot of plugins with that name. Are you referring to this one? https://plugins.hoobs.org/plugin/@newbishme/homebridge-tuya

Hi! I can confirm that the homebridge-tuya plugin (the one you link to looks to be the correct one, I found it here: https://github.com/iRayanKhan/homebridge-tuya) works with the "WaterValve" type. I had issues with mine defaulting to turning off after ten minutes but thanks to this thread I was able to disable that part. My relevant homebridge config looks like this:

{
"name": "Hovedkran",
"type": "WaterValve",
"noTimer": true,
"defaultDuration": 600,
"dpPower": 1,
"manufacturer": "Tuya",
"model": "Smart Valve Controller",
"id": "",
"key": ""
}

Now, if I could only find something for my Tuya natural gas sensor...

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.

5 participants