]> mj.ucw.cz Git - home-hw.git/blobdiff - influx/burrow-influx.c
Auto: Meditation mode turned off
[home-hw.git] / influx / burrow-influx.c
index 9f8176d5503eb8cc18799d1b195d673419fa7fc3..ce5baf247e4d88ea230f1f07e11a70223db0153c 100644 (file)
@@ -124,12 +124,11 @@ static const struct attr attr_table[] = {
                .value_name = "pwm",
                .topic = "burrow/air/exchanger-fan"
        },
-#if 0
        {
                .metric = "loft_fan",
+               .value_name = "on",
                .topic = "burrow/loft/fan"
        },
-#endif
        {
                .metric = "water_circ",
                .value_name = "on",
@@ -434,7 +433,10 @@ int main(int argc UNUSED, char **argv)
        if (mosquitto_will_set(mosq, "status/influx", 4, "dead", 0, true) != MOSQ_ERR_SUCCESS)
                die("Mosquitto: unable to set will");
 
-       if (mosquitto_connect_async(mosq, "10.32.184.5", 1883, 60) != MOSQ_ERR_SUCCESS)
+       if (mosquitto_tls_set(mosq, "/etc/burrow-mqtt/ca.crt", NULL, "/etc/burrow-mqtt/client.crt", "/etc/burrow-mqtt/client.key", NULL) != MOSQ_ERR_SUCCESS)
+               die("Mosquitto: unable to set TLS parameters");
+
+       if (mosquitto_connect_async(mosq, "burrow-mqtt", 8883, 60) != MOSQ_ERR_SUCCESS)
                die("Mosquitto: connect failed");
 
        if (mosquitto_loop_start(mosq))