]> mj.ucw.cz Git - home-hw.git/commitdiff
Influx: New BSB attributes + split attributes to sections
authorMartin Mares <mj@ucw.cz>
Sun, 23 Feb 2025 18:57:18 +0000 (19:57 +0100)
committerMartin Mares <mj@ucw.cz>
Sun, 23 Feb 2025 18:57:18 +0000 (19:57 +0100)
influx/burrow-influx.c

index 1b9604ae2e5c14ee29cb3acad91889eac277294a..ff1697dd8f871501485979d01e261fad32c0b773 100644 (file)
@@ -39,6 +39,7 @@ struct attr {
 };
 
 static const struct attr attr_table[] = {
+       // Temperature sensors
        {
                .metric = "temp,where=loft",
                .value_name = "t",
@@ -79,6 +80,8 @@ static const struct attr attr_table[] = {
                .value_name = "pa",
                .topic = "burrow/pressure/clock"
        },
+
+       // Air conditioning
        {
                .metric = "air,where=inside_intake",
                .value_name = "t",
@@ -124,16 +127,22 @@ static const struct attr attr_table[] = {
                .value_name = "pwm",
                .topic = "burrow/air/exchanger-fan"
        },
+
+       // Ventilation of the loft
        {
                .metric = "loft_fan",
                .value_name = "on",
                .topic = "burrow/loft/fan"
        },
+
+       // Hot water circulation
        {
                .metric = "water_circ",
                .value_name = "on",
                .topic = "burrow/loft/circulation"
        },
+
+       // Power meter
        {
                .metric = "pm_voltage,phase=L1N",
                .value_name = "V",
@@ -184,6 +193,9 @@ static const struct attr attr_table[] = {
                .value_name = "kVArh",
                .topic = "burrow/power/reactive/energy",
        },
+
+       // Quantities collected by bsb-daemon eavesdropping on regular BSB communication,
+       // which is scarce. So we need large timeouts.
        {
                .metric = "heating_water_pressure",
                .value_name = "p",
@@ -244,12 +256,6 @@ static const struct attr attr_table[] = {
                .topic = "burrow/heating/water/active",
                .timeout = 660,
        },
-       {
-               .metric = "heating_hot_water_temp",
-               .value_name = "t",
-               .topic = "burrow/heating/water/temp",
-               // No need to specify large timeout, this one is polled by bsb-daemon
-       },
        {
                .metric = "heating_error",
                .value_name = "err",
@@ -263,6 +269,25 @@ static const struct attr attr_table[] = {
                .timeout = 660,
                .is_string = true,
        },
+
+       // Quantities are polled by the bsb-daemon, so they don't need a large timeout
+       {
+               .metric = "heating_hot_water_temp",
+               .value_name = "t",
+               .topic = "burrow/heating/water/temp",
+       },
+       {
+               .metric = "heating_modulation",
+               .value_name = "pct",
+               .topic = "burrow/heating/modulation",
+       },
+       {
+               .metric = "heating_return_tem",
+               .value_name = "t",
+               .topic = "burrow/heating/return-temp",
+       },
+
+       // Sensors in the mill
        {
                .metric = "mill_temp,where=horni",
                .value_name = "t",