steilerDev / homebridge-openhab2-complete

A homebridge plugin for openHAB, that has the expectation to fully support all Services offered by Apple's Homekit Accessory Protocol (HAP)
GNU General Public License v3.0
52 stars 16 forks source link

Question: Venetian blinds mode #17

Closed CHTHSCH closed 4 years ago

CHTHSCH commented 5 years ago

Does your plug-in support roller shutters (Rollläden) only or also venetian blinds (Jalousien) where you can control the position of the lamellas as well?

steilerDev commented 5 years ago

Currently tilting the lamellas is not supported for rollershutters. How is the tilt angle exposed within openHAB? is it s number representing degrees of an angle?

CHTHSCH commented 5 years ago

I will move over to openHAB to control my blinds (Jalousien) two weeks from now. After that I will now and will let you know. I am using FIBARO Roller Shutters (2 & 3). The control of the lamellas is defined by the time they need to fully rotate. There should be two items types in openHAB, a roller shutter item, that controls the movement up/down and a dimmer item, that controls the lamellas.

CHTHSCH commented 5 years ago

I am using FIBARO Roller Shutter 2 and 3. The RS2 is defined as blinds_control, also for the lamellas and the RS3 as switch_dimmer, also for the lamellas

It is represented as a number (I would say % rather than angle) that determines one full turn (0° - 180°, or in my case 0°-90°)

CHTHSCH commented 5 years ago

Update: In the new SNAPSHOT, the RS3 is also represented as blinds_control. Lamellas are controlled by a second item

steilerDev commented 5 years ago

I checked with the HomeKit specification and it states for vertical and horizontal tilting of WindowCovering the following:

The characteristics describes the current angle of vertical slats for accessories such as windows, fans, portable heater/cooler etc. This characteristics takes values between -90 and 90. A value of 0 indicates that the slats are rotated to be fully open. A value of -90 indicates that the slats are rotated all the way in a direction where the user-facing edge is to the left of the window-facing edge.

Therefore, when I implement this feature, I would expect OpenHAB to provide and understand a value of -90 to 90.

CHTHSCH commented 5 years ago

I will check on Sunday again and provide some feedback. At the moment I am setting the angle of the blinds with a setpoint between 0 and 100.

CHTHSCH commented 5 years ago

The FIBARO Rollershutter 2/3 use two channels, one for the up/down and a second one for the angle of the lamellas.

CHTHSCH commented 5 years ago

The lamellas in openHAB have values between 0 and 100, which would correspond to -90 to 90. Perhaps a parameter is required, that would map this accordingly. Also openHAB allows the percentages to be reversed, which would also call for a parameter to configure the interface.

steilerDev commented 4 years ago

My latest commit (3c65977) adds this feature. I also have added a parameter to map the range from -90/90 to 0/100 (or any other range, fitting your use case).

Feel free to test the feature, I will hopefully publish my next release to npm very soon (I want to close all open issues first).