Skip to content

Water Valve

David Dix edited this page May 10, 2020 · 38 revisions

A HomeKit water valve.

Type Device Type
20 Water Value

The following configuration is available for thermostats:

Section Key Description
Actions "0", "1" etc. The actions performed by the accessory
Inching Time "i" Time period before returning accessory to previous state
State & Status Inputs "f[n]" & "g[n]" Inputs that manage accessory state
ICMP Ping Inputs "q[n]" & "p[n]" Ping inputs that manage accessory state
Accessory Notifications "m" Notifications to send to another accessory
Initial State "s" State a switch accessory enters on boot
Sensor Type "w" Type of sensor attached to accessory
Maximum Use Time "d" Maximum time valve can be on
Actions on Boot "xa" Enable / Disable execution of accessory actions on boot

Example

{
  "c": {
    "b": [{ "g": 0, "t": 5 }]
  },
  "a": [{
    "t": 20,
    "f0": [{ "g": 0, "t": 1 }],
    "f1": [{ "g": 0, "t": 2 }],
  }]
}

This is an example of a water valve... ???

Actions

Key Action Description
"0" OFF (default)
"1" ON

A water valve has two actions. The Digital Outputs "r": [{}] for each should be configured to attain the desired state.

Sensor Type

Sensor Type defined by the "w" key contained within the accessory object.

Type Key Description
0 Water Valve (default)
1 Sprinkler
2 Shower
3 Tap / Faucet

Set the sensor type to indicate what type of water accessory is attached e.g. "w": 2 indicates a sprinkler is attached.

A variety of one-wire sensors are available and supported by HAA.

Maximum Use Time

Maximum use time is defined by the "d" key contained within the accessory object.

Key State Description
"d" 0 Timer disabled
3600 Timer set to 1 hour (default)
1 to ∞ Time in seconds to set the use time

This option limits the maximum amount of time that the water valve can be in the ON state. The default is to limit the valve on time to 3,600 seconds (1 hour), but this time period can be disabled, lengthened or shortened.

When the timer is enabled then the valve will be turned OFF after the maximum use time has elapsed.

Accessory Notifications

The list of Accessory Notifications "m" values supported by a water valve are:

Key Value Notification
"v" 0 Valve OFF (default)
1 Valve ON
-1 Reset maximum use time "d"

See the general Accessory Notifications section for details of how to configure these notifications.

State and Status Inputs

State inputs "f[n]" & Status Inputs "g[n]" are supported by this accessory. The supported list is:

Key Action
"f0" Perform action "0" (Off)
"f1" Perform action "1" (On)
"g0" Set accessory state to Off
"g1" Set accessory state to On

Refer to State Inputs for more detail and examples.

ICMP Ping Inputs

ICMP Ping inputs "p[n]" and "q[n]" are supported by this accessory. The supported list is:

Key Action
"p0" Perform action "0" (Off)
"p1" Perform action "1" (On)
"q0" Set accessory state to Off
"q1" Set accessory state to On

Refer to ICMP Ping Inputs for more detail.

Initial State

The Initial State key is supported by this accessory. Refer to Initial State for details of the available values.

Clone this wiki locally