From 8a77c48759bc871a8a16469553ebd5244556777f Mon Sep 17 00:00:00 2001 From: Theo Arends Date: Thu, 19 Apr 2018 20:27:57 +0200 Subject: [PATCH 1/2] Fix Esp/lib 2.3.0 compile error 5.12.0m * Fix compile error when using ESP/Arduino library v2.3.0 by reverting KNX async UDP library to default UDP library (#2488, #2492, #2493) --- README.md | 4 +- lib/ESPAsyncUDP-0.21/README.md | 12 - .../AsyncUDPClient/AsyncUDPClient.ino | 51 --- .../AsyncUDPMulticastServer.ino | 52 --- .../AsyncUDPServer/AsyncUDPServer.ino | 50 --- lib/ESPAsyncUDP-0.21/keywords.txt | 33 -- lib/ESPAsyncUDP-0.21/library.json | 17 - lib/ESPAsyncUDP-0.21/library.properties | 9 - lib/ESPAsyncUDP-0.21/src/AsyncUDP.cpp | 425 ------------------ lib/ESPAsyncUDP-0.21/src/ESPAsyncUDP.h | 130 ------ lib/ESPAsyncUDP-0.21/travis/common.sh | 23 - .../DPT.h | 0 .../LICENSE | 0 .../README.md | 15 +- .../esp-knx-ip-config.cpp | 0 .../esp-knx-ip-conversion.cpp | 0 .../esp-knx-ip-send.cpp | 4 +- .../esp-knx-ip-webserver.cpp | 0 .../esp-knx-ip.cpp | 17 +- .../esp-knx-ip.h | 6 +- .../environment-sensor/environment-sensor.ino | 0 .../examples/sonoff/sonoff.ino | 0 .../examples/static-config/static-config.ino | 0 .../keywords.txt | 0 .../library.properties | 6 +- sonoff/_releasenotes.ino | 1 + sonoff/language/es-AR.h | 34 +- sonoff/xdrv_11_knx.ino | 5 +- 28 files changed, 40 insertions(+), 854 deletions(-) delete mode 100644 lib/ESPAsyncUDP-0.21/README.md delete mode 100644 lib/ESPAsyncUDP-0.21/examples/AsyncUDPClient/AsyncUDPClient.ino delete mode 100644 lib/ESPAsyncUDP-0.21/examples/AsyncUDPMulticastServer/AsyncUDPMulticastServer.ino delete mode 100644 lib/ESPAsyncUDP-0.21/examples/AsyncUDPServer/AsyncUDPServer.ino delete mode 100644 lib/ESPAsyncUDP-0.21/keywords.txt delete mode 100644 lib/ESPAsyncUDP-0.21/library.json delete mode 100644 lib/ESPAsyncUDP-0.21/library.properties delete mode 100644 lib/ESPAsyncUDP-0.21/src/AsyncUDP.cpp delete mode 100644 lib/ESPAsyncUDP-0.21/src/ESPAsyncUDP.h delete mode 100644 lib/ESPAsyncUDP-0.21/travis/common.sh rename lib/{esp-knx-ip-async-udp-0.4.0.15 => esp-knx-ip-0.5.0}/DPT.h (100%) rename lib/{esp-knx-ip-async-udp-0.4.0.15 => esp-knx-ip-0.5.0}/LICENSE (100%) rename lib/{esp-knx-ip-async-udp-0.4.0.15 => esp-knx-ip-0.5.0}/README.md (77%) rename lib/{esp-knx-ip-async-udp-0.4.0.15 => esp-knx-ip-0.5.0}/esp-knx-ip-config.cpp (100%) rename lib/{esp-knx-ip-async-udp-0.4.0.15 => esp-knx-ip-0.5.0}/esp-knx-ip-conversion.cpp (100%) rename lib/{esp-knx-ip-async-udp-0.4.0.15 => esp-knx-ip-0.5.0}/esp-knx-ip-send.cpp (98%) rename lib/{esp-knx-ip-async-udp-0.4.0.15 => esp-knx-ip-0.5.0}/esp-knx-ip-webserver.cpp (100%) rename lib/{esp-knx-ip-async-udp-0.4.0.15 => esp-knx-ip-0.5.0}/esp-knx-ip.cpp (98%) rename lib/{esp-knx-ip-async-udp-0.4.0.15 => esp-knx-ip-0.5.0}/esp-knx-ip.h (99%) rename lib/{esp-knx-ip-async-udp-0.4.0.15 => esp-knx-ip-0.5.0}/examples/environment-sensor/environment-sensor.ino (100%) rename lib/{esp-knx-ip-async-udp-0.4.0.15 => esp-knx-ip-0.5.0}/examples/sonoff/sonoff.ino (100%) rename lib/{esp-knx-ip-async-udp-0.4.0.15 => esp-knx-ip-0.5.0}/examples/static-config/static-config.ino (100%) rename lib/{esp-knx-ip-async-udp-0.4.0.15 => esp-knx-ip-0.5.0}/keywords.txt (100%) rename lib/{esp-knx-ip-async-udp-0.4.0.15 => esp-knx-ip-0.5.0}/library.properties (60%) diff --git a/README.md b/README.md index 7d95d9370..8d0d6b3d5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## Sonoff-Tasmota -Alternative firmware for _ESP8266 based devices_ like [iTead](https://www.itead.cc/) _**Sonoff**_ with **web**, **timers**, 'Over The Air' (**OTA**) firmware updates and **sensors support**, allowing control under **Serial**, **HTTP** and **MQTT**, so as to be used on **Smart Home Systems**. Written for Arduino IDE and PlatformIO. +Alternative firmware for _ESP8266 based devices_ like [iTead](https://www.itead.cc/) _**Sonoff**_ with **web**, **timers**, 'Over The Air' (**OTA**) firmware updates and **sensors support**, allowing control under **Serial**, **HTTP**, **MQTT** and **KNX**, so as to be used on **Smart Home Systems**. Written for Arduino IDE and PlatformIO. [![GitHub version](https://img.shields.io/github/release/arendst/Sonoff-Tasmota.svg)](https://github.com/arendst/Sonoff-Tasmota/releases/latest) [![GitHub download](https://img.shields.io/github/downloads/arendst/Sonoff-Tasmota/total.svg)](https://github.com/arendst/Sonoff-Tasmota/releases/latest) @@ -81,4 +81,4 @@ You can contribute to Sonoff-Tasmota by ### License -This program is licensed under GPL-3.0 \ No newline at end of file +This program is licensed under GPL-3.0 diff --git a/lib/ESPAsyncUDP-0.21/README.md b/lib/ESPAsyncUDP-0.21/README.md deleted file mode 100644 index 6568fa372..000000000 --- a/lib/ESPAsyncUDP-0.21/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# ESPAsyncUDP -_Library patched with the [PR #21](https://github.com/me-no-dev/ESPAsyncUDP/pull/21)_ - -Async UDP Library for ESP8266 Arduino [![Build Status](https://travis-ci.org/me-no-dev/ESPAsyncUDP.svg?branch=master)](https://travis-ci.org/me-no-dev/ESPAsyncUDP) - -[![Join the chat at https://gitter.im/me-no-dev/ESPAsyncWebServer](https://badges.gitter.im/me-no-dev/ESPAsyncWebServer.svg)](https://gitter.im/me-no-dev/ESPAsyncWebServer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) - -This is a fully asynchronous UDP library, aimed at enabling trouble-free, multi-connection network environment for Espressif's ESP8266 MCUs. - -The library is easy to use and includes support for Unicast, Broadcast and Multicast environments - -Latest GIT version of ESP8266 Arduino might be required for this library to work diff --git a/lib/ESPAsyncUDP-0.21/examples/AsyncUDPClient/AsyncUDPClient.ino b/lib/ESPAsyncUDP-0.21/examples/AsyncUDPClient/AsyncUDPClient.ino deleted file mode 100644 index cf528fe12..000000000 --- a/lib/ESPAsyncUDP-0.21/examples/AsyncUDPClient/AsyncUDPClient.ino +++ /dev/null @@ -1,51 +0,0 @@ -#include -#include "ESPAsyncUDP.h" - -const char * ssid = "***********"; -const char * password = "***********"; - -AsyncUDP udp; - -void setup() -{ - Serial.begin(115200); - WiFi.mode(WIFI_STA); - WiFi.begin(ssid, password); - if (WiFi.waitForConnectResult() != WL_CONNECTED) { - Serial.println("WiFi Failed"); - while(1) { - delay(1000); - } - } - if(udp.connect(IPAddress(192,168,1,100), 1234)) { - Serial.println("UDP connected"); - udp.onPacket([](AsyncUDPPacket packet) { - Serial.print("UDP Packet Type: "); - Serial.print(packet.isBroadcast()?"Broadcast":packet.isMulticast()?"Multicast":"Unicast"); - Serial.print(", From: "); - Serial.print(packet.remoteIP()); - Serial.print(":"); - Serial.print(packet.remotePort()); - Serial.print(", To: "); - Serial.print(packet.localIP()); - Serial.print(":"); - Serial.print(packet.localPort()); - Serial.print(", Length: "); - Serial.print(packet.length()); - Serial.print(", Data: "); - Serial.write(packet.data(), packet.length()); - Serial.println(); - //reply to the client - packet.printf("Got %u bytes of data", packet.length()); - }); - //Send unicast - udp.print("Hello Server!"); - } -} - -void loop() -{ - delay(1000); - //Send broadcast on port 1234 - udp.broadcastTo("Anyone here?", 1234); -} diff --git a/lib/ESPAsyncUDP-0.21/examples/AsyncUDPMulticastServer/AsyncUDPMulticastServer.ino b/lib/ESPAsyncUDP-0.21/examples/AsyncUDPMulticastServer/AsyncUDPMulticastServer.ino deleted file mode 100644 index bb3e69c9b..000000000 --- a/lib/ESPAsyncUDP-0.21/examples/AsyncUDPMulticastServer/AsyncUDPMulticastServer.ino +++ /dev/null @@ -1,52 +0,0 @@ -#include -#include "ESPAsyncUDP.h" - -const char * ssid = "***********"; -const char * password = "***********"; - -AsyncUDP udp; - -void setup() -{ - Serial.begin(115200); - WiFi.mode(WIFI_STA); - WiFi.begin(ssid, password); - if (WiFi.waitForConnectResult() != WL_CONNECTED) { - Serial.println("WiFi Failed"); - while(1) { - delay(1000); - } - } - if(udp.listenMulticast(IPAddress(239,1,2,3), 1234)) { - Serial.print("UDP Listening on IP: "); - Serial.println(WiFi.localIP()); - udp.onPacket([](AsyncUDPPacket packet) { - Serial.print("UDP Packet Type: "); - Serial.print(packet.isBroadcast()?"Broadcast":packet.isMulticast()?"Multicast":"Unicast"); - Serial.print(", From: "); - Serial.print(packet.remoteIP()); - Serial.print(":"); - Serial.print(packet.remotePort()); - Serial.print(", To: "); - Serial.print(packet.localIP()); - Serial.print(":"); - Serial.print(packet.localPort()); - Serial.print(", Length: "); - Serial.print(packet.length()); - Serial.print(", Data: "); - Serial.write(packet.data(), packet.length()); - Serial.println(); - //reply to the client - packet.printf("Got %u bytes of data", packet.length()); - }); - //Send multicast - udp.print("Hello!"); - } -} - -void loop() -{ - delay(1000); - //Send multicast - udp.print("Anyone here?"); -} diff --git a/lib/ESPAsyncUDP-0.21/examples/AsyncUDPServer/AsyncUDPServer.ino b/lib/ESPAsyncUDP-0.21/examples/AsyncUDPServer/AsyncUDPServer.ino deleted file mode 100644 index fc12a7fc3..000000000 --- a/lib/ESPAsyncUDP-0.21/examples/AsyncUDPServer/AsyncUDPServer.ino +++ /dev/null @@ -1,50 +0,0 @@ -#include -#include "ESPAsyncUDP.h" - -const char * ssid = "***********"; -const char * password = "***********"; - -AsyncUDP udp; - -void setup() -{ - Serial.begin(115200); - WiFi.mode(WIFI_STA); - WiFi.begin(ssid, password); - if (WiFi.waitForConnectResult() != WL_CONNECTED) { - Serial.println("WiFi Failed"); - while(1) { - delay(1000); - } - } - if(udp.listen(1234)) { - Serial.print("UDP Listening on IP: "); - Serial.println(WiFi.localIP()); - udp.onPacket([](AsyncUDPPacket packet) { - Serial.print("UDP Packet Type: "); - Serial.print(packet.isBroadcast()?"Broadcast":packet.isMulticast()?"Multicast":"Unicast"); - Serial.print(", From: "); - Serial.print(packet.remoteIP()); - Serial.print(":"); - Serial.print(packet.remotePort()); - Serial.print(", To: "); - Serial.print(packet.localIP()); - Serial.print(":"); - Serial.print(packet.localPort()); - Serial.print(", Length: "); - Serial.print(packet.length()); - Serial.print(", Data: "); - Serial.write(packet.data(), packet.length()); - Serial.println(); - //reply to the client - packet.printf("Got %u bytes of data", packet.length()); - }); - } -} - -void loop() -{ - delay(1000); - //Send broadcast - udp.broadcast("Anyone here?"); -} diff --git a/lib/ESPAsyncUDP-0.21/keywords.txt b/lib/ESPAsyncUDP-0.21/keywords.txt deleted file mode 100644 index 67c0b97a7..000000000 --- a/lib/ESPAsyncUDP-0.21/keywords.txt +++ /dev/null @@ -1,33 +0,0 @@ -####################################### -# Syntax Coloring Map For Ultrasound -####################################### - -####################################### -# Datatypes (KEYWORD1) -####################################### - -AsyncUDP KEYWORD1 -AsyncUDPPacket KEYWORD1 - -####################################### -# Methods and Functions (KEYWORD2) -####################################### - -connect KEYWORD2 -connected KEYWORD2 -listen KEYWORD2 -listenMulticast KEYWORD2 -close KEYWORD2 -write KEYWORD2 -broadcast KEYWORD2 -onPacket KEYWORD2 -data KEYWORD2 -length KEYWORD2 -localIP KEYWORD2 -localPort KEYWORD2 -remoteIP KEYWORD2 -remotePort KEYWORD2 - -####################################### -# Constants (LITERAL1) -####################################### diff --git a/lib/ESPAsyncUDP-0.21/library.json b/lib/ESPAsyncUDP-0.21/library.json deleted file mode 100644 index fe300b6e6..000000000 --- a/lib/ESPAsyncUDP-0.21/library.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name":"ESPAsyncUDP", - "description":"Asynchronous UDP Library for ESP8266", - "keywords":"async,udp,server,client,multicast,broadcast", - "authors": - { - "name": "Hristo Gochkov", - "maintainer": true - }, - "repository": - { - "type": "git", - "url": "https://github.com/me-no-dev/ESPAsyncUDP.git" - }, - "frameworks": "arduino", - "platforms":"espressif" -} diff --git a/lib/ESPAsyncUDP-0.21/library.properties b/lib/ESPAsyncUDP-0.21/library.properties deleted file mode 100644 index 1aa6ef1ad..000000000 --- a/lib/ESPAsyncUDP-0.21/library.properties +++ /dev/null @@ -1,9 +0,0 @@ -name=ESP Async UDP -version=1.0.0 -author=Me-No-Dev -maintainer=Me-No-Dev -sentence=Async UDP Library for ESP8266 -paragraph=Async UDP Library for ESP8266 -category=Other -url=https://github.com/me-no-dev/ESPAsyncUDP -architectures=* diff --git a/lib/ESPAsyncUDP-0.21/src/AsyncUDP.cpp b/lib/ESPAsyncUDP-0.21/src/AsyncUDP.cpp deleted file mode 100644 index 6d2423819..000000000 --- a/lib/ESPAsyncUDP-0.21/src/AsyncUDP.cpp +++ /dev/null @@ -1,425 +0,0 @@ -#include "Arduino.h" -#include "ESPAsyncUDP.h" - -extern "C" { -#include "user_interface.h" -#include "lwip/opt.h" -#include "lwip/inet.h" -#include "lwip/udp.h" -#include "lwip/igmp.h" -} - -AsyncUDPMessage::AsyncUDPMessage(size_t size) -{ - _index = 0; - if(size > 1460) { - size = 1460; - } - _size = size; - _buffer = (uint8_t *)malloc(size); -} - -AsyncUDPMessage::~AsyncUDPMessage() -{ - if(_buffer) { - free(_buffer); - } -} - -size_t AsyncUDPMessage::write(const uint8_t *data, size_t len) -{ - if(_buffer == NULL) { - return 0; - } - size_t s = space(); - if(len > s) { - len = s; - } - memcpy(_buffer + _index, data, len); - _index += len; - return len; -} - -size_t AsyncUDPMessage::write(uint8_t data) -{ - return write(&data, 1); -} - -size_t AsyncUDPMessage::space() -{ - if(_buffer == NULL) { - return 0; - } - return _size - _index; -} - -uint8_t * AsyncUDPMessage::data() -{ - return _buffer; -} - -size_t AsyncUDPMessage::length() -{ - return _index; -} - -void AsyncUDPMessage::flush() -{ - _index = 0; -} - - -AsyncUDPPacket::AsyncUDPPacket(AsyncUDP *udp, ip_addr_t *localIp, uint16_t localPort, ip_addr_t *remoteIp, uint16_t remotePort, uint8_t *data, size_t len) -{ - _udp = udp; - _localIp = localIp; - _localPort = localPort; - _remoteIp = remoteIp; - _remotePort = remotePort; - _data = data; - _len = len; -} - -AsyncUDPPacket::~AsyncUDPPacket() -{ - -} - -uint8_t * AsyncUDPPacket::data() -{ - return _data; -} - -size_t AsyncUDPPacket::length() -{ - return _len; -} - -IPAddress AsyncUDPPacket::localIP() -{ - return IPAddress(_localIp->addr); -} - -uint16_t AsyncUDPPacket::localPort() -{ - return _localPort; -} - -IPAddress AsyncUDPPacket::remoteIP() -{ - return IPAddress(_remoteIp->addr); -} - -uint16_t AsyncUDPPacket::remotePort() -{ - return _remotePort; -} - -bool AsyncUDPPacket::isBroadcast() -{ - return _localIp->addr == 0xFFFFFFFF || _localIp->addr == (uint32_t)(0); -} - -bool AsyncUDPPacket::isMulticast() -{ - return ip_addr_ismulticast(_localIp); -} - -size_t AsyncUDPPacket::write(const uint8_t *data, size_t len) -{ - return _udp->writeTo(data, len, _remoteIp, _remotePort); -} - -size_t AsyncUDPPacket::write(uint8_t data) -{ - return write(&data, 1); -} - -size_t AsyncUDPPacket::send(AsyncUDPMessage &message) -{ - return write(message.data(), message.length()); -} - - - -AsyncUDP::AsyncUDP() -{ - _pcb = NULL; - _connected = false; - _handler = NULL; -} - -AsyncUDP::~AsyncUDP() -{ - close(); -} - -AsyncUDP::operator bool() -{ - return _connected; -} - -bool AsyncUDP::connected() -{ - return _connected; -} - -void AsyncUDP::onPacket(AuPacketHandlerFunctionWithArg cb, void * arg) -{ - onPacket(std::bind(cb, arg, std::placeholders::_1)); -} - -void AsyncUDP::onPacket(AuPacketHandlerFunction cb) -{ - _handler = cb; -} - -void AsyncUDP::_recv(udp_pcb *upcb, pbuf *pb, ip_addr_t *addr, uint16_t port) -{ - (void)upcb; // its unused, avoid warning - while(pb != NULL) { - if(_handler) { - uint8_t * data = (uint8_t*)((pb)->payload); - size_t len = pb->len; - - ip_hdr* iphdr = reinterpret_cast(data - UDP_HLEN - IP_HLEN); - ip_addr_t daddr; - daddr.addr = iphdr->dest.addr; - - udp_hdr* udphdr = reinterpret_cast(((uint8_t*)((pb)->payload)) - UDP_HLEN); - uint16_t dport = ntohs(udphdr->dest); - - AsyncUDPPacket packet(this, &daddr, dport, addr, port, data, len); - _handler(packet); - } - - pbuf * this_pb = pb; - pb = pb->next; - this_pb->next = NULL; - pbuf_free(this_pb); - } -} - -#if LWIP_VERSION_MAJOR == 1 -void AsyncUDP::_s_recv(void *arg, udp_pcb *upcb, pbuf *p, ip_addr_t *addr, uint16_t port) -#else -void AsyncUDP::_s_recv(void *arg, udp_pcb *upcb, pbuf *p, const ip_addr_t *addr, uint16_t port) -#endif -{ - reinterpret_cast(arg)->_recv(upcb, p, (ip_addr_t *)addr, port); -} - -bool AsyncUDP::listen(ip_addr_t *addr, uint16_t port) -{ - close(); - _pcb = udp_new(); - if(_pcb == NULL) { - return false; - } - err_t err = udp_bind(_pcb, addr, port); - if(err != ERR_OK) { - close(); - return false; - } - udp_recv(_pcb, &_s_recv, (void *) this); - _connected = true; - return true; -} - -bool AsyncUDP::listenMulticast(ip_addr_t *addr, uint16_t port, uint8_t ttl) -{ - close(); - if(!ip_addr_ismulticast(addr)) { - return false; - } - ip_addr_t multicast_if_addr; - struct ip_info ifIpInfo; - int mode = wifi_get_opmode(); - if(mode & STATION_MODE) { - wifi_get_ip_info(STATION_IF, &ifIpInfo); - multicast_if_addr.addr = ifIpInfo.ip.addr; - } else if (mode & SOFTAP_MODE) { - wifi_get_ip_info(SOFTAP_IF, &ifIpInfo); - multicast_if_addr.addr = ifIpInfo.ip.addr; - } else { - return false; - } - if (igmp_joingroup(&multicast_if_addr, addr)!= ERR_OK) { - return false; - } - if(!listen(IPADDR_ANY, port)) { - return false; - } -#if LWIP_VERSION_MAJOR == 1 - udp_set_multicast_netif_addr(_pcb, multicast_if_addr); -#else - udp_set_multicast_netif_addr(_pcb, &multicast_if_addr); -#endif - udp_set_multicast_ttl(_pcb, ttl); - ip_addr_copy(_pcb->remote_ip, *addr); - _pcb->remote_port = port; - return true; -} - -bool AsyncUDP::connect(ip_addr_t *addr, uint16_t port) -{ - close(); - _pcb = udp_new(); - if(_pcb == NULL) { - return false; - } - err_t err = udp_connect(_pcb, addr, port); - if(err != ERR_OK) { - close(); - return false; - } - udp_recv(_pcb, &_s_recv, (void *) this); - _connected = true; - return true; -} - -void AsyncUDP::close() -{ - if(_pcb != NULL) { - if(_connected) { - udp_disconnect(_pcb); - } - udp_remove(_pcb); - _connected = false; - _pcb = NULL; - } -} - -size_t AsyncUDP::writeTo(const uint8_t *data, size_t len, ip_addr_t *addr, uint16_t port) -{ - if(!_pcb && !connect(addr, port)) { - return 0; - } - if(len > 1460) { - len = 1460; - } - pbuf* pbt = pbuf_alloc(PBUF_TRANSPORT, len, PBUF_RAM); - if(pbt != NULL) { - uint8_t* dst = reinterpret_cast(pbt->payload); - memcpy(dst, data, len); - err_t err = udp_sendto(_pcb, pbt, addr, port); - pbuf_free(pbt); - if(err < ERR_OK) { - return 0; - } - return len; - } - return 0; -} - -bool AsyncUDP::listen(const IPAddress addr, uint16_t port) -{ - ip_addr_t laddr; - laddr.addr = addr; - return listen(&laddr, port); -} - -bool AsyncUDP::listen(uint16_t port) -{ - return listen(IPAddress((uint32_t)INADDR_ANY), port); -} - -bool AsyncUDP::listenMulticast(const IPAddress addr, uint16_t port, uint8_t ttl) -{ - ip_addr_t laddr; - laddr.addr = addr; - return listenMulticast(&laddr, port, ttl); -} - -bool AsyncUDP::connect(const IPAddress addr, uint16_t port) -{ - ip_addr_t daddr; - daddr.addr = addr; - return connect(&daddr, port); -} - -size_t AsyncUDP::writeTo(const uint8_t *data, size_t len, const IPAddress addr, uint16_t port) -{ - ip_addr_t daddr; - daddr.addr = addr; - return writeTo(data, len, &daddr, port); -} - -size_t AsyncUDP::write(const uint8_t *data, size_t len) -{ - if(_pcb) - { - return writeTo(data, len, &(_pcb->remote_ip), _pcb->remote_port); - } -} - -size_t AsyncUDP::write(uint8_t data) -{ - return write(&data, 1); -} - -size_t AsyncUDP::broadcastTo(uint8_t *data, size_t len, uint16_t port) -{ - ip_addr_t daddr; - daddr.addr = 0xFFFFFFFF; - return writeTo(data, len, &daddr, port); -} - -size_t AsyncUDP::broadcastTo(const char * data, uint16_t port) -{ - return broadcastTo((uint8_t *)data, strlen(data), port); -} - -size_t AsyncUDP::broadcast(uint8_t *data, size_t len) -{ - if(_pcb->local_port != 0) { - return broadcastTo(data, len, _pcb->local_port); - } - return 0; -} - -size_t AsyncUDP::broadcast(const char * data) -{ - return broadcast((uint8_t *)data, strlen(data)); -} - - -size_t AsyncUDP::sendTo(AsyncUDPMessage &message, ip_addr_t *addr, uint16_t port) -{ - if(!message) { - return 0; - } - return writeTo(message.data(), message.length(), addr, port); -} - -size_t AsyncUDP::sendTo(AsyncUDPMessage &message, const IPAddress addr, uint16_t port) -{ - if(!message) { - return 0; - } - return writeTo(message.data(), message.length(), addr, port); -} - -size_t AsyncUDP::send(AsyncUDPMessage &message) -{ - if((!message) || (!_pcb)) { - return 0; - } - return writeTo(message.data(), message.length(), &(_pcb->remote_ip), _pcb->remote_port); -} - -size_t AsyncUDP::broadcastTo(AsyncUDPMessage &message, uint16_t port) -{ - if(!message) { - return 0; - } - return broadcastTo(message.data(), message.length(), port); -} - -size_t AsyncUDP::broadcast(AsyncUDPMessage &message) -{ - if(!message) { - return 0; - } - return broadcast(message.data(), message.length()); -} diff --git a/lib/ESPAsyncUDP-0.21/src/ESPAsyncUDP.h b/lib/ESPAsyncUDP-0.21/src/ESPAsyncUDP.h deleted file mode 100644 index 8e5a70b21..000000000 --- a/lib/ESPAsyncUDP-0.21/src/ESPAsyncUDP.h +++ /dev/null @@ -1,130 +0,0 @@ -#ifndef ESPASYNCUDP_H -#define ESPASYNCUDP_H - -#include "IPAddress.h" -#include "Print.h" -#include -#include "lwip/init.h" - -class AsyncUDP; -class AsyncUDPPacket; -class AsyncUDPMessage; -struct udp_pcb; -struct pbuf; -#if LWIP_VERSION_MAJOR == 1 -struct ip_addr; -typedef struct ip_addr ip_addr_t; -#else -struct ip4_addr; -typedef struct ip4_addr ip_addr_t; -#endif - -class AsyncUDPMessage : public Print -{ -protected: - uint8_t *_buffer; - size_t _index; - size_t _size; -public: - AsyncUDPMessage(size_t size=1460); - virtual ~AsyncUDPMessage(); - size_t write(const uint8_t *data, size_t len); - size_t write(uint8_t data); - size_t space(); - uint8_t * data(); - size_t length(); - void flush(); - operator bool() - { - return _buffer != NULL; - } -}; - -class AsyncUDPPacket : public Print -{ -protected: - AsyncUDP *_udp; - ip_addr_t *_localIp; - uint16_t _localPort; - ip_addr_t *_remoteIp; - uint16_t _remotePort; - uint8_t *_data; - size_t _len; -public: - AsyncUDPPacket(AsyncUDP *udp, ip_addr_t *localIp, uint16_t localPort, ip_addr_t *remoteIp, uint16_t remotePort, uint8_t *data, size_t len); - virtual ~AsyncUDPPacket(); - - uint8_t * data(); - size_t length(); - bool isBroadcast(); - bool isMulticast(); - - IPAddress localIP(); - uint16_t localPort(); - IPAddress remoteIP(); - uint16_t remotePort(); - - size_t send(AsyncUDPMessage &message); - - size_t write(const uint8_t *data, size_t len); - size_t write(uint8_t data); -}; - -typedef std::function AuPacketHandlerFunction; -typedef std::function AuPacketHandlerFunctionWithArg; - -class AsyncUDP : public Print -{ -protected: - udp_pcb *_pcb; - bool _connected; - AuPacketHandlerFunction _handler; - - void _recv(udp_pcb *upcb, pbuf *pb, ip_addr_t *addr, uint16_t port); -#if LWIP_VERSION_MAJOR == 1 - static void _s_recv(void *arg, udp_pcb *upcb, pbuf *p, ip_addr_t *addr, uint16_t port); -#else - static void _s_recv(void *arg, udp_pcb *upcb, pbuf *p, const ip_addr_t *addr, uint16_t port); -#endif - -public: - AsyncUDP(); - virtual ~AsyncUDP(); - - void onPacket(AuPacketHandlerFunctionWithArg cb, void * arg=NULL); - void onPacket(AuPacketHandlerFunction cb); - - bool listen(ip_addr_t *addr, uint16_t port); - bool listen(const IPAddress addr, uint16_t port); - bool listen(uint16_t port); - - bool listenMulticast(ip_addr_t *addr, uint16_t port, uint8_t ttl=1); - bool listenMulticast(const IPAddress addr, uint16_t port, uint8_t ttl=1); - - bool connect(ip_addr_t *addr, uint16_t port); - bool connect(const IPAddress addr, uint16_t port); - - void close(); - - size_t writeTo(const uint8_t *data, size_t len, ip_addr_t *addr, uint16_t port); - size_t writeTo(const uint8_t *data, size_t len, const IPAddress addr, uint16_t port); - size_t write(const uint8_t *data, size_t len); - size_t write(uint8_t data); - - size_t broadcastTo(uint8_t *data, size_t len, uint16_t port); - size_t broadcastTo(const char * data, uint16_t port); - size_t broadcast(uint8_t *data, size_t len); - size_t broadcast(const char * data); - - size_t sendTo(AsyncUDPMessage &message, ip_addr_t *addr, uint16_t port); - size_t sendTo(AsyncUDPMessage &message, const IPAddress addr, uint16_t port); - size_t send(AsyncUDPMessage &message); - - size_t broadcastTo(AsyncUDPMessage &message, uint16_t port); - size_t broadcast(AsyncUDPMessage &message); - - bool connected(); - operator bool(); -}; - -#endif diff --git a/lib/ESPAsyncUDP-0.21/travis/common.sh b/lib/ESPAsyncUDP-0.21/travis/common.sh deleted file mode 100644 index 57bede343..000000000 --- a/lib/ESPAsyncUDP-0.21/travis/common.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -function build_sketches() -{ - local arduino=$1 - local srcpath=$2 - local platform=$3 - local sketches=$(find $srcpath -name *.ino) - for sketch in $sketches; do - local sketchdir=$(dirname $sketch) - if [[ -f "$sketchdir/.$platform.skip" ]]; then - echo -e "\n\n ------------ Skipping $sketch ------------ \n\n"; - continue - fi - echo -e "\n\n ------------ Building $sketch ------------ \n\n"; - $arduino --verify $sketch; - local result=$? - if [ $result -ne 0 ]; then - echo "Build failed ($1)" - return $result - fi - done -} diff --git a/lib/esp-knx-ip-async-udp-0.4.0.15/DPT.h b/lib/esp-knx-ip-0.5.0/DPT.h similarity index 100% rename from lib/esp-knx-ip-async-udp-0.4.0.15/DPT.h rename to lib/esp-knx-ip-0.5.0/DPT.h diff --git a/lib/esp-knx-ip-async-udp-0.4.0.15/LICENSE b/lib/esp-knx-ip-0.5.0/LICENSE similarity index 100% rename from lib/esp-knx-ip-async-udp-0.4.0.15/LICENSE rename to lib/esp-knx-ip-0.5.0/LICENSE diff --git a/lib/esp-knx-ip-async-udp-0.4.0.15/README.md b/lib/esp-knx-ip-0.5.0/README.md similarity index 77% rename from lib/esp-knx-ip-async-udp-0.4.0.15/README.md rename to lib/esp-knx-ip-0.5.0/README.md index b18b50d6b..a93c09192 100644 --- a/lib/esp-knx-ip-async-udp-0.4.0.15/README.md +++ b/lib/esp-knx-ip-0.5.0/README.md @@ -3,19 +3,6 @@ This is a library for the ESP8266 to enable KNXnet/IP communication. It uses UDP multicast on 224.0.23.12:3671. It is intended to be used with the Arduino platform for the ESP8266. -## Prerequisities / Dependencies ## - -* You need version 2.4.0 of the esp8266 board libraries. - * I only tested with lwip v1.4. v2 might work, you need to test yourself. -* You need the [ESPAsyncUDP](https://github.com/me-no-dev/ESPAsyncUDP) library. -* You need a KNXnet/IP **router**. A gateway will **not** work. Alternatively use [knxd](https://github.com/knxd/knxd). - -## Caveats ## - -Receiving packets should work immediately. - -Sending sometimes only works after a substantial amount of time (max 5 minutes in my experiments). In my case, this was fixed by disabling IGMP snooping on the switch(es). - ## How to use ## The library is under development. API may change multiple times in the future. @@ -104,4 +91,4 @@ Simply visit the IP of your ESP with a webbrowser. You can configure the followi * Which group address should trigger which callback * Which group address are to be used by the program (e.g. for status replies) -The configuration is dynamically generated from the code. \ No newline at end of file +The configuration is dynamically generated from the code. diff --git a/lib/esp-knx-ip-async-udp-0.4.0.15/esp-knx-ip-config.cpp b/lib/esp-knx-ip-0.5.0/esp-knx-ip-config.cpp similarity index 100% rename from lib/esp-knx-ip-async-udp-0.4.0.15/esp-knx-ip-config.cpp rename to lib/esp-knx-ip-0.5.0/esp-knx-ip-config.cpp diff --git a/lib/esp-knx-ip-async-udp-0.4.0.15/esp-knx-ip-conversion.cpp b/lib/esp-knx-ip-0.5.0/esp-knx-ip-conversion.cpp similarity index 100% rename from lib/esp-knx-ip-async-udp-0.4.0.15/esp-knx-ip-conversion.cpp rename to lib/esp-knx-ip-0.5.0/esp-knx-ip-conversion.cpp diff --git a/lib/esp-knx-ip-async-udp-0.4.0.15/esp-knx-ip-send.cpp b/lib/esp-knx-ip-0.5.0/esp-knx-ip-send.cpp similarity index 98% rename from lib/esp-knx-ip-async-udp-0.4.0.15/esp-knx-ip-send.cpp rename to lib/esp-knx-ip-0.5.0/esp-knx-ip-send.cpp index 1244fc50a..72459f922 100644 --- a/lib/esp-knx-ip-async-udp-0.4.0.15/esp-knx-ip-send.cpp +++ b/lib/esp-knx-ip-0.5.0/esp-knx-ip-send.cpp @@ -73,7 +73,9 @@ void ESPKNXIP::send(address_t const &receiver, knx_command_type_t ct, uint8_t da DEBUG_PRINTLN(F("")); #endif - udp.writeTo(buf, len, MULTICAST_IP, MULTICAST_PORT); + udp.beginPacketMulticast(MULTICAST_IP, MULTICAST_PORT, WiFi.localIP()); + udp.write(buf, len); + udp.endPacket(); } void ESPKNXIP::send_1bit(address_t const &receiver, knx_command_type_t ct, uint8_t bit) diff --git a/lib/esp-knx-ip-async-udp-0.4.0.15/esp-knx-ip-webserver.cpp b/lib/esp-knx-ip-0.5.0/esp-knx-ip-webserver.cpp similarity index 100% rename from lib/esp-knx-ip-async-udp-0.4.0.15/esp-knx-ip-webserver.cpp rename to lib/esp-knx-ip-0.5.0/esp-knx-ip-webserver.cpp diff --git a/lib/esp-knx-ip-async-udp-0.4.0.15/esp-knx-ip.cpp b/lib/esp-knx-ip-0.5.0/esp-knx-ip.cpp similarity index 98% rename from lib/esp-knx-ip-async-udp-0.4.0.15/esp-knx-ip.cpp rename to lib/esp-knx-ip-0.5.0/esp-knx-ip.cpp index 35b9c5014..b572333b9 100644 --- a/lib/esp-knx-ip-async-udp-0.4.0.15/esp-knx-ip.cpp +++ b/lib/esp-knx-ip-0.5.0/esp-knx-ip.cpp @@ -96,10 +96,7 @@ void ESPKNXIP::__start() server->begin(); } - udp.listenMulticast(MULTICAST_IP, MULTICAST_PORT); - udp.onPacket([this](AsyncUDPPacket &packet) { - DEBUG_PRINTLN("got packet"); - __loop_knx(packet); }); + udp.beginMulticast(WiFi.localIP(), MULTICAST_IP, MULTICAST_PORT); } void ESPKNXIP::save_to_eeprom() @@ -514,6 +511,7 @@ feedback_id_t ESPKNXIP::feedback_register_action(String name, feedback_action_fp void ESPKNXIP::loop() { + __loop_knx(); if (server != nullptr) { __loop_webserver(); @@ -525,9 +523,9 @@ void ESPKNXIP::__loop_webserver() server->handleClient(); } -void ESPKNXIP::__loop_knx(AsyncUDPPacket &packet) +void ESPKNXIP::__loop_knx() { - size_t read = packet.length(); + int read = udp.parsePacket(); if (!read) { return; @@ -536,11 +534,14 @@ void ESPKNXIP::__loop_knx(AsyncUDPPacket &packet) DEBUG_PRINT(F("LEN: ")); DEBUG_PRINTLN(read); - uint8_t *buf = packet.data(); + uint8_t buf[read]; + + udp.read(buf, read); + udp.flush(); DEBUG_PRINT(F("Got packet:")); #ifdef ESP_KNX_DEBUG - for (size_t i = 0; i < read; ++i) + for (int i = 0; i < read; ++i) { DEBUG_PRINT(F(" 0x")); DEBUG_PRINT(buf[i], 16); diff --git a/lib/esp-knx-ip-async-udp-0.4.0.15/esp-knx-ip.h b/lib/esp-knx-ip-0.5.0/esp-knx-ip.h similarity index 99% rename from lib/esp-knx-ip-async-udp-0.4.0.15/esp-knx-ip.h rename to lib/esp-knx-ip-0.5.0/esp-knx-ip.h index 86e02c5e8..538264b3e 100644 --- a/lib/esp-knx-ip-async-udp-0.4.0.15/esp-knx-ip.h +++ b/lib/esp-knx-ip-0.5.0/esp-knx-ip.h @@ -45,7 +45,7 @@ #include "Arduino.h" #include #include -#include +#include #include #include "DPT.h" @@ -509,7 +509,7 @@ class ESPKNXIP { private: void __start(); - void __loop_knx(AsyncUDPPacket &packet); + void __loop_knx(); // Webserver functions void __loop_webserver(); @@ -544,7 +544,7 @@ class ESPKNXIP { ESP8266WebServer *server; address_t physaddr; - AsyncUDP udp; + WiFiUDP udp; callback_assignment_id_t registered_callback_assignments; callback_assignment_id_t free_callback_assignment_slots; diff --git a/lib/esp-knx-ip-async-udp-0.4.0.15/examples/environment-sensor/environment-sensor.ino b/lib/esp-knx-ip-0.5.0/examples/environment-sensor/environment-sensor.ino similarity index 100% rename from lib/esp-knx-ip-async-udp-0.4.0.15/examples/environment-sensor/environment-sensor.ino rename to lib/esp-knx-ip-0.5.0/examples/environment-sensor/environment-sensor.ino diff --git a/lib/esp-knx-ip-async-udp-0.4.0.15/examples/sonoff/sonoff.ino b/lib/esp-knx-ip-0.5.0/examples/sonoff/sonoff.ino similarity index 100% rename from lib/esp-knx-ip-async-udp-0.4.0.15/examples/sonoff/sonoff.ino rename to lib/esp-knx-ip-0.5.0/examples/sonoff/sonoff.ino diff --git a/lib/esp-knx-ip-async-udp-0.4.0.15/examples/static-config/static-config.ino b/lib/esp-knx-ip-0.5.0/examples/static-config/static-config.ino similarity index 100% rename from lib/esp-knx-ip-async-udp-0.4.0.15/examples/static-config/static-config.ino rename to lib/esp-knx-ip-0.5.0/examples/static-config/static-config.ino diff --git a/lib/esp-knx-ip-async-udp-0.4.0.15/keywords.txt b/lib/esp-knx-ip-0.5.0/keywords.txt similarity index 100% rename from lib/esp-knx-ip-async-udp-0.4.0.15/keywords.txt rename to lib/esp-knx-ip-0.5.0/keywords.txt diff --git a/lib/esp-knx-ip-async-udp-0.4.0.15/library.properties b/lib/esp-knx-ip-0.5.0/library.properties similarity index 60% rename from lib/esp-knx-ip-async-udp-0.4.0.15/library.properties rename to lib/esp-knx-ip-0.5.0/library.properties index ff2607bdc..57cad993c 100644 --- a/lib/esp-knx-ip-async-udp-0.4.0.15/library.properties +++ b/lib/esp-knx-ip-0.5.0/library.properties @@ -1,10 +1,10 @@ name=ESP KNX IP Library -version=0.4 +version=0.5 author=Nico Weichbrodt maintainer=Nico Weichbrodt sentence=ESP8266 library for KNX/IP communication. -paragraph=Build your own IoT devices with KNX/IP connectivity! This library depends on the ESPAsyncUDP library. +paragraph=Build your own IoT devices with KNX/IP connectivity! category=Communication url=https://github.com/envy/esp-knx-ip architectures=esp8266 -includes=esp-knx-ip.h \ No newline at end of file +includes=esp-knx-ip.h diff --git a/sonoff/_releasenotes.ino b/sonoff/_releasenotes.ino index ea8d97155..034877a45 100644 --- a/sonoff/_releasenotes.ino +++ b/sonoff/_releasenotes.ino @@ -2,6 +2,7 @@ * Reinit timers to accomodate random window (#2447) * Add random window to timers (#2447) * Add optional KNX IP Protocol Support (#2402) + * Fix compile error when using ESP/Arduino library v2.3.0 by reverting KNX async UDP library to default UDP library (#2488,#2492,#2493) * * 5.12.0l * Release rules up to 511 characters diff --git a/sonoff/language/es-AR.h b/sonoff/language/es-AR.h index 4a4e6c9ec..736e7849d 100644 --- a/sonoff/language/es-AR.h +++ b/sonoff/language/es-AR.h @@ -28,7 +28,7 @@ * Use online command StateText to translate ON, OFF, HOLD and TOGGLE. * Use online command Prefix to translate cmnd, stat and tele. * - * Updated until v5.12.0k + * Updated until v5.12.0m \*********************************************************************/ #define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English) @@ -375,24 +375,24 @@ #define D_TIMER_ACTION "Estado" // xdrv_10_knx.ino -#define D_CONFIGURE_KNX "Configure KNX" -#define D_KNX_PARAMETERS "KNX Parameters" +#define D_CONFIGURE_KNX "Configuración de KNX" +#define D_KNX_PARAMETERS "Parámetros de KNX" #define D_KNX_GENERAL_CONFIG "General" -#define D_KNX_PHYSICAL_ADDRESS "Physical Address" -#define D_KNX_PHYSICAL_ADDRESS_NOTE "( Must be unique on the KNX network )" -#define D_KNX_ENABLE "Enable KNX" -#define D_KNX_GROUP_ADDRESS_TO_WRITE "Data to Send to Group Addresses" -#define D_ADD "Add" -#define D_DELETE "Delete" -#define D_REPLY "Reply" -#define D_KNX_GROUP_ADDRESS_TO_READ "Group Addresses to Receive Data from" +#define D_KNX_PHYSICAL_ADDRESS "Dirección Física" +#define D_KNX_PHYSICAL_ADDRESS_NOTE "( Debe ser única en la red KNX )" +#define D_KNX_ENABLE "Habilitar KNX" +#define D_KNX_GROUP_ADDRESS_TO_WRITE "Datos a Enviar a las Direcciones de Grupo" +#define D_ADD "Agregar" +#define D_DELETE "Eliminar" +#define D_REPLY "Responder" +#define D_KNX_GROUP_ADDRESS_TO_READ "Direcciones de Grupo para Recibir Datos" #define D_LOG_KNX "KNX: " -#define D_RECEIVED_FROM "Received from" -#define D_KNX_COMMAND_WRITE "Write" -#define D_KNX_COMMAND_READ "Read" -#define D_KNX_COMMAND_OTHER "Other" -#define D_SENT_TO "sent to" -#define D_KNX_WARNING "The group address ( 0 / 0 / 0 ) is reserved and can not be used." +#define D_RECEIVED_FROM "Recibido desde" +#define D_KNX_COMMAND_WRITE "Escribir" +#define D_KNX_COMMAND_READ "Leer" +#define D_KNX_COMMAND_OTHER "Otro" +#define D_SENT_TO "enviada a" +#define D_KNX_WARNING "La dirección de grupo ( 0 / 0 / 0 ) está reservada y no puede ser utilizada." // xdrv_03_energy.ino #define D_ENERGY_TODAY "Energía Hoy" diff --git a/sonoff/xdrv_11_knx.ino b/sonoff/xdrv_11_knx.ino index 734c22c54..76fc1cf0c 100644 --- a/sonoff/xdrv_11_knx.ino +++ b/sonoff/xdrv_11_knx.ino @@ -22,8 +22,7 @@ * KNX support * * Using libraries: - * ESP KNX IP library (async-udp branch) (https://github.com/envy/esp-knx-ip/tree/async-udp) - * ESPAsyncUDP library (https://github.com/me-no-dev/ESPAsyncUDP) + * ESP KNX IP library (https://github.com/envy/esp-knx-ip) Constants in sonoff.h ----------------------- @@ -870,8 +869,6 @@ boolean Xdrv11(byte function) break; case FUNC_LOOP: knx.loop(); // Process knx events - // It is not used by the actual config of asyncUDP branch of ESP-KNX-IP Library, - // but is left here for compatibility with upcoming features of ESP-KNX-IP Library break; // case FUNC_COMMAND: // result = KNXCommand(); From b7ed866803fb0f9c86a221d662099bf9850b1cc3 Mon Sep 17 00:00:00 2001 From: Theo Arends Date: Thu, 19 Apr 2018 20:55:12 +0200 Subject: [PATCH 2/2] Update French with KNX (#2452) --- sonoff/language/fr-FR.h | 96 ++++++++++++++++++++--------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/sonoff/language/fr-FR.h b/sonoff/language/fr-FR.h index 26c0fe784..4cd410a9e 100644 --- a/sonoff/language/fr-FR.h +++ b/sonoff/language/fr-FR.h @@ -28,7 +28,7 @@ * Use online command StateText to translate ON, OFF, HOLD and TOGGLE. * Use online command Prefix to translate cmnd, stat and tele. * - * Updated until v5.12.0l + * Updated until v5.12.0m \*********************************************************************/ #define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English) @@ -133,14 +133,14 @@ #define D_SAVE "Enregistrer" #define D_SENSOR "Capteur" #define D_SSID "SSID" -#define D_START "Départ" +#define D_START "Lancer" // "Lancer la mise à jour" #define D_STD_TIME "STD" #define D_STOP "Stop" #define D_SUBNET_MASK "Masque sous-réseau" #define D_SUBSCRIBE_TO "Souscrire à" #define D_SUCCESSFUL "Réussi" -#define D_SUNRISE "Jour" // "Lever du soleil" <- maybe too long? -#define D_SUNSET "Nuit" // "Coucher du soleil" <- maybe too long? +#define D_SUNRISE "Lever du jour" +#define D_SUNSET "Tombée de la nuit" #define D_TEMPERATURE "Température" #define D_TO "à" #define D_TOGGLE "Inverser" @@ -148,7 +148,7 @@ #define D_TRANSMIT "Transmettre" #define D_TRUE "Vrai" #define D_TVOC "TVOC" -#define D_UPGRADE "mise à jour" +#define D_UPGRADE "la mise à jour" // "Lancer la mise à jour" #define D_UPLOAD "Upload" // Not better in french #define D_UPTIME "Durée d'activité" #define D_USER "Utilisateur" @@ -214,24 +214,24 @@ #define D_BUTTON_TOGGLE "on/off" #define D_CONFIGURATION "Configuration" #define D_INFORMATION "Information" -#define D_FIRMWARE_UPGRADE "Mise à jour Firmware" +#define D_FIRMWARE_UPGRADE "Mise à jour du Firmware" #define D_CONSOLE "Console" #define D_CONFIRM_RESTART "Confirmer redémarrage" -#define D_CONFIGURE_MODULE "Configuration Module" +#define D_CONFIGURE_MODULE "Configuration du Module" #define D_CONFIGURE_WIFI "Configuration WiFi" #define D_CONFIGURE_MQTT "Configuration MQTT" #define D_CONFIGURE_DOMOTICZ "Configuration Domoticz" -#define D_CONFIGURE_LOGGING "Configuration Logging" +#define D_CONFIGURE_LOGGING "Configuration du journal" #define D_CONFIGURE_OTHER "Autre configuration" #define D_CONFIRM_RESET_CONFIGURATION "Confirmer réinitialisation configuration" -#define D_RESET_CONFIGURATION "Réinitialisation Configuration" -#define D_BACKUP_CONFIGURATION "Sauvegarde Configuration" -#define D_RESTORE_CONFIGURATION "Restauration Configuration" +#define D_RESET_CONFIGURATION "Configuration par défaut" +#define D_BACKUP_CONFIGURATION "Sauvegarde de la config." +#define D_RESTORE_CONFIGURATION "Restauration de la config." #define D_MAIN_MENU "Menu principal" #define D_MODULE_PARAMETERS "Paramètres module" -#define D_MODULE_TYPE "Type module" +#define D_MODULE_TYPE "Type de module" #define D_GPIO "GPIO" #define D_SERIAL_IN "Serial In" #define D_SERIAL_OUT "Serial Out" @@ -241,8 +241,8 @@ #define D_SCAN_DONE "Scan terminé" #define D_NO_NETWORKS_FOUND "Aucun réseau trouvé" #define D_REFRESH_TO_SCAN_AGAIN "Rafraîchir pour scanner à nouveau" -#define D_DUPLICATE_ACCESSPOINT "AccessPoint dupliqué" -#define D_SKIPPING_LOW_QUALITY "Passe car mauvaise qualité" +#define D_DUPLICATE_ACCESSPOINT "Point d'Accès dupliqué" +#define D_SKIPPING_LOW_QUALITY "Évité car de mauvaise qualité" #define D_RSSI "RSSI" #define D_WEP "WEP" #define D_WPA_PSK "WPA PSK" @@ -256,13 +256,13 @@ #define D_CLIENT "Client" #define D_FULL_TOPIC "topic complet" -#define D_LOGGING_PARAMETERS "Paramètres journalisation" +#define D_LOGGING_PARAMETERS "Paramètres du journal" #define D_SERIAL_LOG_LEVEL "Niveau de journalisation série" #define D_WEB_LOG_LEVEL "Niveau de journalisation web" -#define D_SYS_LOG_LEVEL "Niveau syslog" +#define D_SYS_LOG_LEVEL "Niveau Syslog" #define D_MORE_DEBUG "Plus de debug" -#define D_SYSLOG_HOST "Hôte syslog" -#define D_SYSLOG_PORT "Port syslog" +#define D_SYSLOG_HOST "Hôte Syslog" +#define D_SYSLOG_PORT "Port Syslog" #define D_TELEMETRY_PERIOD "Période télémétrie" #define D_OTHER_PARAMETERS "Autres paramètres" @@ -274,11 +274,11 @@ #define D_SINGLE_DEVICE "module unique" #define D_MULTI_DEVICE "multi module" -#define D_SAVE_CONFIGURATION "Enregistrer configuration" +#define D_SAVE_CONFIGURATION "Enregistrer la configuration" #define D_CONFIGURATION_SAVED "Configuration enregistrée" #define D_CONFIGURATION_RESET "Configuration réinitialisée" -#define D_PROGRAM_VERSION "Version Programme" +#define D_PROGRAM_VERSION "Version du programme" #define D_BUILD_DATE_AND_TIME "Date & Heure de build" #define D_CORE_AND_SDK_VERSION "Version Core/SDK" #define D_FLASH_WRITE_COUNT "Compteur écriture flash" @@ -306,21 +306,21 @@ #define D_UPLOAD_DONE "Téléchargement terminé" #define D_UPLOAD_ERR_1 "Aucun fichier sélectionné" #define D_UPLOAD_ERR_2 "Espace insuffisant" -#define D_UPLOAD_ERR_3 "Magic byte n'est pas 0xE9" +#define D_UPLOAD_ERR_3 "L'octet magique n'est pas 0xE9" #define D_UPLOAD_ERR_4 "La taille du programme à flasher est plus grande que la taille réelle de la mémoire flash" -#define D_UPLOAD_ERR_5 "Erreur comparaison buffer de téléchargement" +#define D_UPLOAD_ERR_5 "Erreur de comparaison du buffer de téléchargement" #define D_UPLOAD_ERR_6 "Téléchargement échoué. Activation logging 3" #define D_UPLOAD_ERR_7 "Téléchargement annulé" #define D_UPLOAD_ERR_8 "Fichier invalide" #define D_UPLOAD_ERR_9 "Fichier trop grand" #define D_UPLOAD_ERROR_CODE "Code d'erreur téléchargement" -#define D_ENTER_COMMAND "Saisir commande" +#define D_ENTER_COMMAND "Saisir une commande" #define D_ENABLE_WEBLOG_FOR_RESPONSE "Activer weblog 2 si response attendue" #define D_NEED_USER_AND_PASSWORD "Nécessite utilisateur=&password=" // xdrv_00_mqtt.ino -#define D_FINGERPRINT "Vérification empreinte TLS ..." +#define D_FINGERPRINT "Vérification d'empreinte TLS ..." #define D_TLS_CONNECT_FAILED_TO "Échec de connexion TLS à" #define D_RETRY_IN "Nouvelle tentative dans" #define D_VERIFIED "Vérifié par empreinte " @@ -345,7 +345,7 @@ #define D_HUE_API_NOT_IMPLEMENTED "API Hue non implémentée" #define D_HUE_API "Hue API" #define D_HUE_POST_ARGS "Hue POST args" -#define D_3_RESPONSE_PACKETS_SENT "3 paquets response envoyés" +#define D_3_RESPONSE_PACKETS_SENT "3 paquets Response envoyés" // xdrv_05_domoticz.ino #define D_DOMOTICZ_PARAMETERS "Paramètres Domoticz" @@ -365,7 +365,7 @@ #define D_DOMOTICZ_UPDATE_TIMER "Durée de rafraichissement" // xdrv_09_timers.ino -#define D_CONFIGURE_TIMER "Configuration Timer" +#define D_CONFIGURE_TIMER "Configuration des Timers" #define D_TIMER_PARAMETERS "Paramètres Timer" #define D_TIMER_ARM "Armer" #define D_TIMER_TIME "Temps" @@ -375,24 +375,24 @@ #define D_TIMER_ACTION "Action" // xdrv_10_knx.ino -#define D_CONFIGURE_KNX "Configure KNX" -#define D_KNX_PARAMETERS "KNX Parameters" -#define D_KNX_GENERAL_CONFIG "General" -#define D_KNX_PHYSICAL_ADDRESS "Physical Address" -#define D_KNX_PHYSICAL_ADDRESS_NOTE "( Must be unique on the KNX network )" -#define D_KNX_ENABLE "Enable KNX" -#define D_KNX_GROUP_ADDRESS_TO_WRITE "Data to Send to Group Addresses" -#define D_ADD "Add" -#define D_DELETE "Delete" -#define D_REPLY "Reply" -#define D_KNX_GROUP_ADDRESS_TO_READ "Group Addresses to Receive Data from" +#define D_CONFIGURE_KNX "Configuration de KNX" +#define D_KNX_PARAMETERS "Paramètres KNX" +#define D_KNX_GENERAL_CONFIG "Général" +#define D_KNX_PHYSICAL_ADDRESS "Adresse individuelle" // Backbone/Line/Device -> Zone/Ligne/Participant +#define D_KNX_PHYSICAL_ADDRESS_NOTE "(Doit être unique sur le réseau KNX)" +#define D_KNX_ENABLE "Activer KNX" +#define D_KNX_GROUP_ADDRESS_TO_WRITE "Données à envoyer à les Adresses de Groupe" +#define D_ADD "Ajoûter" +#define D_DELETE "Supprimer" +#define D_REPLY "Répondre" +#define D_KNX_GROUP_ADDRESS_TO_READ "Données à recevoir des Adresses de Groupe" #define D_LOG_KNX "KNX: " -#define D_RECEIVED_FROM "Received from" -#define D_KNX_COMMAND_WRITE "Write" -#define D_KNX_COMMAND_READ "Read" -#define D_KNX_COMMAND_OTHER "Other" -#define D_SENT_TO "sent to" -#define D_KNX_WARNING "The group address ( 0 / 0 / 0 ) is reserved and can not be used." +#define D_RECEIVED_FROM "Reçu de" +#define D_KNX_COMMAND_WRITE "Écrire" +#define D_KNX_COMMAND_READ "Lire" +#define D_KNX_COMMAND_OTHER "Autre" +#define D_SENT_TO "envoyé à" +#define D_KNX_WARNING "L'Adresse de Groupe ( 0 / 0 / 0 ) est réservée et ne peut être utilisée." // xsns_03_energy.ino #define D_ENERGY_TODAY "Énergie aujourd'hui" @@ -412,7 +412,7 @@ #define D_CHECKSUM_FAILURE "Erreur checksum" // xsns_07_sht1x.ino -#define D_SENSOR_DID_NOT_ACK_COMMAND "Le capteur n'a pas ACK la commande" +#define D_SENSOR_DID_NOT_ACK_COMMAND "Le capteur n'a pas acquitté la commande" #define D_SHT1X_FOUND "SHT1X found" // xsns_18_pms5003.ino @@ -454,12 +454,12 @@ // Units #define D_UNIT_AMPERE "A" #define D_UNIT_HOUR "h" -#define D_UNIT_KILOOHM "kOhm" +#define D_UNIT_KILOOHM "kΩ" #define D_UNIT_KILOWATTHOUR "kWh" #define D_UNIT_LUX "lx" -#define D_UNIT_MICROGRAM_PER_CUBIC_METER "ug/m3" -#define D_UNIT_MICROMETER "um" -#define D_UNIT_MICROSECOND "us" +#define D_UNIT_MICROGRAM_PER_CUBIC_METER "µg/m3" +#define D_UNIT_MICROMETER "µm" +#define D_UNIT_MICROSECOND "µs" #define D_UNIT_MILLIAMPERE "mA" #define D_UNIT_MILLISECOND "ms" #define D_UNIT_MINUTE "Min"