.topic = "burrow/temp/garage"
},
{
- .metric = "temp,where=kitchen",
+ .metric = "temp,where=terarium",
.value_name = "t",
- .topic = "burrow/temp/kitchen"
+ .topic = "burrow/temp/terarium"
},
{
.metric = "rh,where=ursarium",
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))