summaryrefslogtreecommitdiff
path: root/platformio/common/libs/mqtt
diff options
context:
space:
mode:
Diffstat (limited to 'platformio/common/libs/mqtt')
-rw-r--r--platformio/common/libs/mqtt/homekit/mqtt.cpp18
-rw-r--r--platformio/common/libs/mqtt/homekit/mqtt.h18
-rw-r--r--platformio/common/libs/mqtt/library.json8
3 files changed, 44 insertions, 0 deletions
diff --git a/platformio/common/libs/mqtt/homekit/mqtt.cpp b/platformio/common/libs/mqtt/homekit/mqtt.cpp
new file mode 100644
index 0000000..c2ba293
--- /dev/null
+++ b/platformio/common/libs/mqtt/homekit/mqtt.cpp
@@ -0,0 +1,18 @@
+#include "./mqtt.h"
+
+namespace homekit::mqtt {
+
+ const uint8_t MQTT_CA_FINGERPRINT[] = { \
+ 0x0e, 0xb6, 0x3a, 0x02, 0x1f, \
+ 0x4e, 0x1e, 0xe1, 0x6a, 0x67, \
+ 0x62, 0xec, 0x64, 0xd4, 0x84, \
+ 0x8a, 0xb0, 0xc9, 0x9c, 0xbb \
+ };;
+ const char MQTT_SERVER[] = "mqtt.solarmon.ru";
+ const uint16_t MQTT_PORT = 8883;
+ const char MQTT_USERNAME[] = CONFIG_MQTT_USERNAME;
+ const char MQTT_PASSWORD[] = CONFIG_MQTT_PASSWORD;
+ const char MQTT_CLIENT_ID[] = CONFIG_MQTT_CLIENT_ID;
+ const char MQTT_SECRET[CONFIG_NODE_SECRET_SIZE+1] = CONFIG_NODE_SECRET;
+
+}
diff --git a/platformio/common/libs/mqtt/homekit/mqtt.h b/platformio/common/libs/mqtt/homekit/mqtt.h
new file mode 100644
index 0000000..2c86b00
--- /dev/null
+++ b/platformio/common/libs/mqtt/homekit/mqtt.h
@@ -0,0 +1,18 @@
+#ifndef COMMON_HOMEKIT_MQTT_H
+#define COMMON_HOMEKIT_MQTT_H
+
+#include <stdint.h>
+
+namespace homekit::mqtt {
+
+ extern const uint8_t MQTT_CA_FINGERPRINT[];
+ extern const char MQTT_SERVER[];
+ extern const uint16_t MQTT_PORT;
+ extern const char MQTT_USERNAME[];
+ extern const char MQTT_PASSWORD[];
+ extern const char MQTT_CLIENT_ID[];
+ extern const char MQTT_SECRET[CONFIG_NODE_SECRET_SIZE+1];
+
+}
+
+#endif //COMMON_HOMEKIT_MQTT_H
diff --git a/platformio/common/libs/mqtt/library.json b/platformio/common/libs/mqtt/library.json
new file mode 100644
index 0000000..8131494
--- /dev/null
+++ b/platformio/common/libs/mqtt/library.json
@@ -0,0 +1,8 @@
+{
+ "name": "homekit_mqtt",
+ "version": "1.0.2",
+ "build": {
+ "flags": "-I../../include"
+ }
+}
+