aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/mqtt_node_util.py2
-rw-r--r--include/pio/libs/mqtt/homekit/mqtt/mqtt.cpp2
-rw-r--r--include/pio/libs/mqtt/library.json2
-rw-r--r--include/pio/libs/temphum/library.json2
-rw-r--r--include/py/homekit/mqtt/module/ota.py2
-rw-r--r--include/py/homekit/pio/products.py7
6 files changed, 12 insertions, 5 deletions
diff --git a/bin/mqtt_node_util.py b/bin/mqtt_node_util.py
index 5587739..639d4b9 100755
--- a/bin/mqtt_node_util.py
+++ b/bin/mqtt_node_util.py
@@ -49,7 +49,7 @@ if __name__ == '__main__':
parser.add_argument('--switch-relay', choices=[0, 1], type=int,
help='send relay state')
parser.add_argument('--push-ota', type=str, metavar='OTA_FILENAME',
- help='push OTA, receives path to firmware.bin')
+ help='push OTA, receives path to firmware.bin (not .elf!)')
parser.add_argument('--no-wait', action='store_true',
help='execute command and exit')
diff --git a/include/pio/libs/mqtt/homekit/mqtt/mqtt.cpp b/include/pio/libs/mqtt/homekit/mqtt/mqtt.cpp
index aa769a5..83764ca 100644
--- a/include/pio/libs/mqtt/homekit/mqtt/mqtt.cpp
+++ b/include/pio/libs/mqtt/homekit/mqtt/mqtt.cpp
@@ -119,7 +119,7 @@ void Mqtt::reconnect() {
void Mqtt::disconnect() {
// TODO test how this works???
reconnectTimer.detach();
- client.disconnect();
+ client.disconnect(true);
}
void Mqtt::loop() {
diff --git a/include/pio/libs/mqtt/library.json b/include/pio/libs/mqtt/library.json
index f3f2504..6238c21 100644
--- a/include/pio/libs/mqtt/library.json
+++ b/include/pio/libs/mqtt/library.json
@@ -1,6 +1,6 @@
{
"name": "homekit_mqtt",
- "version": "1.0.11",
+ "version": "1.0.12",
"build": {
"flags": "-I../../include"
}
diff --git a/include/pio/libs/temphum/library.json b/include/pio/libs/temphum/library.json
index 329b7ca..4cf5c63 100644
--- a/include/pio/libs/temphum/library.json
+++ b/include/pio/libs/temphum/library.json
@@ -1,6 +1,6 @@
{
"name": "homekit_temphum",
- "version": "1.0.3",
+ "version": "1.0.4",
"build": {
"flags": "-I../../include"
}
diff --git a/include/py/homekit/mqtt/module/ota.py b/include/py/homekit/mqtt/module/ota.py
index cd34332..2f9b216 100644
--- a/include/py/homekit/mqtt/module/ota.py
+++ b/include/py/homekit/mqtt/module/ota.py
@@ -74,4 +74,4 @@ class MqttOtaModule(MqttModule):
if not self._initialized:
self._ota_request = (filename, qos)
else:
- self.do_push_ota(filename, qos)
+ self.do_push_ota(self._mqtt_node_ref.secret, filename, qos)
diff --git a/include/py/homekit/pio/products.py b/include/py/homekit/pio/products.py
index 5b40aae..3d5034f 100644
--- a/include/py/homekit/pio/products.py
+++ b/include/py/homekit/pio/products.py
@@ -41,6 +41,11 @@ def platformio_ini(product_config: dict,
if node_id not in MqttNodesConfig().get_nodes().keys():
raise ValueError(f'node id "{node_id}" is not specified in the config!')
+ try:
+ node_defines = MqttNodesConfig().get_node(node_id)['defines']
+ except KeyError:
+ node_defines = None
+
# defines
defines = {
**product_config['common_defines'],
@@ -66,6 +71,8 @@ def platformio_ini(product_config: dict,
if build_specific_defines:
for k, v in build_specific_defines.items():
defines[k] = v
+ if node_defines:
+ defines = {**defines, **node_defines}
defines = OrderedDict(sorted(defines.items(), key=lambda t: t[0]))
# libs