-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[homekit] New HomeKit client binding #19340
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
…addons into homekit-client
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@lsiepel and @jimtng -- this addon is far from ready yet; it has not been tested at all, and there are still many areas work-in-progress -- however I am putting this up here as I think you guys may get some joy from it ;) Note I did make contact with @kgoderis since he has also a huge HomeKit project that is also work-in-progress. I did take a look at your code, but eventually I found it easier to make a clean re-start on my own. (Sorry for that). One notable thing missing from my code is the HomeKit proxy server (which allows HomeKit accessories to be imported and also re-exported). However since we already have the HomeKit server io addon combined with this HomeKit client binding, I think that the proxy is not really required.. |
fyi @ccutrer |
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@ThomasM102 many thanks for your Json dump. I just created a stub JUnit test case based on it. However I still need to write the intricate detail tests for it.. |
You marked my topic about the reversed roller shutters as solved. I only partially agree: It would also be nice to have text in the position state, if possible. Here's my input: |
@ccutrer OK I am slowly starting to come around to your way of thinking. A few points..
|
I agree your point. I had overlooked that. But see my post above this one concerning the merging of setpoint and actual characteristics, which will probably also resolve this issue.
Hmm. Nice to have. (IMHO). Such texts are not provided by the hardware. They are only available in the Apple specification PDF. There are 128 characteristics in the spec, and about half of them have 2 or more texts in the PDF. So there is a lot of work to extract the texts and create i18n property files and whatever. Personally I want to focus on functionality rather than cosmetics, so I suggest to postpone that text extraction work to a later PR. |
With Velux roller shutters, it's possible that the actual value may not reach the target value. When the window is open, my roller shutters close to a maximum of 80% to prevent damage. I would prefer two variables. Edit: The same applies to the window when the rain sensor is active. |
This comment was marked as resolved.
This comment was marked as resolved.
I think it would make a lot of sense to merge this into a single channel, similar to how other bindings map shades etc.
Having only a single channel could then disregard (veto) that target position. So if you start at 0%, then send a command with 100%, the final state will then become 80%. What is gained by having a separate channel for keeping the 100% you tried to command? It's not like a setpoint, where the window will then try to reach 100% over time. It's immediately rejected/corrected to 80%, and you have to send another command to try again (also in case of rain). |
I'll just add that currently when a window is initially closed, both channels are 100%. If I then use the Velux app (or physical button) to open the window a little bit, both channels change state to the new position, e.g. 80%. That seems counter-intuitive. |
Indeed. It is on the TODO list in the top post. EDIT: @ThomasM102 perhaps you can give some more input on this? There are actually three channels for this; the position current and position target channels as discussed above for the percent open position; plus the position hold channel for the stop command. We have argued to keep current and target as seperate channels. Which kind of argues that position hold should also be separate. => WDYT? |
This comment was marked as resolved.
This comment was marked as resolved.
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
...ekit/src/test/java/org/openhab/binding/homekit/internal/TestChannelCreationForVeluxJson.java
Show resolved
Hide resolved
Yes, I very much agree that any current/target that are enums with different valid values should be separate channels. Things like thermostat current/target mode (current can be idle, which is missing from target), security system current/target state (current can be triggered, which is missing from target), fan mode (target is just manual/auto, but current is inactive/idle/blowing). |
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
=== WORK IN PROGRESS ===
There is an existing HomeKit server io addon which allows exporting Items into the HomeKit eco- system.
This is a new HomeKit client binding addon which allows importing Things and Channels from the HomeKit eco- system.
There are two types of Things supported:
accessory
: This integrates a single HomeKit accessory, whereby its services appear as channel groups and the respective service- characteristics appear as channels.bridge
: This integrates a HomeKit bridge accessory containing multiple childaccessory
Things.So Things of type
accessory
either represent a stand-alone accessories or a child of abridge
Thing.Things of type
bridge
and stand-aloneaccessory
Things both communicate directly with their HomeKit device over the LAN. Whereas childaccessory
Things communicate via their respectivebridge
Thing.See Apple HomeKit Specification.pdf
Signed-off-by: Andrew Fiddian-Green software@whitebear.ch
Todos: