Much longer latency when controlling puck over API compared to Alexa integration
When using the API, it takes more than 4 minutes for changes of a Puck setting to take effect. However, when that change is done through Alexa's integration, it takes seconds.
Is this expected? Why is the API so much slower?
The issue is that direct API with HomeBridge is the only way to make HomeKit work with the Pucks, so HomeKit changes taks 4+ mins to take effect.
This is the code that I used to measure the latency of and direct API call but turning off a mini split. Lacenty observed when using HomeBridge + homebridge-flair is also ~4mins. When doing the same action with Alexa or the Flair App, it's way less than a minute.
import json
from flair_api import make_client
# redacted secrets
client = make_client(client_id, client_secret, 'https://api.flair.co/')
rooms = client.get('rooms')
theRoom=None
for room in rooms:
if room.attributes["name"] == "Music room thermostat":
theRoom=room
break
# read attributes
print(json.dumps(theRoom.attributes, indent=4))
print("Is {} on? {}".format(theRoom.attributes["name"], theRoom.attributes["active"]))
if theRoom.attributes["active"]:
print("Turning off")
# Next call is successful and returns immediately.
# if we ask the server, active has become false.
# Still, it takes 4mins for the Puck to turn off the mini split
response=theRoom.update(attributes={'active': False})
-
Official comment
Thank you for reporting this. We have passed this on to our engineers and will get back to you when we have some updates to share.
Thanks for being a valued Flair customer.
Regards,
The Flair Team
Comment actions
Please sign in to leave a comment.
Comments
1 comment