Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MQTT] (Auto)Discovery implementation #5199

Open
wants to merge 35 commits into
base: mega
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
3656475
[MQTT] (Auto)Discovery implementation
tonhuisman Dec 30, 2024
6fdf84c
[P052] Add MQTT Discovery data for supported Values
tonhuisman Dec 30, 2024
7be7b81
[Source] Fix CR/LF vs LF
tonhuisman Dec 30, 2024
a9ddd65
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Jan 1, 2025
834b2d7
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Jan 9, 2025
d14b111
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Jan 10, 2025
e4b0e4e
[MQTT] Add support for more VTypes, implement more VTypes, small impr…
tonhuisman Jan 10, 2025
5240af6
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Jan 12, 2025
3666157
[MQTT] Move TaskValue VType Discovery to each plugin where needed. So…
tonhuisman Jan 12, 2025
89381f2
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Jan 12, 2025
c06a29b
[P105] Fix Uncrustify formatting
tonhuisman Jan 12, 2025
0bed31b
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Jan 16, 2025
49bf984
[P164] Add fixme for currently unsupported AQI Discovery value
tonhuisman Jan 16, 2025
738159b
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Jan 16, 2025
01daf16
[Discovery] Add VType for Reactive Power
tonhuisman Jan 16, 2025
e143e5f
[Discovery] Implement VType for Reactive Power
tonhuisman Jan 16, 2025
19513a8
[P076] Implement Discovery support (for user-selected values)
tonhuisman Jan 16, 2025
0d4344d
[P077] Implement Discovery support (for user-selected values)
tonhuisman Jan 16, 2025
11b8c2e
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Jan 17, 2025
4fe9219
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Jan 17, 2025
51621ec
[P078] Implement Discovery support (for user-selected values)
tonhuisman Jan 17, 2025
bbf4246
[P085] Implement Discovery support (for user-selected values)
tonhuisman Jan 17, 2025
865852a
[P102] Implement Discovery support (for user-selected values)
tonhuisman Jan 17, 2025
fa3afec
[P108] Implement Discovery support (for user-selected values)
tonhuisman Jan 17, 2025
f060c3d
[P115] Implement Discovery support (for user-selected values)
tonhuisman Jan 18, 2025
9754ae9
[P132] Implement Discovery support (for user-selected values)
tonhuisman Jan 18, 2025
243b271
[P142] Implement Discovery support (for user-selected values)
tonhuisman Jan 18, 2025
d5b8298
[Discovery] Refactor getting VType per plugin, add some more plugins …
tonhuisman Jan 18, 2025
9ac80ed
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Jan 22, 2025
8c6ea9f
[Discovery] Add support for some more VTypes, add AQI and NOx
tonhuisman Jan 23, 2025
4fedeef
[P147] Implement MQTT Discovery support
tonhuisman Jan 23, 2025
d447566
[P164] Update MQTT Discovery support
tonhuisman Jan 23, 2025
29d9453
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Feb 3, 2025
a6cd05f
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Feb 4, 2025
c0fcf9f
Merge branch 'mega' into feature/MQTT-discovery
tonhuisman Feb 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/_C005.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/** Changelog:
* 2024-11-29 tonhuisman: Add Discovery trigger setting
* 2024-11-11 tonhuisman: Add AutoDiscovery options
* Home Assistant suggested discovery topic: "homeassistant/%devclass%/%sysname%/%tskname%/config"
* Home Assistant suggested discovery topic: "homeassistant/%devclass%/%sysname%/%tskname%"
* 2023-08-18 tonhuisman: Clean up source for pull request
* 2023-03-15 tonhuisman: Add processing of topic endpoint /set to issue a TaskValueSet,taskname,taskvalue,payload command for
* topic %sysname%/#/taskname/valuename/set
Expand Down Expand Up @@ -151,7 +151,11 @@ bool CPlugin_005(CPlugin::Function function, struct EventStruct *event, String&
// We have received the Discovery request topic
// Generate random time-offset in 0.1 sec, range 1..10 seconds
mqttDiscoveryTimeout = random(10, 100);
addLog(LOG_LEVEL_INFO, strformat(F("C005 : Request for AutoDiscovery received. %d"), mqttDiscoveryTimeout));

if (loglevelActiveFor(LOG_LEVEL_INFO)) {
addLog(LOG_LEVEL_INFO, strformat(F("C005 : Request for AutoDiscovery received. %.1f sec."),
mqttDiscoveryTimeout / 10.0f));
}

// FIXME Generate event when request received?
} else
Expand Down
Loading
Loading