Add .env support for transport and sound device configuration

- Add python-dotenv support to control_server.py and sound.py
- Load TRANSPORT from environment variable (default: spi)
- Load AUDIO_INPUT_DEVICE from environment variable (default: 7)
- Load all port configurations from environment variables
- Update .env.example with comprehensive configuration options
- Create .env file with sensible defaults for Pi
- Transport, sound device, and network settings now configurable via .env
This commit is contained in:
Pi User
2025-10-03 20:19:55 +13:00
parent fbf4205c87
commit e78a8727b2
6 changed files with 68 additions and 11 deletions

10
Pipfile.lock generated
View File

@@ -1,7 +1,7 @@
{
"_meta": {
"hash": {
"sha256": "3f3ca9af45dd4382aac3c649ae11cefbe97059ad14f40172735213c4919baada"
"sha256": "db66b0f2b4e51e5a0bc2edc0d89af123c03928c72add32c16ba955eaefc34da7"
},
"pipfile-spec": 6,
"requires": {
@@ -162,6 +162,14 @@
"index": "pypi",
"version": "==0.2.14"
},
"python-dotenv": {
"hashes": [
"sha256:31f23644fe2602f88ff55e1f5c79ba497e01224ee7737937930c448e4d0e24dc",
"sha256:a8a6399716257f45be6a007360200409fce5cda2661e3dec71d23dc15f6189ab"
],
"index": "pypi",
"version": "==1.1.1"
},
"python-rtmidi": {
"hashes": [
"sha256:052c89933cae4fca354012d8ca7248f4f9e1e3f062471409d48415a7f7d7e59e",