From 49d4e73a649c59d1b48e778c03624af9ae7fa10a Mon Sep 17 00:00:00 2001 From: HomeSpan Date: Wed, 25 Nov 2020 13:07:24 -0600 Subject: [PATCH] Update Reference.md --- docs/Reference.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/Reference.md b/docs/Reference.md index bbed105..a6c42b4 100644 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -1,3 +1,18 @@ # HomeSpan Library Reference -*(coming soon)* +The HomeSpan Library is invoked by including *HomeSpan.h* in your Arduino sketch as follows: + +```C++ +#include "HomeSpan.h"; +``` + +At runtime this HomeSpan will create a global object named `homeSpan` that supports the following methods: + +* `void begin(Category catID, char *displayName, char *hostNameBase, char *modelName);` + * begin() initializes homeSpan and **must** be called at the beginning of each sketch before any other HomeSpan functions. + * all arguments are **optional** + * *catID* - the HAP Category HomeSpan broadcasts for pairing to HomeKit. Default is [Category::Lighting](Categories.md) + * *displayName* - the MDNS display name broadcast by HomeSpan. Default is "HomeSpan Server" + * *hostNameBase* - the full MDNS host name is broadcast by HomeSpan as *hostNameBase-DeviceID*.local, where DeviceID is a unique 6-byte code generated automatically by HomeSpan. Default is "HomeSpan" + * modelName - the HAP model name HomeSpan broadcasts for pairing to HomeKit. Default is "HomeSpan-ESP32" +