release
This commit is contained in:
2603
lib/home-assistant-integration/docsrc/source/Doxyfile
Normal file
2603
lib/home-assistant-integration/docsrc/source/Doxyfile
Normal file
File diff suppressed because it is too large
Load Diff
90
lib/home-assistant-integration/docsrc/source/conf.py
Normal file
90
lib/home-assistant-integration/docsrc/source/conf.py
Normal file
@@ -0,0 +1,90 @@
|
||||
# Configuration file for the Sphinx documentation builder.
|
||||
#
|
||||
# This file only contains a selection of the most common options. For a full
|
||||
# list see the documentation:
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||
|
||||
# -- Path setup --------------------------------------------------------------
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#
|
||||
# import os
|
||||
# import sys
|
||||
# sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
project = 'ArduinoHA'
|
||||
copyright = '2022, Dawid Chyrzynski'
|
||||
author = 'Dawid Chyrzynski'
|
||||
|
||||
# The full version, including alpha/beta/rc tags
|
||||
release = '2.0.0'
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = [
|
||||
'breathe',
|
||||
'sphinx.ext.extlinks',
|
||||
'sphinxcontrib.email'
|
||||
]
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
# templates_path = ['templates']
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
# This pattern also affects html_static_path and html_extra_path.
|
||||
exclude_patterns = []
|
||||
|
||||
# Setup the breathe extension
|
||||
breathe_projects = {
|
||||
'ArduinoHA': '../xml'
|
||||
}
|
||||
breathe_default_project = 'ArduinoHA'
|
||||
breathe_show_include = True
|
||||
breathe_default_members = ('members', 'undoc-members')
|
||||
|
||||
# Tell sphinx what the primary language being documented is.
|
||||
primary_domain = 'cpp'
|
||||
|
||||
# Tell sphinx what the pygments highlight language should be.
|
||||
highlight_language = 'cpp'
|
||||
|
||||
extlinks = {
|
||||
'example': ('https://github.com/dawidchyrzynski/arduino-home-assistant/tree/main/examples/', None)
|
||||
}
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
|
||||
html_scaled_image_link = False
|
||||
html_copy_source = False
|
||||
html_theme = 'press-ext'
|
||||
html_theme_path = ['themes']
|
||||
html_title = 'ArduinoHA'
|
||||
html_sidebars = {'**': ['util/searchbox.html', 'sidetoc.html']}
|
||||
html_theme_options = {
|
||||
'external_links': [
|
||||
('Github', 'https://github.com/dawidchyrzynski/arduino-home-assistant')
|
||||
]
|
||||
}
|
||||
html_js_files = [
|
||||
'custom.js'
|
||||
]
|
||||
html_css_files = [
|
||||
'custom.css'
|
||||
]
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named 'default.css' will overwrite the builtin 'default.css'.
|
||||
html_static_path = ['static']
|
||||
|
||||
# -- Extension ---------------------------------------------------------------
|
||||
|
||||
email_automode = False
|
||||
@@ -0,0 +1,9 @@
|
||||
HADevice class
|
||||
==============
|
||||
|
||||
.. doxygenclass:: HADevice
|
||||
:project: ArduinoHA
|
||||
:members:
|
||||
:protected-members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
@@ -0,0 +1,9 @@
|
||||
HAMqtt class
|
||||
============
|
||||
|
||||
.. doxygenclass:: HAMqtt
|
||||
:project: ArduinoHA
|
||||
:members:
|
||||
:protected-members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
@@ -0,0 +1,7 @@
|
||||
Core API
|
||||
========
|
||||
|
||||
.. toctree::
|
||||
|
||||
ha-device
|
||||
ha-mqtt
|
||||
@@ -0,0 +1,9 @@
|
||||
HABaseDeviceType class
|
||||
======================
|
||||
|
||||
.. doxygenclass:: HABaseDeviceType
|
||||
:project: ArduinoHA
|
||||
:members:
|
||||
:protected-members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
@@ -0,0 +1,9 @@
|
||||
HABinarySensor class
|
||||
====================
|
||||
|
||||
.. doxygenclass:: HABinarySensor
|
||||
:project: ArduinoHA
|
||||
:members:
|
||||
:protected-members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
@@ -0,0 +1,9 @@
|
||||
HAButton class
|
||||
==============
|
||||
|
||||
.. doxygenclass:: HAButton
|
||||
:project: ArduinoHA
|
||||
:members:
|
||||
:protected-members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
@@ -0,0 +1,9 @@
|
||||
HACamera class
|
||||
==============
|
||||
|
||||
.. doxygenclass:: HACamera
|
||||
:project: ArduinoHA
|
||||
:members:
|
||||
:protected-members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
@@ -0,0 +1,9 @@
|
||||
HACover class
|
||||
=============
|
||||
|
||||
.. doxygenclass:: HACover
|
||||
:project: ArduinoHA
|
||||
:members:
|
||||
:protected-members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
@@ -0,0 +1,9 @@
|
||||
HADeviceTracker class
|
||||
=====================
|
||||
|
||||
.. doxygenclass:: HADeviceTracker
|
||||
:project: ArduinoHA
|
||||
:members:
|
||||
:protected-members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
@@ -0,0 +1,9 @@
|
||||
HADeviceTrigger class
|
||||
=====================
|
||||
|
||||
.. doxygenclass:: HADeviceTrigger
|
||||
:project: ArduinoHA
|
||||
:members:
|
||||
:protected-members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
@@ -0,0 +1,9 @@
|
||||
HAFan class
|
||||
===========
|
||||
|
||||
.. doxygenclass:: HAFan
|
||||
:project: ArduinoHA
|
||||
:members:
|
||||
:protected-members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
@@ -0,0 +1,9 @@
|
||||
HAHVAC class
|
||||
============
|
||||
|
||||
.. doxygenclass:: HAHVAC
|
||||
:project: ArduinoHA
|
||||
:members:
|
||||
:protected-members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
@@ -0,0 +1,9 @@
|
||||
HALight class
|
||||
=============
|
||||
|
||||
.. doxygenclass:: HALight
|
||||
:project: ArduinoHA
|
||||
:members:
|
||||
:protected-members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
@@ -0,0 +1,9 @@
|
||||
HALock class
|
||||
============
|
||||
|
||||
.. doxygenclass:: HALock
|
||||
:project: ArduinoHA
|
||||
:members:
|
||||
:protected-members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
@@ -0,0 +1,9 @@
|
||||
HANumber class
|
||||
==============
|
||||
|
||||
.. doxygenclass:: HANumber
|
||||
:project: ArduinoHA
|
||||
:members:
|
||||
:protected-members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
@@ -0,0 +1,9 @@
|
||||
HAScene class
|
||||
=============
|
||||
|
||||
.. doxygenclass:: HAScene
|
||||
:project: ArduinoHA
|
||||
:members:
|
||||
:protected-members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
@@ -0,0 +1,9 @@
|
||||
HASelect class
|
||||
==============
|
||||
|
||||
.. doxygenclass:: HASelect
|
||||
:project: ArduinoHA
|
||||
:members:
|
||||
:protected-members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
@@ -0,0 +1,9 @@
|
||||
HASensorNumber class
|
||||
====================
|
||||
|
||||
.. doxygenclass:: HASensorNumber
|
||||
:project: ArduinoHA
|
||||
:members:
|
||||
:protected-members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
@@ -0,0 +1,9 @@
|
||||
HASensor class
|
||||
==============
|
||||
|
||||
.. doxygenclass:: HASensor
|
||||
:project: ArduinoHA
|
||||
:members:
|
||||
:protected-members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
@@ -0,0 +1,9 @@
|
||||
HASwitch class
|
||||
==============
|
||||
|
||||
.. doxygenclass:: HASwitch
|
||||
:project: ArduinoHA
|
||||
:members:
|
||||
:protected-members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
@@ -0,0 +1,9 @@
|
||||
HATagScanner class
|
||||
==================
|
||||
|
||||
.. doxygenclass:: HATagScanner
|
||||
:project: ArduinoHA
|
||||
:members:
|
||||
:protected-members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
@@ -0,0 +1,23 @@
|
||||
Device types API
|
||||
================
|
||||
|
||||
.. toctree::
|
||||
|
||||
ha-base-device-type
|
||||
ha-binary-sensor
|
||||
ha-button
|
||||
ha-camera
|
||||
ha-cover
|
||||
ha-device-tracker
|
||||
ha-device-trigger
|
||||
ha-fan
|
||||
ha-hvac
|
||||
ha-light
|
||||
ha-lock
|
||||
ha-number
|
||||
ha-scene
|
||||
ha-select
|
||||
ha-sensor
|
||||
ha-sensor-number
|
||||
ha-switch
|
||||
ha-tag-scanner
|
||||
@@ -0,0 +1,8 @@
|
||||
API reference
|
||||
=============
|
||||
|
||||
.. toctree::
|
||||
|
||||
core/index
|
||||
device-types/index
|
||||
utils/index
|
||||
@@ -0,0 +1,9 @@
|
||||
HANumeric class
|
||||
===============
|
||||
|
||||
.. doxygenclass:: HANumeric
|
||||
:project: ArduinoHA
|
||||
:members:
|
||||
:protected-members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
@@ -0,0 +1,9 @@
|
||||
HASerializerArray class
|
||||
=======================
|
||||
|
||||
.. doxygenclass:: HASerializerArray
|
||||
:project: ArduinoHA
|
||||
:members:
|
||||
:protected-members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
@@ -0,0 +1,9 @@
|
||||
HASerializer class
|
||||
==================
|
||||
|
||||
.. doxygenclass:: HASerializer
|
||||
:project: ArduinoHA
|
||||
:members:
|
||||
:protected-members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
@@ -0,0 +1,9 @@
|
||||
HAUtils class
|
||||
=============
|
||||
|
||||
.. doxygenclass:: HAUtils
|
||||
:project: ArduinoHA
|
||||
:members:
|
||||
:protected-members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
@@ -0,0 +1,9 @@
|
||||
Utils API
|
||||
=========
|
||||
|
||||
.. toctree::
|
||||
|
||||
ha-numeric
|
||||
ha-serializer
|
||||
ha-serializer-array
|
||||
ha-utils
|
||||
@@ -0,0 +1,27 @@
|
||||
Compatible Hardware
|
||||
===================
|
||||
|
||||
The library uses the Arduino Ethernet Client API for interacting with the network hardware.
|
||||
It should work fine as long as the `Client` class is available.
|
||||
|
||||
Here is the list of devices on which the library was tested:
|
||||
|
||||
- Arduino Uno
|
||||
- Arduino Mega
|
||||
- Arduino Nano
|
||||
- Arduino Pro Mini
|
||||
- Arduino Nano 33 IoT
|
||||
- NodeMCU
|
||||
- Controllino Mega (Pure)
|
||||
- Controllino Maxi (Pure)
|
||||
- ESP-01
|
||||
- ESP32-CAM
|
||||
- Sonoff Dual R2
|
||||
- Sonoff Dual R3
|
||||
- Sonoff Basic
|
||||
- Sonoff Mini
|
||||
- Tuya Wi-Fi switch module
|
||||
- Tuya Wi-Fi curtain module
|
||||
|
||||
Please note that it's not the complete list of supported devices.
|
||||
You may try to use the library on any device that uses Arduino core.
|
||||
@@ -0,0 +1,60 @@
|
||||
Examples
|
||||
========
|
||||
|
||||
.. list-table::
|
||||
:widths: 25 75
|
||||
:header-rows: 1
|
||||
:class: examples-table
|
||||
|
||||
* - Example
|
||||
- Description
|
||||
* - :example:`Binary sensor <binary-sensor/binary-sensor.ino>`
|
||||
- Using the binary sensor as a door contact sensor.
|
||||
* - :example:`Button <button/button.ino>`
|
||||
- Adding simple buttons to the Home Assistant panel.
|
||||
* - :example:`Camera <esp32-cam/esp32-cam.ino>`
|
||||
- Publishing the preview from the ESP32-CAM module.
|
||||
* - :example:`Cover <cover/cover.ino>`
|
||||
- Controlling a window cover (open / close / stop).
|
||||
* - :example:`Device trigger <multi-state-button/multi-state-button.ino>`
|
||||
- Implementation of a simple wall switch that reports press and hold states.
|
||||
* - :example:`Fan <fan/fan.ino>`
|
||||
- Controlling a simple fan (state + speed).
|
||||
* - :example:`HVAC <hvac/hvac.ino>`
|
||||
- HVAC controller with multiple modes, power control and target temperature.
|
||||
* - :example:`Lock <lock/lock.ino>`
|
||||
- A simple door lock that's controlled by the Home Assistant.
|
||||
* - :example:`Light <light/light.ino>`
|
||||
- A simple light that allows changing brightness, color temperature and RGB color.
|
||||
* - :example:`Number <number/number.ino>`
|
||||
- Adding an interactive numeric slider in the Home Assistant panel.
|
||||
* - :example:`Scene <scene/scene.ino>`
|
||||
- Adding a custom scene in the Home Assistant panel.
|
||||
* - :example:`Select <select/select.ino>`
|
||||
- A dropdown selector that's displayed in the Home Assistant panel.
|
||||
* - :example:`Sensor <sensor/sensor.ino>`
|
||||
- A simple sensor that reports a state in a string representation (open / opening / close).
|
||||
* - :example:`Analog sensor <sensor-analog/sensor-analog.ino>`
|
||||
- Reporting the analog pin's voltage to the Home Assistant.
|
||||
* - :example:`Integer sensor <sensor-integer/sensor-integer.ino>`
|
||||
- Reporting the device's uptime to the Home Assistant.
|
||||
* - :example:`Switch <led-switch/led-switch.ino>`
|
||||
- The LED that's controlled by the Home Assistant.
|
||||
* - :example:`Multi-switch <multi-switch/multi-switch.ino>`
|
||||
- Multiple switches controlled by the Home Assistant.
|
||||
* - :example:`Tag scanner <tag-scanner/tag-scanner.ino>`
|
||||
- Scanning RFID tags using the MFRC522 module.
|
||||
* - :example:`Availability <availability/availability.ino>`
|
||||
- Reporting entities' availability (online / offline) to the Home Assistant.
|
||||
* - :example:`Advanced availability <advanced-availability/advanced-availability.ino>`
|
||||
- Advanced availability reporting with MQTT LWT (Last Will and Testament).
|
||||
* - :example:`MQTT advanced <mqtt-advanced/mqtt-advanced.ino>`
|
||||
- Subscribing to custom topics and publishing custom messages.
|
||||
* - :example:`MQTT with credentials <mqtt-with-credentials/mqtt-with-credentials.ino>`
|
||||
- Establishing connection with a MQTT broker using the credentials.
|
||||
* - :example:`NodeMCU (ESP8266) <nodemcu/nodemcu.ino>`
|
||||
- Basic example for ESP8266 devices.
|
||||
* - :example:`Arduino Nano 33 IoT <nano33iot/nano33iot.ino>`
|
||||
- Basic example for Arduino Nano 33 IoT (SAMD family).
|
||||
* - :example:`mDNS discovery <mdns/mdns.ino>`
|
||||
- Make your ESP8266 discoverable via the mDNS.
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
Getting started
|
||||
===============
|
||||
|
||||
Welcome to the ArduinoHA library!
|
||||
This documentation is a step-by-step guide that presents all features of the library.
|
||||
If you feel that there is anything unclear don't hesitate to open a new GitHub discussion.
|
||||
|
||||
Have fun!
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
prerequisites
|
||||
installation
|
||||
compatible-hardware
|
||||
examples
|
||||
@@ -0,0 +1,44 @@
|
||||
Installation
|
||||
============
|
||||
|
||||
There are two ways to install the library depending on your project.
|
||||
If you're using Arduino IDE to compile your project you only need to install the library into the IDE.
|
||||
|
||||
The second method is meant for more advanced users that use *makeEspArduino* for building the project for ESP32/ESP8266 devices.
|
||||
|
||||
Arduino IDE
|
||||
-----------
|
||||
|
||||
To install the library into your Arduino IDE you can use Library Manager (available from IDE version 1.6.2).
|
||||
Open the IDE and click to the "Sketch" menu and then *Include Library > Manage Libraries*.
|
||||
|
||||
.. image:: images/manage-libraries.png
|
||||
:width: 500
|
||||
:align: center
|
||||
|
||||
Type "home-assistant-integration" in the search field, select the latest version of the library from the dropdown and then click *Install*.
|
||||
|
||||
.. image:: images/library-search.png
|
||||
:width: 500
|
||||
:align: center
|
||||
|
||||
For other installation methods please refer to `Arduino documentation <https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries>`_.
|
||||
|
||||
makeEspArduino
|
||||
--------------
|
||||
|
||||
The library can be installed in an environment managed by `makeEspArduino <https://github.com/plerup/makeEspArduino>`_.
|
||||
The best approach is to add the library and its dependency as submodules in the project as follows:
|
||||
|
||||
::
|
||||
|
||||
git submodule add https://github.com/dawidchyrzynski/arduino-home-assistant.git arduino-home-assistant
|
||||
cd arduino-home-assistant && git checkout tags/2.0.0 && cd ..
|
||||
git submodule add https://github.com/knolleary/pubsubclient.git pubsubclient
|
||||
cd pubsubclient && git checkout tags/v2.8
|
||||
|
||||
Then you just need to add one extra line in your `Makefile`:
|
||||
|
||||
::
|
||||
|
||||
LIBS := $(ROOT)/arduino-home-assistant $(ROOT)/pubsubclient
|
||||
@@ -0,0 +1,8 @@
|
||||
Prerequisites
|
||||
=============
|
||||
|
||||
ArduinoHA uses MQTT protocol over TCP to communicate with your Home Assistant instance.
|
||||
The MQTT broker is not installed by default so you will need to install an extra HA addon in order to get the integration working.
|
||||
|
||||
The recommended setup method is to use the `Mosquitto Brokker addon <https://github.com/home-assistant/addons/blob/master/mosquitto/DOCS.md>`_.
|
||||
After installing the addon your HA instance acts as a broker for all devices you're going to integrate with it.
|
||||
@@ -0,0 +1,100 @@
|
||||
Availability reporting
|
||||
======================
|
||||
|
||||
Home Assistant allows to track online/offline states of devices and device types.
|
||||
In this way controls available in the panel will be displayed as disabled if a device is offline.
|
||||
|
||||
The library allows to expose state of the entire device (i.e. shared availability) or specific type (sensor, switch, light, etc.).
|
||||
By default this feature is not enabled to save resources (RAM and flash) but you can easily turn it on as shown below.
|
||||
|
||||
Shared availability
|
||||
-------------------
|
||||
|
||||
I highly recommend to use shared availability feature as it allows to utilize MQTT LWT.
|
||||
Basically, shared availability allows to control availability of all types related to a specific device.
|
||||
For example: if your device has 5 switches and 2 buttons you can control their availability in the HA panel using a single method call.
|
||||
|
||||
See example below showing how to enable shared availability of the device.
|
||||
By default, the device is considered online but you can control its state manually using ``HADevice::setAvailability(bool online)`` method.
|
||||
In most cases you won't need to control availability manually as the library takes care of availability as long as the device is powered on.
|
||||
|
||||
::
|
||||
|
||||
#include <ArduinoHA.h>
|
||||
|
||||
HADevice device("myUniqueID");
|
||||
|
||||
void setup() {
|
||||
device.enableSharedAvailability();
|
||||
// device.setAvailability(false); // changes default state to offline
|
||||
|
||||
// ...
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// ...
|
||||
|
||||
// device.setAvailability(true); // you can control availability manually if you want
|
||||
}
|
||||
|
||||
MQTT LWT
|
||||
--------
|
||||
|
||||
The shared availability feature is considered a complete solution only if it's used with MQTT LWT feature.
|
||||
Without LWT if the device is powered off then Home Assistant displays it as online.
|
||||
That's because availability tracking relies on MQTT messages and if you cut off power of your device then its not capable of publishing the offline message.
|
||||
|
||||
When LWT feature is enabled the device becomes offline in the HA panel even if you cut off power supply.
|
||||
This solution is implemented by MQTT broker that automatically publishes the message when the TCP connection to the device is lost.
|
||||
|
||||
::
|
||||
|
||||
#include <ArduinoHA.h>
|
||||
|
||||
HADevice device("myUniqueID");
|
||||
|
||||
void setup() {
|
||||
device.enableSharedAvailability();
|
||||
device.enableLastWill();
|
||||
|
||||
// ...
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// ...
|
||||
}
|
||||
|
||||
Device type's availability
|
||||
--------------------------
|
||||
|
||||
There also a way to control availability of specific device types.
|
||||
Each type can be controlled separately as shown below.
|
||||
Please note that this solution requires shared availability to be disabled and it's not supported by LWT.
|
||||
|
||||
::
|
||||
|
||||
#include <Ethernet.h>
|
||||
#include <ArduinoHA.h>
|
||||
|
||||
byte mac[] = {0x00, 0x10, 0xFA, 0x6E, 0x38, 0x4A};
|
||||
EthernetClient client;
|
||||
HADevice device(mac, sizeof(mac));
|
||||
HAMqtt mqtt(client, device);
|
||||
HASwitch mySwitch("mySwitchId");
|
||||
|
||||
void setup() {
|
||||
Ethernet.begin(mac);
|
||||
|
||||
// this line enables availability for your switch
|
||||
mySwitch.setAvailability(true); // you can also set it to false
|
||||
|
||||
// ...
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// ...
|
||||
|
||||
// you can control availability at runtime as follows:
|
||||
mySwitch.setAvailability(true); // online
|
||||
mySwitch.setAvailability(false); // offline
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
Compiler macros
|
||||
===============
|
||||
|
||||
The library supports couple of macros that are defined in the `ArduinoHADefines.h` file.
|
||||
You can uncomment them in this specific file or provide flags directly to compiler (for example: via Makefile).
|
||||
|
||||
Debug mode
|
||||
----------
|
||||
|
||||
Debug mode unlocks logging feature in the library.
|
||||
Logs may be useful for debugging the communication with the Home Assistant.
|
||||
|
||||
To enable debug mode you need to defined `ARDUINOHA_DEBUG` macro.
|
||||
|
||||
Code optimization
|
||||
-----------------
|
||||
|
||||
Defining one of the macros listed below results in truncating the corresponding device type.
|
||||
It may be useful if you want to save some flash memory occupied by virtual tables of those classes.
|
||||
|
||||
* `EX_ARDUINOHA_BINARY_SENSOR`
|
||||
* `EX_ARDUINOHA_BUTTON`
|
||||
* `EX_ARDUINOHA_CAMERA`
|
||||
* `EX_ARDUINOHA_COVER`
|
||||
* `EX_ARDUINOHA_DEVICE_TRACKER`
|
||||
* `EX_ARDUINOHA_DEVICE_TRIGGER`
|
||||
* `EX_ARDUINOHA_FAN`
|
||||
* `EX_ARDUINOHA_HVAC`
|
||||
* `EX_ARDUINOHA_LIGHT`
|
||||
* `EX_ARDUINOHA_LOCK`
|
||||
* `EX_ARDUINOHA_NUMBER`
|
||||
* `EX_ARDUINOHA_SCENE`
|
||||
* `EX_ARDUINOHA_SELECT`
|
||||
* `EX_ARDUINOHA_SENSOR`
|
||||
* `EX_ARDUINOHA_SWITCH`
|
||||
* `EX_ARDUINOHA_TAG_SCANNER`
|
||||
@@ -0,0 +1,46 @@
|
||||
Connection parameters
|
||||
=====================
|
||||
|
||||
:doc:`HAMqtt </documents/api/core/ha-mqtt>` class exposes a few variants of the ``begin`` method that allows specifying the MQTT connection parameters.
|
||||
**This method should be called only once and at the end of the setup logic.**
|
||||
The example below presents all possible variants. Pick one that meets your requirements.
|
||||
|
||||
.. NOTE::
|
||||
|
||||
Connection to the MQTT broker is established asynchronously.
|
||||
The :doc:`HAMqtt::begin </documents/api/core/ha-mqtt>` method just sets the parameters of the connection.
|
||||
The connection attempt is made during the loop cycle.
|
||||
|
||||
::
|
||||
|
||||
#include <Ethernet.h>
|
||||
#include <ArduinoHA.h>
|
||||
|
||||
byte mac[] = {0x00, 0x10, 0xFA, 0x6E, 0x38, 0x4A};
|
||||
EthernetClient client;
|
||||
HADevice device(mac, sizeof(mac));
|
||||
HAMqtt mqtt(client, device);
|
||||
|
||||
void setup() {
|
||||
Ethernet.begin(mac);
|
||||
|
||||
// anoymous connection on default port 1883
|
||||
mqtt.begin("192.168.1.50");
|
||||
|
||||
// anoymous connection on port 8888
|
||||
mqtt.begin("192.168.1.50", 8888);
|
||||
|
||||
// connection with credentials on default port 1883
|
||||
mqtt.begin("192.168.1.50", "username", "password");
|
||||
|
||||
// connection with credentials on port 8888
|
||||
mqtt.begin("192.168.1.50", 8888, "username", "password");
|
||||
|
||||
// you can also use hostname in all variants
|
||||
mqtt.begin("mybroker.local");
|
||||
}
|
||||
|
||||
void loop() {
|
||||
Ethernet.maintain();
|
||||
mqtt.loop();
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
Device configuration
|
||||
====================
|
||||
|
||||
:doc:`HADevice </documents/api/core/ha-device>` represents the physical device where the library is installed.
|
||||
Logically it's a group of types like sensors, switches, lights and so on.
|
||||
In the Home Assistant, it's listed with properties that may be configured using the library's API.
|
||||
|
||||
Each property except the unique ID is optional.
|
||||
Setting optional properties increases flash and RAM usage so it's not recommended to set them on lower-spec MCUs.
|
||||
|
||||
The supported properties are:
|
||||
|
||||
* unique ID*
|
||||
* name
|
||||
* software version
|
||||
* manufacturer
|
||||
* model
|
||||
|
||||
Unique ID
|
||||
---------
|
||||
|
||||
The ID of a device needs to be unique in a scope of a Home Assistant instance.
|
||||
The safest solution is to use the MAC address of an Ethernet or Wi-Fi chip but you can also implement your own solution.
|
||||
|
||||
There are three different ways to set the ID of the device.
|
||||
You can pick one depending on your needs.
|
||||
|
||||
1) Providing string (const char*) to the :doc:`HADevice </documents/api/core/ha-device>` constructor
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Try to keep the ID simple (alphanumeric characters) and short.
|
||||
|
||||
::
|
||||
|
||||
#include <ArduinoHA.h>
|
||||
|
||||
HADevice device("myUniqueID");
|
||||
|
||||
void setup() {
|
||||
// ...
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// ...
|
||||
}
|
||||
|
||||
2) Providing byte array to the :doc:`HADevice </documents/api/core/ha-device>` constructor
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
::
|
||||
|
||||
#include <ArduinoHA.h>
|
||||
|
||||
// use your own unique bytes sequence
|
||||
byte mac[] = {0x00, 0x10, 0xFA, 0x6E, 0x38, 0x4A};
|
||||
HADevice device(mac, sizeof(mac));
|
||||
|
||||
void setup() {
|
||||
// ...
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// ...
|
||||
}
|
||||
|
||||
3) Using :doc:`HADevice::setUniqueId </documents/api/core/ha-device>` method during the setup
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
::
|
||||
|
||||
#include <ArduinoHA.h>
|
||||
|
||||
HADevice device;
|
||||
|
||||
void setup() {
|
||||
// any length is acceptable
|
||||
byte myId[] = {0x05, 0xb4, 0xc6, 0x9f, 0xbe, 0xce, 0x8c, 0x1f, 0xc7};
|
||||
device.setUniqueId(myId, sizeof(myId)); // the input array is cloned internally
|
||||
|
||||
// ...
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// ...
|
||||
}
|
||||
|
||||
Device properties
|
||||
-----------------
|
||||
|
||||
Each property has its corresponding setter method in the :doc:`HADevice </documents/api/core/ha-device>` class.
|
||||
Please note that all these methods accept const char pointer whose **content is not copied**.
|
||||
|
||||
::
|
||||
|
||||
#include <ArduinoHA.h>
|
||||
|
||||
HADevice device("myUniqueId");
|
||||
|
||||
void setup() {
|
||||
device.setName("Bedroom Light Controller");
|
||||
device.setSoftwareVersion("1.0.0");
|
||||
device.setManufacturer("Developer Corp.");
|
||||
device.setModel("ABC-123");
|
||||
|
||||
// ...
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// ...
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
|
||||
Device types
|
||||
============
|
||||
|
||||
Device type represents a single entity in the Home Assistant panel.
|
||||
It can be a sensor, lock, camera or anything that's listed in the table below.
|
||||
|
||||
Your physical device (for example ESP-01 board) can have multiple device types assigned.
|
||||
They will be displayed as child entities in the HA panel.
|
||||
|
||||
Limitations
|
||||
-----------
|
||||
|
||||
Registering a new device type requires some flash and RAM memory to be utilized.
|
||||
On less powerful units like Arduino Uno, you may quickly hit the limit of resources, so keeping the device simple is recommended.
|
||||
Hitting the resource limit will result in random reboots of the device.
|
||||
|
||||
By default, the maximum number of device types is 6.
|
||||
You can increase the limit using the :doc:`HAMqtt </documents/api/core/ha-mqtt>` class constructor as follows:
|
||||
|
||||
::
|
||||
|
||||
#include <Ethernet.h>
|
||||
#include <ArduinoHA.h>
|
||||
|
||||
byte mac[] = {0x00, 0x10, 0xFA, 0x6E, 0x38, 0x4A};
|
||||
EthernetClient client;
|
||||
HADevice device(mac, sizeof(mac));
|
||||
HAMqtt mqtt(client, device, 12); // <------------ 12 is a new limit of device types
|
||||
|
||||
void setup() {
|
||||
Ethernet.begin(mac);
|
||||
|
||||
// your setup logic goes here
|
||||
}
|
||||
|
||||
void loop() {
|
||||
Ethernet.maintain();
|
||||
mqtt.loop();
|
||||
|
||||
// your loop logic goes here
|
||||
}
|
||||
|
||||
Please note that this limit cannot be changed at runtime.
|
||||
|
||||
Supported device types
|
||||
----------------------
|
||||
|
||||
.. list-table::
|
||||
:widths: 25 15 60
|
||||
:header-rows: 1
|
||||
:class: supported-device-types-table
|
||||
|
||||
* - Device type
|
||||
- Supported
|
||||
- Documentation
|
||||
* - Binary sensor
|
||||
- ✅
|
||||
- :doc:`HABinarySensor </documents/api/device-types/ha-binary-sensor>`
|
||||
* - Button
|
||||
- ✅
|
||||
- :doc:`HAButton </documents/api/device-types/ha-button>`
|
||||
* - Camera
|
||||
- ✅
|
||||
- :doc:`HACamera </documents/api/device-types/ha-camera>`
|
||||
* - Cover
|
||||
- ✅
|
||||
- :doc:`HACover </documents/api/device-types/ha-cover>`
|
||||
* - Device tracker
|
||||
- ✅
|
||||
- :doc:`HADeviceTracker </documents/api/device-types/ha-device-tracker>`
|
||||
* - Device trigger
|
||||
- ✅
|
||||
- :doc:`HADeviceTrigger </documents/api/device-types/ha-device-trigger>`
|
||||
* - Fan
|
||||
- ✅
|
||||
- :doc:`HAFan </documents/api/device-types/ha-fan>`
|
||||
* - Humidifier
|
||||
- ❌
|
||||
- --
|
||||
* - HVAC
|
||||
- ✅
|
||||
- :doc:`HAHVAC </documents/api/device-types/ha-hvac>`
|
||||
* - Light
|
||||
- ✅
|
||||
- :doc:`HALight </documents/api/device-types/ha-light>`
|
||||
* - Lock
|
||||
- ✅
|
||||
- :doc:`HALock </documents/api/device-types/ha-lock>`
|
||||
* - Number
|
||||
- ✅
|
||||
- :doc:`HANumber </documents/api/device-types/ha-number>`
|
||||
* - Scene
|
||||
- ✅
|
||||
- :doc:`HAScene </documents/api/device-types/ha-scene>`
|
||||
* - Select
|
||||
- ✅
|
||||
- :doc:`HASelect </documents/api/device-types/ha-select>`
|
||||
* - | Sensor (text)
|
||||
- ✅
|
||||
- :doc:`HASensor </documents/api/device-types/ha-sensor>`
|
||||
* - | Sensor (number)
|
||||
- ✅
|
||||
- :doc:`HASensorNumber </documents/api/device-types/ha-sensor-number>`
|
||||
* - Switch
|
||||
- ✅
|
||||
- :doc:`HASwitch </documents/api/device-types/ha-switch>`
|
||||
* - Tag scanner
|
||||
- ✅
|
||||
- :doc:`HATagScanner </documents/api/device-types/ha-tag-scanner>`
|
||||
* - Vacuum
|
||||
- ❌
|
||||
- --
|
||||
@@ -0,0 +1,44 @@
|
||||
Discovery
|
||||
=========
|
||||
|
||||
The library automatically maintains connection to the MQTT broker and takes care of the discovery process.
|
||||
Each device type that you create (sensor, switch, light, fan, etc.) is automatically registered in MQTT manager.
|
||||
Whenever connection with the MQTT broker is acquired the configuration of all device types is pushed to the Home Assistant.
|
||||
|
||||
There is one basic rule that you need to follow: device types need to be constructed after :doc:`HAMqtt </documents/api/core/ha-mqtt>` class.
|
||||
That's because device types are relying on :doc:`HAMqtt </documents/api/core/ha-mqtt>` instance internally.
|
||||
|
||||
Topics prefix
|
||||
-------------
|
||||
|
||||
In some cases you may need to change prefix of MQTT topics.
|
||||
There are two types of topics utilized by the library:
|
||||
|
||||
* **discovery topic** - used for publishing device types' configuration (default: ``homeassistant``)
|
||||
* **data topic** - used for publishing states, data, etc. (default: ``aha``)
|
||||
|
||||
The discovery topic's prefix can be changed using ``HAMqtt::setDiscoveryPrefix(const char* prefix)`` method.
|
||||
The data topic's prefix can be changed using ``HAMqtt::setDataPrefix(const char* prefix)`` method
|
||||
|
||||
::
|
||||
|
||||
#include <Ethernet.h>
|
||||
#include <ArduinoHA.h>
|
||||
|
||||
byte mac[] = {0x00, 0x10, 0xFA, 0x6E, 0x38, 0x4A};
|
||||
EthernetClient client;
|
||||
HADevice device(mac, sizeof(mac));
|
||||
HAMqtt mqtt(client, device);
|
||||
|
||||
// register your device types here
|
||||
|
||||
void setup() {
|
||||
mqtt.setDiscoveryPrefix("myCustomPrefix");
|
||||
mqtt.setDataPrefix("myDataPrefix");
|
||||
|
||||
// ...
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// ...
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
Library
|
||||
=======
|
||||
|
||||
This chapter describes basic all of the library's core.
|
||||
Solid understanding of foundations will allow you to utilize full potential of the library.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
introduction
|
||||
device-configuration
|
||||
availability-reporting
|
||||
connection-params
|
||||
discovery
|
||||
device-types
|
||||
mqtt-security
|
||||
mqtt-advanced
|
||||
compiler-macros
|
||||
@@ -0,0 +1,79 @@
|
||||
Introduction
|
||||
============
|
||||
|
||||
Before implementing the business logic of your application you will need to
|
||||
add a few necessary pieces of code to your project.
|
||||
Basically, everything comes up to a few basic rules:
|
||||
|
||||
1) :doc:`HADevice </documents/api/core/ha-device>` and :doc:`HAMqtt </documents/api/core/ha-mqtt>` instances need to be initialized once globally or as a part of another global object.
|
||||
2) :doc:`HAMqtt::begin </documents/api/core/ha-mqtt>` needs to be called at the end of setup logic. It provides MQTT broker credentials that will be used for a connection.
|
||||
3) :doc:`HAMqtt::loop </documents/api/core/ha-mqtt>` method needs to be called periodically (it doesn't need to be called on each tick).
|
||||
4) Device types need to be initialized after :doc:`HAMqtt </documents/api/core/ha-mqtt>` class (it will be described later in the documentation).
|
||||
|
||||
Here are the minimal boilerplates that you can start with.
|
||||
Don't worry if you have no idea what's going on here.
|
||||
Everything will be covered in the following chapters.
|
||||
|
||||
Arduino Boilerplate
|
||||
-------------------
|
||||
|
||||
::
|
||||
|
||||
#include <Ethernet.h>
|
||||
#include <ArduinoHA.h>
|
||||
|
||||
byte mac[] = {0x00, 0x10, 0xFA, 0x6E, 0x38, 0x4A};
|
||||
EthernetClient client;
|
||||
HADevice device(mac, sizeof(mac));
|
||||
HAMqtt mqtt(client, device);
|
||||
|
||||
void setup() {
|
||||
Ethernet.begin(mac);
|
||||
|
||||
// your setup logic goes here
|
||||
|
||||
// MQTT broker connection (use your data here)
|
||||
mqtt.begin("192.168.1.50", "username", "password");
|
||||
}
|
||||
|
||||
void loop() {
|
||||
Ethernet.maintain();
|
||||
mqtt.loop();
|
||||
|
||||
// your loop logic goes here
|
||||
}
|
||||
|
||||
ESP32/ESP8266 Boilerplate
|
||||
-------------------------
|
||||
|
||||
::
|
||||
|
||||
#include <ESP8266WiFi.h>
|
||||
#include <ArduinoHA.h>
|
||||
|
||||
WiFiClient client;
|
||||
HADevice device;
|
||||
HAMqtt mqtt(client, device);
|
||||
|
||||
void setup() {
|
||||
byte mac[WL_MAC_ADDR_LENGTH];
|
||||
WiFi.macAddress(mac);
|
||||
device.setUniqueId(mac, sizeof(mac));
|
||||
|
||||
// you can skip this part if you're already maintaining the connection logic
|
||||
WiFi.begin("MyNetworkSSID", "MyPassword");
|
||||
while (WiFi.status() != WL_CONNECTED) {
|
||||
delay(500); // waiting for the connection
|
||||
}
|
||||
|
||||
// your setup logic goes here
|
||||
|
||||
// MQTT broker connection (use your data here)
|
||||
mqtt.begin("192.168.1.50", "username", "password");
|
||||
}
|
||||
|
||||
void loop() {
|
||||
mqtt.loop();
|
||||
|
||||
// your loop logic goes here
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
MQTT advanced features
|
||||
======================
|
||||
|
||||
Callbacks
|
||||
---------
|
||||
|
||||
:doc:`HAMqtt </documents/api/core/ha-mqtt>` class exposes some useful callbacks that you can bind to.
|
||||
Please take a look at the example below.
|
||||
|
||||
::
|
||||
|
||||
#include <Ethernet.h>
|
||||
#include <ArduinoHA.h>
|
||||
|
||||
byte mac[] = {0x00, 0x10, 0xFA, 0x6E, 0x38, 0x4A};
|
||||
EthernetClient client;
|
||||
HADevice device(mac, sizeof(mac));
|
||||
HAMqtt mqtt(client, device);
|
||||
|
||||
void onMessage(const char* topic, const uint8_t* payload, uint16_t length) {
|
||||
// this method will be called each time the device receives an MQTT message
|
||||
}
|
||||
|
||||
void onConnected() {
|
||||
// this method will be called when connection to MQTT broker is established
|
||||
}
|
||||
|
||||
void setup() {
|
||||
Ethernet.begin(mac);
|
||||
|
||||
mqtt.onMessage(onMessage);
|
||||
mqtt.onConnected(onConnected);
|
||||
mqtt.begin("192.168.1.50", "username", "password");
|
||||
}
|
||||
|
||||
void loop() {
|
||||
Ethernet.maintain();
|
||||
mqtt.loop();
|
||||
}
|
||||
|
||||
Subscriptions
|
||||
-------------
|
||||
|
||||
You can also subscribe to a custom topic using ``HAMqtt::subscribe(const char* topic)`` method.
|
||||
The subscription needs to be made each time a connection to the MQTT broker is established.
|
||||
|
||||
::
|
||||
|
||||
#include <Ethernet.h>
|
||||
#include <ArduinoHA.h>
|
||||
|
||||
byte mac[] = {0x00, 0x10, 0xFA, 0x6E, 0x38, 0x4A};
|
||||
EthernetClient client;
|
||||
HADevice device(mac, sizeof(mac));
|
||||
HAMqtt mqtt(client, device);
|
||||
|
||||
void onMessage(const char* topic, const uint8_t* payload, uint16_t length) {
|
||||
if (strcmp(topic, "myTopic") == 0) {
|
||||
// message on "myTopic" received
|
||||
}
|
||||
}
|
||||
|
||||
void onConnected() {
|
||||
mqtt.subscribe("myTopic");
|
||||
}
|
||||
|
||||
void setup() {
|
||||
Ethernet.begin(mac);
|
||||
|
||||
mqtt.onMessage(onMessage);
|
||||
mqtt.onConnected(onConnected);
|
||||
mqtt.begin("192.168.1.50", "username", "password");
|
||||
}
|
||||
|
||||
void loop() {
|
||||
Ethernet.maintain();
|
||||
mqtt.loop();
|
||||
}
|
||||
|
||||
Publishing a message
|
||||
--------------------
|
||||
|
||||
HAMqtt class also exposes the method that allows to publish custom messages.
|
||||
|
||||
::
|
||||
|
||||
#include <Ethernet.h>
|
||||
#include <ArduinoHA.h>
|
||||
|
||||
byte mac[] = {0x00, 0x10, 0xFA, 0x6E, 0x38, 0x4A};
|
||||
EthernetClient client;
|
||||
HADevice device(mac, sizeof(mac));
|
||||
HAMqtt mqtt(client, device);
|
||||
|
||||
void setup() {
|
||||
Ethernet.begin(mac);
|
||||
|
||||
mqtt.begin("192.168.1.50", "username", "password");
|
||||
}
|
||||
|
||||
void loop() {
|
||||
Ethernet.maintain();
|
||||
mqtt.loop();
|
||||
|
||||
// Publishing the non-retained message:
|
||||
// mqtt.publish("customTopic", "customPayload");
|
||||
|
||||
// Publishing the retained message:
|
||||
// mqtt.publish("customTopic", "customPayload", true);
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
MQTT security
|
||||
=============
|
||||
|
||||
The library allows you to use credentials for acquiring a TCP connection with the MQTT broker.
|
||||
By default you can use the same credentials you use for login in the Home Assistant panel but you can also configure custom credentials in the Mosquitto broker.
|
||||
|
||||
.. DANGER::
|
||||
|
||||
This solution is not 100% secure because communication between Arduino and Home Assistant is not encrypted.
|
||||
Username and password can be easily discovered by analyzing your local network traffic.
|
||||
However, that's fine as long as your local network is secured against unattended access.
|
||||
On more powerful devices (like ESP), you should consider using TLS/SSL connection.
|
||||
|
||||
::
|
||||
|
||||
#include <Ethernet.h>
|
||||
#include <ArduinoHA.h>
|
||||
|
||||
byte mac[] = {0x00, 0x10, 0xFA, 0x6E, 0x38, 0x4A};
|
||||
EthernetClient client;
|
||||
HADevice device(mac, sizeof(mac));
|
||||
HAMqtt mqtt(client, device);
|
||||
|
||||
void setup() {
|
||||
// ...
|
||||
|
||||
// replace username and password with your credentials
|
||||
mqtt.begin("192.168.1.50", "username", "password");
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// ...
|
||||
}
|
||||
|
||||
|
||||
SSL connection
|
||||
--------------
|
||||
|
||||
On ESP32/ESP8266 you can use ``WiFiClientSecure`` client to establish encrypted connection between your device and Home Assistant.
|
||||
Please take a look at :example:`this example <mqtt-with-ssl/mqtt-with-ssl.ino>`.
|
||||
27
lib/home-assistant-integration/docsrc/source/index.rst
Normal file
27
lib/home-assistant-integration/docsrc/source/index.rst
Normal file
@@ -0,0 +1,27 @@
|
||||
ArduinoHA documentation
|
||||
==================================================
|
||||
|
||||
ArduinoHA allows to integrate an Arduino/ESP based device with Home Assistant using MQTT.
|
||||
The library is designed to use as low resources (RAM/flash) as possible.
|
||||
Initially, it was optimized to work on Arduino Uno with Ethernet Shield,
|
||||
but I successfully use it on ESP8266/ESP8255 boards in my projects.
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
* Two-way communication (state reporting and command execution)
|
||||
* MQTT discovery (device is added to the Home Assistant panel automatically)
|
||||
* MQTT Last Will and Testament
|
||||
* Support for custom MQTT messages (publishing and subscribing)
|
||||
* Auto reconnect with MQTT broker
|
||||
* Reporting availability (online/offline states) of a device
|
||||
* Doxygen documentation
|
||||
* Covered by unit tests (AUnit + EpoxyDuino + AUniter)
|
||||
|
||||
.. toctree::
|
||||
:caption: Docs
|
||||
:maxdepth: 3
|
||||
|
||||
documents/getting-started/index
|
||||
documents/library/index
|
||||
documents/api/index
|
||||
@@ -0,0 +1,2 @@
|
||||
[theme]
|
||||
inherit = press
|
||||
Reference in New Issue
Block a user