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
"template": "pair/login.html",
...
"template": "pair/list_devices.html"
should be:
"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)
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.
You shouldn’t use template
at all for custom templates, only id
:
"pair": [
{
"id": "login",
"navigation": {
"next": "list_devices"
}
},
{
"id": "list_devices"
}
],
The only Sonoff devices I still use are Zigbee, and not with Homey
Now it works and continues to the login, but then fails with error code.
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
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
2024-08-14T17:42:00.063Z [log] [ManagerDrivers] [Driver:sonoff_basic] [pairing] Login successful, credentials received: { error: 403, msg: ‘Sign:oauthClient enable invalid’ }
Repository updated now. Please check the code for me regarding above problem.
Thanks.
That’s really just a case of reading the fine manual
1 Like
Hello @Robin_Widhede … just interested in this topic of yours … can you tell me if you have progressed in your app so far ?