if (!mosq)
die("Mosquitto: initialization failed");
+ 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_will_set(mosq, "status/arexxd", 4, "dead", 0, true) != MOSQ_ERR_SUCCESS)
die("Mosquitto: unable to set will");
mosquitto_connect_callback_set(mosq, mqtt_conn_callback);
- if (mosquitto_connect(mosq, "10.32.184.5", 1883, 60) != MOSQ_ERR_SUCCESS)
+ if (mosquitto_connect(mosq, "burrow-mqtt", 8883, 60) != MOSQ_ERR_SUCCESS)
die("Mosquitto: connect failed");
if (mosquitto_loop_start(mosq))
*/
switch (id) {
case 10415:
- *name = "kitchen";
+ *name = "terarium";
return val - 0.93;
case 10707:
*name = "catarium";