diff --git a/README.md b/README.md index e98cf4a..3934b34 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A simple helper library for controlling a Roth Touchline heat pump controller ```py -from pytouchline import PyTouchline +from pytouchlineplus import PyTouchline py_touchline = PyTouchline() @@ -14,4 +14,4 @@ device1.update() print(device1.get_name()) print(device1.get_current_temperature()) print(device1.get_target_temperature()) -``` \ No newline at end of file +``` diff --git a/pytouchline/__init__.py b/pytouchline/__init__.py index ec6de62..8681fb0 100644 --- a/pytouchline/__init__.py +++ b/pytouchline/__init__.py @@ -2,7 +2,7 @@ import cchardet as chardet import xml.etree.ElementTree as ET -__author__ = 'abondoe' +__author__ = 'pilehave' class PyTouchline(object): @@ -48,6 +48,13 @@ def get_number_of_devices(self, ip_address): response = self._request_and_receive_xml(request) return self._parse_number_of_devices(response) + def get_hostname(self): + hostname_items = [] + hostname_items.append("hw.HostName") + request = self._get_touchline_request(hostname_items) + response = self._request_and_receive_xml(request) + return self._parse_number_of_devices(response) + def get_status(self): status_items = [] status_items.append("R0.SystemStatus") @@ -246,4 +253,4 @@ def get_desc(self): return self._desc def get_type(self): - return self._type \ No newline at end of file + return self._type diff --git a/setup.py b/setup.py index 8c74afa..5ea5fa8 100644 --- a/setup.py +++ b/setup.py @@ -1,14 +1,14 @@ from distutils.core import setup setup( - name = 'pytouchline', - packages = ['pytouchline'], - version = '0.7', + name = 'pytouchlineplus', + packages = ['pytouchlineplus'], + version = '0.8', description = 'A Roth Touchline interface library', - author = 'Aksel Bondoe', - author_email = 'aksel.bondoe@gmail.com', + author = 'Mikkel Pilehave Jensen', + author_email = 'pilehave@gmail.com', license='MIT', - url = 'https://github.com/abondoe/pytouchline', - download_url = 'https://github.com/abondoe/pytouchline/archive/0.7.tar.gz', + url = 'https://github.com/pilehave/pytouchlineplus', + download_url = 'https://github.com/pilehave/pytouchlineplus/archive/0.8.tar.gz', keywords = ['Roth', 'Touchline', 'Home Assistant', 'hassio', "Heat pump"], classifiers = [ 'Development Status :: 3 - Alpha', @@ -17,4 +17,4 @@ 'Programming Language :: Python :: 3', ], install_requires=['httplib2', 'cchardet'] -) \ No newline at end of file +)