Skip to content

Commit

Permalink
feat(homeassistant): enable homeassistant discovery
Browse files Browse the repository at this point in the history
refactor(mqtt): use arduino json for overrides

doc(homeassistant): some remarks to homeassistant integration

refactor(discovery): various items from test
  • Loading branch information
tspopp committed Oct 20, 2024
1 parent 6bf13d4 commit 9fd8fdb
Show file tree
Hide file tree
Showing 9 changed files with 1,057 additions and 35 deletions.
4 changes: 4 additions & 0 deletions AquaMQTT/include/Version.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
namespace aquamqtt
{
constexpr char VERSION[] = "v1.4.0";
}
15 changes: 13 additions & 2 deletions AquaMQTT/include/config/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@ constexpr char timeZoneInfo[] = "CET-1CEST,M3.5.0,M10.5.0/3"; // Europe/Berlin
*/
constexpr char ntpServer[] = "pool.ntp.org";

/**
* Enable HomeAssistant MQTT Discovery Mode
*/
constexpr bool ENABLE_HOMEASSISTANT_DISCOVERY_MODE = true;

/**
* Homeassistant MQTT Discovery Prefix
* https://www.home-assistant.io/integrations/mqtt/#discovery-topic
*/
constexpr char haDiscoveryPrefix[] = "homeassistant/";

/**
* The OperationMode which is used for AquaMqtt. Refer to EOperationMode
*/
Expand Down Expand Up @@ -104,8 +115,8 @@ constexpr float ABSENCE_WATER_TEMPERATURE = 20.0;
*/
constexpr uint32_t WATCHDOG_TIMEOUT_MS = 60000;
constexpr uint16_t WIFI_RECONNECT_CYCLE_S = 10;
constexpr uint8_t MQTT_MAX_TOPIC_SIZE = 80;
constexpr uint8_t MQTT_MAX_PAYLOAD_SIZE = 255;
constexpr uint16_t MQTT_MAX_TOPIC_SIZE = 255;
constexpr uint16_t MQTT_MAX_PAYLOAD_SIZE = 1024;

/**
* Pin assignments for AquaMQTT Board Rev 1.0
Expand Down
7 changes: 4 additions & 3 deletions AquaMQTT/include/config/ExampleConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ constexpr char brokerAddr[] = "192.168.188.1";
constexpr uint16_t brokerPort = 1883;
constexpr char brokerClientId[] = "aquamqtt";
// leave blank if your broker does not require a username/password
constexpr char brokerUser[] = "";
constexpr char brokerPassword[] = "";
constexpr char mqttPrefix[] = "";
constexpr char brokerUser[] = "";
constexpr char brokerPassword[] = "";
constexpr char mqttPrefix[] = "";
constexpr char heatpumpModelName[] = "Atlantic Explorer v4";

} // namespace config

Expand Down
Loading

0 comments on commit 9fd8fdb

Please sign in to comment.