Community
OpenEnergyMonitor

OpenEnergyMonitor Community

Emoncms + Self-signed certificate + MQTT

Tags: #<Tag:0x00007fc9b68a8b58>

Hi, I’ve secured my Mosquitto installation adding a self-signed certificate to it. It is working. However, emonhub only configure user and password. I’ve also checked doc and I can’t find a way to point cafile to communicate emoncms with my mosquitto server.

I found that emoncms_mqtt.php only calls for user and pass anyway.

try {
                // SUBSCRIBE
                $log->warn("Not connected, retrying connection");
                $mqtt_client->setCredentials($settings['mqtt']['user'],$settings['mqtt']['password']);
                $mqtt_client->connect($settings['mqtt']['host'], $settings['mqtt']['port'], 5);
                // moved subscribe to onConnect callback

            } catch (Exception $e) {
                $log->error($e);
                $subscribed = 0;
            }

Am I missing something?