PatchworkBoy / homebridge-edomoticz

Domoticz Homebridge-Plugin
Other
118 stars 44 forks source link

Blinds Percentage, 1. without MQTT ➡️ inverted status 2. others problems with MQTT #223

Closed jyjourdain closed 1 year ago

jyjourdain commented 3 years ago

Hi,

I have problems with a « Blinds Percentage » roller shutter. All is fine if I set it as « Blinds » only.

Without MQTT installed from Domoticz side, status appears inverted in Apple Home (« open » if the shutter is closed for exemple).

I made a quick test with MQTT activated: no more inversion but the roller shutter value seems out of sync ...

I had a look in code (and was not able to understand everything 😉). But, if I look domoticz_accessory.js / Line 1303 : this.cachedValues[Characteristic.Brightness.UUID] = position;

Shouldn't we replace Brightness with Position?

I know you don't have a roller shutter available, if I can help with testing ...

Thank you!

PatchworkBoy commented 3 years ago

On the characteristic: Brightness is essentially a generic handler for anything that uses a % slider iirc.

Will take a look...

On 14 Sep 2020, at 15:47, Jean-Yves Jourdain notifications@github.com wrote:

 Hi,

I have problems with a « Blinds Percentage » roller shutter. All is fine if I set it as « Blinds » only.

Without MQTT installed from Domoticz side, status appears inverted in Apple Home (« open » if the shutter is closed for exemple).

I made a quick test with MQTT activated: no more inversion but the roller shutter value seems out of sync ...

I had a look in code (and was not able to understand everything 😉). But, if I look domoticz_accessory.js / Line 1303 : this.cachedValues[Characteristic.Brightness.UUID] = position;

Shouldn't we replace Brightness with Position?

I know you don't have a roller shutter available, if I can help with testing ...

Thank you!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

jyjourdain commented 3 years ago

Hi,

I made my comment because I saw that, line 264 : var cachedValue = (this.isPercentageBlind || this.isInvertedBlind) ? this.cachedValues[Characteristic.CurrentPosition.UUID] : this.cachedValues[Characteristic.Brightness.UUID];

Thanks for your help!

PatchworkBoy commented 1 year ago

I believe resolved in 2.1.40

jyjourdain commented 1 year ago

Thanks! I’ll test next week.

jyjourdain commented 1 year ago

Hi @PatchworkBoy , that worked! Thanks again. I wish you an happy new year.