Skip to content

Water Valve

David Dix edited this page Apr 26, 2020 · 38 revisions

A HomeKit water valve.

Type Device Type
20 Water Value

The following configuration is available for thermostats:

Section Name Description
Actions "a" The actions performed by the device
State Inputs "f[n]" Inputs that trigger a fixed event
Ping State Inputs "q[n]" Ping input to set a 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

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

Name 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" object contained within the accessory object.

Type Name 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" object contained within the accessory object.

Name 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.

State Inputs

State inputs are defined by an "f[n]" object contained within the accessory object. Where [n] is the number of the associated state.

Name Required State
"f0" Valve Off
"f1" Valve On

Refer to State Inputs for more detail and examples.

ICMP Ping Inputs

ICMP Ping inputs are defined by an "q[n]" object contained within the accessory object. Where [n] is the number of the associated state.

Name State
"q0" Set state to On
"q1" Set state to Off

Refer to ICMP Ping Inputs for more detail and examples.

Accessory Notifications

The list of notifications "m" supported by a water valve are as follows:

Value Notification
0 Valve OFF (default)
1 Valve ON

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

Initial State

Initial state is defined by the "s" object contained within the accessory object.

Name State Description
"s" 0 OFF (default)
1 ON
4 Defined by fixed state inputs
5 Last state before restart
6 Opposite to last state before restart

The initial state that a water valve enters on boot can be set using the "s" option.

Clone this wiki locally