Mal ne ganz doofe Frage: wie bindet man das ein?
Würde gern per knx nen 1100 ein und ausschalten...
Danke, sm
Würde gern per knx nen 1100 ein und ausschalten...
Danke, sm
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Sat Feb 28 13:17:18 2015 from masterbrain.local admin@smarthome:/usr/smarthome$ reboot reboot: must be superuser. admin@smarthome:/usr/smarthome$ smarthome.py --stop admin@smarthome:/usr/smarthome$ smarthome.py -d 2015-03-01 21:19:16,627 INFO Main Start SmartHome.py 1.0-5-g5300605 -- smarthome.py:__init__:231 2015-03-01 21:19:16,633 DEBUG Main Python 3.2.3 -- smarthome.py:__ini t__:232 2015-03-01 21:19:16,639 INFO Main Init Scheduler -- scheduler.py:__i nit__:86 2015-03-01 21:19:16,646 INFO Main Init Plugins -- smarthome.py:start :274 2015-03-01 21:19:16,651 DEBUG Scheduler creating 5 workers -- scheduler.py :run:93 2015-03-01 21:19:16,672 DEBUG Main Plugin: knx -- plugin.py:__init__: 43 2015-03-01 21:19:16,700 DEBUG Main Plugin: visu -- plugin.py:__init__ :43 2015-03-01 21:19:16,793 DEBUG Main Plugin: cli -- plugin.py:__init__: 43 2015-03-01 21:19:16,806 DEBUG Main Plugin: sql -- plugin.py:__init__: 43 2015-03-01 21:19:16,838 DEBUG Main SQLite 3.7.13 -- __init__.py:__ini t__:62 2015-03-01 21:19:17,869 DEBUG Main SQLite: database integrity ok -- _ _init__.py:__init__:78 2015-03-01 21:19:17,896 DEBUG Main SQLite pack next time: 2015-03-02 03:02:00+01:00 -- scheduler.py:_next_time:289 2015-03-01 21:19:17,903 DEBUG Main Plugin: denon -- plugin.py:__init_ _:43 Traceback (most recent call last): File "/usr/smarthome/lib/plugin.py", line 53, in __init__ plugin_thread = Plugin(smarthome, plugin, classname, classpath, args) File "/usr/smarthome/lib/plugin.py", line 79, in __init__ exec("import {0}".format(classpath)) File "<string>", line 1, in <module> File "/usr/smarthome/plugins/denon/__init__.py", line 28, in <module> 2015-03-01 21:19:18,303 ERROR Main Unhandled exception: 'utf-8' codec can't decode byte 0xfc in position 124: invalid start byte <class 'UnicodeDecodeError'> File "/usr/smarthome/bin/smarthome.py", line 606, in <module> sh.start() File "/usr/smarthome/bin/smarthome.py", line 275, in start self._plugins = lib.plugin.Plugins(self, configfile=self._plugin_conf) File "/usr/smarthome/lib/plugin.py", line 57, in __init__ logger.exception("Plugin {0} exception: {1}".format(plugin, e)) File "/usr/lib/python3.2/logging/__init__.py", line 1273, in exception self.error(msg, *args, **kwargs) File "/usr/lib/python3.2/logging/__init__.py", line 1266, in error self._log(ERROR, msg, args, **kwargs) File "/usr/lib/python3.2/logging/__init__.py", line 1372, in _log self.handle(record) File "/usr/lib/python3.2/logging/__init__.py", line 1382, in handle self.callHandlers(record) File "/usr/lib/python3.2/logging/__init__.py", line 1444, in callHandlers hdlr.handle(record) File "/usr/lib/python3.2/logging/__init__.py", line 835, in handle self.emit(record) File "/usr/lib/python3.2/logging/__init__.py", line 947, in emit self.handleError(record) File "/usr/lib/python3.2/logging/__init__.py", line 888, in handleError None, sys.stderr) File "/usr/lib/python3.2/traceback.py", line 161, in print_exception print_tb(tb, limit, file) File "/usr/lib/python3.2/traceback.py", line 68, in print_tb line = linecache.getline(filename, lineno, f.f_globals) File "/usr/lib/python3.2/linecache.py", line 15, in getline lines = getlines(filename, module_globals) File "/usr/lib/python3.2/linecache.py", line 41, in getlines return updatecache(filename, module_globals) File "/usr/lib/python3.2/linecache.py", line 132, in updatecache lines = fp.readlines() File "/usr/lib/python3.2/codecs.py", line 300, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) -- smarthome.py:_excepthook:494 C2015-03-01 21:19:54,791 INFO Main Number of Threads: 7 -- smarthome.py:stop:348 2015-03-01 21:19:55,766 INFO Main SmartHome.py stopped -- smarthome.py:stop:372 Exception SystemExit: SystemExit(None,) in <module 'threading' from '/usr/lib/python3.2/threading.py'> ignored
import pydevd
def update_send_item(self, item, caller=None, source=None, dest=None): # Receive commands, process them and forward them to receiver if caller != 'DENON': # hier werden die kommandos für bool verwendet, die einen status zurückbringen command = item.conf['denon_send'] zone = item.conf['denon_zone'] value = item() if command == 'Power': if item(): self._request(self._denonIp, self._denonPort, 'GET', '/goform/formiPhoneAppPower.xml?' + zone + '+PowerON') else: self._request(self._denonIp, self._denonPort, 'GET', '/goform/formiPhoneAppPower.xml?' + zone + '+PowerStandby') elif command == 'Mute': if item(): self._request(self._denonIp, self._denonPort, 'GET', '/goform/formiPhoneAppMute.xml?' + zone + '+MuteON') else: self._request(self._denonIp, self._denonPort, 'GET', '/goform/formiPhoneAppMute.xml?' + zone + '+MuteOFF') elif command == 'MasterVolume': value = self._limit_range_int(value,0,99) self._request(self._denonIp, self._denonPort, 'GET', '/goform/formiPhoneAppVolume.xml?' + zone + '+{0}'.format(int(value-80))) elif command == 'SetAudioURI': self._upnp_set_uri(value) self._upnp_play() [COLOR="Red"] elif command == 'InputFuncSelect': self._request(self._denonIp, self._denonPort, 'GET', '/goform/formiPhoneAppDirect.xml?' + 'SI' + value)[/COLOR]
def _get_deviceinfo(self): [COLOR="red"]while self.alive:[/COLOR] self._requestLock.acquire() responseEtree = self._request(self._denonIp, self._denonPort, 'GET', self._XMLDeviceInfoURI['0']) self._requestLock.release() # im falle eines fehlers wird None zurückgeliefert if responseEtree is not None: # durchinterieren über alle einträge für das listen # es ist nur die erste ebene ! for node in responseEtree: returnItemIndex = '0' + node.tag for denonListen in self._listenItems: if denonListen == returnItemIndex: value = node.text self._listenItems[denonListen](value,'DENON')
def run(self): self.alive = True # einmalig zum start die Device info abholen self._get_deviceinfo() # ich hole regelmässig im polling den wert der zonen while self.alive: # allerdings nur für die konfigurierten zonen for zone in self._configuredZones: self._update_status(zone) self._sh.scheduler.add('denon, self._update_status(zone), prio=5, cycle=self._cycle, offset=2)
Wir verarbeiten personenbezogene Daten über die Nutzer unserer Website mithilfe von Cookies und anderen Technologien, um unsere Dienste bereitzustellen. Weitere Informationen findest Du in unserer Datenschutzerklärung.
Indem Du unten auf "ICH stimme zu" klickst, stimmst Du unserer Datenschutzerklärung und unseren persönlichen Datenverarbeitungs- und Cookie-Praktiken zu, wie darin beschrieben. Du erkennst außerdem an, dass dieses Forum möglicherweise außerhalb Deines Landes gehostet wird und bist damit einverstanden, dass Deine Daten in dem Land, in dem dieses Forum gehostet wird, gesammelt, gespeichert und verarbeitet werden.
Kommentar