mitch7391 / homebridge-cmd4-AdvantageAir

Catered shell script to integrate air conditioner control units by Advantage Air into HomeKit using the plug-in homebridge-cmd4.
MIT License
38 stars 4 forks source link

[Support] Cmd4 Plugin not installed #35

Closed ozbastion closed 2 years ago

ozbastion commented 2 years ago

Describe Your Problem: Getting lots of different error messages such as getValue. Last error found Getting: "CurrentTemperature". Perhaps you should run in debug mode to find out what the problem might be.

However, I have gone back to step 9 to the "Advantage Air Shell Check" and clicked on "Check Configuration" which tells me the Cmd4 Plugin is not installed, when it is showing as installed.

[Link to Logs:]()

Paste of Logs:

[1/27/2022, 11:43:47 PM] [Homebridge UI] Homebridge restart request received
[1/27/2022, 11:43:47 PM] [Homebridge UI] Terminal session ended.
[1/27/2022, 11:43:47 PM] [Homebridge UI] UI / Bridge settings have not changed; only restarting Homebridge process
[1/27/2022, 11:43:47 PM] [Homebridge UI] Sending SIGTERM to Homebridge
[1/27/2022, 11:43:47 PM] Got SIGTERM, shutting down Homebridge...
[1/27/2022, 11:43:52 PM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[1/27/2022, 11:43:57 PM] [HB Supervisor] Restarting Homebridge...
[1/27/2022, 11:43:57 PM] [HB Supervisor] Starting Homebridge with extra flags: -I -P /homebridge/node_modules
[1/27/2022, 11:43:58 PM] [HB Supervisor] Started Homebridge v1.4.0 with PID: 1618
[1/27/2022, 11:43:58 PM] Loaded config.json with 0 accessories and 2 platforms.
[1/27/2022, 11:43:59 PM] Loaded 2 cached accessories from cachedAccessories.
[1/27/2022, 11:43:59 PM] ---
[1/27/2022, 11:43:59 PM] [Homebridge UI] Starting terminal session
[1/27/2022, 11:44:00 PM] Loaded plugin: homebridge-cmd4@6.0.4
[1/27/2022, 11:44:00 PM] Registering accessory 'homebridge-cmd4.Cmd4'
[1/27/2022, 11:44:00 PM] Registering platform 'homebridge-cmd4.Cmd4'
[1/27/2022, 11:44:00 PM] ---
[1/27/2022, 11:44:00 PM] Loaded plugin: homebridge-cmd4-advantageair@3.1.0
[1/27/2022, 11:44:00 PM] Registering platform 'homebridge-cmd4-advantageair.cmd4-AdvantageAir'
[1/27/2022, 11:44:00 PM] ---
[1/27/2022, 11:44:00 PM] Loaded plugin: homebridge-dummy@0.5.0
[1/27/2022, 11:44:00 PM] Registering accessory 'homebridge-dummy.DummySwitch'
[1/27/2022, 11:44:00 PM] ---
[1/27/2022, 11:44:00 PM] Loaded plugin: homebridge-config-ui-x@4.42.0
[1/27/2022, 11:44:00 PM] Registering platform 'homebridge-config-ui-x.config'
[1/27/2022, 11:44:00 PM] ---
[1/27/2022, 11:44:00 PM] Loading 2 platforms...
[1/27/2022, 11:44:00 PM] [Config] Initializing config platform...
[1/27/2022, 11:44:00 PM] [Config] Running in Service Mode
[1/27/2022, 11:44:00 PM] [Cmd4] Initializing Cmd4 platform...
[1/27/2022, 11:44:00 PM] [Cmd4] Cmd4Platform didFinishLaunching
[1/27/2022, 11:44:00 PM] [Cmd4] Restoring existing accessory from cache: Front_Room
[1/27/2022, 11:44:02 PM] [Cmd4] Restoring existing accessory from cache: Front
Setup Payload:
X-HM://0023ISYWY3FHM
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

    ┌────────────┐     
    │ 031-45-154 │     
    └────────────┘     

[1/27/2022, 11:44:02 PM] Homebridge v1.4.0 (HAP v0.10.0) (Homebridge) is running on port 53037.
[1/27/2022, 11:44:42 PM] [Cmd4] *** Starting Polling
[1/27/2022, 11:44:51 PM] [Cmd4] *** All characteristics are now being polled
[1/27/2022, 11:45:04 PM] [Cmd4] More than *50* errors were encountered in a row for "Front_Room" getValue. Last error found Getting: "StatusLowBattery". Perhaps you should run in debug mode to find out what the problem might be.

Screen Shot 2022-01-27 at 11 38 45 pm

Cmd4 Config:

Screenshots: Homebridge Cmd4 Plugin Installed

Error Cmd4 Plugin Not Installed

Advantage Air System:

Homebridge Environment:

mitch7391 commented 2 years ago

I guess I would call this one of my passion projects; so always very keen to make it as seamless as possible for everyone. John had made that even more possible with the countless hours he has put into this project too.

It's even passed the shell check (green tick)

Yessssss! :D

looks like there are just some quirks/incompatibilities with the oznu/homebridge via Docker.

Do you have enough of a grasp of the situation to perhaps explain it in a issue raised on their repo so they are aware over there? Could save someone else getting into the same situation in the future.

My RPi4 (the first model) is used for Homebridge originally, I have then connected some HDDs to it to test the waters for if I want a NAS or not (and found it is doing a good enough job for what I need as is) and also continuously run downloads/uploads into/out of it, I ran Hyperion/HyperHDR on it (a TV ambilight server), it is now my dev machine for this project and I have recently installed Pi-Hole on it. It barely chews any power and the CPU usage all of that barely goes over 12% when it is under load. Eventually want to see how it handles homebridge CCTV/HKSV as well.

Man RPi's are good! John does so much more with them as well.

ztalbot2000 commented 2 years ago

Hi all,

Sorry, I did not think about restarting docker, only Homebridge. Glad it worked. Skip the last command about moving modules.del back to modules. I would still not mind the output of ls -al /usr/local/lib/node_modules

I have probably at least a dozen Pi's ;-) These ones are dedicated NAS Server Security system using Shinobi Homebridge Kodi CNC controller Kali box Thermal camera

Those were Pi 4s. I have lots of Pi 3's and 2's kicking around unused. The Pi4 being the best because they finally have separate busses for GigE and USB. I wasn't kidding about my ability to take a Pi4, with all it's GPIO's and connectivity to make a replacement AirCon. Just not enough time in the day.

The Pi is not the only SBC on the market. It depends on what you need. For Single Board Computers it is actually one of the more expensive ones.

Ttyl, John

On Mon, Jan 31, 2022 at 7:06 AM ozbastion @.***> wrote:

You guys are amazing. John, good morning! Thanks for responding so quickly. Mitch, thank you too. After restarting the Docker container, and updating the config.json file, we're all systems go. It's even passed the shell check (green tick), so the system works as normal - looks like there are just some quirks/incompatibilities with the oznu/homebridge via Docker.

I'll do a bit more research on Pi2 / Pi3 / Pi4 - anything in particular you guys use it for?

— Reply to this email directly, view it on GitHub https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/issues/35#issuecomment-1025670400, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX2J52S7PPO6AAYM3OTUYZ3NVANCNFSM5M56ERIQ . You are receiving this because you were mentioned.Message ID: @.***>

ozbastion commented 2 years ago

Do you have enough of a grasp of the situation to perhaps explain it in a issue raised on their repo so they are aware over there? Could save someone else getting into the same situation in the future.

I'm happy to do so - sorry not sure what 'repo' means.

I've started drafting an issue, but have realised I'm not quite sure I have solved the problem myself. I have subsequently installed other plugins though those new ones are still going to /homebridge/node_modules (e.g. https://www.npmjs.com/package/homebridge-yeelight has also gone there).

bash-5.0# ls -al /homebridge/node_modules
total 88
drwxr-xr-x 1 abc users   328 Jan 31 23:02 .
drwxr-xr-x 1 abc users   312 Jan 31 23:01 ..
-rwxr-xr-x 1 abc users 88790 Jan 31 23:02 .package-lock.json
drwxr-xr-x 1 abc users   402 Jan 31 23:02 homebridge-cmd4
drwxr-xr-x 1 abc users   242 Jan 30 13:36 homebridge-cmd4-advantageair
drwxr-xr-x 1 abc users   126 Jan 27 23:07 homebridge-dummy
drwxr-xr-x 1 abc users   130 Jan 31 17:52 homebridge-fronius-inverter-energy
drwxr-xr-x 1 abc users   172 Jan 31 22:59 homebridge-fronius-inverter-lights
drwxr-xr-x 1 abc users    64 Jan 31 22:56 homebridge-yeelight

(the last two on the list were installed late this evening after moving the original homebridge over).

I suppose I would need to update the mount path below - I assume it would need to be updated to /usr ?

2022 01 31 homebridge Network path

Not even sure where everything needs to go now!

ozbastion commented 2 years ago

ls -al /usr/local/lib/node_modules

bash-5.0# ls -al /usr/local/lib/node_modules
total 0
drwxr-xr-x 1 root root 320 Jan 31 21:47 .
drwxr-xr-x 1 root root  24 Jan 11 15:02 ..
drwxr-xr-x 1 root root  80 Jan 11 15:02 corepack
drwxr-xr-x 1 root root 152 Jan 31 17:50 homebridge
drwxr-xr-x 1 root root 402 Jan 31 21:47 homebridge-cmd4
drwxr-xr-x 1 root root 242 Jan 31 21:47 homebridge-cmd4-advantageair
drwxr-xr-x 1 root root 236 Jan 23 01:47 homebridge-config-ui-x
drwxr-xr-x 1 root root  82 Jan 31 17:50 homebridge-fronius-inverter
drwxr-xr-x 1 root root 204 Jan 30 12:26 homebridge-keylights
drwxr-xr-x 1 root root 146 Jan 30 12:58 homebridge-tplink-smarthome
drwxr-xr-x 1 root root 160 Jan 11 15:02 npm
ztalbot2000 commented 2 years ago

Hi,

That looks correct! You did not move the node_modules.del back and everything is working. Your good to go it seems.

Ttyl, John

On Mon, Jan 31, 2022 at 8:22 AM ozbastion @.***> wrote:

ls -al /usr/local/lib/node_modules

bash-5.0# ls -al /usr/local/lib/node_modules total 0 drwxr-xr-x 1 root root 320 Jan 31 21:47 . drwxr-xr-x 1 root root 24 Jan 11 15:02 .. drwxr-xr-x 1 root root 80 Jan 11 15:02 corepack drwxr-xr-x 1 root root 152 Jan 31 17:50 homebridge drwxr-xr-x 1 root root 402 Jan 31 21:47 homebridge-cmd4 drwxr-xr-x 1 root root 242 Jan 31 21:47 homebridge-cmd4-advantageair drwxr-xr-x 1 root root 236 Jan 23 01:47 homebridge-config-ui-x drwxr-xr-x 1 root root 82 Jan 31 17:50 homebridge-fronius-inverter drwxr-xr-x 1 root root 204 Jan 30 12:26 homebridge-keylights drwxr-xr-x 1 root root 146 Jan 30 12:58 homebridge-tplink-smarthome drwxr-xr-x 1 root root 160 Jan 11 15:02 npm

— Reply to this email directly, view it on GitHub https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/issues/35#issuecomment-1025733962, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCXZAG3HTOABR57B7WNTUY2EJTANCNFSM5M56ERIQ . You are receiving this because you were mentioned.Message ID: @.***>

ozbastion commented 2 years ago

Hi, That looks correct! You did not move the node_modules.del back and everything is working. Your good to go it seems. Ttyl, John

Is it right that new plug-ins are being installed in /homebridge/node_modules ?

mitch7391 commented 2 years ago

sorry not sure what 'repo' means.

Repo being short for repository; meaning this GitHub project itself :)

Is it right that new plug-ins are being installed in /homebridge/node_modules ?

They should hopefully be going to /usr/local/lib/node_modules not /homebridge/node_modules; our issue was that for some reason our two plug-ins went to the latter and not the former where they should have been.

ztalbot2000 commented 2 years ago

Hi Mitch,

His installation was a docker image that gets mounted as a filesystem with a mount point of /homebridge This really has not anything to do with homebridge/node_modules, but that was unfortunately where our plugins were installed. This made everything confusing. His /homebridge was essentially the /var/homebridge directory on your Pi. If you can see that, then you can understand why node_modules should never have been there. Now that it's sorted out, our plugins are installed where we expect them to be and work correctly. No additional coding required to handle his docker image.

Ttyl, John

On Mon, Jan 31, 2022 at 8:35 AM Mitch Williams @.***> wrote:

sorry not sure what 'repo' means.

Repo being short for repository; meaning this GitHub project itself :)

Is it right that new plug-ins are being installed in /homebridge/node_modules ?

They should hopefully be going to /usr/local/lib/node_modules not /homebridge/node_modules; our issue was that for some reason our two plug-ins went to the latter and not the former where they should have been.

— Reply to this email directly, view it on GitHub https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/issues/35#issuecomment-1025745871, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX3FRYBGNQTLIYD777TUY2FZNANCNFSM5M56ERIQ . You are receiving this because you were mentioned.Message ID: @.***>

ozbastion commented 2 years ago

I feel like I've duplicated the plug-in and it's still trying to use the one in /homebridge/node_modules

When I restart, I get the below:

[2/1/2022, 8:53:42 AM] Warning: skipping plugin found at '/usr/local/lib/node_modules/homebridge-cmd4' since we already loaded the same plugin from '/homebridge/node_modules/homebridge-cmd4'.
[2/1/2022, 8:53:42 AM] Warning: skipping plugin found at '/usr/local/lib/node_modules/homebridge-cmd4-advantageair' since we already loaded the same plugin from '/homebridge/node_modules/homebridge-cmd4-advantageair'.
[2/1/2022, 8:53:42 AM] Warning: skipping plugin found at '/usr/local/lib/node_modules/homebridge-yeelight' since we already loaded the same plugin from '/homebridge/node_modules/homebridge-yeelight'.

I'm quite sure yesterday I updated to the latest version but I am still seeing this:

[UPDATE AVAILABLE] Version 6.1.1 of homebridge-cmd4 is available. Any release notes can be found here: https://github.com/ztalbot2000/homebridge-cmd4/blob/master/ChangeLog.md

Is there a way I can temporarily (re)move the original installation of the instance in /homebridge/node_modules ? Just create a backup somewhere in another folder?

ztalbot2000 commented 2 years ago

Hi,

I thought that we did not put back /homebridge/node_modules Is that still true?

John

On Mon, Jan 31, 2022 at 5:57 PM ozbastion @.***> wrote:

I feel like I've duplicated the plug-in and it's still trying to use the one in /homebridge/node_modules

When I restart, I get the below:

[2/1/2022, 8:53:42 AM] Warning: skipping plugin found at '/usr/local/lib/node_modules/homebridge-cmd4' since we already loaded the same plugin from '/homebridge/node_modules/homebridge-cmd4'. [2/1/2022, 8:53:42 AM] Warning: skipping plugin found at '/usr/local/lib/node_modules/homebridge-cmd4-advantageair' since we already loaded the same plugin from '/homebridge/node_modules/homebridge-cmd4-advantageair'. [2/1/2022, 8:53:42 AM] Warning: skipping plugin found at '/usr/local/lib/node_modules/homebridge-yeelight' since we already loaded the same plugin from '/homebridge/node_modules/homebridge-yeelight'.

I'm quite sure yesterday I updated to the latest version but I am still seeing this:

[UPDATE AVAILABLE] Version 6.1.1 of homebridge-cmd4 is available. Any release notes can be found here: https://github.com/ztalbot2000/homebridge-cmd4/blob/master/ChangeLog.md

Is there a way I can temporarily (re)move the original installation of the instance in /homebridge/node_modules ? Just create a backup somewhere in another folder?

— Reply to this email directly, view it on GitHub https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/issues/35#issuecomment-1026293683, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX3M334ZOJEIRQDESQ3UY4HWFANCNFSM5M56ERIQ . You are receiving this because you were mentioned.Message ID: @.***>

ztalbot2000 commented 2 years ago

Hi,

Quickly though I did release a 6.1.1 an hour or so ago

On Mon, Jan 31, 2022 at 5:59 PM John Talbot @.***> wrote:

Hi,

I thought that we did not put back /homebridge/node_modules Is that still true?

John

On Mon, Jan 31, 2022 at 5:57 PM ozbastion @.***> wrote:

I feel like I've duplicated the plug-in and it's still trying to use the one in /homebridge/node_modules

When I restart, I get the below:

[2/1/2022, 8:53:42 AM] Warning: skipping plugin found at '/usr/local/lib/node_modules/homebridge-cmd4' since we already loaded the same plugin from '/homebridge/node_modules/homebridge-cmd4'. [2/1/2022, 8:53:42 AM] Warning: skipping plugin found at '/usr/local/lib/node_modules/homebridge-cmd4-advantageair' since we already loaded the same plugin from '/homebridge/node_modules/homebridge-cmd4-advantageair'. [2/1/2022, 8:53:42 AM] Warning: skipping plugin found at '/usr/local/lib/node_modules/homebridge-yeelight' since we already loaded the same plugin from '/homebridge/node_modules/homebridge-yeelight'.

I'm quite sure yesterday I updated to the latest version but I am still seeing this:

[UPDATE AVAILABLE] Version 6.1.1 of homebridge-cmd4 is available. Any release notes can be found here: https://github.com/ztalbot2000/homebridge-cmd4/blob/master/ChangeLog.md

Is there a way I can temporarily (re)move the original installation of the instance in /homebridge/node_modules ? Just create a backup somewhere in another folder?

— Reply to this email directly, view it on GitHub https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/issues/35#issuecomment-1026293683, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX3M334ZOJEIRQDESQ3UY4HWFANCNFSM5M56ERIQ . You are receiving this because you were mentioned.Message ID: @.***>

ozbastion commented 2 years ago

Hi, I thought that we did not put back /homebridge/node_modules Is that still true? John

I might have reverted it just before I did the container restart. Should I just re-run the command? Is it similar to a delete? Does it ignore the '.del' folder?

ztalbot2000 commented 2 years ago

Hi,

Homebridge would ignore the .del folder. If /homebridge/node_modules exists, somehow something is downloading packages there, instead of to /usr/local/lib/node_modules

Can you please do:

head /homebridge/node_modules/homebridge-cmd4/package.json head /homebridge/node_modules.del/homebridge-cmd4/package.json head /usr/local/lib/node_modules/homebridge-cmd4/package.json

I want to see if they are different versions. One of the commands might fail with no such file or directory. This is okay.

To fix things for the moment, we will redo what you did before. Except now node_modules.del exists and we will deal with that first.

mv /homebridge/node_modules.del /tmp/ mv /homebridge/node_modules /homebridge/node_modules.del

restart your docker image as that is what you found was needed the last time.

I will see if there is a configuration in homebridge-ui that installs plugins locally, instead of globally. That might explain what is going on.

Take care, John

On Mon, Jan 31, 2022 at 6:02 PM ozbastion @.***> wrote:

Hi, I thought that we did not put back /homebridge/nodemodules Is that still true? John … <#m-6693830012017870886_m5349022840925647957>

I might have reverted it just before I did the container restart. Should I just re-run the command? Is it similar to a delete? Does it ignore the '.del' folder?

— Reply to this email directly, view it on GitHub https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/issues/35#issuecomment-1026296230, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX5A6DOMW2WD7LZNFS3UY4IG3ANCNFSM5M56ERIQ . You are receiving this because you were mentioned.Message ID: @.***>