Ankündigung
Einklappen
Keine Ankündigung bisher.
Support Thread für das Webservices Plugin
Einklappen
X
-
Sisamiwe ich baue das ein bzw. lasse es teilweise einfach als kommentar stehen. ist ja auch legitim. wenn das beispiel zu lange wird, verstehen es am ende sonst wieder weniger leute.. und der ambitionierte user kann das aus dem kommentar ja nachtragen
freigabe mache ich heute abend.. leider zu wenig zeit.. seit 5 schon wieder auf achse...
Kommentar
-
Wow, danke! Das ging ja flott ;-) Wie kann ich das einzelne Plugin aus dem DEV testen?
Ich habe jetzt die folgenden Files per wget gealden und sh neugestartet:
https://github.com/smarthomeNG/plugi...tes/index.html
https://github.com/smarthomeNG/plugi...es/__init__.py
https://github.com/smarthomeNG/plugi...es/locale.yaml
https://github.com/smarthomeNG/plugi...es/plugin.yaml
https://github.com/smarthomeNG/plugi...ices/README.md
Beim starten bekomme ich folgende Fehlermeldung:
2018-07-25 18:21:20 ERROR lib.metadata plugin 'webservices' version differs between Python code (1.5.0.4) and metadata (1.5.0.5)
Bei aufrufen der beiden URLs kommen auch nur noch Fehlermeldungen.
http://192.168.178.207:8383/webservices/
http://192.168.178.207:8384/rest/ite...en.Bily.dieselPHP-Code:192.168.178.207 - - [25/Jul/2018:18:15:24] "GET /gstatic/img/logo_small_120x120.png HTTP/1.1" 304 - "http://192.168.178.207:8383/webservices/" "Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0" [25/Jul/2018:18:15:25] HTTP Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/cherrypy/_cprequest.py", line 627, in respond self._do_respond(path_info) File "/usr/local/lib/python3.5/dist-packages/cherrypy/_cprequest.py", line 686, in _do_respond response.body = self.handler() File "/usr/local/lib/python3.5/dist-packages/cherrypy/lib/encoding.py", line 221, in __call__ self.body = self.oldhandler(*args, **kwargs) File "/usr/local/lib/python3.5/dist-packages/cherrypy/_cpdispatch.py", line 54, in __call__ return self.callable(*self.args, **self.kwargs) File "/usr/local/smarthome/plugins/webservices/__init__.py", line 148, in index item.type() in ['foo'] and item.path() in self.plugin.ALLOWED_FOO_PATHS): AttributeError: 'Item' object has no attribute 'path' [25/Jul/2018:18:15:25] HTTP Request Headers: REFERER: http://192.168.178.207:8383/backend/plugins.html UPGRADE-INSECURE-REQUESTS: 1 HOST: 192.168.178.207:8383 USER-AGENT: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 ACCEPT-LANGUAGE: de,en-US;q=0.7,en;q=0.3 Remote-Addr: 192.168.178.207 ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 ACCEPT-ENCODING: gzip, deflate PRAGMA: no-cache DNT: 1 CONNECTION: keep-alive CACHE-CONTROL: no-cache
PHP-Code:[25/Jul/2018:18:17:17] HTTP Request Headers: UPGRADE-INSECURE-REQUESTS: 1 HOST: 192.168.178.207:8384 USER-AGENT: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 ACCEPT-LANGUAGE: de,en-US;q=0.7,en;q=0.3 Remote-Addr: 192.168.178.207 ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 ACCEPT-ENCODING: gzip, deflate CACHE-CONTROL: max-age=0 DNT: 1 CONNECTION: keep-alive 192.168.178.207 - - [25/Jul/2018:18:17:17] "GET /rest/items/tankstellen.Bily.diesel HTTP/1.1" 500 732 "" "Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0" [25/Jul/2018:18:17:18] HTTP Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/cherrypy/_cprequest.py", line 627, in respond self._do_respond(path_info) File "/usr/local/lib/python3.5/dist-packages/cherrypy/_cprequest.py", line 686, in _do_respond response.body = self.handler() File "/usr/local/lib/python3.5/dist-packages/cherrypy/lib/encoding.py", line 221, in __call__ self.body = self.oldhandler(*args, **kwargs) File "/usr/local/lib/python3.5/dist-packages/cherrypy/lib/jsontools.py", line 58, in json_handler value = cherrypy.serving.request._json_inner_handler(*args, **kwargs) File "/usr/local/lib/python3.5/dist-packages/cherrypy/_cpdispatch.py", line 54, in __call__ return self.callable(*self.args, **self.kwargs) File "/usr/local/smarthome/plugins/webservices/__init__.py", line 475, in items item_data = self.assemble_item_data(item, final_mode) File "/usr/local/smarthome/plugins/webservices/__init__.py", line 209, in assemble_item_data if entry == item.path(): AttributeError: 'Item' object has no attribute 'path' [25/Jul/2018:18:17:18] HTTP Request Headers: UPGRADE-INSECURE-REQUESTS: 1 HOST: 192.168.178.207:8384 USER-AGENT: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 ACCEPT-LANGUAGE: de,en-US;q=0.7,en;q=0.3 Remote-Addr: 192.168.178.207 ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 ACCEPT-ENCODING: gzip, deflate CACHE-CONTROL: max-age=0 DNT: 1 CONNECTION: keep-alive 192.168.178.207 - - [25/Jul/2018:18:17:18] "GET /rest/items/tankstellen.Bily.diesel HTTP/1.1" 500 732 "" "Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0"
Kommentar
-
Ja, die (Test-) Installation ist recht frisch.
Ich habe nur per wget die Dateien unter /usr/local/smarthome/plugins/webservices/ getauscht.
SmartHomeNG Version: 1.5.1.master (cc1288de) in /usr/local/smarthome - v1.5.1 - Benutzer: smarthome 
SmartHomeNG Plugins Version: 1.5.1.master (3c2531a5) in /usr/local/smarthome/plugins - v1.5.1
Der ERROR lib.metadata ist jetz weg, aber die Webseiten werden leider immer noch nicht angezeigt.
Kommentar
-
uahh ich sehe dass es die methode path() wohl nur im develop core gibt: https://github.com/smarthomeNG/smart...op/lib/item.py
insofern pushe ich gleich nochmal ein downgrade auch wenn denn die arbeit an der stelle für die katz ist :-/ aus der sicht etwas doof wenn man die stränge mixed...
bitte ziehs dir jetzt.. ab morgen pushe ich wieder das für 1.6 korrekte .path()
hoffe dass da nicht noch mehr neurungen drin sind. bei dem was ich weiterentwickle bewege ich mich üblicherweise mit dem core mitZuletzt geändert von psilo; 25.07.2018, 19:56.
Kommentar


Kommentar