[HOW TO] CLI install method

Okay, now it worked. Thank you so much for that, you’re brilliant. :+1:t4:

is it possble to cli a homey via the www , i have on e homey on version 5 on an other network , the other homys are production homeys , do i have to nat a port or something ?

Is it possible to download an app from your homey with CLI? I wan`t to look at some code to verify manufacturerID support.

No, that’s not possible :frowning:

1 Like

When I run the command “home app run” I get the following error message (at the end):

✓ Pre-processing app…
✓ Running plugins…
✓ Running plugin compose
✓ Plugin compose finished
✓ Validating app…
✓ Homey App validated successfully against level debug
✓ Packing Homey App…
✓ Pruning dev dependencies…
— App size: 134.5 KB
✓ Installing Homey App on Øyvind's Homey (https://10-22-1-124.homey.homeylocal.com)…
× An unkown error has occured [incompatible_app_version]

I’ve followed the Getting Started Guide on https://apps-sdk-v2.developer.athom.com/tutorial-Getting%20Started.html to the letter. I’ve also ensured that the node.js version I am using is supported (v15.3.0)

Any ideas what’s causing the error?
I apologize if this has been asked/answered elsewhere, I couldn’t find anything relevant on the forum.

The app you’re trying to install (probably) requires firmware v5 (experimental at the moment), and your Homey is still running v4.

1 Like

Upgrading firmware worked, thank you!

Hmm Used CLI before. Just installed Node.js v12.16.1.
Now I get this error:

Don’t know what I am doing wrong?

Execute this: xcode-select --install

This will install the (required) Xcode toolkit on your Mac.

1 Like

Once again @robertklep to the rescue! Thnx. This solved my problem!

Hi,

I’m trying to install Assistant Relay:

But I also need to install Python on Homey. Is this possible?

Regards,

Dennis

You need to develop an Homey App, This is not an Homey App.
You could start here:
https://developer.athom.com/docs/apps-reference
and
https://apps-sdk-v2.developer.athom.com/

Hello all and specially @robertklep :smiley:

I have Meross devices. I previsouly had success CLI installing GitHub - bjwelker/com.merros.cloud: Meross Cloud devices for Homey

Recently the author added the mss210, as i have these devices it s awsome BUT after each installs i did, i have the app crashing on homey app.

During node prompt install i see these warnings :
1/ npm install

2/ homey app install

I uninstalled node.js app on my windows then i reinstalled it. Downloaded the fresh github app. I did that many time with no success.

Any idea what it coud be ?

Yes: your version of npm (which comes with Node.js) is too new, and the homey app cannot deal with it. But even though the error occurs, the app is still installed successfully (see last line).

If you want to get rid of the error, you should install npm@6 (npm install npm@6 -g).

1 Like

Wow you were right. I had no more errors in the node js prompt.
But I still have the app crashed syndrom :frowning:

Your screenshot isn’t showing any crashes, though. Instead of homey app install you can use homey app run; that will run the app and show debug information.

Now that s a challenge !
I am posting here the debug i got running the homey app run on com.merros.cloud-master

Now i am going to search how to force install the missing modules ?

─────────────── Logging stdout & stderr ───────────────
internal/modules/cjs/loader.js:985
  throw err;
  ^

Error: Cannot find module './lib/websocket'
Require stack:
- /node_modules/ws/index.js
- /node_modules/mqtt/lib/connect/ws.js
- /node_modules/mqtt/lib/connect/index.js
- /node_modules/mqtt/mqtt.js
- /lib/meross.js
- /app.js
- /opt/homey-client/node_modules/homey-apps-sdk-v2/lib/SDK.js
- /opt/homey-client/node_modules/homey-apps-sdk-v2/index.js
- /opt/homey-client/system/manager/ManagerApps/bootstrap.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)
    at Function.Module._load (internal/modules/cjs/loader.js:864:27)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at Module.require (/opt/homey-client/node_modules/homey-apps-sdk-v2/index.js:14:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/node_modules/ws/index.js:3:19)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/node_modules/ws/index.js',
    '/node_modules/mqtt/lib/connect/ws.js',
    '/node_modules/mqtt/lib/connect/index.js',
    '/node_modules/mqtt/mqtt.js',
    '/lib/meross.js',
    '/app.js',
    '/opt/homey-client/node_modules/homey-apps-sdk-v2/lib/SDK.js',
    '/opt/homey-client/node_modules/homey-apps-sdk-v2/index.js',
    '/opt/homey-client/system/manager/ManagerApps/bootstrap.js'
  ]
}

--- INFO: com.meross.cloud has been killed ---

Try:
npm install

Or

npm update

@Adrian_Rockall
Did you try to install that app and di it work for you ?

No, I’ve not tried it.