homebridge-loxone-ws
homebridge-loxone-ws copied to clipboard
Shutters don't close but go to shading
I have blinds that can also rotate the shutters to shade. Why is it when I close shutters via HomeKit, they go fully down and then go back to shading? I cannot achieve that they fully close.
I had raised the same issue on Homebridge, but they say it's a plugin issue...
Expected Behavior
With blinds open, when tapping on a blinds button in Home, I expect the blinds to go fully down.
Current Behavior
The go fully down, but then go slightly back to turn the slats horizontal. Sometimes they show as 1% status.
Versions
Homebridge: 0.4.50 Node: v12.12.0 OS: macOS 10.15 on 2018 Mac Mini
@Sroose your thoughts please?
In the Loxone Config Software, you can change this behaviour for your blinds. There is a field which defines how much backwards the blind should go after reaching it's destination or something.
My blinds don't have this behavior when I control them via Loxone software...
Looking at the logs those end positions are sent as:
[blinds] iOS - send message to Backyard Door in 2.3 Dining: ManualPosition/100
[blinds] iOS - send message to Backyard Door in 2.3 Dining: ManualPosition/0
Could it be that iOS 13 no longer sends the bool and thus you don't send FullUp and FullDown?
https://github.com/Sroose/homebridge-loxone-ws/blob/master/items/BlindsItem.js#L119-L125
Would a workaround be to do FullUp
in case of position 100 and FullDown
in case of position 0?
Yes, there is a setting "Return duration for shading with blinds" - but that needs to be set so that my controller can adjust the angle of the slats between vertical and horizontal.
My blinds have two parameters: slat rotation and position. If you set a ManualPosition downward then during the movement the slats go vertical and then at the end they are set to horizontal again. If you go up, then there is no adjustment, because upwards motion already sets the slats to horizontal.
Is there a way to enhance the logic to also take this into account? i.e. to have a separate command for the slat angle and to set that to vertical going downwards as to prevent my controller to restoring horizontal slats after fully closing?
I experimented a bit more and this seems to work to a degree:
var command = 0;
if (typeof value === 'boolean') {
command = value ? 'FullUp' : 'FullDown';
} else {
if (this.startedPosition >= this.targetPosition && this.targetPosition == 0)
{
command = "FullDown"
}
else if (this.startedPosition <= this.targetPosition && this.targetPosition == 100)
{
command = "FullUp"
}
else
{
//reverse again the value
command = "ManualPosition/" + (100 - value);
}
}
The problem I am having with this is that if the blinds are already moving in the opposite direction then this command only stops them. it needs to be sent a second time.
ManualPosition doesn't have this issue, I can always change it and it immediately reverse.
@Sroose is there a way to send the FullDown
immediately after a ManualPosition fully down has been reached?
This is so far the best result. When moving to fully closed from stand-still it closes the slats. This is the case for example if you tap the blinds button or instruct Siri to close the blinds.
If the blinds are opening and then you close it, this doesn't work, because issuing FullDown
while moving stops the blinds and doesn't cause any additional movement. For this case the full down command would have to be sent with a time-delay. How could that be achieve?
BlindsItem.prototype.setItem = function(value, callback) {
//sending new state (pct closed) to loxone
var self = this;
//set a flag that we're in control. this way we'll know if the action is coming from Homekit or from external actor (eg Loxone app)
//this flag is removed after 20 seconds (increase if you have really long or slow blinds ;)
this.inControl =true;
setTimeout(function(){ self.inControl = false; }, 20000);
// check if stopped before recording new positions
var isStopped = (this.currentPosition == this.targetPosition)
this.startedPosition = this.currentPosition;
this.targetPosition = parseInt(value);
var command = 0;
if (typeof value === 'boolean') {
command = value ? 'FullUp' : 'FullDown';
} else {
if (this.targetPosition == 0 && isStopped) {
// override the command to get the slats vertical on the full close
command = "FullDown"
}
else
{
//reverse again the value
command = "ManualPosition/" + (100 - value);
}
}
this.log("[blinds] iOS - send message to " + this.name + ": " + command);
this.platform.ws.sendCommand(this.uuidAction, command);
callback();
};
Hi, did you finally manage it to work completely?
I did some more or less random experimenting, with limited success. The problem remains unsolved.
maybe its necessary to use IObroker for that!? but thanks for the quick response ;-)