Error message

master
E. Almqvist 4 years ago
parent 4b50fe5554
commit e12ef3c903
  1. 4
      modules/hue/hue_controller.py
  2. 10
      setup.sh

@ -178,9 +178,13 @@ class controller:
else:
BRIDGE_ADDRESS = APIrequest.fetchBridgeIP()
try:
jsonLights = loop.run_until_complete(APIrequest.get("/lights"))
global LIGHTS
LIGHTS = json.loads(jsonLights.text)
except Exception as err:
print("\033[91mUnable to fetch lights. This could be because your configuration file is incomplete! Please check your config at \"~/.config/roomcomputer/config.json\".\033[0m")
raise err
def end():
loop.close()

@ -2,6 +2,10 @@
cfgPath="$HOME/.config/roomcomputer"
mkdir $cfgPath
cp default-config.json $cfgPath/config.json
cp default-presets.json $cfgPath/presets.json
if [ -d $cfgPath ]; then
echo Config already exists.
else
mkdir $cfgPath
cp default-config.json $cfgPath/config.json
cp default-presets.json $cfgPath/presets.json
fi

Loading…
Cancel
Save