mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-11 16:06:38 +02:00
Implement MQTT discovery for Home Assistant
This commit is contained in:
parent
b1f09d482f
commit
bbc725f316
6 changed files with 105 additions and 11 deletions
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <RF24.h>
|
||||
#include <RF24_config.h>
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
#include "defines.h"
|
||||
#include "main.h"
|
||||
|
@ -73,6 +74,8 @@ class app : public Main {
|
|||
|
||||
void saveValues(bool webSend);
|
||||
void updateCrc(void);
|
||||
void sendMqttDiscoveryConfig(void);
|
||||
const char* getFieldDeviceClass(uint8_t fieldId);
|
||||
|
||||
uint64_t Serial2u64(const char *val) {
|
||||
char tmp[3] = {0};
|
||||
|
@ -116,6 +119,7 @@ class app : public Main {
|
|||
uint16_t mMqttTicker;
|
||||
uint16_t mMqttInterval;
|
||||
bool mMqttActive;
|
||||
bool mMqttConfigSendState[MAX_NUM_INVERTERS];
|
||||
|
||||
// serial
|
||||
uint16_t mSerialTicker;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue