brbeaird / SmartThings-MyQ-Edge

SmartThings/MyQ Integration via Edge
62 stars 16 forks source link

Unable to install Server #6

Closed HeliManCdn closed 1 year ago

HeliManCdn commented 1 year ago

I am unable to install either the Windows 64 or MacOS server. Windows briefly opens a cmd window that closes immediately when run as administrator, then no installer shows up, it just closes the window.

MacOS, the download is not in a format that runs as an installer so I can't run it. It only opens as a text file.

I realize I may be missing some basic info on how to make these work, please accept my apologies if I'm supposed to already know some hidden secret to installing files like these.

rvs007 commented 1 year ago

The .EXE file is not an installer. That's the server itself. You need to open a command prompt (doesn't need to run as administrator), and run the .EXE file. The server will then run. You'll need to create the config.json file and add your MyQ login & password to it per the instructions.

If you want the server to run everytime Windows starts, try using Task Scheduler and create a task to start the exe during Windows startup.

swerb73 commented 1 year ago

I've tried both versions of windows, running from command prompt I get:

This version of c:\MyQ\myQBridgeServer-win.exe is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher.

I'm running Windows 10 Home 21H2 on an older Intel Stick, Intel(R) Atom(TM) x5-Z8330 CPU @ 1.44GHz 1.44 GHz, 2GB RAM, 32-bit operating system, x64-based processor.

Is there a way to get a build for this machine?

brbeaird commented 1 year ago

Can you check out the latest version and see if you still have this issue?

swerb73 commented 1 year ago

Can you check out the latest version and see if you still have this issue? Hi @brbeaird, same issue:

c:\MyQ>myQBridgeServer-win.exe This version of c:\MyQ\myQBridgeServer-win.exe is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher.

brbeaird commented 1 year ago

I am not sure on this one. I'm using pkg to build the node into an executable. It seems like it should work for you if your stick is running 64-bit Windows, but my machine just may not be able to fully emulate what you need. https://github.com/vercel/pkg

If you really want to play with it, you could:

  1. Install NodeJS
  2. Run npm install -g pkg
  3. Clone this repository
  4. From inside the src/server directory, run "pkg server.js" and see if maybe it'll build one that's usable for you.
swerb73 commented 1 year ago

I am not sure on this one. I'm using pkg to build the node into an executable. It seems like it should work for you if your stick is running 64-bit Windows, but my machine just may not be able to fully emulate what you need. https://github.com/vercel/pkg

If you really want to play with it, you could:

  1. Install NodeJS
  2. Run npm install -g pkg
  3. Clone this repository
  4. From inside the src/server directory, run "pkg server.js" and see if maybe it'll build one that's usable for you.

Thanks, I'm not familiar with the pkg process, but here's what I get after cloning and running as you indicate above: C:\MyQ\src\server>pkg server.js

pkg@5.8.0 Targets not specified. Assuming: node12-linux-x86, node12-macos-x86, node12-win-x86 Fetching base Node.js binaries to PKG_CACHE_PATH fetched-v12.22.11-linux-x86 [ ] 0% Error! 404: Not Found Not found in remote cache: {"tag":"v3.4","name":"node-v12.22.11-linux-x86"} Building base binary from source: built-v12.22.11-linux-x86 Error! Not able to build for 'linux' here, only for 'win'

Somehow it's targeting linux, but I'm on Windows?

brbeaird commented 1 year ago

Interesting. You can explicitly set the target. What if you run this?

pkg server.js -o myQBridgeServer --targets node12-win-x86 --no-bytecode --public-packages "*" --public

or this?

pkg server.js -o myQBridgeServer --targets node12-win-x64 --no-bytecode --public-packages "*" --public

swerb73 commented 1 year ago

When I run the x86 version it starts with what looks like an error: C:\MyQ\src\server>pkg server.js -o myQBridgeServer --targets node12-win-x86 --no-bytecode --public-packages "*" --public

pkg@5.8.0 Fetching base Node.js binaries to PKG_CACHE_PATH fetched-v12.22.11-win-x86 [ ] 0% Error! 404: Not Found Not found in remote cache: {"tag":"v3.4","name":"node-v12.22.11-win-x86"} Building base binary from source: built-v12.22.11-win-x86 Fetching Node.js source archive from nodejs.org... Extracting Node.js source archive...

Then ends with:

vcbuild.bat Applying patches Error! Error: spawnSync patch ENOENT at Object.spawnSync (internal/child_process.js:1041:20) at spawnSync (child_process.js:616:24) at C:\Users\shann\AppData\Roaming\npm\node_modules\pkg\node_modules\pkg-fetch\lib-es5\utils.js:148:51 at step (C:\Users\shann\AppData\Roaming\npm\node_modules\pkg\node_modules\pkg-fetch\lib-es5\utils.js:33:23) at Object.next (C:\Users\shann\AppData\Roaming\npm\node_modules\pkg\node_modules\pkg-fetch\lib-es5\utils.js:14:53) at C:\Users\shann\AppData\Roaming\npm\node_modules\pkg\node_modules\pkg-fetch\lib-es5\utils.js:8:71 at new Promise () at __awaiter (C:\Users\shann\AppData\Roaming\npm\node_modules\pkg\node_modules\pkg-fetch\lib-es5\utils.js:4:12) at spawn (C:\Users\shann\AppData\Roaming\npm\node_modules\pkg\node_modules\pkg-fetch\lib-es5\utils.js:145:12) at C:\Users\shann\AppData\Roaming\npm\node_modules\pkg\node_modules\pkg-fetch\lib-es5\build.js:221:60

When I run the x64 version I get: C:\MyQ\src\server>pkg server.js -o myQBridgeServer --targets node12-win-x64 --no-bytecode --public-packages "*" --public

pkg@5.8.0 Warning Cannot find module 'axios' from 'C:\MyQ\src\server' in C:\MyQ\src\server\server.js Warning Cannot find module 'express' from 'C:\MyQ\src\server' in C:\MyQ\src\server\server.js Warning Cannot find module '@hjdhjd/myq' from 'C:\MyQ\src\server' in C:\MyQ\src\server\server.js Warning Cannot find module 'node-ssdp-response' from 'C:\MyQ\src\server' in C:\MyQ\src\server\server.js

Thanks for your help!

brbeaird commented 1 year ago

Hmm. Maybe try it without specifying the node version? Something like --targets win-x86 ?

swerb73 commented 1 year ago

Hmm. Maybe try it without specifying the node version? Something like --targets win-x86 ?

OK, I'm switching over to a Mac to try and make all of this (and other things) work better. Now when I download the Mac server it doesn't appear to show up as an app so I can't run it. Is there a trick to getting MacOS to recognize it as an app and run it when I open it?

swerb73 commented 1 year ago

Hmm. Maybe try it without specifying the node version? Something like --targets win-x86 ?

OK, I'm switching over to a Mac to try and make all of this (and other things) work better. Now when I download the Mac server it doesn't appear to show up as an app so I can't run it. Is there a trick to getting MacOS to recognize it as an app and run it when I open it?

Hi @brbeaird - just checking in on any ideas with the Mac build, trying on a Mac instead.

brbeaird commented 1 year ago

Unfortunately, I do not have a Mac available to test, so I can't offer much assistance on that. You could check the thread in the SmartThings thread - I'm pretty sure a few people commented on the Mac executable there. https://community.smartthings.com/t/st-edge-smartthings-myq-edge