Hi, is it possible to get Homey’s model number from within a Homey app (without API permission)?
What exactly? HP19/23 type?
I have some check in one of my apps. I can give you an example this evening.
That app has the homey:manager:api permission, so that’s how it determines it
But the solution of @RonnyW is great, I didn’t know that the crash reports also contained the model number.
That’s just weird, needing full access to just get the model ID.
I think I was wrong with using model ID. I only use
if (this.homey.platform == "local"){
to check if it’s a Homey or Container (used for HP23/26 with homey app run without the -r parameter) to init the debugger correctly for both.
like this:
if (process.env.DEBUG === '1'){
if (this.homey.platform == "local"){
try{
require('inspector').waitForDebugger();
}
catch(error){
require('inspector').open(9901, '0.0.0.0', true);
}
}
}
PS: I asked Athom to extend the developer/app details to show model ID in crash log list. Let’s wait for an answer if that’s possible because it’s a cumulated list.






