Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyPI Openzwave #7415

Merged
merged 4 commits into from
May 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
sudo: false
addons:
apt:
packages:
- libudev-dev
matrix:
fast_finish: true
include:
Expand Down
15 changes: 2 additions & 13 deletions homeassistant/components/zwave/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from .discovery_schemas import DISCOVERY_SCHEMAS
from .util import check_node_schema, check_value_schema, node_name

REQUIREMENTS = ['pydispatcher==2.0.5']
REQUIREMENTS = ['pydispatcher==2.0.5', 'python_openzwave==0.4.0.31']

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -221,22 +221,12 @@ def setup(hass, config):
descriptions = conf_util.load_yaml_config_file(
os.path.join(os.path.dirname(__file__), 'services.yaml'))

try:
import libopenzwave
except ImportError:
_LOGGER.error("You are missing required dependency Python Open "
"Z-Wave. Please follow instructions at: "
"https://home-assistant.io/components/zwave/")
return False
from pydispatch import dispatcher
# pylint: disable=import-error
from openzwave.option import ZWaveOption
from openzwave.network import ZWaveNetwork
from openzwave.group import ZWaveGroup

default_zwave_config_path = os.path.join(os.path.dirname(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the configuration not a part of the package? That is unfortunate. I wonder if we should auto download the config in a future PR. Let's make sure that we note in the docs how to obtain it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it does, it's just in a different place. The behavior when config_path is None is now basically an improved version of what we were doing (it checks the new location, along with a number of other places where it has been historically). There's no longer a need for us to get clever with the default path.

libopenzwave.__file__), 'config')

# Load configuration
use_debug = config[DOMAIN].get(CONF_DEBUG)
autoheal = config[DOMAIN].get(CONF_AUTOHEAL)
Expand All @@ -249,8 +239,7 @@ def setup(hass, config):
options = ZWaveOption(
config[DOMAIN].get(CONF_USB_STICK_PATH),
user_path=hass.config.config_dir,
config_path=config[DOMAIN].get(
CONF_CONFIG_PATH, default_zwave_config_path))
config_path=config[DOMAIN].get(CONF_CONFIG_PATH))

options.set_console_output(use_debug)
options.lock()
Expand Down
3 changes: 3 additions & 0 deletions requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,9 @@ python-vlc==1.1.2
# homeassistant.components.wink
python-wink==1.2.3

# homeassistant.components.zwave
python_openzwave==0.4.0.31

# homeassistant.components.device_tracker.trackr
pytrackr==0.0.5

Expand Down
1 change: 0 additions & 1 deletion virtualization/Docker/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ MAINTAINER Paulus Schoutsen <Paulus@PaulusSchoutsen.nl>
#ENV INSTALL_TELLSTICK no
#ENV INSTALL_OPENALPR no
#ENV INSTALL_FFMPEG no
#ENV INSTALL_OPENZWAVE no
#ENV INSTALL_LIBCEC no
#ENV INSTALL_PHANTOMJS no
#ENV INSTALL_COAP_CLIENT no
Expand Down
30 changes: 0 additions & 30 deletions virtualization/Docker/scripts/python_openzwave

This file was deleted.

9 changes: 2 additions & 7 deletions virtualization/Docker/setup_docker_prereqs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ set -e
INSTALL_TELLSTICK="${INSTALL_TELLSTICK:-yes}"
INSTALL_OPENALPR="${INSTALL_OPENALPR:-yes}"
INSTALL_FFMPEG="${INSTALL_FFMPEG:-yes}"
INSTALL_OPENZWAVE="${INSTALL_OPENZWAVE:-yes}"
INSTALL_LIBCEC="${INSTALL_LIBCEC:-yes}"
INSTALL_PHANTOMJS="${INSTALL_PHANTOMJS:-yes}"
INSTALL_COAP_CLIENT="${INSTALL_COAP_CLIENT:-yes}"
Expand All @@ -24,13 +23,13 @@ PACKAGES=(
bluetooth libglib2.0-dev libbluetooth-dev
# homeassistant.components.device_tracker.owntracks
libsodium13
# homeassistant.components.zwave
libudev-dev
)

# Required debian packages for building dependencies
PACKAGES_DEV=(
cmake git
# python-openzwave
cython3 libudev-dev
# libcec
swig
)
Expand All @@ -51,10 +50,6 @@ if [ "$INSTALL_FFMPEG" == "yes" ]; then
virtualization/Docker/scripts/ffmpeg
fi

if [ "$INSTALL_OPENZWAVE" == "yes" ]; then
virtualization/Docker/scripts/python_openzwave
fi

if [ "$INSTALL_LIBCEC" == "yes" ]; then
virtualization/Docker/scripts/libcec
fi
Expand Down