mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-04 11:41:38 +02:00
Merge branch 'development03' into hms
This commit is contained in:
commit
25d018840b
4 changed files with 20 additions and 4 deletions
|
@ -18,6 +18,8 @@ Prometheus metrics provided at `/metrics`.
|
|||
| Metric name | Type | Description | Labels |
|
||||
|----------------------------------------|---------|--------------------------------------------------------|--------------|
|
||||
| `ahoy_solar_info` | Gauge | Information about the AhoyDTU device | version, image, devicename |
|
||||
| `ahoy_solar_uptime` | Counter | Seconds since boot of the AhoyDTU device | devicename |
|
||||
| `ahoy_solar_rssi_db` | Gauge | Quality of the Wifi STA connection | devicename |
|
||||
| `ahoy_solar_inverter_info` | Gauge | Information about the configured inverter(s) | name, serial |
|
||||
| `ahoy_solar_inverter_enabled` | Gauge | Is the inverter enabled? | inverter |
|
||||
| `ahoy_solar_inverter_is_available` | Gauge | is the inverter available? | inverter |
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
|
||||
(starting from release version `0.5.66`)
|
||||
|
||||
## 0.5.107
|
||||
* fix: show save message
|
||||
* fix: removed serial newline for `enqueueCmd`
|
||||
* Merged improved Prometheus #808
|
||||
|
||||
## 0.5.106
|
||||
* merged MI and debug message changes #804
|
||||
* fixed MQTT autodiscover #794, #632
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//-------------------------------------
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 5
|
||||
#define VERSION_PATCH 106
|
||||
#define VERSION_PATCH 107
|
||||
|
||||
//-------------------------------------
|
||||
typedef struct {
|
||||
|
|
|
@ -688,8 +688,17 @@ class Web {
|
|||
mApp->getVersion(), mConfig->sys.deviceName);
|
||||
metrics = String(type) + String(topic);
|
||||
|
||||
snprintf(topic,sizeof(topic),"# TYPE ahoy_solar_freeheap gauge\nahoy_solar_freeheap{devicename=\"%s\"} %u\n",mConfig->sys.deviceName,ESP.getFreeHeap());
|
||||
metrics += String(topic);
|
||||
snprintf(type,sizeof(type),"# TYPE ahoy_solar_freeheap gauge\n");
|
||||
snprintf(topic,sizeof(topic),"ahoy_solar_freeheap{devicename=\"%s\"} %u\n",mConfig->sys.deviceName,ESP.getFreeHeap());
|
||||
metrics += String(type) + String(topic);
|
||||
|
||||
snprintf(type,sizeof(type),"# TYPE ahoy_solar_uptime counter\n");
|
||||
snprintf(topic,sizeof(topic),"ahoy_solar_uptime{devicename=\"%s\"} %u\n", mConfig->sys.deviceName, mApp->getUptime());
|
||||
metrics += String(type) + String(topic);
|
||||
|
||||
snprintf(type,sizeof(type),"# TYPE ahoy_solar_wifi_rssi_db gauge\n");
|
||||
snprintf(topic,sizeof(topic),"ahoy_solar_wifi_rssi_db{devicename=\"%s\"} %d\n", mConfig->sys.deviceName, WiFi.RSSI());
|
||||
metrics += String(type) + String(topic);
|
||||
|
||||
// NRF Statistics
|
||||
stat = mApp->getStatistics();
|
||||
|
@ -799,7 +808,7 @@ class Web {
|
|||
|
||||
String radioStatistic(String statistic, uint32_t value) {
|
||||
char type[60], topic[80], val[25];
|
||||
snprintf(type, sizeof(type), "# TYPE ahoy_solar_radio_%s gauge",statistic.c_str());
|
||||
snprintf(type, sizeof(type), "# TYPE ahoy_solar_radio_%s counter",statistic.c_str());
|
||||
snprintf(topic, sizeof(topic), "ahoy_solar_radio_%s",statistic.c_str());
|
||||
snprintf(val, sizeof(val), "%d", value);
|
||||
return ( String(type) + "\n" + String(topic) + " " + String(val) + "\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue