cflurin / homebridge-mqtt

Homebridge-mqtt is a Plugin for Homebridge.
Apache License 2.0
229 stars 39 forks source link

cert issue #78

Closed Austinthemighty closed 5 years ago

Austinthemighty commented 5 years ago

Every time I run homebridge it keeps spitting this out

[2019-4-19 22:17:40] [mqtt] Number of cached Accessories: 0
[2019-4-19 22:17:40] Error: ENOENT: no such file or directory, open '/home/pi/key.pem'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.readFileSync (fs.js:551:33)
    at Model.start (/usr/lib/node_modules/homebridge-mqtt/lib/model.js:54:22)
    at Controller.start (/usr/lib/node_modules/homebridge-mqtt/lib/controller.js:361:14)
    at PluginPlatform.<anonymous> (/usr/lib/node_modules/homebridge-mqtt/index.js:70:23)
    at emitNone (events.js:111:20)
    at API.emit (events.js:208:7)
    at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:103:13)
    at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:59:10)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Function.Module.runMain (module.js:694:10)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3
[2019-4-19 22:17:40] Got SIGTERM, shutting down Homebridge...

i have determined it to be an issue with the cert, the key, and the ca.

"cert": "/path/to/certificate.pem",
"key": "path/to/key.pem",
"ca": "/path/to/ca_certificate.pem",

where do i find/ how do i make these files?

cflurin commented 5 years ago

Hi,

cert, key and ca are optional. If you don't need them, just delete them in the config.json.