brutella / hkknx-public

hkknx is a HomeKit KNX bridge for KNX.
https://hochgatterer.me/hkknx
98 stars 6 forks source link

Close connection and remove session #59

Closed darkangel72F closed 4 years ago

darkangel72F commented 4 years ago

Hallo, ich verwende die Version 1.1.0, eventuell ist das auch schon das Problem, da die Version ja noch nicht freigegeben ist. Meine KNX-Elemente melden nach ca. 3-5min keine Antwort mehr. Nach Neustart der hkknx funktioniert es wieder ca. 3-5min problemfrei. Habe daher mal den Debug Modus mitlaufen lassen und erhalte nach besagter Zeit die Meldung {"characteristics":[{"aid":6,"iid":10,"value":22}]} DEBUG 2020/07/30 09:34:07 connection.go:112: Close connection and remove session DEBUG 2020/07/30 09:34:08 connection.go:112: Close connection and remove session DEBUG 2020/07/30 09:34:08 connection.go:112: Close connection and remove session

Nach dieser Meldung hört das Logging auch auf. Es erfolgen keine weiteren Meldungen oder ein Neustart mehr.

Was kann das sein? Danke Steffen

brutella commented 4 years ago

Ist die Brücke über WLAN oder Ethernet mit deinem Netzwerk verbunden? Welche iOS Version verwendest du?

darkangel72F commented 4 years ago

Die Brücke ist solange verbunden, bis die Connection geschlossen wird. Danach ist keine Verbindung, weder über die HKKX app noch über die WebOberfläche möglich. Solange die Verbindung jedoch steht, wird die Brücke als verfügbar angezeigt und ich kann auch die KNX Geräte über die HomeKit App steuern Aktuell verwende ich die Ios 13.6 und die Mac Version 10.15.3

darkangel72F commented 4 years ago

Die Brücke ist über LAN (Ethernet) angeschlossen.

brutella commented 4 years ago

Ist die Weboberfläche über die IP Adresse (http://<ip-adresse>:8080) dann noch erreichbar?

darkangel72F commented 4 years ago

Ja, die WebOberfläche ist erreichbar und ich kann auch Änderungen vornehmen, ohne das eine Fehlermeldung kommt. Was ich gerade durch Zufall probiert und festgestellt habe, wenn ich dann in der Weboberfläche auf KNX Gateway Test gehe, wird das KNX Gateway wieder gesucht und gefunden und danach laufen die Geräte wieder für 3-5 min. Vielleicht ist das ein Ansatzpunkt? Mein KNX Gateway habe ich aktuell auf automatische Suche stehend. Sollte ich dieses einmal als feste Adresse hinterlegen. Prinzipiell ist die Gateway IP als feste IP hinterlegt und wird somit nicht geändert.

darkangel72F commented 4 years ago

Habe jetzt noch einmal ein wenig experimentiert. Zuvor gesagtes, dass es genügt, über die WebOberfläche, das KNX Gateway neu zu suchen, funktioniert leider nur per Zufall. Wäre an sich auch nicht wirklich eine Lösung gewesen. Ursache bleibt aus meiner Sicht, dass sich die Schnittstelle selbstständig beendet.Die Frage ist nur warum tut sie das? Hier noch einmal die stets letzten Zeilen aus dem Debug LogDEBUG 2020/07/30 18:13:52 characteristic_controller.go:76: {"characteristics":[{"aid":7,"iid":10,"ev":true},{"aid":7,"iid":11,"ev":true},{"aid":7,"iid":12,"ev":true}]} DEBUG 2020/07/30 18:13:52 characteristics.go:48: 192.168.2.37:49426 PUT /characteristics DEBUG 2020/07/30 18:13:52 characteristic_controller.go:76: {"characteristics":[{"aid":4,"iid":10,"ev":true},{"aid":4,"iid":11,"ev":true}]} DEBUG 2020/07/30 18:15:46 characteristics.go:43: 192.168.2.22:55771 GET /characteristics map[id:[6.10,3.10,13.10,11.10,8.10,2.10,2.11,12.10,9.10,7.11,7.10,10.10,4.10,4.11]] DEBUG 2020/07/30 18:15:51 characteristics.go:43: 192.168.2.22:55771 GET /characteristics map[id:[3.10]] DEBUG 2020/07/30 18:15:51 characteristics.go:43: 192.168.2.22:55771 GET /characteristics map[id:[8.10]] DEBUG 2020/07/30 18:16:51 connection.go:112: Close connection and remove session DEBUG 2020/07/30 18:16:53 connection.go:112: Close connection and remove session DEBUG 2020/07/30 18:17:08 connection.go:112: Close connection and remove session DEBUG 2020/07/30 18:17:09 connection.go:112: Close connection and remove session DEBUG 2020/07/30 18:17:10 connection.go:112: Close connection and remove session DEBUG 2020/07/30 18:17:15 connection.go:112: Close connection and remove session

darkangel72F commented 4 years ago

Habe noch weitere Versuche unternommen. Alles komplett gelöscht und eine komplett neue DB anlegen lassen. HomeKit neu zugewiesen und lediglich ein Element (Licht) hinzugefügt. Ergebnis leider identisch. Close Connection and remove session nach ca. 3 min. Hier noch die Logansicht, wobei diese identisch scheint. Irgendetwas muss den Prozess zum Schließen animieren, die Frage wäre nur was und warum. Danke

{"characteristics":[{"aid":2,"iid":10,"value":false}]} DEBUG 2020/07/30 21:13:54 connection.go:112: Close connection and remove session DEBUG 2020/07/30 21:14:04 characteristics.go:48: 192.168.2.37:49441 PUT /characteristics DEBUG 2020/07/30 21:14:04 characteristic_controller.go:76: {"characteristics":[{"aid":2,"iid":10,"value":1}]} DEBUG 2020/07/30 21:14:04 writer.go:45: write True to 0/3/6 DEBUG 2020/07/30 21:14:04 ip_transport.go:282: 192.168.2.21:51752 <- EVENT/1.0 200 OK Content-Length: 53 Content-Type: application/hap+json

{"characteristics":[{"aid":2,"iid":10,"value":true}]} DEBUG 2020/07/30 21:14:04 ip_transport.go:282: 192.168.2.23:49513 <- EVENT/1.0 200 OK Content-Length: 53 Content-Type: application/hap+json

{"characteristics":[{"aid":2,"iid":10,"value":true}]} DEBUG 2020/07/30 21:14:04 ip_transport.go:282: 192.168.2.31:54381 <- EVENT/1.0 200 OK Content-Length: 53 Content-Type: application/hap+json

{"characteristics":[{"aid":2,"iid":10,"value":true}]} DEBUG 2020/07/30 21:14:04 ip_transport.go:282: 192.168.2.27:54830 <- EVENT/1.0 200 OK Content-Length: 53 Content-Type: application/hap+json

{"characteristics":[{"aid":2,"iid":10,"value":true}]} DEBUG 2020/07/30 21:14:47 connection.go:112: Close connection and remove session DEBUG 2020/07/30 21:14:47 connection.go:112: Close connection and remove session DEBUG 2020/07/30 21:14:47 connection.go:112: Close connection and remove session DEBUG 2020/07/30 21:14:49 connection.go:112: Close connection and remove session

darkangel72F commented 4 years ago

Habe weiter experimentiert, da mir eingefallen war, dass es vor Wechsel auf den Glasfaseranschluss und mit Nutzung der Version 0.18 alles funktioniert hatte. Habe daher im Bereich Multicast bei AVM (Fritzbox) mal nachgefragt und bekam zur Antwort den Internet Zugang anders zu konfigurieren. Mir scheint, dass es zumindest eine Auswirkung hatte, da die Fehlermeldungen nun andere sind. (siehe log) Interessant zudem ist, dass die Brücke bestehen bleibt, die KNX Geräte jedoch leider weiter keine Antwort liefern/erhalten. Kann es eine Ursache sein, was die Einstellungen der Fritzbox angeht, oder ist das nur Zufall? Falls ja, was genau müsste eingestellt werden? Hier noch das neue Log. Neu ist der Eintrag "mdns responder stopped" Diesen hatte ich bisher noch nicht. Dafür kommt kein Close connection and remove session mehr.

INFO 2020/07/31 11:36:41 main.go:64: version 1.1.0 (built at 2020-06-12T16:15:41Z+0200) INFO 2020/07/31 11:36:41 main.go:183: webpage available at port 8080 DEBUG 2020/07/31 11:36:41 io.go:12: read: 0/3/7 INFO 2020/07/31 11:36:41 ip_transport.go:184: Listening on port 55492 DEBUG 2020/07/31 11:37:41 ip_transport.go:169: mdns responder stopped 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/ HTTP/1.1" from 192.168.2.20:58040 - 303 73B in 454.2µs 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/projects/2e7aabbc-bc42-46b3-a0bc-c6657ad8dff6 HTTP/1.1" from 192.168.2.20:58040 - 303 85B in 451.737µs 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/projects/2e7aabbc-bc42-46b3-a0bc-c6657ad8dff6/accessories HTTP/1.1" from 192.168.2.20:58040 - 200 27331B in 10.752859ms 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/js/api.js HTTP/1.1" from 192.168.2.20:58040 - 200 263B in 20.210301ms 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/css/dashboard.css HTTP/1.1" from 192.168.2.20:58043 - 200 258B in 5.608187ms 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/js/bootstrap.bundle.min.js HTTP/1.1" from 192.168.2.20:58045 - 200 81084B in 7.085702ms 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/js/jquery.js HTTP/1.1" from 192.168.2.20:58041 - 200 88144B in 10.965295ms 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/css/font-awesome.all.css HTTP/1.1" from 192.168.2.20:58044 - 200 70942B in 4.090681ms 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/css/bootstrap.min.css HTTP/1.1" from 192.168.2.20:58042 - 200 160403B in 16.107933ms 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/img/accessory/lightbulb.png HTTP/1.1" from 192.168.2.20:58042 - 200 1035B in 265.936µs 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/img/accessory/switch.png HTTP/1.1" from 192.168.2.20:58044 - 200 638B in 184.583µs 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/img/accessory/outlet.png HTTP/1.1" from 192.168.2.20:58045 - 200 921B in 131.987µs 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/img/accessory/blind.png HTTP/1.1" from 192.168.2.20:58041 - 200 796B in 110.785µs 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/img/accessory/contact-sensor.png HTTP/1.1" from 192.168.2.20:58043 - 200 768B in 209.258µs 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/img/accessory/garage-door.png HTTP/1.1" from 192.168.2.20:58040 - 200 1518B in 192.478µs 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/img/accessory/temp-sensor.png HTTP/1.1" from 192.168.2.20:58043 - 200 935B in 328.355µs 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/img/accessory/thermostat.png HTTP/1.1" from 192.168.2.20:58040 - 200 1824B in 173.183µs 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/img/accessory/light-sensor.png HTTP/1.1" from 192.168.2.20:58044 - 200 1390B in 217.679µs 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/img/accessory/lock.png HTTP/1.1" from 192.168.2.20:58042 - 200 1248B in 208.498µs 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/img/accessory/leak-sensor.png HTTP/1.1" from 192.168.2.20:58045 - 200 1146B in 331.027µs 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/img/accessory/humidity-sensor.png HTTP/1.1" from 192.168.2.20:58041 - 200 1098B in 625.372µs 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/img/accessory/security-system.png HTTP/1.1" from 192.168.2.20:58043 - 200 951B in 170.049µs 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/img/accessory/motion-sensor.png HTTP/1.1" from 192.168.2.20:58043 - 200 2050B in 212.671µs 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/img/accessory/occupancy-sensor.png HTTP/1.1" from 192.168.2.20:58041 - 200 1724B in 157.896µs 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/img/accessory/smoke-sensor.png HTTP/1.1" from 192.168.2.20:58040 - 200 1371B in 159.449µs 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/img/accessory/co-sensor.png HTTP/1.1" from 192.168.2.20:58042 - 200 1613B in 471.135µs 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/img/accessory/air-quality-sensor.png HTTP/1.1" from 192.168.2.20:58044 - 200 1771B in 460.175µs 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/img/accessory/co2-sensor.png HTTP/1.1" from 192.168.2.20:58045 - 200 1966B in 243.213µs 2020/07/31 11:43:57 "GET http://192.168.2.28:8080/static/webfonts/fa-solid-900.woff2 HTTP/1.1" from 192.168.2.20:58045 - 200 76084B in 2.416684ms 2020/07/31 11:43:58 "GET http://192.168.2.28:8080/static/favicon/favicon-32x32.png HTTP/1.1" from 192.168.2.20:58045 - 200 1074B in 203.299µs 2020/07/31 11:44:03 "GET http://192.168.2.28:8080/projects/2e7aabbc-bc42-46b3-a0bc-c6657ad8dff6/settings HTTP/1.1" from 192.168.2.20:58045 - 200 41076B in 9.445627ms 2020/07/31 11:44:03 "GET http://192.168.2.28:8080/static/webfonts/fa-regular-400.woff2 HTTP/1.1" from 192.168.2.20:58045 - 200 13576B in 360.419µs 2020/07/31 11:44:05 "GET http://192.168.2.28:8080/api/knx/status?pid=2e7aabbc-bc42-46b3-a0bc-c6657ad8dff6 HTTP/1.1" from 192.168.2.20:58045 - 200 50B in 11.011515ms 2020/07/31 11:44:08 "GET http://192.168.2.28:8080/api/homekit/status HTTP/1.1" from 192.168.2.20:58045 - 200 20B in 282.58µs

darkangel72F commented 4 years ago

Habe die Lösung durch ein KNX Forum gefunden. WLAN und Ethernet waren beide aktiv, was die "Ausfälle" verursacht hat. Vielleicht eine Idee, dass mit in einer Art FAQ aufzunehmen.

brutella commented 4 years ago

Danke für das Update. Zu diesem Problem gibt es jetzt einen Hinweis in der Online-Hilfe.