rudyberends / homebridge-loxone-proxy

Homebridge Dynamic Platform Plugin which exposes a Loxone System to Homekit
Apache License 2.0
11 stars 6 forks source link

Please add UpDownDigital #70

Closed cedriic-dev closed 7 months ago

cedriic-dev commented 7 months ago

Hello,

In my Loxone Home to controll my Shades/Jalousie is for some reason type of UpDownDigital and i don't think i could change that very easy, is there a way to add this item here? Best, Cedric

rudyberends commented 7 months ago

No problem, I will have a look. Could you send me a screenshot of how this is setup in Loxone config?

cedriic-dev commented 7 months ago

Sure, see picture below, also see my fork of your repo... This actually works but just a little bit sketchy, maybe you know a better control in HomeKit because I used the same you used for Jalousie which is really buggy because you cant set a value just up and down so its really sketchy to use.

Screenshot_1 Screenshot_2

I hope those are enough screenshots

Best, Cedric

rudyberends commented 7 months ago

could you share a piece from your LoxAPP3.json? I have added a dummy EIB shade and this is what I have In my json;

"1c444169-0311-c19e-ffff4decce15e82a": { "name": "TEST EIB Shade", "type": "UpDownDigital", "uuidAction": "1c444169-0311-c19e-ffff4decce15e82a", "room": "117f8509-0122-a8df-ffff4decce15e82a", "cat": "117f8509-00b4-a6fe-ffff4decce15e82a", "defaultRating": 0, "isFavorite": false, "isSecured": false, "restrictions": 0, "details": { "jLockable": false, "EIB": true }, "states": { "active": "1c444169-0311-c19e-ffff4decce15e82a" } }

As you can see I only have an "active" state on this item, and I don't see any state changes on this. You seem to be monitoring the "position" state, but I don't have it on the item.

I also saw that you could use EIBDimmers by just renaming, so I added a shortcut on Dimmer to make it work in my version. I have not tested it, but I guess you have.

cedriic-dev commented 7 months ago

sure "0b4f0728-02f1-9f40-ffff504f94000000":{ "name":"Jal. Büro Fenster links", "type":"UpDownDigital", "uuidAction":"0b4f0728-02f1-9f40-ffff504f94000000", "room":"0b4c4a00-00ba-0331-ffff504f94000000", "cat":"0b4c4a00-007c-027b-ffff504f94000000", "defaultRating":0, "isFavorite":false, "isSecured":false, "restrictions":0, "details":{ "jLockable":false, "EIB":true }, "states":{ "active":"0b4f0728-02f1-9f40-ffff504f94000000" } }, "0b4f0746-01c6-bc84-ffff504f94000000":{ "name":"Jal. Büro Fenster links", "type":"InfoOnlyAnalog", "uuidAction":"0b4f0746-01c6-bc84-ffff504f94000000", "room":"0b4c4a00-00ba-0331-ffff504f94000000", "cat":"0b4c4a00-007c-027b-ffff504f94000000", "defaultRating":0, "isFavorite":false, "isSecured":false, "defaultIcon":null, "restrictions":0, "details":{ "jLockable":false, "format":"%.1f%%" }, "states":{ "value":"0b4f0746-01c6-bc84-ffff504f94000000", "error":"0b4f0746-01c6-bc83-ffff504f94000000" } }, "0b4f072d-01ee-a281-ffff504f94000000":{ "name":"Jal. Büro Fenster rechts", "type":"UpDownDigital", "uuidAction":"0b4f072d-01ee-a281-ffff504f94000000", "room":"0b4c4a00-00ba-0331-ffff504f94000000", "cat":"0b4c4a00-007c-027b-ffff504f94000000", "defaultRating":0, "isFavorite":false, "isSecured":false, "restrictions":0, "details":{ "jLockable":false, "EIB":true }, "states":{ "active":"0b4f072d-01ee-a281-ffff504f94000000" } }, "0b4f0748-001f-bfd0-ffff504f94000000":{ "name":"Jal. Büro Fenster rechts", "type":"InfoOnlyAnalog", "uuidAction":"0b4f0748-001f-bfd0-ffff504f94000000", "room":"0b4c4a00-00ba-0331-ffff504f94000000", "cat":"0b4c4a00-007c-027b-ffff504f94000000", "defaultRating":0, "isFavorite":false, "isSecured":false, "defaultIcon":null, "restrictions":0, "details":{ "jLockable":false, "format":"%.1f%%" }, "states":{ "value":"0b4f0748-001f-bfd0-ffff504f94000000", "error":"0b4f0748-001f-bfcf-ffff504f94000000" } },

hope this helps, tell me if you need more information

EIBDimmer is working fine but there is only on off in homekit then because i used the same lamp, so you cant dim actually i think, but i will test more when i am back home.

rudyberends commented 7 months ago

So this does not really have any state to get information from. How does this look in the Loxone App? You can't see the current position from there right?

cedriic-dev commented 7 months ago

image In this image you see the position is like a extra there so yeah you can see it. Thats actually a weird type to be honest. I also didnt know how to implement it correctly I just did try and error... But yeah this is what it looks like in the app

rudyberends commented 7 months ago

I guess your best bet at getting this fully functional is swapping out your "EIB Shading" block for an "Automatic Shading" block in Loxone Config. This way you will get more functionality in the Loxone App, and you will have instant HomeKit control.

The position can be mapped the same way as you do right now. It will then be visible on the item itself. The commands to the KNX actors need to be translated to work. Perhaps you can look at this?

https://loxwiki.atlassian.net/wiki/spaces/LOX/pages/1522696771/KNX+Jalousienaktor+f+r+die+Automatikjalousie+verwenden

As for the original question. UpDownDigital is basically just that. Two pushbuttons (Up and Down), without any state. As HomeKit does not have pushbuttons, they would need to be mapped as switches. It is possible, but it is not a nice implementation. In theory it would be possible to map it to a blind, but then you need state fetched from the InfoOnlyAnalogItem that supplies this value. You then need some way for the plugin to know these 2 items need to be mapped together (by creating a naming convention or something). And even then, the implementation would still be buggy, as, like you pointed out, there is no way to set a value. There is only up and down control.

I am willing to look into this to see how far we can get, but "fixing" it from the Loxone side would be a much cleaner solution.

cedriic-dev commented 7 months ago

Thanks for your help but I think changing it in my Loxone Config will be a less stresful task for both of us. Thanks for your help and I really like this project!