Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f2aa056

Browse files
docs(zigbee): Update docs with Binary Output
1 parent e11776c commit f2aa056

File tree

1 file changed

+114
-7
lines changed

1 file changed

+114
-7
lines changed

‎docs/en/zigbee/ep_binary.rst

Lines changed: 114 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ About
77

88
The ``ZigbeeBinary`` class provides an endpoint for binary input/output sensors in Zigbee networks. This endpoint implements the Zigbee Home Automation (HA) standard for binary sensors, supporting various application types for HVAC, security, and general binary sensing.
99
Binary Input (BI) is meant to be used for sensors that provide a binary signal, such as door/window sensors, motion detectors, etc. to be sent to the network.
10-
11-
.. note::
12-
13-
Binary Output (BO) is not supported yet.
10+
Binary Output (BO) is used for controlling binary devices such as relays, switches, or actuators that can be turned on/off remotely.
1411

1512
API Reference
1613
-------------
@@ -63,6 +60,33 @@ Security Application Types
6360
#define BINARY_INPUT_APPLICATION_TYPE_SECURITY_HEAT_DETECTION 0x01000008
6461
#define BINARY_INPUT_APPLICATION_TYPE_SECURITY_OTHER 0x0100FFFF
6562
63+
Binary Output Application Types
64+
*******************************
65+
66+
HVAC Application Types
67+
^^^^^^^^^^^^^^^^^^^^^^
68+
69+
.. code-block:: arduino
70+
71+
#define BINARY_OUTPUT_APPLICATION_TYPE_HVAC_BOILER 0x00000003
72+
#define BINARY_OUTPUT_APPLICATION_TYPE_HVAC_CHILLER 0x0000000D
73+
#define BINARY_OUTPUT_APPLICATION_TYPE_HVAC_FAN 0x00000022
74+
#define BINARY_OUTPUT_APPLICATION_TYPE_HVAC_HEATING_VALVE 0x0000002C
75+
#define BINARY_OUTPUT_APPLICATION_TYPE_HVAC_HUMIDIFIER 0x00000033
76+
#define BINARY_OUTPUT_APPLICATION_TYPE_HVAC_PREHEAT 0x00000034
77+
#define BINARY_OUTPUT_APPLICATION_TYPE_HVAC_OTHER 0x0000FFFF
78+
79+
Security Application Types
80+
^^^^^^^^^^^^^^^^^^^^^^^^^^
81+
82+
.. code-block:: arduino
83+
84+
#define BINARY_OUTPUT_APPLICATION_TYPE_SECURITY_ARM_DISARM_COMMAND 0x01000000
85+
#define BINARY_OUTPUT_APPLICATION_TYPE_SECURITY_OCCUPANCY_CONTROL 0x01000001
86+
#define BINARY_OUTPUT_APPLICATION_TYPE_SECURITY_ENABLE_CONTROL 0x01000002
87+
#define BINARY_OUTPUT_APPLICATION_TYPE_SECURITY_ACCESS_CONTROL 0x01000003
88+
#define BINARY_OUTPUT_APPLICATION_TYPE_SECURITY_OTHER 0x0100FFFF
89+
6690
API Methods
6791
***********
6892

@@ -127,11 +151,94 @@ Manually reports the current binary input value.
127151
128152
This function will return ``true`` if successful, ``false`` otherwise.
129153

154+
addBinaryOutput
155+
^^^^^^^^^^^^^^^
156+
157+
Adds a binary output cluster to the endpoint.
158+
159+
.. code-block:: arduino
160+
161+
bool addBinaryOutput();
162+
163+
This function will return ``true`` if successful, ``false`` otherwise.
164+
165+
setBinaryOutputApplication
166+
^^^^^^^^^^^^^^^^^^^^^^^^^^
167+
168+
Sets the application type for the binary output.
169+
170+
.. code-block:: arduino
171+
172+
bool setBinaryOutputApplication(uint32_t application_type);
173+
174+
* ``application_type`` - Application type constant (see Binary Output Application Types above)
175+
176+
This function will return ``true`` if successful, ``false`` otherwise.
177+
178+
setBinaryOutputDescription
179+
^^^^^^^^^^^^^^^^^^^^^^^^^^
180+
181+
Sets a custom description for the binary output.
182+
183+
.. code-block:: arduino
184+
185+
bool setBinaryOutputDescription(const char *description);
186+
187+
* ``description`` - Description string
188+
189+
This function will return ``true`` if successful, ``false`` otherwise.
190+
191+
onBinaryOutputChange
192+
^^^^^^^^^^^^^^^^^^^^^
193+
194+
Sets a callback function to be called when the binary output value changes.
195+
196+
.. code-block:: arduino
197+
198+
void onBinaryOutputChange(void (*callback)(bool binary_output));
199+
200+
* ``callback`` - Function pointer to callback that receives the new binary output value
201+
202+
setBinaryOutput
203+
^^^^^^^^^^^^^^^
204+
205+
Sets the binary output value.
206+
207+
.. code-block:: arduino
208+
209+
bool setBinaryOutput(bool output);
210+
211+
* ``output`` - Binary value (true/false)
212+
213+
This function will return ``true`` if successful, ``false`` otherwise.
214+
215+
getBinaryOutput
216+
^^^^^^^^^^^^^^^
217+
218+
Gets the current binary output value.
219+
220+
.. code-block:: arduino
221+
222+
bool getBinaryOutput();
223+
224+
This function returns the current binary output state.
225+
226+
reportBinaryOutput
227+
^^^^^^^^^^^^^^^^^^
228+
229+
Manually reports the current binary output value.
230+
231+
.. code-block:: arduino
232+
233+
bool reportBinaryOutput();
234+
235+
This function will return ``true`` if successful, ``false`` otherwise.
236+
130237
Example
131238
-------
132239

133-
Binary Input Implementation
134-
****************************
240+
Binary Input and Output Implementation
241+
**************************************
135242

136-
.. literalinclude:: ../../../libraries/Zigbee/examples/Zigbee_Binary_Input/Zigbee_Binary_Input.ino
243+
.. literalinclude:: ../../../libraries/Zigbee/examples/Zigbee_Binary_Input_Output/Zigbee_Binary_Input_Output.ino
137244
:language: arduino

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /