diff --git a/devdi b/devdi index 5a94efb..66a4719 160000 --- a/devdi +++ b/devdi @@ -1 +1 @@ -Subproject commit 5a94efbc8c4ca7e1a7ef6f40df53177717bb7c16 +Subproject commit 66a471979d41bb6477b676dddd3f5959ba0326cc diff --git a/devices/__init__.py b/devices/__init__.py index edde23e..cbc4d83 100644 --- a/devices/__init__.py +++ b/devices/__init__.py @@ -11,7 +11,7 @@ from devices.tradfri import button as tradfri_button audio_status = None remote = None - +my_ambient = None class group(object): def __init__(self, *args): diff --git a/init_venv b/init_venv new file mode 100755 index 0000000..ce282b0 --- /dev/null +++ b/init_venv @@ -0,0 +1,23 @@ +#!/bin/bash +# +BASEPATH=`realpath $(dirname $0)` + +# +# Create venv +# +if [[ ! -e $BASEPATH/venv ]]; then + python3 -m venv $BASEPATH/venv > /dev/null 2>&1 + find $BASEPATH -name requirements.txt | xargs -L 1 $BASEPATH/venv/bin/pip install -r > /dev/null 2>&1 + echo "venv changed" +fi +# +# Update venv modules +# +for req_mod in $($BASEPATH/venv/bin/pip list --format=json | jq -r '.[] | .name'); do + $BASEPATH/venv/bin/pip install -U $req_mod | grep install > /dev/null 2>&1 + if [[ "$?" -eq "0" ]]; then + echo $req_mod changed + fi + +done +#|xargs -n1 $BASEPATH/venv/bin/pip install -U diff --git a/mqtt b/mqtt index 1adfb06..14e56cc 160000 --- a/mqtt +++ b/mqtt @@ -1 +1 @@ -Subproject commit 1adfb0626e7777c6d29be65d4ad4ce2d57541301 +Subproject commit 14e56ccdbf6594f699b4afcfb4acafe9b899e914 diff --git a/report b/report index b53dd30..7003c13 160000 --- a/report +++ b/report @@ -1 +1 @@ -Subproject commit b53dd30eae1d679b7eec4999bec50aed55bc105b +Subproject commit 7003c13ef8c7e7c3a55a545cbbad4039cc024a9f diff --git a/user_interface.py b/user_interface.py index 32b3462..98f45f9 100644 --- a/user_interface.py +++ b/user_interface.py @@ -27,7 +27,7 @@ class user_interface(dict): if callable(cb): cb(*args) else: - print("Unknown command \"%s\"" % name) + print("Unknown command \"%s\"" % cmd) def add_command(self, name, callback): self[name] = callback