make DEBUG an environment variable
This commit is contained in:
parent
8b7312b6fc
commit
285af11af7
|
@ -7,7 +7,8 @@ The plan:
|
||||||
1. Use Fauxmo to create a virtual switch 'Movie Lights' recognized on the
|
1. Use Fauxmo to create a virtual switch 'Movie Lights' recognized on the
|
||||||
NAS at port 20000
|
NAS at port 20000
|
||||||
2. Fauxmo will run in a docker file and be able to talk to another container,
|
2. Fauxmo will run in a docker file and be able to talk to another container,
|
||||||
which runs our golang executable. Other container IP will be 172.31.0.243
|
which runs our golang executable. Other container host will be movielights
|
||||||
|
(added via add-host option)
|
||||||
3. Our golang executable will then talk to the actual wemo switches
|
3. Our golang executable will then talk to the actual wemo switches
|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
|
|
|
@ -31,6 +31,7 @@ import requests
|
||||||
import select
|
import select
|
||||||
import socket
|
import socket
|
||||||
import struct
|
import struct
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
import uuid
|
import uuid
|
||||||
|
@ -52,7 +53,7 @@ SETUP_XML = """<?xml version="1.0"?>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
DEBUG = False
|
DEBUG = os.getenv("DEBUG", "FALSE") == "TRUE"
|
||||||
|
|
||||||
|
|
||||||
def dbg(msg):
|
def dbg(msg):
|
||||||
|
@ -384,8 +385,8 @@ FAUXMOS = [
|
||||||
[
|
[
|
||||||
'Movie Lights',
|
'Movie Lights',
|
||||||
rest_api_handler(
|
rest_api_handler(
|
||||||
'http://172.31.0.243:8081/basement?moviemode=true',
|
'http://movielights:8081/basement?moviemode=true',
|
||||||
'http://172.31.0.243:8081/basement?moviemode=false'
|
'http://movielights:8081/basement?moviemode=false'
|
||||||
),
|
),
|
||||||
20000
|
20000
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user