99% done, need your help passing variables

Hey guys,

I’ve forked a great docker container which connects Cbus to MQTT, allowing Cbus lighting and control systems to connect into the ecosystem.
https://github.com/lowgoz/Cbus-2-HA - i’ve uploaded my code here FYI.

I spent most of last night reading and trying to get config.json variables through to .sh that the dockerfile calls when run - hoping for your help. It’s a mess, i know.

the docker calls the entrypoint-cmqttd.sh file when run, and i’ve managed to get it manually working by amending the final line of the dockerfile to manually pass the arguments through.

there is scope here for config to reflect the variables and the entrypoint.sh file to use them when launching the add on, as an example in the entrypoint-cmqttd.sh:

# Simple arguments
if [ -n "${MQTT_PORT}" ]; then
    CMQTTD_ARGS="${CMQTTD_ARGS} --broker-port ${MQTT_PORT}"

This then compiles the correct arguments based on user config in HA and then commands cmqtd with the appropriate flags

can someone point out where I’ve gone wrong, as the config variables i’ve set up are not being passed through to https://github.com/lowgoz/Cbus-2-HA/blob/c668dcb391425801b24691dd89e9cade0fab0ece/entrypoint-cmqttd.sh ? You can see my commented out attempts in the code, and i think it’s got to be something simple that i’ve missed.

I am using legacy mode to pass config variables into environment.
Example: https://github.com/fuatakgun/eufy_security_addon/blob/0f4d80cfd5c8f2592f823d13ed9148018a84a880/config.json#L21

More over here: Add-On Configuration | Home Assistant Developer Docs