From 09af192a21960f215cb908161a6ac7de017349d9 Mon Sep 17 00:00:00 2001 From: Adrian Scillato <35405447+ascillato@users.noreply.github.com> Date: Tue, 9 Jul 2019 19:53:01 -0300 Subject: [PATCH 1/6] Update esp-knx-ip library. DPT.h --- lib/esp-knx-ip-0.5.1/DPT.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/esp-knx-ip-0.5.1/DPT.h b/lib/esp-knx-ip-0.5.1/DPT.h index 71045b103..3529d51af 100644 --- a/lib/esp-knx-ip-0.5.1/DPT.h +++ b/lib/esp-knx-ip-0.5.1/DPT.h @@ -40,13 +40,14 @@ typedef enum __dpt_3_007 typedef enum __weekday { + DPT_10_001_WEEKDAY_NODAY = 0, DPT_10_001_WEEKDAY_MONDAY = 1, DPT_10_001_WEEKDAY_TUESDAY = 2, DPT_10_001_WEEKDAY_WEDNESDAY = 3, DPT_10_001_WEEKDAY_THURSDAY = 4, DPT_10_001_WEEKDAY_FRIDAY = 5, DPT_10_001_WEEKDAY_SATURDAY = 6, - DPT_10_001_WEEKDAY_SUNDAY = 8, + DPT_10_001_WEEKDAY_SUNDAY = 7, } weekday_t; typedef struct __time_of_day From 6b52e96f2d5bb098566e89776b2bf413fcd842ec Mon Sep 17 00:00:00 2001 From: Adrian Scillato <35405447+ascillato@users.noreply.github.com> Date: Tue, 9 Jul 2019 19:57:29 -0300 Subject: [PATCH 2/6] Update KNX Library - Send String --- lib/esp-knx-ip-0.5.1/esp-knx-ip-send.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/esp-knx-ip-0.5.1/esp-knx-ip-send.cpp b/lib/esp-knx-ip-0.5.1/esp-knx-ip-send.cpp index ae5e9fabc..787f045bf 100644 --- a/lib/esp-knx-ip-0.5.1/esp-knx-ip-send.cpp +++ b/lib/esp-knx-ip-0.5.1/esp-knx-ip-send.cpp @@ -185,3 +185,15 @@ void ESPKNXIP::send_4byte_float(address_t const &receiver, knx_command_type_t ct uint8_t buf[] = {0x00, ((uint8_t *)&val)[3], ((uint8_t *)&val)[2], ((uint8_t *)&val)[1], ((uint8_t *)&val)[0]}; send(receiver, ct, 5, buf); } + +void ESPKNXIP::send_14byte_string(address_t const &receiver, knx_command_type_t ct, const char *val) +{ + uint8_t buf[14]; + int len = strlen(val); + if (len > 14) + { + len = 14; + } + memcpy(buf, val, len); + send(receiver, ct, 14, buf); +} From ddb606c2b58362c6fba504225e728680395159df Mon Sep 17 00:00:00 2001 From: Adrian Scillato <35405447+ascillato@users.noreply.github.com> Date: Wed, 10 Jul 2019 09:22:00 -0300 Subject: [PATCH 3/6] Update esp-knx-ip.h --- lib/esp-knx-ip-0.5.1/esp-knx-ip.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/esp-knx-ip-0.5.1/esp-knx-ip.h b/lib/esp-knx-ip-0.5.1/esp-knx-ip.h index e2346c5a3..eb5ecf7b0 100644 --- a/lib/esp-knx-ip-0.5.1/esp-knx-ip.h +++ b/lib/esp-knx-ip-0.5.1/esp-knx-ip.h @@ -451,6 +451,7 @@ class ESPKNXIP { void send_4byte_int(address_t const &receiver, knx_command_type_t ct, int32_t val); void send_4byte_uint(address_t const &receiver, knx_command_type_t ct, uint32_t val); void send_4byte_float(address_t const &receiver, knx_command_type_t ct, float val); + void send_14byte_string(address_t const &receiver, knx_command_type_t ct, const char *val); void write_1bit(address_t const &receiver, uint8_t bit) { send_1bit(receiver, KNX_CT_WRITE, bit); } void write_2bit(address_t const &receiver, uint8_t twobit) { send_2bit(receiver, KNX_CT_WRITE, twobit); } @@ -469,6 +470,7 @@ class ESPKNXIP { void write_4byte_int(address_t const &receiver, int32_t val) { send_4byte_int(receiver, KNX_CT_WRITE, val); } void write_4byte_uint(address_t const &receiver, uint32_t val) { send_4byte_uint(receiver, KNX_CT_WRITE, val); } void write_4byte_float(address_t const &receiver, float val) { send_4byte_float(receiver, KNX_CT_WRITE, val);} + void write_14byte_string(address_t const &receiver, const char *val) { send_14byte_string(receiver, KNX_CT_WRITE, val); } void answer_1bit(address_t const &receiver, uint8_t bit) { send_1bit(receiver, KNX_CT_ANSWER, bit); } void answer_2bit(address_t const &receiver, uint8_t twobit) { send_2bit(receiver, KNX_CT_ANSWER, twobit); } @@ -487,6 +489,7 @@ class ESPKNXIP { void answer_4byte_int(address_t const &receiver, int32_t val) { send_4byte_int(receiver, KNX_CT_ANSWER, val); } void answer_4byte_uint(address_t const &receiver, uint32_t val) { send_4byte_uint(receiver, KNX_CT_ANSWER, val); } void answer_4byte_float(address_t const &receiver, float val) { send_4byte_float(receiver, KNX_CT_ANSWER, val);} + void answer_14byte_string(address_t const &receiver, const char *val) { send_14byte_string(receiver, KNX_CT_ANSWER, val); } bool data_to_bool(uint8_t *data); int8_t data_to_1byte_int(uint8_t *data); From 1cf2dfe006aff23c3301a30ce221b80de4ba952d Mon Sep 17 00:00:00 2001 From: Adrian Scillato <35405447+ascillato@users.noreply.github.com> Date: Wed, 10 Jul 2019 09:25:05 -0300 Subject: [PATCH 4/6] Sync to latest esp-knx-ip library --- .../examples/static-config/static-config.ino | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/esp-knx-ip-0.5.1/examples/static-config/static-config.ino b/lib/esp-knx-ip-0.5.1/examples/static-config/static-config.ino index bea5093f3..54472dda3 100644 --- a/lib/esp-knx-ip-0.5.1/examples/static-config/static-config.ino +++ b/lib/esp-knx-ip-0.5.1/examples/static-config/static-config.ino @@ -31,14 +31,14 @@ void setup() { pinMode(LED_PIN, OUTPUT); Serial.begin(115200); - callback_id_t temp_cb = knx.callback_register("Read Temperature", temp_cb); - callback_id_t hum_cb =knx.callback_register("Read Humidity", hum_cb); - callback_id_t pres_cb =knx.callback_register("Read Pressure", pres_cb); + callback_id_t temp_cb_id = knx.callback_register("Read Temperature", temp_cb); + callback_id_t hum_cb_id =knx.callback_register("Read Humidity", hum_cb); + callback_id_t pres_cb_id =knx.callback_register("Read Pressure", pres_cb); // Assign callbacks to group addresses (2/1/1, 2/1/2, 2/1/3) - knx.callback_assign(temp_cb, knx.GA_to_address(2, 1, 1)); - knx.callback_assign(hum_cb, knx.GA_to_address(2, 1, 2)); - knx.callback_assign(pres_cb, knx.GA_to_address(2, 1, 3)); + knx.callback_assign(temp_cb_id, knx.GA_to_address(2, 1, 1)); + knx.callback_assign(hum_cb_id, knx.GA_to_address(2, 1, 2)); + knx.callback_assign(pres_cb_id, knx.GA_to_address(2, 1, 3)); // Set physical address (1.1.1) knx.physical_address_set(knx.PA_to_address(1, 1, 1)); From abdfbb9d22e2b9b435c64929513d03b2b3d2c13e Mon Sep 17 00:00:00 2001 From: Adrian Scillato <35405447+ascillato@users.noreply.github.com> Date: Wed, 10 Jul 2019 09:45:18 -0300 Subject: [PATCH 5/6] Update library.properties --- lib/esp-knx-ip-0.5.1/library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/esp-knx-ip-0.5.1/library.properties b/lib/esp-knx-ip-0.5.1/library.properties index 1adbc402a..f3b86de9c 100644 --- a/lib/esp-knx-ip-0.5.1/library.properties +++ b/lib/esp-knx-ip-0.5.1/library.properties @@ -1,5 +1,5 @@ name=ESP KNX IP Library -version=0.5.1 +version=0.5.2 author=Nico Weichbrodt maintainer=Nico Weichbrodt sentence=ESP8266 library for KNX/IP communication. From e12845b877dc4fcee2b73798c2e83ae613be763b Mon Sep 17 00:00:00 2001 From: ascillato Date: Wed, 10 Jul 2019 09:52:51 -0300 Subject: [PATCH 6/6] Update esp-knx-ip library to latest --- lib/{esp-knx-ip-0.5.1 => esp-knx-ip-0.5.2}/DPT.h | 0 lib/{esp-knx-ip-0.5.1 => esp-knx-ip-0.5.2}/LICENSE | 0 lib/{esp-knx-ip-0.5.1 => esp-knx-ip-0.5.2}/README.md | 0 lib/{esp-knx-ip-0.5.1 => esp-knx-ip-0.5.2}/esp-knx-ip-config.cpp | 0 .../esp-knx-ip-conversion.cpp | 0 lib/{esp-knx-ip-0.5.1 => esp-knx-ip-0.5.2}/esp-knx-ip-send.cpp | 0 .../esp-knx-ip-webserver.cpp | 0 lib/{esp-knx-ip-0.5.1 => esp-knx-ip-0.5.2}/esp-knx-ip.cpp | 0 lib/{esp-knx-ip-0.5.1 => esp-knx-ip-0.5.2}/esp-knx-ip.h | 0 .../examples/environment-sensor/environment-sensor.ino | 0 .../examples/sonoff/sonoff.ino | 0 .../examples/static-config/static-config.ino | 0 lib/{esp-knx-ip-0.5.1 => esp-knx-ip-0.5.2}/keywords.txt | 0 lib/{esp-knx-ip-0.5.1 => esp-knx-ip-0.5.2}/library.properties | 0 14 files changed, 0 insertions(+), 0 deletions(-) rename lib/{esp-knx-ip-0.5.1 => esp-knx-ip-0.5.2}/DPT.h (100%) rename lib/{esp-knx-ip-0.5.1 => esp-knx-ip-0.5.2}/LICENSE (100%) rename lib/{esp-knx-ip-0.5.1 => esp-knx-ip-0.5.2}/README.md (100%) rename lib/{esp-knx-ip-0.5.1 => esp-knx-ip-0.5.2}/esp-knx-ip-config.cpp (100%) rename lib/{esp-knx-ip-0.5.1 => esp-knx-ip-0.5.2}/esp-knx-ip-conversion.cpp (100%) rename lib/{esp-knx-ip-0.5.1 => esp-knx-ip-0.5.2}/esp-knx-ip-send.cpp (100%) rename lib/{esp-knx-ip-0.5.1 => esp-knx-ip-0.5.2}/esp-knx-ip-webserver.cpp (100%) rename lib/{esp-knx-ip-0.5.1 => esp-knx-ip-0.5.2}/esp-knx-ip.cpp (100%) rename lib/{esp-knx-ip-0.5.1 => esp-knx-ip-0.5.2}/esp-knx-ip.h (100%) rename lib/{esp-knx-ip-0.5.1 => esp-knx-ip-0.5.2}/examples/environment-sensor/environment-sensor.ino (100%) rename lib/{esp-knx-ip-0.5.1 => esp-knx-ip-0.5.2}/examples/sonoff/sonoff.ino (100%) rename lib/{esp-knx-ip-0.5.1 => esp-knx-ip-0.5.2}/examples/static-config/static-config.ino (100%) rename lib/{esp-knx-ip-0.5.1 => esp-knx-ip-0.5.2}/keywords.txt (100%) rename lib/{esp-knx-ip-0.5.1 => esp-knx-ip-0.5.2}/library.properties (100%) diff --git a/lib/esp-knx-ip-0.5.1/DPT.h b/lib/esp-knx-ip-0.5.2/DPT.h similarity index 100% rename from lib/esp-knx-ip-0.5.1/DPT.h rename to lib/esp-knx-ip-0.5.2/DPT.h diff --git a/lib/esp-knx-ip-0.5.1/LICENSE b/lib/esp-knx-ip-0.5.2/LICENSE similarity index 100% rename from lib/esp-knx-ip-0.5.1/LICENSE rename to lib/esp-knx-ip-0.5.2/LICENSE diff --git a/lib/esp-knx-ip-0.5.1/README.md b/lib/esp-knx-ip-0.5.2/README.md similarity index 100% rename from lib/esp-knx-ip-0.5.1/README.md rename to lib/esp-knx-ip-0.5.2/README.md diff --git a/lib/esp-knx-ip-0.5.1/esp-knx-ip-config.cpp b/lib/esp-knx-ip-0.5.2/esp-knx-ip-config.cpp similarity index 100% rename from lib/esp-knx-ip-0.5.1/esp-knx-ip-config.cpp rename to lib/esp-knx-ip-0.5.2/esp-knx-ip-config.cpp diff --git a/lib/esp-knx-ip-0.5.1/esp-knx-ip-conversion.cpp b/lib/esp-knx-ip-0.5.2/esp-knx-ip-conversion.cpp similarity index 100% rename from lib/esp-knx-ip-0.5.1/esp-knx-ip-conversion.cpp rename to lib/esp-knx-ip-0.5.2/esp-knx-ip-conversion.cpp diff --git a/lib/esp-knx-ip-0.5.1/esp-knx-ip-send.cpp b/lib/esp-knx-ip-0.5.2/esp-knx-ip-send.cpp similarity index 100% rename from lib/esp-knx-ip-0.5.1/esp-knx-ip-send.cpp rename to lib/esp-knx-ip-0.5.2/esp-knx-ip-send.cpp diff --git a/lib/esp-knx-ip-0.5.1/esp-knx-ip-webserver.cpp b/lib/esp-knx-ip-0.5.2/esp-knx-ip-webserver.cpp similarity index 100% rename from lib/esp-knx-ip-0.5.1/esp-knx-ip-webserver.cpp rename to lib/esp-knx-ip-0.5.2/esp-knx-ip-webserver.cpp diff --git a/lib/esp-knx-ip-0.5.1/esp-knx-ip.cpp b/lib/esp-knx-ip-0.5.2/esp-knx-ip.cpp similarity index 100% rename from lib/esp-knx-ip-0.5.1/esp-knx-ip.cpp rename to lib/esp-knx-ip-0.5.2/esp-knx-ip.cpp diff --git a/lib/esp-knx-ip-0.5.1/esp-knx-ip.h b/lib/esp-knx-ip-0.5.2/esp-knx-ip.h similarity index 100% rename from lib/esp-knx-ip-0.5.1/esp-knx-ip.h rename to lib/esp-knx-ip-0.5.2/esp-knx-ip.h diff --git a/lib/esp-knx-ip-0.5.1/examples/environment-sensor/environment-sensor.ino b/lib/esp-knx-ip-0.5.2/examples/environment-sensor/environment-sensor.ino similarity index 100% rename from lib/esp-knx-ip-0.5.1/examples/environment-sensor/environment-sensor.ino rename to lib/esp-knx-ip-0.5.2/examples/environment-sensor/environment-sensor.ino diff --git a/lib/esp-knx-ip-0.5.1/examples/sonoff/sonoff.ino b/lib/esp-knx-ip-0.5.2/examples/sonoff/sonoff.ino similarity index 100% rename from lib/esp-knx-ip-0.5.1/examples/sonoff/sonoff.ino rename to lib/esp-knx-ip-0.5.2/examples/sonoff/sonoff.ino diff --git a/lib/esp-knx-ip-0.5.1/examples/static-config/static-config.ino b/lib/esp-knx-ip-0.5.2/examples/static-config/static-config.ino similarity index 100% rename from lib/esp-knx-ip-0.5.1/examples/static-config/static-config.ino rename to lib/esp-knx-ip-0.5.2/examples/static-config/static-config.ino diff --git a/lib/esp-knx-ip-0.5.1/keywords.txt b/lib/esp-knx-ip-0.5.2/keywords.txt similarity index 100% rename from lib/esp-knx-ip-0.5.1/keywords.txt rename to lib/esp-knx-ip-0.5.2/keywords.txt diff --git a/lib/esp-knx-ip-0.5.1/library.properties b/lib/esp-knx-ip-0.5.2/library.properties similarity index 100% rename from lib/esp-knx-ip-0.5.1/library.properties rename to lib/esp-knx-ip-0.5.2/library.properties