staromeste / homebridge-http-advanced-accessory

Supports all devices on HomeBridge Platform / Bridges devices to http
Apache License 2.0
65 stars 22 forks source link

Set multiple attributes with one URL call #28

Closed fredlcore closed 3 years ago

fredlcore commented 3 years ago

First of all, thanks a lot for this great plugin! I have the problem that for my "thermostat" device, I could get all the relevant data in one URL call. Is it possible to assign multiple thermostat-variables with just one URL call, e.g. "getTemperatureDisplayUnits" and "getCurrentTemperature"? Because now I have to send five URLs and my device can't handle that many at the same time and some get returned with error "ECONNREFUSED" and are thus undefined.

The other alternative would be to add a short delay between URL calls. Is there a setting for that?

staromeste commented 3 years ago

I'm sorry but unfortunately there is no setting for this. But it wouldn't be so difficult to add... I'll schedule it as soon as possible.

On Wed, 13 Jan 2021 at 09:52, fredlcore notifications@github.com wrote:

First of all, thanks a lot for this great plugin! I have the problem that for my "thermostat" device, I could get all the relevant data in one URL call. Is it possible to assign multiple thermostat-variables with just one URL call, e.g. "getTemperatureDisplayUnits" and "getCurrentTemperature"? Because now I have to send five URLs and my device can't handle that many at the same time and some get returned with error "ECONNREFUSED" and are thus undefined.

The other alternative would be to add a short delay between URL calls. Is there a setting for that?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/staromeste/homebridge-http-advanced-accessory/issues/28, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBP2MOOVCAPDYZYIEVWSX3SZVNLVANCNFSM4WAOSCXQ .

fredlcore commented 3 years ago

Thanks a lot for your quick response and your offer to look into it!

staromeste commented 3 years ago

I've added a configuration option "uriCallsDelay" to add a delay between calls. Let me know if it works for you.

On Wed, 13 Jan 2021 at 11:10, fredlcore notifications@github.com wrote:

Thanks a lot for your quick response and your offer to look into it!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/staromeste/homebridge-http-advanced-accessory/issues/28#issuecomment-759346614, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBP2MNKRVGK7YXAVPQM653SZVWRJANCNFSM4WAOSCXQ .

fredlcore commented 3 years ago

Great, works like charm, thanks a lot for this quick fix!