upsert / lutron-caseta-pro

Custom Home Assistant Component for Lutron Caseta Smart Bridge PRO / RA2 Select
Apache License 2.0
184 stars 38 forks source link

Fan set_speed service is unreliable #40

Closed jreed509 closed 5 years ago

jreed509 commented 5 years ago

Sometimes when calling the fan.set_speed service, the actual fan speed seems to be set incorrectly.

For example, calling fan.set_speed with the below data seems to set the actual fan speed to low ~50% of the time.

entity_id: fan.my_lutron_fan
speed: medium

Interestingly, the reported speed in both Home Assistant AND the Lutron app always matches the service call regardless of the actual fan speed. Maybe this points to this being a bug on Lutron’s side rather than this plugin, but this seemed like a good place to start.

cwawak commented 5 years ago

Also seeing this.

upsert commented 5 years ago

I don't have a fan or a fan speed controller to test this but I would be interested to know if Lutron sticks to their own spec and maybe that could cause an issue. Presumably the physical buttons are still working reliably?

This could be tested by logging into the Telnet interface directly and monitoring the output to the console when pressing the buttons on the fan speed controller. You should be able to see a device go to a certain level from 0-100, e.g. medium is expected to output 50.

The speed to output level mapping should be as follows:

SPEED_OFF: 0,
SPEED_LOW: 25,
SPEED_MEDIUM: 50,
SPEED_MEDIUM_HIGH: 75,
SPEED_HIGH: 100

The Telnet credentials are here if you would be willing to try this.

jreed509 commented 5 years ago

@upsert, I just did some testing and it looks like the output level mapping isn't quite as you listed. The output mapping that Lutron is using is:

SPEED_OFF: 0.00,
SPEED_LOW: 25.10,
SPEED_MEDIUM: 50.20,
SPEED_MEDIUM_HIGH: 75.30,
SPEED_HIGH: 100.00

If I manually send #OUTPUT,3,1,50 several times over telnet, I see the incorrect behavior mentioned above. Interestingly, when sending #OUTPUT,3,1,50 several times:

Sending #OUTPUT,3,1,50.20 several times in a row over telnet results in the expected behavior - the fan turns on to medium and remains there.

upsert commented 5 years ago

Fixed with changes in #41. Should be improved reliability.