bitfocus / companion-module-broadlink-remote

MIT License
0 stars 0 forks source link

Can't load module #1

Closed BenJamesAndo closed 5 months ago

BenJamesAndo commented 5 months ago

I've loaded this module up but it crashes. Below is the log.

system: ** Starting Connection from "G:\Documents\Scripts\companion\companion-module-broadlink-remote-0.1.0\index.js" **
system: ** Connection started **
error: node:internal/errors:496
    ErrorCaptureStackTrace(err);
    ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@companion-module/base' imported from G:\Documents\Scripts\companion\companion-module-broadlink-remote-0.1.0\index.js
    at new NodeError (node:internal/errors:405:5)
    at packageResolve (node:internal/modules/esm/resolve:916:9)
    at moduleResolve (node:internal/modules/esm/resolve:973:20)
    at defaultResolve (node:internal/modules/esm/resolve:1193:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:403:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:372:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:249:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:39)
    at link (node:internal/modules/esm/module_job:75:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}

Node.js v18.19.1
leonreucher commented 5 months ago

Thank you for the input. Which version of Companion are you currently at?

BenJamesAndo commented 5 months ago

Currently running the latest beta version 3.3.0+6815-main-6402fb91

leonreucher commented 5 months ago

Did you use the version of the module published with the beta or did you clone this repo and built it yourself?

BenJamesAndo commented 5 months ago

I downloaded the module from this Github project and loaded it up as a developer module. image

image

image

leonreucher commented 5 months ago

Yeah, I just saw that the module is not even included in the latest beta build, caused by a wrong version number. Could you please check if this build is working for you? pkg.tgz

BenJamesAndo commented 5 months ago

It works great now. Thank you! I was able to learn and send an IR signal. I'm working on learning an RF signal now. I have 2 RM4 Mini's at my work that I can test this with on the weekend.

leonreucher commented 5 months ago

Currently only the RM4 pro is "officially" supported, but please give it a try with an RM4 mini. Great to hear that it's working for you :) For the rf signal, you can open the log of the module as a helping factor for the first time. In the log you can see the instructions on what to do to get the RF code working :)

BenJamesAndo commented 5 months ago

Very helpful with the logs thanks. I've used the Broadlink within Home Assistant. HA uses the codes in B64. I was able to convert them to Hex and successfully use it with your module. I used this website to convert it https://pasthev.github.io/sensus

I was able to send an RF signal as well. So all working from my end :)