Dawid ChyrzyńskiandGitHub 4135d0991f Add support for "availability" for sensors and switch (#4)
* hide onMqttConnected and onMqttMessage methods in BaseDeviceType class

* bump up version

* replace HAComponentName with initialization inside constructor

* add missing documentation to begin() method

* add support for availability in BaseDeviceType

* add support for availability in HABinarySensor, HASensor and HASwitch

* move serialization to separate class

* wip: DeviceTypeSerializer

* update device types

* refactored all devices types to use common serializer

* update examples

* update availability example README.md

* bugs fixes

* fix build for NodeMCU

* cleanup
2021-02-06 20:41:10 +01:00
2021-01-08 19:23:03 +01:00

Arduino Home Assistant integration

ArduinoHA allows to integrate an Arduino/ESP based device with Home Assistant using MQTT. The library is designed to use as little 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

  • MQTT discovery (device is added to the Home Assistant panel automatically)
  • Auto reconnect with MQTT broker

Examples

Tested boards

  • Arduino Uno
  • Arduino Mega
  • Controllino Maxi (standard/pure/automation/power)
  • Controllino Mega (standard/pure)
  • NodeMCU
  • ESP-01
  • Generic ESP8266/ESP8255

Tested Arduino Shields

  • Arduino Ethernet Shield (WizNet W5100)

Supported HA types

  • Binary sensors
  • Device triggers
  • Switches
  • Sensors
  • Tag scanner

Unsupported features

The library doesn't support all features of the MQTT integration. If you need support for a new feature please open a new issue in the repository.

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License v3.0 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/gpl.html

S
Description
ArduinoHA allows to integrate an Arduino/ESP based device with Home Assistant using MQTT.
Readme
2.8 MiB
Languages
C++ 99.1%
C 0.9%