Homey Pro (Early 2023) - (P)Review Alpha Testing

Yesss, thanks so much, @Emile! :tada::smiley:
Much appreciated!

2 Likes

Fantastic! :pray::tada:

8 posts were merged into an existing topic: Homey Mobile App (v7 necessary for New Homey Pro Early 2023) - (P)Review Alpha Testing

Hey,

is the alarm type went on or off flow trigger gone on home zone level? on the old homey pro I can use this in the flows , now I need to add all the door sensors.


#homey-pro-early-2023 channel on slack would be a better place to post this.

2 Likes

has the syntax to issue webhooks to homey pro changed in 2023 version ?
i am not able to trigger anything from my apple through the old webhook url (with updated homeyid offcourse)

@Django Yes, you can now use these…

Local:
http://<homey-ip>/webhook?event=my_event&tag=my_tag

Cloud:
https://webhook.homey.app/<homey-cloud-id>/my_event?tag=my_tag

2 Likes

Hello,
Anyone of you know if the paths within the apps changed in new Homey Pro 2023? I’ve got an app made with SDKv3 (BleBox). On the older Homey Pro works OK, but I receive crashes with the new Homey Pro 2023 (I don’t own it, I can see it on the developer site). I’ve got a folder in my project structure called “lib” and within it I’ve got for example util.js. In several files in the project I require /lib/util.js

In the crash stack trace from 10.0.0-rc.55 I can see:

Stack trace
Error: Cannot find module ‘/lib/util.js’
Require stack:

  • /app/app.js
  • /node_modules/@athombv/homey-apps-sdk-v3/lib/Util.js
  • /node_modules/@athombv/homey-apps-sdk-v3/lib/Device.js
  • /node_modules/@athombv/homey-apps-sdk-v3/homey.js
  • /node_modules/@athombv/homey-apps-sdk-v3/index.js
  • /homey-app-runner/lib/App.js
  • /homey-app-runner/index.js
    at Socket. (file:///app/lib/App.mjs:622:61)
    at Socket.onack (/node_modules/socket.io/dist/socket.js:310:17)
    at Socket._onpacket (/node_modules/socket.io/dist/socket.js:247:22)
    at /node_modules/socket.io/dist/client.js:214:24
    at processTicksAndRejections (node:internal/process/task_queues:77:11)

So I assume something changed with paths. Anyone knows what is wrong?
From one of the users (maybe the one, who makes “crashed”) I get an info, that he can’t install the app - after installation it disappears from the “Apps” In the mobile application within around 10 seconds…

Yes they have, apps are now run with /app as working directory (whereas on the old HP it’s /).

You should always use relative paths for require(), not just for Homey apps but in general. In your case, it should look like this:

const util = require('./lib/util');
1 Like

Seeing the same errors popping in my apps from people running 10.0.0.rc#
Its a bit annoying that this is a requirement that is not validated in the nodejs tooling.
It is kind of an SDK change that is breaking, but not clearly communicated and not validated nor can I manage it by changing a requirement in de app.
I will try to change these and see if the people are not getting the errors anymore. trial and error
This is why Homey should allow devs to do a device swap or something. I bought the 2019 version just last year and with loosing the ring on the device as the status light ( :cry: ) there is more to loose than to gain. So spending that much money to write off a brand new device is not something I can explain to the wife.

Yes, it’s annoying, but OTOH, using absolute paths for require() has always been a bad practice with Node.js development.

Also, the ESLint rules for Homey apps throw an error when you use an absolute path:

/private/tmp/com.company.myapp/app.js
  4:21  error  Do not import modules using an absolute path  import/no-absolute-path

Interesting, looking at my code i never do an absolute path. Still get the same errors posted.
Now i am lost :confused:

Can you post an actual stack trace?

Error: Cannot find module ‘…/…/lib/homeycrypt’

Require stack:

at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1021:15)

at Function.Module._load (node:internal/modules/cjs/loader:866:27)

at Module.require (node:internal/modules/cjs/loader:1093:19)

at Module.homeyRequire [as require] (/node_modules/@athombv/homey-apps-sdk-v3/index.js:12:19)

at require (node:internal/modules/cjs/helpers:108:18)

at Function.getAuthCookie (/app/lib/mnm.js:65:25)

at /app/drivers/chargepoint/driver.js:84:40

at PairSession._triggerEvent (/node_modules/@athombv/homey-apps-sdk-v3/lib/PairSession.js:80:12)

at ManagerDrivers._onPairSessionEvent (/node_modules/@athombv/homey-apps-sdk-v3/manager/drivers.js:190:20)

at processTicksAndRejections (node:internal/process/task_queues:96:5) {

code: ‘MODULE_NOT_FOUND’,

requireStack: [

‘/app/lib/mnm.js’,

‘/app/drivers/chargepoint/driver.js’,

‘/node_modules/@athombv/homey-apps-sdk-v3/lib/Util.js’,

‘/node_modules/@athombv/homey-apps-sdk-v3/lib/Device.js’,

‘/node_modules/@athombv/homey-apps-sdk-v3/homey.js’,

‘/node_modules/@athombv/homey-apps-sdk-v3/index.js’,

‘/homey-app-runner/lib/App.js’,

‘/homey-app-runner/index.js’

]

}

From my other app:
2023-03-15T18:55:38.661Z [err] [Homey:6405cb1c0ad98a0b95ea6672] [ManagerDrivers] Error Initializing Driver H61A2: Error: Cannot find module ‘…/…/api/govee-api’

Require stack:

at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1021:15)

at Function.Module._load (node:internal/modules/cjs/loader:866:27)

at Module.require (node:internal/modules/cjs/loader:1093:19)

at Module.homeyRequire [as require] (/node_modules/@athombv/homey-apps-sdk-v3/index.js:12:19)

at require (node:internal/modules/cjs/helpers:108:18)

at Object. (/app/api/govee-driver.js:5:12)

at Module._compile (node:internal/modules/cjs/loader:1191:14)

at Object.Module._extensions…js (node:internal/modules/cjs/loader:1245:10)

at Module.load (node:internal/modules/cjs/loader:1069:32)

at Function.Module._load (node:internal/modules/cjs/loader:904:12) {

code: ‘MODULE_NOT_FOUND’,

requireStack: [

‘/app/api/govee-driver.js’,

‘/app/drivers/H61A2/driver.js’,

‘/node_modules/@athombv/homey-apps-sdk-v3/lib/Util.js’,

‘/node_modules/@athombv/homey-apps-sdk-v3/lib/Device.js’,

‘/node_modules/@athombv/homey-apps-sdk-v3/homey.js’,

‘/node_modules/@athombv/homey-apps-sdk-v3/index.js’,

‘/homey-app-runner/lib/App.js’,

‘/homey-app-runner/index.js’

]

}

I think what is happening is that I have a …/ to much in those files, and in old homey it just rooted at / while now if supersedes the app level and then tries to find the /lib as sibling off app
So my bad anyway (of course) but still hard to debug and fix if the old devices dont enforce this while the new ones do

Another weird stack trace:

Homey Version

v10.0.0-rc.64

Stack Trace

Error: ENOENT: no such file or directory, open ‘/homey/user/apps/dc395f073c11ab982acd75aa71db3b95/app.json’

Does any1 know what happened?

I guess you forgot to report here:

Report an Issue

If you have encountered an issue, please report it so our team can fix it. Even if you think it has already been reported, knowing how often it occurs help a lot solving it.

No, I didn’t. I don’t have a Homey Pro 2023. I’m an app developer, who received a crash report for my app and I wonder if it’s another problem with my app and I should change something for HP2023 (on old HP it works OK)…

Apparently, apps can be half-installed. I’ve seen it on some of my apps too. Nothing we can do about it :frowning: