Skip to content

Commit

Permalink
mathieucarbou/MycilaESPConnect @ 7.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieucarbou committed Nov 12, 2024
1 parent 93d8210 commit 6aae2cf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ lib_deps =
mathieucarbou/ESPAsyncWebServer @ 3.3.22
mathieucarbou/MycilaConfig @ 6.0.2
mathieucarbou/MycilaDS18 @ 4.1.0
mathieucarbou/MycilaESPConnect @ 6.1.1
mathieucarbou/MycilaESPConnect @ 7.0.0
mathieucarbou/MycilaEasyDisplay @ 3.0.2
mathieucarbou/MycilaHADiscovery @ 5.0.1
mathieucarbou/MycilaJSY @ 11.1.3
Expand Down
2 changes: 1 addition & 1 deletion src/Website.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ void YaSolR::WebsiteClass::initCards() {
_firmwareBuildTimestamp.set(Mycila::AppInfo.buildDate.c_str());
_firmwareFilename.set(Mycila::AppInfo.firmware.c_str());
_networkAPMAC.set(espConnect.getMACAddress(Mycila::ESPConnect::Mode::AP).c_str());
_networkEthMAC.set(espConnect.getMACAddress(Mycila::ESPConnect::Mode::ETH).isEmpty() ? "N/A" : espConnect.getMACAddress(Mycila::ESPConnect::Mode::ETH).c_str());
_networkEthMAC.set(espConnect.getMACAddress(Mycila::ESPConnect::Mode::ETH).empty() ? "N/A" : espConnect.getMACAddress(Mycila::ESPConnect::Mode::ETH).c_str());
_networkHostname.set(Mycila::AppInfo.defaultHostname.c_str());
_networkWiFiMAC.set(espConnect.getMACAddress(Mycila::ESPConnect::Mode::STA).c_str());

Expand Down
22 changes: 11 additions & 11 deletions src/tasks/MQTT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ Mycila::Task mqttPublishStaticTask("MQTT Static", Mycila::TaskType::ONCE, [](voi
mqtt.publish(baseTopic + "/system/firmware/filename", Mycila::AppInfo.firmware, true);
yield();

mqtt.publish(baseTopic + "/system/network/eth/mac_address", espConnect.getMACAddress(Mycila::ESPConnect::Mode::ETH), true);
mqtt.publish(baseTopic + "/system/network/hostname", espConnect.getHostname(), true);
mqtt.publish(baseTopic + "/system/network/wifi/mac_address", espConnect.getMACAddress(Mycila::ESPConnect::Mode::STA), true);
mqtt.publish(baseTopic + "/system/network/eth/mac_address", espConnect.getMACAddress(Mycila::ESPConnect::Mode::ETH).c_str(), true);
mqtt.publish(baseTopic + "/system/network/hostname", espConnect.getHostname().c_str(), true);
mqtt.publish(baseTopic + "/system/network/wifi/mac_address", espConnect.getMACAddress(Mycila::ESPConnect::Mode::STA).c_str(), true);
yield();
});

Expand Down Expand Up @@ -99,15 +99,15 @@ Mycila::Task mqttPublishTask("MQTT", [](void* params) {
mqtt.publish(baseTopic + "/system/device/uptime", String(Mycila::System::getUptime()));
yield();

mqtt.publish(baseTopic + "/system/network/eth/ip_address", espConnect.getIPAddress(Mycila::ESPConnect::Mode::ETH).toString());
mqtt.publish(baseTopic + "/system/network/ip_address", espConnect.getIPAddress().toString());
mqtt.publish(baseTopic + "/system/network/mac_address", espConnect.getMACAddress());
mqtt.publish(baseTopic + "/system/network/eth/ip_address", espConnect.getIPAddress(Mycila::ESPConnect::Mode::ETH).toString().c_str());
mqtt.publish(baseTopic + "/system/network/ip_address", espConnect.getIPAddress().toString().c_str());
mqtt.publish(baseTopic + "/system/network/mac_address", espConnect.getMACAddress().c_str());
mqtt.publish(baseTopic + "/system/network/ntp", YASOLR_STATE(Mycila::NTP.isSynced()));
mqtt.publish(baseTopic + "/system/network/wifi/bssid", espConnect.getWiFiBSSID());
mqtt.publish(baseTopic + "/system/network/wifi/ip_address", espConnect.getIPAddress(Mycila::ESPConnect::Mode::STA).toString());
mqtt.publish(baseTopic + "/system/network/wifi/quality", String(espConnect.getWiFiSignalQuality()));
mqtt.publish(baseTopic + "/system/network/wifi/rssi", String(espConnect.getWiFiRSSI()));
mqtt.publish(baseTopic + "/system/network/wifi/ssid", espConnect.getWiFiSSID());
mqtt.publish(baseTopic + "/system/network/wifi/bssid", espConnect.getWiFiBSSID().c_str());
mqtt.publish(baseTopic + "/system/network/wifi/ip_address", espConnect.getIPAddress(Mycila::ESPConnect::Mode::STA).toString().c_str());
mqtt.publish(baseTopic + "/system/network/wifi/quality", String(espConnect.getWiFiSignalQuality()).c_str());
mqtt.publish(baseTopic + "/system/network/wifi/rssi", String(espConnect.getWiFiRSSI()).c_str());
mqtt.publish(baseTopic + "/system/network/wifi/ssid", espConnect.getWiFiSSID().c_str());
yield();

switch (espConnect.getMode()) {
Expand Down

0 comments on commit 6aae2cf

Please sign in to comment.