brutella / hkknx-public

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

Update from 2.8.2-b1 to 2.8.2 broke write/read access to KNX bus #308

Open cptbalusgit opened 2 months ago

cptbalusgit commented 2 months ago

After updating from 2.8.2-b1 to 2.8.2 write/read access to KNX bus did not work properly. Roll back to 2.8.2-b1 fixed issue. No changes to settings and so on between Update/Downgrade.

brutella commented 2 months ago

What kind of error did you see in the logs when writing/reading from the KNX bus? Was hkknx able to connect to the KNX gateway?

There was no change in this regard between version 2.8.2-b1 and 2.8.2. Maybe your issue is related to a different problem.

cptbalusgit commented 2 months ago

Connection to KNX Gateway shown as "secured connection (TCP)" and Homekit Bridge as "Available" in both cases. Initialisation of all HK devices was successful as well based on settings tab.

I will upgrade and downgrade and run complete system protocol and GA monitor in the background while doing so. Will compare and let you know.

cptbalusgit commented 2 months ago

Well - after doing it again, now for the fourth time overall, it works as expected again and no apparent issues in the logs visible with 2.8.2. Read and Write of values to GAs works as expected. Closing issue. Don't really have an explanation, as it was reproducable at least twice before after restarts of bridge itself and Pi as well.

cptbalusgit commented 2 months ago

alright so issue came back after a while - here is the system protocol screenshot of a write call to GA 1/0/28 not working on 2.8.2.
...79 is hkknx ...219 is knx gateway. ...178 is hk hub = apple tv 4k

2 8 2

same call after rolling back to 2.8.2-b1 2 8 2-b1

hkknx on rpi and knx gw currently still on the same default VLAN and ip address range within the network. I will check tomorrow morning again to see if the closed network communication issue occurs after time again on 2.8.2-b1.

I did not change any intra VLAN rules on xxx.xxx.1.xxx - none of the three switch ports are isolated. I can still ping all 3 IPs.

brutella commented 2 months ago

What hardware are you using as KNX gateway? Do you have other software connected to your KNX IP gateway?

cptbalusgit commented 2 months ago

ISE Smart Connect KNX Remote Access. I did not update to its new V7 SW yet. So still on V6.1.392. Besides ETS SW 6.x when I use it - no. No changes on the KNX GW configuration itself. Connection confirmed in hknx UI as well as "securely connected (TCP)". Works in this setup smooth since Aug 2023. Is your suspicion the ISE closes the TCP connection and does not allow hkknx - which is the client?! - to open it again when needed? Should it stay open once established within the uptime of hkknx? Not sure in detail tbh how the TCP handshake and connection mechanism between hkknx and knx gw work in detail in dynamic changes of states on knx, calls via hk through hknx to knx bus and so on.

cptbalusgit commented 2 months ago

So with 2.8.2-b1 it still works without issues after 2 days.

hr-automation commented 2 months ago

Hello, i have also some „strange“ connection issues since some weeks. From time to time the connection is lost. The Group Monitor is Collecting Data from the KNX Bus, but the Bridge looks like broke. I tested 2.8.2 up to 3 (Alpha) - maybe there is an issue with  Home since 17.4.1 by thereselve? I also cańt give you an Log-File because there is no info inside. In usage is an SCN-IP000.03 IP Interface from MDT (i think it´s an good one :-D)

Update: Under Status - HomeKit Bridge is not showing any Info. If i go to Home+ App or Home from  the Status Manager is showing me, that the Bridge is working.

DEBUG 2024/05/01 19:42:58 characteristics.go:144 {"characteristics":[{"aid":9,"iid":10,"value":false},{"aid":12,"iid":10,"value":false},{"aid":53,"iid":10,"value":false},{"aid":22,"iid":11,"value":0},{"aid":22,"iid":10,"value":false},{"aid":20,"iid":11,"value":2},{"aid":20,"iid":10,"value":false},{"aid":19,"iid":10,"value":false},{"aid":51,"iid":10,"value":false},{"aid":67,"iid":10,"value":false},{"aid":29,"iid":11,"value":0},{"aid":29,"iid":10,"value":false},{"aid":30,"iid":10,"value":false},{"aid":14,"iid":10,"value":false},{"aid":27,"iid":10,"value":false},{"aid":11,"iid":11,"value":62},{"aid":11,"iid":10,"value":false},{"aid":26,"iid":10,"value":false},{"aid":26,"iid":11,"value":0},{"aid":55,"iid":10,"value":false},{"aid":54,"iid":10,"value":false},{"aid":18,"iid":10,"value":false},{"aid":17,"iid":10,"value":false},{"aid":10,"iid":11,"value":0},{"aid":10,"iid":10,"value":false},{"aid":13,"iid":10,"value":false},{"aid":13,"iid":11,"value":100},{"aid":24,"iid":10,"value":false},{"aid":28,"iid":10,"value":false},{"aid":8,"iid":11,"value":53},{"aid":8,"iid":10,"value":false},{"aid":25,"iid":10,"value":false},{"aid":25,"iid":11,"value":100},{"aid":16,"iid":10,"value":false},{"aid":15,"iid":10,"value":false},{"aid":23,"iid":10,"value":false},{"aid":21,"iid":10,"value":false},{"aid":31,"iid":10,"value":false}]}

dornadeluxe commented 1 month ago

I have the same/simular issue and it started either with the 2.8.2 update or the new ios 14.5. So far hkknx has been rock stable for me but now it looses connection to the KNX bus after a while (several hours to days). I recognize when I can't control my devices in homekit anymore. They still show up there as available and also on the hkknx web interface all looks well but I can see that the connection is lost because the bus monitor is just dead. The only thing that helps is to restart hkknx or the complete raspi. Will try to roll back to an older version.

brutella commented 1 month ago

@dornadeluxe Do you find any log output which indicates an error?

Can you find an mDNS entry for the HomeKit bridge when the connection seems lost? https://hochgatterer.me/hkknx/docs/help/homekit-connection-issues/

dornadeluxe commented 1 month ago

Thanks for your reply, unfortunately I already rolled back to 2.8.1 but there was no entry in the logs when I checked after the issue happened. I also do not think that the problem was on the connection side between the bridge and homekit since all devices in Homekit where still available and not showing up as "not responding". They just would not react to pressing them, e.g. when trying to open up the garage door it would just stay shut and also immediately after showing as opening it would jump back to closed again in homekit. I think the issue is between the KNX gateway and the bridge because as I said I would not be able to see anything going on in the group monitor when the issue happened e.g. when manually turning off the lights this would not show up. The bridge would however still show all green under the status tab.

brutella commented 1 month ago

In version 3.0, where you can control accessories directly in the web interface, you will be able to check if the connection between KNX and hkknx or between hkknx and HomeKit is broken.