tsightler / ring-mqtt

Ring devices to MQTT Bridge
MIT License
603 stars 106 forks source link

How do I get mosquitto self-signed data into the docker container? #796

Closed zraken closed 8 months ago

zraken commented 8 months ago

Describe the Issue

I'm using mosquitto with TLS and I was able to get this to work fine on a standalone container where I mapped a "certs" directory with all the related info in there. The issue is that now I'm using ring-mqtt as an Addon and not sure how to set it up where I could map a volume from the parent homeassistant directory.

Steps take so far

Tried scp from within the container but it is not installed

Log Output

2024-03-05T23:30:37.410Z ring-mqtt Error: ENOENT: no such file or directory, open 'certs/mosquittoTLS/ca.crt'
    at Object.openSync (node:fs:603:3)
    at Object.readFileSync (node:fs:471:35)
    at file:///app/ring-mqtt/lib/mqtt.js:65:61
    at Array.forEach (<anonymous>)
    at Mqtt.init (file:///app/ring-mqtt/lib/mqtt.js:58:52)
    at EventEmitter.<anonymous> (file:///app/ring-mqtt/lib/mqtt.js:27:22)
2024-03-05T23:30:37.411Z ring-mqtt Could not parse MQTT advanced options, continuing with default settings

Screenshots

No response

Config File

mqtt_options:
--rejectUnauthorized=false,--ca=certs/mosquittoTLS/ca.crt,--cert=certs/mosquittoTLS/server.crt,--key=certs/mosquittoTLS/server.key,--passphrase=''

Install Type

Home assistant addon

Version

5.6.3

Operating System

Home assistant OS

Architecture

x86_64

tsightler commented 8 months ago

Addons map /ssl from the hassio environment to /ssl in the container environment so you just need to place your files there, like all other ssl files in HAOS.

zraken commented 8 months ago

Thanks, that helped.