diff --git a/Network.cpp b/Network.cpp index 72568a2..61db484 100644 --- a/Network.cpp +++ b/Network.cpp @@ -65,7 +65,9 @@ void Network::loop() { // We are doing this every 60 seconds because of the BS related to // the MDNS library. The original library required manual updates // to the MDNS or it would lose its hostname after 2 minutes. - if(this->lastMDNS != 0) MDNS.setInstanceName(settings.hostname); + //if(this->lastMDNS != 0) MDNS.setInstanceName(settings.hostname); + + // Every 60 seconds we are going to look at wifi connectivity // to get around the roaming issues with ESP32. We will try to do this in an async manner. If // there is a channel that is better we will stop the radio and reconnect @@ -153,7 +155,7 @@ void Network::emitSockets() { } } void Network::emitSockets(uint8_t num) { - char buf[128]; + //char buf[128]; if(this->connType == conn_types::ethernet) { JsonSockEvent *json = sockEmit.beginEmit("ethernet"); json->beginObject(); @@ -175,8 +177,8 @@ void Network::emitSockets(uint8_t num) { JsonSockEvent *json = sockEmit.beginEmit("wifiStrength"); json->beginObject(); json->addElem("ssid", WiFi.SSID().c_str()); - json->addElem("strength", (uint32_t)WiFi.RSSI()); - json->addElem("channel", (uint32_t)this->channel); + json->addElem("strength", (int32_t)WiFi.RSSI()); + json->addElem("channel", (int32_t)this->channel); json->endObject(); sockEmit.endEmit(num); /* @@ -339,7 +341,7 @@ void Network::setConnected(conn_types connType) { SSDP.setActive(0, true); if(MDNS.begin(settings.hostname)) { Serial.printf("MDNS Responder Started: serverId=%s\n", settings.serverId); - //MDNS.addService("http", "tcp", 80); + MDNS.addService("http", "tcp", 80); //MDNS.addServiceTxt("http", "tcp", "board", "ESP32"); //MDNS.addServiceTxt("http", "tcp", "model", "ESPSomfyRTS"); diff --git a/Somfy.cpp b/Somfy.cpp index 274894e..f98176c 100644 --- a/Somfy.cpp +++ b/Somfy.cpp @@ -4495,7 +4495,7 @@ void Transceiver::emitFrame(somfy_frame_t *frame, somfy_rx_t *rx) { json->addElem("address", (uint32_t)frame->remoteAddress); json->addElem("rcode", (uint32_t)frame->rollingCode); json->addElem("command", translateSomfyCommand(frame->cmd).c_str()); - json->addElem("rssi", (uint32_t)frame->rssi); + json->addElem("rssi", (int32_t)frame->rssi); json->addElem("bits", rx->bit_length); json->addElem("proto", static_cast(frame->proto)); json->addElem("valid", frame->valid); diff --git a/SomfyController.ino.esp32.bin b/SomfyController.ino.esp32.bin index 547befe..6ae1ecc 100644 Binary files a/SomfyController.ino.esp32.bin and b/SomfyController.ino.esp32.bin differ diff --git a/SomfyController.ino.esp32s3.bin b/SomfyController.ino.esp32s3.bin index d311bf7..e35a946 100644 Binary files a/SomfyController.ino.esp32s3.bin and b/SomfyController.ino.esp32s3.bin differ diff --git a/SomfyController.littlefs.bin b/SomfyController.littlefs.bin index 0a9d30d..a598aa8 100644 Binary files a/SomfyController.littlefs.bin and b/SomfyController.littlefs.bin differ diff --git a/data/index.js b/data/index.js index cfd383e..564b95d 100644 --- a/data/index.js +++ b/data/index.js @@ -1884,6 +1884,7 @@ class Wifi { }); } procWifiStrength(strength) { + //console.log(strength); let ssid = strength.ssid || strength.name; document.getElementById('spanNetworkSSID').innerHTML = !ssid || ssid === '' ? '-------------' : ssid; document.getElementById('spanNetworkChannel').innerHTML = isNaN(strength.channel) || strength.channel < 0 ? '--' : strength.channel;