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:

uswong commented 2 years ago

Hi, may I know which operating system (OS) are you running your Homebridge in? In Raspberry Pi, intel Mac, M1 Mac or Windows?

I know of another user who runs his Homebridge in M1 Mac has the similar errors with his MyPlace system. I am troubleshooting it as we speak. I suspect the OS might play a part here. Will certainly let you know if I found some solutions in the coming days.

I will leave it to Mitch on your Cmd4 Plugin not installed issue.

ozbastion commented 2 years ago

Hi, may I know which operating system (OS) are you running your Homebridge in? In Raspberry Pi, intel Mac, M1 Mac or Windows?

I know of another user who runs his Homebridge in M1 Mac has the similar errors with his MyPlace system. I am troubleshooting it as we speak. I suspect the OS might play a part here. Will certainly let you know if I found some solutions in the coming days.

I will leave it to Mitch on your Cmd4 Plugin not installed issue.

It's currently running from a Synology NAS DSM 7.0.1-42218 update 2 which I believe is the most recent version, and Docker 20.10.3-1239. Thanks for your help.

mitch7391 commented 2 years ago

Thanks Ung Sing for starting to help out; this one might be a little different to your issue though.

@ozbastion sorry for the late reply. You may be my first user I know of using Docker and a Synology NAS; I have had a user with a QNAP, but not sure if they were using Docker. You have clearly shown that you have homebridge-cmd4 installed (thank you for that) and this may just be a 'false' issue with the Shell Check tool saying it is not there. How this check is performed is by looking for the file path of node_modules and if it cannot ascertain that it has hard coded file paths for systems we know to look for; Docker or the Synology may have an issue with the 'call' to figure out the file path and then not have the file path hardcoded for this system (I have faced this same issue with trying to set up Windows).

Can you please run whereis node_modules for me in your terminal and post the response? This will help me determine the issue I have just described. For you, it sounds like in the mean time we have to try and fault find your system without the Shell Check tool (doing it the old way).

Next (and as I found for the QNAP user), there may be different install commands for your system vs what I have in my README. Did you use apt-get install jq and apt-get install curl and if so did it install without issue? I tried to do a quick google for what commands Synology would use and did not come up with much useful information. You can check if they were installed properly with jq -V or curl -V (if those are the right commands for Synology).

After all that, I would need to see your config for cmd4 to make sure there are no silly mistakes (like repeated displayNames). That should give us a good starting point for figuring out your actual issue.

ozbastion commented 2 years ago

Hi @mitch7391 and @uswong thank you both for your prompt response. This is the first time I have used Github and Synology/Docker with these various commands.

After running /homebridge # whereis node_modules I get the response node_modules: /usr/local/lib/node_modules

In relation to the codes to install jq, I think I used 'apk add --no-cache jq' which I found here: https://github.com/cicciovo/homebridge-samsung-airconditioner/issues/4. JQ seemed to install with no problem, and Curl was already installed.

Here are the versions:

jq-master-v20200428-28-g864c859e9d
curl 7.79.1 (x86_64-alpine-linux-musl) libcurl/7.79.1 OpenSSL/1.1.1l zlib/1.2.11 nghttp2/1.41.0
Release-Date: 2021-09-22
Protocols: dict file ftp ftps gopher gophers http https imap imaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: alt-svc AsynchDNS HSTS HTTP2 HTTPS-proxy IPv6 Largefile libz NTLM NTLM_WB SSL TLS-SRP UnixSockets
ozbastion commented 2 years ago

Here is my current config.

Please note:

  1. Front Room
  2. Living
  3. Master Bed
  4. Bed 2
  5. Cat
  6. Nick
  7. Garage

Not sure how these correlate to the z01-z06 notation etc. For example, do I just assume 'z01' = the first zone that is set up?

{
    "bridge": {
        "name": "Homebridge",
        "username": "0E:E7:9B:2C:56:C9",
        "port": 53037,
        "pin": "031-45-154"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "platform": "Cmd4",
            "name": "Cmd4",
            "outputConstants": false,
            "statusMsg": true,
            "timeout": 5000,
            "stateChangeResponseTime": 0,
            "constants": [
                {
                    "key": "${IP}",
                    "value": "192.168.1.46"
                }
            ],
            "queueTypes": [
                {
                    "queue": "A",
                    "queueType": "WoRm"
                }
            ],
            "accessories": [
                {
                    "type": "TemperatureSensor",
                    "subType": "tempSensor1",
                    "displayName": "Front_Room",
                    "currentTemperature": 25,
                    "statusLowBattery": "BATTERY_LEVEL_LOW",
                    "name": "Front_Room",
                    "manufacturer": "Advantage Air Australia",
                    "model": "MyPlace",
                    "serialNumber": "Daikin",
                    "queue": "A",
                    "polling": [
                        {
                            "characteristic": "currentTemperature"
                        },
                        {
                            "characteristic": "statusLowBattery"
                        }
                    ],
                    "state_cmd": "'/usr/local/lib/node_modules/homebridge-cmd4-advantageair/AdvAir.sh'",
                    "state_cmd_suffix": "z01 ${IP}"
                }
            ]
        }
    ]
}
Screenshot-AdvancedInfo Screenshot-Mode Screenshot-Sensors Screenshot-Zones
mitch7391 commented 2 years ago

Hey @ozbastion sorry for the late reply again, I have just transitioned into night shifts for the next few days. Thank you for providing all of that; your config for the one accessory so far looks perfect!

Now did you go with those installation commands due to the ones I had listed did not work or was it in preparation knowing you had a Synology and had found that issue linked? That being said if they gave you version numbers then they should be installed fine.

I think the IP address is 192.168.1.46 though it appears that is the address of the Android tablet? Does the Android tablet act as the master to the controller (i.e. the ethernet connection is simply PoE)?

Yep based on one of the screenshots you have sent, you have the IP address correct. Do you also have the remote access set up for the device? Which lets you use the MyAir app outside of the house? Could also be worth going into the settings and turning on the 'Google Home / Alexa' tick box (one user told me that fixed their issues, but I am unsure).

Not sure how these correlate to the z01-z06 notation etc. For example, do I just assume 'z01' = the first zone that is set up?

This is a good question as I do not think I have ever addressed it for users before. I am fairly certain it is the order they appear in the last screenshot. That being said, let's be extra sure and if you can punch this in your URL, you can check the data yourself:

http://192.168.1.46:2025/getSystemData

It will provide you with all the information our plug-in uses and presents. If you do not mind, could you send me a copy to look over? Just look over it carefully and take out any personal information, it may contain your postcode and location (as latitude and longitude); then send it through to mitchwilliams7391@hotmail.com. If you do not wish to or do not feel comfortable than that is fine. It might help Ung Sing and I compare to a problem we are trying to sort out for his son.

Now one last test we can do to make sure the Synology is correctly using curl or jq is to run the following command from your terminal:

curl http://192.168.1.46:2025/getSystemData | jq '.aircon.ac1.zones.z01.measuredTemp'

That should return the value of your zone 1 temperature sensor; if it does not and returns some form of error, then please let me know what it is.

mitch7391 commented 2 years ago

Side note and maybe a little cheeky for me to ask - but do you have a cat room or is that the name of a family member? :)

ozbastion commented 2 years ago

Hi Mitch, no need to apologise at all!

your config for the one accessory so far looks perfect!

Thanks, that's a good start!

Now did you go with those installation commands due to the ones I had listed did not work or was it in preparation knowing you had a Synology and had found that issue linked?

I used the other installation commands as those ones did not work for the Synology/Docker combination. JQ definitely didn't work, so had to Google how else I could install it.

Do you also have the remote access set up for the device? Which lets you use the MyAir app outside of the house?

Yes, confirmed that this works remotely.

This is a good question as I do not think I have ever addressed it for users before. I am fairly certain it is the order they appear in the last screenshot. That being said, let's be extra sure and if you can punch this in your URL, you can check the data yourself:

I followed the code and got quite a string of text. After formatting it for readability, it does seem that my assumption was right - the z numbering is in order of the appearance.

Now one last test we can do to make sure the Synology is correctly using curl or jq is to run the following command from your terminal:

I tried both of these commands. The curl one gave me the same output as the first one through the normal browser (I assume it is just a JSON GET)?

This one: jq '.aircon.ac1.zones.z01.measuredTemp' does not give me any error message- just seems to not respond (been waiting 10+ mins for it).

Side note and maybe a little cheeky for me to ask - but do you have a cat room or is that the name of a family member? :)

No Cat room I'm afraid, though we have a dog! I'm not sure he is too fond of cats though! Labrador x Retriever, his name is Ollie!

ozbastion commented 2 years ago

By way of further update, I am doing some network reconfiguration as a completely unrelated exercise. During the day, the IP address of the tablet changed (from 192.168.1.46 to 192.168.1.7). During this changeover, my Homebridge was offline as well.

Here was the original error message (while the IP address was still correct).

[1/29/2022, 10:45:20 PM] [Cmd4] More than *50* errors were encountered in a row for "Front_Room" getValue. Last error found Getting: "CurrentTemperature". Perhaps you should run in debug mode to find out what the problem might be.

After booting up the NAS/Homebridge, I didn't update the IP address immediately. It still shows the exact same error message.

[1/29/2022, 11:10:49 PM] [Cmd4] More than *50* errors were encountered in a row for "Front_Room" getValue. Last error found Getting: "CurrentTemperature". Perhaps you should run in debug mode to find out what the problem might be.

Not sure if this helps with the troubleshooting, though it seems Homebridge can't even connect to the Android tablet? I don't think connectivity should be an issue as there's no firewall or any other network configuration (all on the same WiFi network). I've also managed to add the Homebridge to my iPhone Homekit, and as I have been testing a few of the accessories, it also showed up on my phone (just non-functional).

mitch7391 commented 2 years ago

I used the other installation commands as those ones did not work for the Synology/Docker combination. JQ definitely didn't work, so had to Google how else I could install it.

Good to know, I will have to update my installation instructions; as I know the Synology is another popular choice for Homebridge.

I followed the code and got quite a string of text. After formatting it for readability, it does seem that my assumption was right - the z numbering is in order of the appearance.

We may have just realised that the MyPlace json body you saw could be a lot larger than the other systems; so I imagine it was a bit to look at haha...

I tried both of these commands. The curl one gave me the same output as the first one through the normal browser (I assume it is just a JSON GET)?

That command is actually one command; it takes the output of curl (the huge json body) and gives it as an input to jq to be parsed and take the info we want from it. If you only did the last half (the jq half) it would endlessly wait to receive nothing haha if you did not know, a ctrl+C command works to cut it short. If doing the whole command as one and it returned no value for you, then I may have given you an outdated command and will have to double check it when I get home to make sure I gave you the right one.

By way of further update, I am doing some network reconfiguration as a completely unrelated exercise. During the day, the IP address of the tablet changed (from 192.168.1.46 to 192.168.1.7). During this changeover, my Homebridge was offline as well.

If you do not set a static IP address in your router for this device (and any others in your home automation system), you will face this all the time with power outages or reboots.

I've also managed to add the Homebridge to my iPhone Homekit, and as I have been testing a few of the accessories, it also showed up on my phone (just non-functional).

This means there is no issues with config or the cmd4 side of things; this and the alarms you sent means something is going wrong in terms of the actual communicating to the device itself in terms or get/set values. The issue is that it could be so many different things. We normally start by making sure jq and curl are working. I will confirm that command for you when I get home like 9hrs and we will take it from there. Also if you didn't send that command as one command, make sure you try it and you should get a value back in the form of something like 24.5 or whatever it is actually reading.

mitch7391 commented 2 years ago

No Cat room I'm afraid, though we have a dog! I'm not sure he is too fond of cats though! Labrador x Retriever, his name is Ollie!

Ahh bugger, we are a cat household (well, we have birds and fish too), but will eventually get a dog :p

mitch7391 commented 2 years ago

@ozbastion, I do not think this is needed anymore but there is no harm installing this:

apk add bash

A user with an issue on his QNAP NAS once had to also install bash for it to work; I do not think we use bash anymore, unless it is still used internally by cmd4. See if installing this helps you.

mitch7391 commented 2 years ago

I actually have a stronger feeling now that bash might be missing and is your problem!

ozbastion commented 2 years ago

That command is actually one command; it takes the output of curl (the huge json body) and gives it as an input to jq to be parsed and take the info we want from it.

20220130 Morning Script apk add bash

Not sure what it all means - looks like data/speed, not temperatures?

Also shows I have installed bash.

Unfortunately after a restart, I'm still getting the same errors:

[1/30/2022, 8:36:10 AM] Homebridge v1.4.0 (HAP v0.10.0) (Homebridge) is running on port 53037.
[1/30/2022, 8:36:50 AM] [Cmd4] *** Starting Polling
[1/30/2022, 8:36:53 AM] [Cmd4] *** All characteristics are now being polled
[1/30/2022, 8:38:01 AM] [Cmd4] More than *50* errors were encountered in a row for "Front_Room" getValue. Last error found Getting: "CurrentTemperature". Perhaps you should run in debug mode to find out what the problem might be.
[1/30/2022, 8:39:22 AM] [Cmd4] More than *100* 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.
mitch7391 commented 2 years ago

Also shows I have installed bash.

Damn… Well there goes that idea.

Also I gave you a typo in the curl command (I have gone back and edited my post); it had three ‘t’s in ‘http’ and only needs two. Also I should have given you a ‘-s’ in the command to silence the progress bar. Try this command:

curl -s http://192.168.1.46:2025/getSystemData | jq '.aircon.ac1.zones.z01.measuredTemp'

I can see it returned ‘null’ for you which is not good and I would expect it might do the same again. I am going to have to keep thinking about this one; sorry it has not been an easy solution so far!

ozbastion commented 2 years ago

This command also returns null unfortunately (using the updated IP address)

curl -s http://192.168.1.7:2025/getSystemData | jq '.aircon.ac1.zones.z01.measuredTemp'

mitch7391 commented 2 years ago

Hmm strange, that may not be an issue; as mine is returning null as well and I swear it never used to. But my system is also working…

You could try chmod +x jq as described here. You might need to go to the folder jq is in though before executing that. You can find that with which jq and use cd /file/path/to/jq to get to it. That’s my last idea before bed, I will try think up some more stuff tonight.

mitch7391 commented 2 years ago

@uswong any ideas while I sleep today?

ozbastion commented 2 years ago

You could try chmod +x jq as described here. You might need to go to the folder jq is in though before executing that. You can find that with which jq and use cd /file/path/to/jq to get to it. That’s my last idea before bed, I will try think up some more stuff tonight.

I have done this one. It is saved in /usr/bin.

After another restart, still no success unfortunately:

[1/30/2022, 9:49:38 AM] [Cmd4] *** Starting Polling
[1/30/2022, 9:49:41 AM] [Cmd4] *** All characteristics are now being polled
[1/30/2022, 9:52:30 AM] [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.
ozbastion commented 2 years ago

If it helps with the troubleshooting, I have successfully installed homebridge-keylights (https://www.npmjs.com/package/homebridge-keylights) and this works well for me.

ozbastion commented 2 years ago

Not sure if this helps but in the config, I noticed this code:

"state_cmd": "'/usr/local/lib/node_modules/homebridge-cmd4-advantageair/AdvAir.sh'"

The folder 'homebridge-cmd4-advantageair' doesn't seem to exist in that folder - should it?

bash-5.0# ls -l
total 0
drwxr-xr-x 1 root root  80 Jan 11 15:02 corepack
drwxr-xr-x 1 root root 152 Jan 23 01:47 homebridge
drwxr-xr-x 1 root root 236 Jan 23 01:47 homebridge-config-ui-x
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
ozbastion commented 2 years ago

I have figured it out - the installation location is different, which is a little strange given the other plugins install in /usr/local/lib/node_modules

Original: "state_cmd": "'/usr/local/lib/node_modules/homebridge-cmd4-advantageair/AdvAir.sh'", Modified: "state_cmd": "'/homebridge/node_modules/homebridge-cmd4-advantageair/AdvAir.sh'",

I'm going through and configuring all the other sensors/accessories now.

mitch7391 commented 2 years ago

Amazing @ozbastion, you have found the problem and what I would call a cheeky work-around. I assume everything is working now?

So it means the error for not finding cmd4 was true as it was not located where it should have been in the end. This is my bad for only checking your file path but not asking to see the directories inside of it.

Now this means that a different approach was taken for how you installed your other accessories vs how you installed homebridge-cmd4 and homebridge-cmd4-advantageair; am I safe in assuming this? If you bare with me I would like to try get to the root cause so I can make sure this does not happen to another user or I can help them out even quicker.

mitch7391 commented 2 years ago

Ideally I would like us to get your homebridge-cmd4 and homebridge-cmd4-advantageair installed in the correct node_modules directory so that you can use the correct file path for the "state_cmd" and ensure a standard install like all others.

ozbastion commented 2 years ago

Yes, all working now thanks.

Happy to sort this out to what it should be. Is it something as simple as moving them to the right path?

What caused the initial installation path to the Homebridge folder - is it just the way that Docker works?

And a newbie question - are all plug-ins supposed to be in the /usr path?

Thank you

mitch7391 commented 2 years ago

Yes, all working now thanks.

Awesome, so glad to hear it! :)

All these plug-ins are located in /usr/local/lib/node_modules correct?

corepack
homebridge
homebridge-config-ui-x
homebridge-keylights
homebridge-tplink-smarthome

And it seems that these plug-ins were located in /homebridge/node_modules correct?

homebridge-cmd4
homebridge-cmd4-advantageair

If I have that correct, then it means the first batch were installed one way and the other batch were installed another way. Did you use Homebridge UI to install these via the search function or did you use the terminal to install via command line?

And a newbie question - are all plug-ins supposed to be in the /usr path?

Yep they are all meant to be together and in the /usr/local/lib/node_modules file path. I can show you a quick way to copy them over, but would like to understand how they were installed and ended up there in the first place.

ozbastion commented 2 years ago

I can show you a quick way to copy them over, but would like to understand how they were installed and ended up there in the first place.

There's a search function in Homebridge and when you find the one you want you just click Install. That's all I did for all the packages so I'm puzzled why they are in different locations. It doesn't ask for any user inputs.

mitch7391 commented 2 years ago

That is even more strange; as it is like some of them have not been installed globally. I have no idea why Homebridge UI would do that… You should be able to copy them over with this command for both plug-ins:

sudo cp -a /homebridge/node_modules/homebridge-cmd4-advantageair /usr/local/lib/node_modules
sudo cp -a /homebridge/node_modules/homebridge-cmd4 /usr/local/lib/node_modules

You may need to check /homebridge/node_modules and see if the plugins are still there after the copy. If they are you can remove them with

sudo rm -r homebridge-cmd4-advantageair
sudo rm -r homebridge-cmd4

Once copied over you would need to change your “state_cmd” back again. And hopefully updates in future will keep the two plugins in the correct directory!

ztalbot2000 commented 2 years ago

Hi,all,

You should not be installing anything anymore with a copy command. homebridge, homebridge-cmd4 and homebridge-cmd4-advantageair are all installed via npm Where npm installs it is based on the output of sudo npm root -g if you use copy, further upgrades will fail.

multiple homebridge installations with multiple node_modules can be accidentally created by not following the installation instructions of the various packages. I've screwed myself over many times, so don't feel bad about it.

Pay attention to where the package gets installed. Use the verbose install option to see where things are going. Check it afterwards to see that it went where you expected it.

The important piece is your config.json. Startng over, paying attention is never an issue.

Afterwards check where homebridge was installed. Start homebridge in debug mode, all of these are key to getting it right and never having to worry about it again.

Ttyl, John

On Sun, Jan 30, 2022 at 5:44 PM Mitch Williams @.***> wrote:

That is even more strange; as it is like some of them have not been installed globally. I have no idea why Homebridge UI would do that… You should be able to copy them over with this command for both plug-ins:

sudo cp -a /homebridge/node_modules/homebridge-cmd4-advantageair /usr/local/lib/node_modules

sudo cp -a /homebridge/node_modules/homebridge-cmd4 /usr/local/lib/node_modules

You may need to check /homebridge/node_modules and see if the plugins are still there after the copy. If they are you can remove them with

sudo rm -r homebridge-cmd4-advantageair

sudo rm -r homebridge-cmd4

Once copied over you would need to change your “state_cmd” back again. And hopefully updates in future will keep the two plugins in the correct directory!

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

ozbastion commented 2 years ago

You should not be installing anything anymore with a copy command.

Does this mean I should not copy the files/folders over to /usr/local/lib ?

Where npm installs it is based on the output of sudo npm root -g if you use copy, further upgrades will fail.

I ran this and below is the output:

bash-5.0# sudo npm root -g
/usr/local/lib/node_modules

Pay attention to where the package gets installed. Use the verbose install option to see where things are going. Check it afterwards to see that it went where you expected it.

Other than clicking "Install" in the UI, what are my other options to ensure it is installed to the correct path (/usr/local/lib/node_modules)?

Thanks also for your help and troubleshooting, I really appreciate it :)

ztalbot2000 commented 2 years ago

Hi,

Thanks for sending the output of the npm root. As you can see, that is what it should be. I would not copy anything. We are going to properly install everything.

So now we have to figure out why it is not. So where did you find homebridge and the plugins installed? For example if it was installed in '/opt/local/lib/node_modules' Please do a ls -al /opt/local/lib

Thanks, John

So

On Sun, Jan 30, 2022 at 8:18 PM ozbastion @.***> wrote:

You should not be installing anything anymore with a copy command.

Does this mean I should not copy the files/folders over to /usr/local/lib ?

Where npm installs it is based on the output of sudo npm root -g if you use copy, further upgrades will fail.

I ran this and below is the output:

bash-5.0# sudo npm root -g /usr/local/lib/node_modules

Pay attention to where the package gets installed. Use the verbose install option to see where things are going. Check it afterwards to see that it went where you expected it.

Other than clicking "Install" in the UI, what are my other options to ensure it is installed to the correct path (/usr/local/lib/node_modules)?

Thanks also for your help and troubleshooting, I really appreciate it :)

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

ozbastion commented 2 years ago

So where did you find homebridge and the plugins installed?

Homebridge is installed in the root directory

Within the /homebridge folder

bash-5.0# ls -al
total 628
drwxr-xr-x 1 abc  users    312 Jan 30 14:20 .
drwxr-xr-x 1 root root     210 Jan 27 23:07 ..
-rwxr-xr-x 1 abc  users     81 Jan 27 23:07 .docker.env
-rwxr-xr-x 1 abc  users    795 Jan 30 13:40 .uix-dashboard.json
-rwxr-xr-x 1 abc  users     81 Jan 27 23:07 .uix-secrets
drwxr-xr-x 1 abc  users    126 Jan 30 12:57 accessories
-rwxr-xr-x 1 abc  users    359 Jan 27 23:07 auth.json
drwxr-xr-x 1 abc  users     60 Jan 28 00:25 backups
-rwxr-xr-x 1 abc  users  15399 Jan 30 14:20 config.json
-rwxr-xr-x 1 abc  users 509298 Jan 31 15:42 homebridge.log
drwxr-xr-x 1 abc  users      0 Jan 27 23:07 logs
drwxr-xr-x 1 abc  users    154 Jan 30 13:36 node_modules
-rwxr-xr-x 1 abc  users  86235 Jan 30 13:36 package-lock.json
-rwxr-xr-x 1 abc  users    239 Jan 30 13:36 package.json
drwxr-xr-x 1 abc  users    128 Jan 27 23:07 persist
-rwxr-xr-x 1 abc  users    573 Jan 27 23:07 startup.sh

And within /homebridge/node_modules, we have:

drwxr-xr-x 1 abc users 402 Jan 27 23:09 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

Within /usr/local/bin, we have:

drwxr-xr-x 1 root root      132 Jan 23 01:47 .
drwxr-xr-x 1 root root       36 Sep  2  2020 ..
lrwxrwxrwx 1 root root       45 Jan 11 15:02 corepack -> ../lib/node_modules/corepack/dist/corepack.js
-rwxr-xr-x 1 root root 33308824 Sep  2  2020 ffmpeg
lrwxrwxrwx 1 root root       65 Jan 23 01:47 hb-service -> ../lib/node_modules/homebridge-config-ui-x/dist/bin/hb-service.js
lrwxrwxrwx 1 root root       45 Jan 23 01:47 homebridge -> ../lib/node_modules/homebridge/bin/homebridge
lrwxrwxrwx 1 root root       65 Jan 23 01:47 homebridge-config-ui-x -> ../lib/node_modules/homebridge-config-ui-x/dist/bin/standalone.js
-rwxr-xr-x 1 root root 81029304 Jan 11 14:58 node
lrwxrwxrwx 1 root root       38 Jan 11 15:02 npm -> ../lib/node_modules/npm/bin/npm-cli.js
lrwxrwxrwx 1 root root       38 Jan 11 15:02 npx -> ../lib/node_modules/npm/bin/npx-cli.js

Within /usr/local/lib/node_modules, we have:

drwxr-xr-x 1 root root 180 Jan 30 12:58 .
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 23 01:47 homebridge
drwxr-xr-x 1 root root 236 Jan 23 01:47 homebridge-config-ui-x
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,

Just to be clear, if you do ls -al /homebridge You get the listing above?

If so, this is definitely not correct. There are conventions in Unix and tools do not go directly in /

I'm surprised anything, even running as root this directory was created as / generally refers to a file system mount point that is extremely protected.

Ttyl, John

On Mon, Jan 31, 2022 at 12:48 AM ozbastion @.***> wrote:

So where did you find homebridge and the plugins installed?

Homebridge is installed in the root directory

Within the /homebridge folder

bash-5.0# ls -al total 628 drwxr-xr-x 1 abc users 312 Jan 30 14:20 . drwxr-xr-x 1 root root 210 Jan 27 23:07 .. -rwxr-xr-x 1 abc users 81 Jan 27 23:07 .docker.env -rwxr-xr-x 1 abc users 795 Jan 30 13:40 .uix-dashboard.json -rwxr-xr-x 1 abc users 81 Jan 27 23:07 .uix-secrets drwxr-xr-x 1 abc users 126 Jan 30 12:57 accessories -rwxr-xr-x 1 abc users 359 Jan 27 23:07 auth.json drwxr-xr-x 1 abc users 60 Jan 28 00:25 backups -rwxr-xr-x 1 abc users 15399 Jan 30 14:20 config.json -rwxr-xr-x 1 abc users 509298 Jan 31 15:42 homebridge.log drwxr-xr-x 1 abc users 0 Jan 27 23:07 logs drwxr-xr-x 1 abc users 154 Jan 30 13:36 node_modules -rwxr-xr-x 1 abc users 86235 Jan 30 13:36 package-lock.json -rwxr-xr-x 1 abc users 239 Jan 30 13:36 package.json drwxr-xr-x 1 abc users 128 Jan 27 23:07 persist -rwxr-xr-x 1 abc users 573 Jan 27 23:07 startup.sh

And within /homebridge/node_modules, we have:

drwxr-xr-x 1 abc users 402 Jan 27 23:09 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

Within /usr/local/bin, we have:

drwxr-xr-x 1 root root 132 Jan 23 01:47 . drwxr-xr-x 1 root root 36 Sep 2 2020 .. lrwxrwxrwx 1 root root 45 Jan 11 15:02 corepack -> ../lib/node_modules/corepack/dist/corepack.js -rwxr-xr-x 1 root root 33308824 Sep 2 2020 ffmpeg lrwxrwxrwx 1 root root 65 Jan 23 01:47 hb-service -> ../lib/node_modules/homebridge-config-ui-x/dist/bin/hb-service.js lrwxrwxrwx 1 root root 45 Jan 23 01:47 homebridge -> ../lib/node_modules/homebridge/bin/homebridge lrwxrwxrwx 1 root root 65 Jan 23 01:47 homebridge-config-ui-x -> ../lib/node_modules/homebridge-config-ui-x/dist/bin/standalone.js -rwxr-xr-x 1 root root 81029304 Jan 11 14:58 node lrwxrwxrwx 1 root root 38 Jan 11 15:02 npm -> ../lib/node_modules/npm/bin/npm-cli.js lrwxrwxrwx 1 root root 38 Jan 11 15:02 npx -> ../lib/node_modules/npm/bin/npx-cli.js

Within /usr/local/lib/node_modules, we have:

drwxr-xr-x 1 root root 180 Jan 30 12:58 . 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 23 01:47 homebridge drwxr-xr-x 1 root root 236 Jan 23 01:47 homebridge-config-ui-x 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-1025401868, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX5D5R6HLUIFXPYNM53UYYPEVANCNFSM5M56ERIQ . You are receiving this because you commented.Message ID: @.***>

ozbastion commented 2 years ago

This is the root directory

bash-5.0# ls -l
total 4
drwxr-xr-x   1 abc  users    0 Jan 11 15:02 app
drwxr-xr-x   1 root root  5286 Jan 30 08:35 bin
drwxr-xr-x   1 abc  users    0 Jan 11 15:02 config
drwxr-xr-x   1 abc  users  100 Jan 23 01:46 defaults
drwxr-xr-x   5 root root   360 Jan 30 08:47 dev
drwxr-xr-x   1 root root  1082 Jan 30 08:47 etc
drwxr-xr-x   1 root root     0 Nov 12 22:14 home
drwxr-xr-x   1 abc  users  312 Jan 30 14:20 homebridge
-rwxr-xr-x   1 root root   389 Oct 20  2017 init
drwxr-xr-x   1 root root   962 Jan 11 19:52 lib
drwxr-xr-x   1 root root   104 Jan 11 15:02 libexec
drwxr-xr-x   1 root root    28 Nov 12 22:14 media
drwxr-xr-x   1 root root     0 Nov 12 22:14 mnt
drwxr-xr-x   1 root root     0 Nov 12 22:14 opt
dr-xr-xr-x 459 root root     0 Jan 30 08:47 proc
drwx------   1 abc  users   82 Jan 30 09:48 root
drwxr-xr-x   1 root root    86 Jan 27 23:07 run
drwxr-xr-x   1 root root  1238 Jan 11 19:52 sbin
drwxr-xr-x   1 root root     0 Nov 12 22:14 srv
dr-xr-xr-x  12 root root     0 Jan 30 08:45 sys
drwxrwxrwt   1 root root    30 Jan 31 06:44 tmp
drwxr-xr-x   1 root root   116 Jan 23 01:46 usr
drwxr-xr-x   1 root root    96 Jan 11 19:53 var

And then below is the /homebridge directory

bash-5.0# ls -al /homebridge
total 628
drwxr-xr-x 1 abc  users    312 Jan 30 14:20 .
drwxr-xr-x 1 root root     210 Jan 27 23:07 ..
-rwxr-xr-x 1 abc  users     81 Jan 27 23:07 .docker.env
-rwxr-xr-x 1 abc  users    795 Jan 30 13:40 .uix-dashboard.json
-rwxr-xr-x 1 abc  users     81 Jan 27 23:07 .uix-secrets
drwxr-xr-x 1 abc  users    126 Jan 30 12:57 accessories
-rwxr-xr-x 1 abc  users    359 Jan 27 23:07 auth.json
drwxr-xr-x 1 abc  users     60 Jan 28 00:25 backups
-rwxr-xr-x 1 abc  users  15399 Jan 30 14:20 config.json
-rwxr-xr-x 1 abc  users 509472 Jan 31 15:57 homebridge.log
drwxr-xr-x 1 abc  users      0 Jan 27 23:07 logs
drwxr-xr-x 1 abc  users    154 Jan 30 13:36 node_modules
-rwxr-xr-x 1 abc  users  86235 Jan 30 13:36 package-lock.json
-rwxr-xr-x 1 abc  users    239 Jan 30 13:36 package.json
drwxr-xr-x 1 abc  users    128 Jan 27 23:07 persist
-rwxr-xr-x 1 abc  users    573 Jan 27 23:07 startup.sh
ozbastion commented 2 years ago

I was following the instructions here: https://github.com/oznu/docker-homebridge/wiki/Homebridge-on-Synology

Is it because of this particular instruction: "Set the Mount path to be /homebridge." ?

ztalbot2000 commented 2 years ago

Hi,

I know you must be thinking I'm nuts, but this is so weird.

Can you please do uname -a df /homebridge which node node -v

I want to know what platform we are on and what filesystem /homebridge is on and also possibly if node is not properly installed.

Either way, whatever is in /homebridge is going to go bye-bye.

Ttyl, John

On Mon, Jan 31, 2022 at 1:01 AM ozbastion @.***> wrote:

This is the root directory

bash-5.0# ls -l total 4 drwxr-xr-x 1 abc users 0 Jan 11 15:02 app drwxr-xr-x 1 root root 5286 Jan 30 08:35 bin drwxr-xr-x 1 abc users 0 Jan 11 15:02 config drwxr-xr-x 1 abc users 100 Jan 23 01:46 defaults drwxr-xr-x 5 root root 360 Jan 30 08:47 dev drwxr-xr-x 1 root root 1082 Jan 30 08:47 etc drwxr-xr-x 1 root root 0 Nov 12 22:14 home drwxr-xr-x 1 abc users 312 Jan 30 14:20 homebridge -rwxr-xr-x 1 root root 389 Oct 20 2017 init drwxr-xr-x 1 root root 962 Jan 11 19:52 lib drwxr-xr-x 1 root root 104 Jan 11 15:02 libexec drwxr-xr-x 1 root root 28 Nov 12 22:14 media drwxr-xr-x 1 root root 0 Nov 12 22:14 mnt drwxr-xr-x 1 root root 0 Nov 12 22:14 opt dr-xr-xr-x 459 root root 0 Jan 30 08:47 proc drwx------ 1 abc users 82 Jan 30 09:48 root drwxr-xr-x 1 root root 86 Jan 27 23:07 run drwxr-xr-x 1 root root 1238 Jan 11 19:52 sbin drwxr-xr-x 1 root root 0 Nov 12 22:14 srv dr-xr-xr-x 12 root root 0 Jan 30 08:45 sys drwxrwxrwt 1 root root 30 Jan 31 06:44 tmp drwxr-xr-x 1 root root 116 Jan 23 01:46 usr drwxr-xr-x 1 root root 96 Jan 11 19:53 var

And then below is the /homebridge directory

bash-5.0# ls -al /homebridge total 628 drwxr-xr-x 1 abc users 312 Jan 30 14:20 . drwxr-xr-x 1 root root 210 Jan 27 23:07 .. -rwxr-xr-x 1 abc users 81 Jan 27 23:07 .docker.env -rwxr-xr-x 1 abc users 795 Jan 30 13:40 .uix-dashboard.json -rwxr-xr-x 1 abc users 81 Jan 27 23:07 .uix-secrets drwxr-xr-x 1 abc users 126 Jan 30 12:57 accessories -rwxr-xr-x 1 abc users 359 Jan 27 23:07 auth.json drwxr-xr-x 1 abc users 60 Jan 28 00:25 backups -rwxr-xr-x 1 abc users 15399 Jan 30 14:20 config.json -rwxr-xr-x 1 abc users 509472 Jan 31 15:57 homebridge.log drwxr-xr-x 1 abc users 0 Jan 27 23:07 logs drwxr-xr-x 1 abc users 154 Jan 30 13:36 node_modules -rwxr-xr-x 1 abc users 86235 Jan 30 13:36 package-lock.json -rwxr-xr-x 1 abc users 239 Jan 30 13:36 package.json drwxr-xr-x 1 abc users 128 Jan 27 23:07 persist -rwxr-xr-x 1 abc users 573 Jan 27 23:07 startup.sh

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

ozbastion commented 2 years ago
bash-5.0# uname -a
Linux homebridge 3.10.108 #42218 SMP Mon Oct 18 19:15:17 CST 2021 x86_64 GNU/Linux
bash-5.0# df /homebridge
Filesystem              1K-blocks       Used  Available Use% Mounted on
/dev/mapper/cachedev_0 9362921228 6649154828 2713766400  72% /homebridge
bash-5.0# which node
/usr/local/bin/node
bash-5.0# node -v
v16.13.2

Whatever it's done, it's all working well.. I switched on my air conditioning with HomeKit !

ztalbot2000 commented 2 years ago

Hi,

Okay we are starting to make some sense now. Their instructions though are a little disturbing. I will look further into their instructions and where they went wrong. Any reason why you wanted it on the NAS specifically or is this just a docker thing?

Putting the mount point in / was a bad idea on their part, probably the easiest to describe as an example, but goes against Unix path structure.

Ttyl, John

On Mon, Jan 31, 2022 at 1:03 AM ozbastion @.***> wrote:

I was following the instructions here: https://github.com/oznu/docker-homebridge/wiki/Homebridge-on-Synology

Is it because of this particular instruction: "Set the Mount path to be /homebridge." ?

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

ozbastion commented 2 years ago

Any reason why you wanted it on the NAS specifically or is this just a docker thing?

It's probably the only device that I have at home which is on most of the time - I don't have any server or server-like hardware. What are the other alternatives that people do - use a NUC or Raspberry Pi? I considered those two but would mean spending additional money when the NAS appears to be able to do the same job.

ztalbot2000 commented 2 years ago

Okay,

I understood what they did and why. Still not the best thing to do. By putting the mount point to / they have symbolic links everywhere from the proper path of /usr/local/bin/homebridge to /homebridge/bin/homebridge and so may others. I just saw this reading above in the long thread. The sad part is that upgrading a package could possibly remove a symbolic link and your screwed.

Ttyl, John

On Mon, Jan 31, 2022 at 1:16 AM John Talbot @.***> wrote:

Hi,

Okay we are starting to make some sense now. Their instructions though are a little disturbing. I will look further into their instructions and where they went wrong. Any reason why you wanted it on the NAS specifically or is this just a docker thing?

Putting the mount point in / was a bad idea on their part, probably the easiest to describe as an example, but goes against Unix path structure.

Ttyl, John

On Mon, Jan 31, 2022 at 1:03 AM ozbastion @.***> wrote:

I was following the instructions here: https://github.com/oznu/docker-homebridge/wiki/Homebridge-on-Synology

Is it because of this particular instruction: "Set the Mount path to be /homebridge." ?

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

ztalbot2000 commented 2 years ago

Hi,

What else could you use? Good question. I guess the question may also be what device do you have that is always on? I have so many. Trying to get a Pi these days is difficult because of shortages. If you lived in Ottawa Canada I could give you an older Pi2 or Pi3. I have several Pi4's. One running a 8TB NAS configured as RAID10. My Mac is also always on.

I have to look through more of your previous emails and that big Synology instructions to see how I can optimize you out of your predicament.

Ttyl, John

On Mon, Jan 31, 2022 at 1:19 AM ozbastion @.***> wrote:

Any reason why you wanted it on the NAS specifically or is this just a docker thing?

It's probably the only device that I have at home which is on most of the time - I don't have any server or server-like hardware. What are the other alternatives that people do - use a NUC or Raspberry Pi? I considered those two but would mean spending additional money when the NAS appears to be able to do the same job.

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

ztalbot2000 commented 2 years ago

Hi,

So this part of the thread had me concerned. There are a number of homebridge plugins that are not in the same spot. For example, /homebridge/node_modules contains Cmd4 and AdvAir, while /usr/local/lib/node_modules we have homebridge-config-ui-x etc. So /homebridge is NAS docker mount point and in it is the configuration files for Homebridge. I do not believe their should be a node_modules directory there. It was probably created when Cmd4 and AdvAir plugins were installed as a local package and not a global one

Here is what I suggest we do mv /homebridge/node_modules /homebridge/node_modules.del sudo npm install -g --unsafe-perm homebridge-cmd4 sudo npm install -g --unsafe-perm homebridge-cmd4-advantageair

This should put the Cmd4 and AdvantageAir plugins in /usr/local/lib/node_modules as dictated by 'sudo npm root -g' Don't worry about the unsafe-perm. npm can sometimes get confused with who owns what and fail to install properly. This fixes that.

backup your old config.json file Édit the config.json file. The state_cmd for the AdvantageAir accessories should be: /usr/local/lib/node_modules/homebridge-cmd4-advantageair/AdvAir.sh

Restart homebridge From the homebridge-cmd4-advantageair config-ui-x page press the check Installation button. Hopefully all goes well at that point.

So I'm going back to bed. Hopefully we now know what went wrong and why; As well as how to fix it. The result should be a proper installation that will upgrade in the future.

As you noticed, I backed up the old stuff as a precaution. It can be deleted if after things are now working correctly.

Ttyl, John

On Mon, Jan 31, 2022 at 12:48 AM ozbastion @.***> wrote:

So where did you find homebridge and the plugins installed?

Homebridge is installed in the root directory

Within the /homebridge folder

bash-5.0# ls -al total 628 drwxr-xr-x 1 abc users 312 Jan 30 14:20 . drwxr-xr-x 1 root root 210 Jan 27 23:07 .. -rwxr-xr-x 1 abc users 81 Jan 27 23:07 .docker.env -rwxr-xr-x 1 abc users 795 Jan 30 13:40 .uix-dashboard.json -rwxr-xr-x 1 abc users 81 Jan 27 23:07 .uix-secrets drwxr-xr-x 1 abc users 126 Jan 30 12:57 accessories -rwxr-xr-x 1 abc users 359 Jan 27 23:07 auth.json drwxr-xr-x 1 abc users 60 Jan 28 00:25 backups -rwxr-xr-x 1 abc users 15399 Jan 30 14:20 config.json -rwxr-xr-x 1 abc users 509298 Jan 31 15:42 homebridge.log drwxr-xr-x 1 abc users 0 Jan 27 23:07 logs drwxr-xr-x 1 abc users 154 Jan 30 13:36 node_modules -rwxr-xr-x 1 abc users 86235 Jan 30 13:36 package-lock.json -rwxr-xr-x 1 abc users 239 Jan 30 13:36 package.json drwxr-xr-x 1 abc users 128 Jan 27 23:07 persist -rwxr-xr-x 1 abc users 573 Jan 27 23:07 startup.sh

And within /homebridge/node_modules, we have:

drwxr-xr-x 1 abc users 402 Jan 27 23:09 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

Within /usr/local/bin, we have:

drwxr-xr-x 1 root root 132 Jan 23 01:47 . drwxr-xr-x 1 root root 36 Sep 2 2020 .. lrwxrwxrwx 1 root root 45 Jan 11 15:02 corepack -> ../lib/node_modules/corepack/dist/corepack.js -rwxr-xr-x 1 root root 33308824 Sep 2 2020 ffmpeg lrwxrwxrwx 1 root root 65 Jan 23 01:47 hb-service -> ../lib/node_modules/homebridge-config-ui-x/dist/bin/hb-service.js lrwxrwxrwx 1 root root 45 Jan 23 01:47 homebridge -> ../lib/node_modules/homebridge/bin/homebridge lrwxrwxrwx 1 root root 65 Jan 23 01:47 homebridge-config-ui-x -> ../lib/node_modules/homebridge-config-ui-x/dist/bin/standalone.js -rwxr-xr-x 1 root root 81029304 Jan 11 14:58 node lrwxrwxrwx 1 root root 38 Jan 11 15:02 npm -> ../lib/node_modules/npm/bin/npm-cli.js lrwxrwxrwx 1 root root 38 Jan 11 15:02 npx -> ../lib/node_modules/npm/bin/npx-cli.js

Within /usr/local/lib/node_modules, we have:

drwxr-xr-x 1 root root 180 Jan 30 12:58 . 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 23 01:47 homebridge drwxr-xr-x 1 root root 236 Jan 23 01:47 homebridge-config-ui-x 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-1025401868, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX5D5R6HLUIFXPYNM53UYYPEVANCNFSM5M56ERIQ . You are receiving this because you commented.Message ID: @.***>

mitch7391 commented 2 years ago

Looks like I have a lot of emails from my repo today while asleep for night shift lol...

@ozbastion I would definitely listen to John's advice for all this stuff over mine; he has a lot more experience and I am still learning as I go. It sounds like John has confirmed that the copy over I was suggesting would have caused future issues with updates for those plugins.

Whatever it's done, it's all working well.. I switched on my air conditioning with HomeKit !

This is the part that makes me happy! I would suggest you following along with what John has to say to 'fix' the issue with your homebridge setup that might catch you out again in the future with this plug-in or others though. In the mean time I will close this issue as we do have your system working.

Also @ztalbot2000 a lot of people, especially testing the waters of Homebridge will try to use a device they already have dedicated to something else in there house. Not everyone has a heap of RPi's laying around the place like us or have the space or powerpoints to plug in another machine. Nick, I do highly recommend a RPi if you ever decide to switch over to a dedicated machine.

If you lived in Ottawa Canada I could give you an older Pi2 or Pi3.

Remember John, the Advantage Air system is an Australian aircon system :p

ztalbot2000 commented 2 years ago

Hi Mitch,

Well the last week our thermometer has been between -20 and -40°C. I'd love to be in Australia right now.

I still wish AirCon would have sent me something to play with ;-) I bet you I could take a Pi4 and use it to create an AdvAir replacement. Hmmmm, No got to many things to do myself :-)

Ttyl, John

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

Looks like I have a lot of emails from my repo today while asleep for night shift lol...

@ozbastion https://github.com/ozbastion I would definitely listen to John's advice for all this stuff over mine; he has a lot more experience and I am still learning as I go. It sounds like John has confirmed that the copy over I was suggesting would have caused future issues with updates for those plugins.

Whatever it's done, it's all working well.. I switched on my air conditioning with HomeKit !

This is the part that makes me happy! I would suggest you following along with what John has to say to 'fix' the issue with your homebridge setup that might catch you out again in the future with this plug-in or others though. In the mean time I will close this issue as we do have your system working.

Also @ztalbot2000 https://github.com/ztalbot2000 a lot of people, especially testing the waters of Homebridge will try to use a device they already have dedicated to something else in there house. Not everyone has a heap of RPi's laying around the place like us or have the space or powerpoints to plug in another machine. Ozbastion, I do highly recommend a RPi if you ever decide to switch over to a dedicated machine.

If you lived in Ottawa Canada I could give you an older Pi2 or Pi3.

Remember John, the Advantage Air system is an Australian aircon system :p

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

mitch7391 commented 2 years ago

Well the last week our thermometer has been between -20 and -40°C. I'd love to be in Australia right now.

And I was just thinking I would love to be in Canada right now lol the heat waves we have been getting in Western Australia the last month or two has made it such that you look at the forecast and think oh thank god it is only going to be 36 today...

I still wish AirCon would have sent me something to play with ;-)

Very cheeky when you asked them to send you a control unit to play with and such a shame they never replied. They have never been interested in making this HomeKit compatible. The software for the control tablet can't even be put on an iPad sadly... As I would much rather an iPad on the wall...

I bet you I could take a Pi4 and use it to create an AdvAir replacement. Hmmmm, No got to many things to do myself :-)

Don't suggest that lol I am barely keeping on top of all of this project as it is! Hahaha...

ozbastion commented 2 years ago

I tried following the instructions (move, install and install), after that, the whole system broke, I couldn't see the status and couldn't even get to the config file, and I couldn't even restart it! 2022 01 31 ENOENT Error on Status 2022 01 31 Failed to Load Config

Restarting Homebridge An error occured sending the restart command to the server. 2022 01 31 Restart Command

ztalbot2000 commented 2 years ago

Hi,

Please do the following

mv /homebridge/node_modules.del /homebridge/node_modules ls -al /usr/local/lib/node_modules

The first will un break things. The second will see where the stuff got installed to.

I still have to figure out why you have two node_modules directories.

John

On Mon, Jan 31, 2022 at 6:55 AM ozbastion @.***> wrote:

I tried following the instructions (move, install and install), after that, the whole system broke, I couldn't see the status and couldn't even get to the config file, and I couldn't even restart it! [image: 2022 01 31 ENOENT Error on Status] https://user-images.githubusercontent.com/31245090/151789426-b1054a98-4b80-4430-91bc-b3975db24a39.png [image: 2022 01 31 Failed to Load Config] https://user-images.githubusercontent.com/31245090/151789433-a828b79c-97f4-4d49-b9bb-8ea04fd9ff11.png

Restarting Homebridge An error occured sending the restart command to the server. [image: 2022 01 31 Restart Command] https://user-images.githubusercontent.com/31245090/151789604-3ca896b4-3f50-49d6-9d22-466b56651a3a.png

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

ozbastion commented 2 years ago

Might have raised the alarm a bit soon - looks like I had to restart the Docker container first. I will work my way through the update of the config file and revert.

mitch7391 commented 2 years ago

Was just googling anything related just in case John was asleep... Keep us updated Nick and we will both try help get you sorted!

ozbastion commented 2 years ago

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?