diff --git a/src/WebApi_sysstatus.cpp b/src/WebApi_sysstatus.cpp index c392d6cb4..cca3c2969 100644 --- a/src/WebApi_sysstatus.cpp +++ b/src/WebApi_sysstatus.cpp @@ -69,8 +69,12 @@ void WebApiSysstatusClass::onSystemStatus(AsyncWebServerRequest* request) root["uptime"] = esp_timer_get_time() / 1000000; - root["radio_connected"] = Hoymiles.getRadioNrf()->isConnected(); - root["radio_pvariant"] = Hoymiles.getRadioNrf()->isPVariant(); + root["nrf_configured"] = Hoymiles.getRadioNrf()->isInitialized(); + root["nrf_connected"] = Hoymiles.getRadioNrf()->isConnected(); + root["nrf_pvariant"] = Hoymiles.getRadioNrf()->isPVariant(); + + root["cmt_configured"] = Hoymiles.getRadioCmt()->isInitialized(); + root["cmt_connected"] = Hoymiles.getRadioCmt()->isConnected(); response->setLength(); request->send(response); diff --git a/webapp/src/components/RadioInfo.vue b/webapp/src/components/RadioInfo.vue index 8f16a212b..a59cee45d 100644 --- a/webapp/src/components/RadioInfo.vue +++ b/webapp/src/components/RadioInfo.vue @@ -4,27 +4,61 @@ - + - + + + + + + + + + + + + +
{{ $t('radioinfo.ChipStatus') }}{{ $t('radioinfo.Status', { module: "nRF24" }) }} - +
{{ $t('radioinfo.ChipType') }}{{ $t('radioinfo.ChipStatus', { module: "nRF24" }) }} + v-if="systemStatus.nrf_configured && systemStatus.nrf_connected">{{ $t('radioinfo.Connected') }} + v-else-if="systemStatus.nrf_configured && !systemStatus.nrf_connected">{{ $t('radioinfo.NotConnected') }} + +
{{ $t('radioinfo.ChipType', { module: "nRF24" }) }} + + +
{{ $t('radioinfo.Status', { module: "CMT2300a" }) }} + +
{{ $t('radioinfo.ChipStatus', { module: "CMT2300a" }) }} + + + + +
diff --git a/webapp/src/locales/de.json b/webapp/src/locales/de.json index 699f77471..b322e736a 100644 --- a/webapp/src/locales/de.json +++ b/webapp/src/locales/de.json @@ -187,10 +187,13 @@ }, "radioinfo": { "RadioInformation": "Funkmodulinformationen", - "ChipStatus": "Chip-Status", - "ChipType": "Chip-Typ", + "Status": "{module} Status", + "ChipStatus": "{module} Chip-Status", + "ChipType": "{module} Chip-Type", "Connected": "verbunden", "NotConnected": "nicht verbunden", + "Configured": "konfiguriert", + "NotConfigured": "nicht konfiguriert", "Unknown": "unbekannt" }, "networkinfo": { diff --git a/webapp/src/locales/en.json b/webapp/src/locales/en.json index 11748f0f0..f930ae13b 100644 --- a/webapp/src/locales/en.json +++ b/webapp/src/locales/en.json @@ -187,10 +187,13 @@ }, "radioinfo": { "RadioInformation": "Radio Information", - "ChipStatus": "Chip Status", - "ChipType": "Chip Type", + "Status": "{module} Status", + "ChipStatus": "{module} Chip Status", + "ChipType": "{module} Chip Type", "Connected": "connected", "NotConnected": "not connected", + "Configured": "configured", + "NotConfigured": "not configured", "Unknown": "Unknown" }, "networkinfo": { diff --git a/webapp/src/locales/fr.json b/webapp/src/locales/fr.json index d45ecaae3..5f86d1fd6 100644 --- a/webapp/src/locales/fr.json +++ b/webapp/src/locales/fr.json @@ -187,10 +187,13 @@ }, "radioinfo": { "RadioInformation": "Informations sur la radio", - "ChipStatus": "État de la puce", - "ChipType": "Type de puce", + "Status": "{module} Status", + "ChipStatus": "{module} sÉtat de la puce", + "ChipType": "{module} Type de puce", "Connected": "connectée", "NotConnected": "non connectée", + "Configured": "configured", + "NotConfigured": "not configured", "Unknown": "Inconnue" }, "networkinfo": { diff --git a/webapp/src/types/SystemStatus.ts b/webapp/src/types/SystemStatus.ts index 6be634cd5..80b86c0d9 100644 --- a/webapp/src/types/SystemStatus.ts +++ b/webapp/src/types/SystemStatus.ts @@ -25,6 +25,9 @@ export interface SystemStatus { sketch_total: number; sketch_used: number; // RadioInfo - radio_connected: boolean; - radio_pvariant: boolean; + nrf_configured: boolean; + nrf_connected: boolean; + nrf_pvariant: boolean; + cmt_configured: boolean; + cmt_connected: boolean; } \ No newline at end of file