michaelarnauts / cec-mqtt-bridge

A HDMI-CEC to MQTT bridge for connecting HDMI-CEC-devices to your Home Automation system.
145 stars 48 forks source link

Document environment variables usage #15

Closed renemarc closed 5 years ago

renemarc commented 5 years ago

In order to fully distance oneself from the obligation of using config files, we should allow most/all configuration properties to be defined using environment variables. Useful when using Docker on multiple devices!

Edit: In my haste I had not noticed that environment variables where already read in the following code block. I am therefore downgrading this PR to a simple documentation improvement.

https://github.com/michaelarnauts/cec-mqtt-bridge/blob/d6a4937d5f563f533c18b7c4aec884e15e989797/bridge.py#L224-L229

In my case, I am using Resin.io for orchestrating Docker/Balena deployments, which opens the possibility of having a single build deployed to multiple TV sets (well, to their respective RPis). All devices therefore share an identical code base and just rely on fleet-wide and device-specific environment variables. Yay, less micro-management! 😃

michaelarnauts commented 5 years ago

Thanks!