# Help with my new eWeLink (Sonoff) app developenent

**URL:** <https://community.homey.app/t/help-with-my-new-ewelink-sonoff-app-developenent/114409>\
**Category:** Developers\
**Created:** [August 14, 2024, 2:43pm UTC](https://community.homey.app/t/help-with-my-new-ewelink-sonoff-app-developenent/114409 "2024-08-14T14:43:56Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robin\_Widhede](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robin_widhede/32/82544_2.png) [@Robin\_Widhede](https://community.homey.app/u/Robin_Widhede)\
**Post date:** [August 14, 2024, 2:43pm UTC](https://community.homey.app/t/help-with-my-new-ewelink-sonoff-app-developenent/114409/1 "2024-08-14T14:43:56Z")

</div>

I am developing a new Homy app with support for the new eWeLink API to connect Sonoff devices to Homey.

I have got quite far, but have trouble when testing the pairing process.

I get the error: “Error: unknown\_error\_getting\_file” when it is supposed to start listing devices.

GitHub: [https://github.com/rowitechautomation/com.robinwidhede.ewelink](https://github.com/rowitechautomation/com.robinwidhede.ewelink)

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [August 14, 2024, 2:52pm UTC](https://community.homey.app/t/help-with-my-new-ewelink-sonoff-app-developenent/114409/2 "2024-08-14T14:52:50Z")

</div>

```auto
"template": "pair/login.html",
...
"template": "pair/list_devices.html"

```

should be:

```auto
"id" : "login",
...
"id": "list_devices"

```

(although `list_devices` is also the name of a built-in template, and I don’t know in which order the SDK will check, so you may have to rename the file/template id)

---

<div class="post-metadata">

**Author:** ![Robin\_Widhede](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robin_widhede/32/82544_2.png) [@Robin\_Widhede](https://community.homey.app/u/Robin_Widhede)\
**Post date:** [August 14, 2024, 3:19pm UTC](https://community.homey.app/t/help-with-my-new-ewelink-sonoff-app-developenent/114409/3 "2024-08-14T15:19:59Z")

</div>

I have made the changes, but still get same error.

Repository updated with the new code.

Since you are the Sonoff guru here, maybe you can check further if I have made some mistake somewhere?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [August 14, 2024, 3:28pm UTC](https://community.homey.app/t/help-with-my-new-ewelink-sonoff-app-developenent/114409/4 "2024-08-14T15:28:52Z")

</div>

> [@Robin\_Widhede](#):
>
> I have made the changes, but still get same error.

You shouldn’t use `template` at all for custom templates, only `id`:

```auto
    "pair": [
        {
            "id": "login",
            "navigation": {
                "next": "list_devices"
            }
        },
        {
            "id": "list_devices"
        }
    ],

```

> [@Robin\_Widhede](#):
>
> Since you are the Sonoff guru here, maybe you can check further if I have made some mistake somewhere?

The only Sonoff devices I still use are Zigbee, and not with Homey 😅

---

<div class="post-metadata">

**Author:** ![Robin\_Widhede](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robin_widhede/32/82544_2.png) [@Robin\_Widhede](https://community.homey.app/u/Robin_Widhede)\
**Post date:** [August 14, 2024, 5:42pm UTC](https://community.homey.app/t/help-with-my-new-ewelink-sonoff-app-developenent/114409/5 "2024-08-14T17:42:53Z")

</div>

Now it works and continues to the login, but then fails with error code.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/7/772c8a2b90a255f0713e45eb869ec05b3edf2fb8.png)

Debug log says:

─────────────── Logging stdout & stderr ───────────────  
Debugger listening on ws://0.0.0.0:9229/a8d9506d-ec7a-41ab-91ab-346d417418c2  
For help, see: [Node.js — Debugging Node.js](https://nodejs.org/en/docs/inspector)  
2024-08-14T17:41:33.739Z [log] [MyApp] MyApp has been initialized  
2024-08-14T17:41:33.742Z [log] [MyApp] eWeLink credentials and region set. Ready to pair devices.  
2024-08-14T17:41:36.702Z [log] [ManagerDrivers] [Driver:sonoff\_basic] [init] Sonoff Basic Driver has been initialized  
2024-08-14T17:41:40.578Z [log] [ManagerDrivers] [Driver:sonoff\_basic] [pairing] Pairing process started  
2024-08-14T17:41:40.579Z [log] [ManagerDrivers] [Driver:sonoff\_basic] Loading login file from path: /app/drivers/sonoff\_basic/pair/login.html  
2024-08-14T17:41:40.579Z [log] [ManagerDrivers] [Driver:sonoff\_basic] Loading list devices file from path: /app/drivers/sonoff\_basic/pair/list\_devices.html  
2024-08-14T17:41:59.791Z [log] [ManagerDrivers] [Driver:sonoff\_basic] [pairing] Login using stored credentials: [robinwidhede@icloud.com](mailto:robinwidhede@icloud.com)  
2024-08-14T17:42:00.063Z [log] [ManagerDrivers] [Driver:sonoff\_basic] [pairing] Login successful, credentials received: { error: 403, msg: ‘Sign:oauthClient enable invalid’ }

---

<div class="post-metadata">

**Author:** ![Robin\_Widhede](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robin_widhede/32/82544_2.png) [@Robin\_Widhede](https://community.homey.app/u/Robin_Widhede)\
**Post date:** [August 14, 2024, 6:22pm UTC](https://community.homey.app/t/help-with-my-new-ewelink-sonoff-app-developenent/114409/6 "2024-08-14T18:22:25Z")

</div>

Repository updated now. Please check the code for me regarding above problem.

Thanks.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [August 15, 2024, 4:59am UTC](https://community.homey.app/t/help-with-my-new-ewelink-sonoff-app-developenent/114409/7 "2024-08-15T04:59:42Z")

</div>

> [@Robin\_Widhede](#):
>
> Please check the code for me regarding above problem.

That’s really just a case of [reading the fine manual](https://apps.developer.homey.app/advanced/custom-views/custom-pairing-views#next-view) 🤨

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [August 15, 2024, 5:06am UTC](https://community.homey.app/t/help-with-my-new-ewelink-sonoff-app-developenent/114409/8 "2024-08-15T05:06:27Z")

</div>

> moved to developers categorie

---

<div class="post-metadata">

**Author:** ![Ahmed\_Wael](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ahmed_wael/32/109861_2.png) [@Ahmed\_Wael](https://community.homey.app/u/Ahmed_Wael)\
**Post date:** [August 23, 2024, 4:44pm UTC](https://community.homey.app/t/help-with-my-new-ewelink-sonoff-app-developenent/114409/9 "2024-08-23T16:44:39Z")

</div>

Hello @Robin_Widhede … just interested in this topic of yours … can you tell me if you have progressed in your app so far ?

---

<div class="post-metadata">

**Author:** ![Kowex](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kowex/32/2188_2.png) [@Kowex](https://community.homey.app/u/Kowex)\
**Post date:** [December 23, 2024, 2:45pm UTC](https://community.homey.app/t/help-with-my-new-ewelink-sonoff-app-developenent/114409/10 "2024-12-23T14:45:33Z")

</div>

Any progress?

---

<div class="post-metadata">

**Author:** ![Balazs\_Porganyi](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/balazs_porganyi/32/122421_2.png) [@Balazs\_Porganyi](https://community.homey.app/u/Balazs_Porganyi)\
**Post date:** [March 7, 2025, 11:52am UTC](https://community.homey.app/t/help-with-my-new-ewelink-sonoff-app-developenent/114409/11 "2025-03-07T11:52:09Z")

</div>

Hi! Your project is very interesting…  
I’m curious to see where the project is going.  
I’m really looking forward to it!
