# Best way to get started with a PHP API?

**URL:** <https://forum.ewelink.cc/t/best-way-to-get-started-with-a-php-api/9702>\
**Category:** Free discussion\
**Created:** [December 5, 2022, 11:33am UTC](https://forum.ewelink.cc/t/best-way-to-get-started-with-a-php-api/9702 "2022-12-05T11:33:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![barrysau](https://avatars.discourse-cdn.com/v4/letter/b/aeb1de/32.png) [@barrysau](https://forum.ewelink.cc/u/barrysau)\
**Post date:** [December 5, 2022, 11:33am UTC](https://forum.ewelink.cc/t/best-way-to-get-started-with-a-php-api/9702/1 "2022-12-05T11:33:21Z")

</div>

I am just getting started with eWeLink and would like to control/read devices using a PHP API.

I have loaded kukkjanos/ewelink from github and am getting a number of errors.

I want to read the temperature back from a SonOff temperature sensor and plot it on a web page.

Is this the best route for PHP API? Is there a better route?

Rgds,  
Barry.

---

<div class="post-metadata">

**Author:** ![yitie](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.ewelink.cc/yitie/32/3613_2.png) [@yitie](https://forum.ewelink.cc/u/yitie)\
**Post date:** [December 6, 2022, 9:31am UTC](https://forum.ewelink.cc/t/best-way-to-get-started-with-a-php-api/9702/2 "2022-12-06T09:31:08Z")

</div>

Check this [https://dev.ewelink.cn/#/](https://dev.ewelink.cn/#/)

---

<div class="post-metadata">

**Author:** ![p.janisio](https://avatars.discourse-cdn.com/v4/letter/p/f08c70/32.png) [@p.janisio](https://forum.ewelink.cc/u/p.janisio)\
**Post date:** [June 24, 2024, 5:23pm UTC](https://forum.ewelink.cc/t/best-way-to-get-started-with-a-php-api/9702/3 "2024-06-24T17:23:27Z")

</div>

I have made an API gateway for ewelink, just some days ago: [https://github.com/PJanisio/ewelinkApiPhp](https://github.com/PJanisio/ewelinkApiPhp)

---

<div class="post-metadata">

**Author:** ![mre](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@mre](https://forum.ewelink.cc/u/mre)\
**Post date:** [August 19, 2024, 9:54am UTC](https://forum.ewelink.cc/t/best-way-to-get-started-with-a-php-api/9702/4 "2024-08-19T09:54:43Z")

</div>

If you are still interested in doing this, please check out my recent php script. I am also reading a temperature sensor. [https://mresoftware.com/Coolkit\_API.htm](https://mresoftware.com/Coolkit_API.htm)

---

<div class="post-metadata">

**Author:** ![p.janisio](https://avatars.discourse-cdn.com/v4/letter/p/f08c70/32.png) [@p.janisio](https://forum.ewelink.cc/u/p.janisio)\
**Post date:** [August 12, 2025, 6:11pm UTC](https://forum.ewelink.cc/t/best-way-to-get-started-with-a-php-api/9702/5 "2025-08-12T18:11:42Z")

</div>

Great stuff! But still when you want to fetch **live** voltage, power and currentyou need to use websockets connection and ping the device, its known issue in HA and other implementations.

So again 🙂 [GitHub - PJanisio/ewelinkApiPhp: API connector for Sonoff / ewelink devices](https://github.com/PJanisio/ewelinkApiPhp) more advertisement needed ;D
