Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using ESP-KNX-IP Library to connect to Home Assistant #33

Closed
ascillato opened this issue Mar 8, 2018 · 2 comments
Closed

Using ESP-KNX-IP Library to connect to Home Assistant #33

ascillato opened this issue Mar 8, 2018 · 2 comments

Comments

@ascillato
Copy link
Contributor

ascillato commented Mar 8, 2018

This is a workaround explanation for using ESP-KNX-IP Library to connect to Home Assistant.

The link between Home Assistant and a KNX Router, is the XKNX Python Library.

Side note:
If you don't have a KNX Router, you can use KNXd on the same Raspberry Pi than Home Assistant.

There is a bug using XKNX Library on Home Assistant, that makes XKNX Library not understanding ESP-KNX-IP (Issue XKNX/xknx#112)

While waiting for response on the XKNX issue, the checksum can be eliminated changing esp-knx-ip-send.cpp#L69 for udp.write(buf, len-1)

With this you can have a working ESP-KNX-IP Library for testing on Home Assistant until the bug is solved.

@envy
Copy link
Owner

envy commented Mar 8, 2018

So the checksum is a very interesting thing. In the KNX spec pdfs I have here, there is no mention of it, at least I can't find it at the moment.

I recorded some messages with tcpdump and found out that openHAB does not include a checksum to its packets whereas my KNX IP Router (ABB IPR/S3.1.1) is adding one but sets it to 0x00.

Maybe it is not even needed? I can't find the reference I used that said that there is a checksum field but everything worked in my environment with real KNX devices so I thought it is correct.

Maybe we should find out if it really is part of the spec or not.

@ascillato
Copy link
Contributor Author

Me neither. I could not find anything about the checksum.

I'm waiting the response of the author of XKNX Library for Home Assistant but seems that there is no need for checksum. May be that the KNX Devices are ingnoring the last byte, thats why the KNX network continue working.

Better could be add the ACK response and resend if NACK is received.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants