Skip to content

Instantly share code, notes, and snippets.

View AlexanderKrutov's full-sized avatar

Alexander Krutov AlexanderKrutov

View GitHub Profile
@Resinchem
Resinchem / mqtt_discovery.cpp
Last active December 4, 2024 21:54
Sample Arduino code for publishing devices using Home Assistant MQTT Discovery. See the following for use case: https://youtu.be/VHiCtZqllU8 or https://resinchemtech.blogspot.com/2023/12/mqtt-auto-discovery.html
/* ===================================================================
SAMPLE CODE Segments for Home Assistant MQTT Discovery
This is NOT complete code but shows an example of generating a unique ID
for topic/entity publishing based on the device MAC address.
It also includes sample code for creating a Home Assistant device with four
entities via MQTT Discovery, as shown here:
Video: https://youtu.be/VHiCtZqllU8
Blog: https://resinchemtech.blogspot.com/2023/12/mqtt-auto-discovery.html
It is highly recommended that you include some sort of end-user accessible setting to
/*
* Project Name: BigDipper
* Solution Name: BigDipper
* Original creation date: 24/03/2008
* Edit date: 19/01/2013
* Programmer name: Jamie Taylor (aka "GaProgMan")
* File name: VBigDipper.cpp
*
* Purpose of the project:
* My favourite constellation is the Big Dipper. So