peterbuga / HASS-sonoff-ewelink

Home Assistant component to control Sonoff/eWeLink devices with original firmware
MIT License
797 stars 294 forks source link

It is recommended that you use websocket to get device status instead of requesting API #209

Open ghost opened 4 years ago

ghost commented 4 years ago

Hello,

There are some problems in the way of getting the device status of your project. Although the request device list (/api/user/device) can get all the device status, too many requests for the interface will cause great pressure on the coolkit server. It is recommended to use websocket to monitor and get the latest status of the device in real time.

Relevant document address: https://coolkit-technologies.github.io/apiDocs/findStatus_en.html

It can improve your project and hope to adopt it.

Thank you!

peterbuga commented 4 years ago

Thanks @coolkit-carl 🙌

I'll definitely look into it! To be honest I've previously skimmed through the documentation from here (ps: yesterday the above link was not working 404) and it wasn't quite clear that the information is offered via websocket, now some light has been shed upon it :D

in all fairness i tried to increase the polling times as much as possible mostly for the reason listed above 😊

elserge82 commented 4 years ago

Will it improve the change group state?

peterbuga commented 4 years ago

@elserge82

Will it improve the change group state?

what do you mean ?