HAMQTT 0.1.0
ESP-IDF component for integrating devices with Home Assistant over MQTT
Loading...
Searching...
No Matches
common.h
Go to the documentation of this file.
1/*
2 * Copyright 2025 Ethan Barnes
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
32
33#pragma once
34
35#include <stdbool.h>
36
37#include "cJSON.h"
38
39#include "esp_system.h"
40#include "esp_log.h"
41#include "esp_err.h"
42#include "esp_check.h"
43#include "freertos/FreeRTOS.h"
44#include "freertos/task.h"
45#include "freertos/event_groups.h"
46
47#include "mqtt_client.h"
48
49#include "sdkconfig.h"
50
51#define HAMQTT_DEVICE_MAX_COMPONENTS CONFIG_HAMQTT_DEVICE_MAX_COMPONENTS
52#define HAMQTT_MAX_CHAR_BUF_SIZE CONFIG_HAMQTT_MAX_CHAR_BUF_SIZE
53
54#define HAMQTT_MQTT_CONNECT_TIMEOUT_MS CONFIG_HAMQTT_MQTT_CONNECT_TIMEOUT_MS