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
37 stars 5 forks source link

[Support] HOOBS Install - Cannot Find Config Path #80

Closed caranxignobilis closed 1 year ago

mitch7391 commented 1 year ago

Hi @caranxignobilis, I was wondering if you could provide a little more context here? Have you followed the HOOBS specific command line instructions to get the ConfigCreator working?

caranxignobilis commented 1 year ago

Hi Mitch,

I followed the instructions but got a prompt asking for the full path of the config.json file (after generating the config). Had a quick look through old issues and found that it was mentioned in Issue 70 that the script was updated to reflect the directory structure of HOOBS v4. I assume I’m still using the old ConfigCreator if it’s asking for the full path of the config.json file.

Cheers.

From: Mitch @.> Sent: Friday, 17 February 2023 9:26 AM To: @.> Cc: @.>; @.> Subject: Re: [mitch7391/homebridge-cmd4-AdvantageAir] Updated ConfigCreator.sh (for HOOBS v4 installation) does not appear to be in the latest release. (Issue #80)

Hi @caranxignobilishttps://github.com/caranxignobilis, I was wondering if you could provide a little more context here? Have you followed the HOOBS specific command line instructions to get the ConfigCreator working?

— Reply to this email directly, view it on GitHubhttps://github.com/mitch7391/homebridge-cmd4-AdvantageAir/issues/80#issuecomment-1433966089, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AYHYDWYBOTC5WSZF3U7NQ7TWX3HTHANCNFSM6AAAAAAU63PCUI. You are receiving this because you were mentioned.Message ID: @.***>

mitch7391 commented 1 year ago

@caranxignobilis there will be no chance that you are using an older version unless you explicitly chose to install an older version, this is still very experimental for HOOBS users due to HOOBS v4 and how HOOBS decided to split away from Homebridge and make everything harder.

Can I please get you to run the following command from your terminal and send me the response?

find /var/lib/hoobs -name config.json 2>&1|grep -v find|grep -v System|grep -v cache|grep -v hassio|grep -v node_modules|grep config.json
caranxignobilis commented 1 year ago

Not sure what happened but after trying it a couple more times (deleting and reinstalling) I was finally able to generate the script. I just assumed that I was somehow using the old script when it asked for the full path of my config.json file. Sorry for the trouble and thanks for your time.

mitch7391 commented 1 year ago

@caranxignobilis no troubles at all and glad you got it working! All I can say if an uninstall and re-install sorted it out, then something must have gone wrong along the way with the installation. We have very few HOOBS users, so I am glad to hear our current method ended up working for you :) if you ever have any suggestions or find any problems, please let us know!

ScoopieFTW commented 1 year ago

Hey @mitch7391, I'm having the same issue as @caranxignobilis, however deleting and following the steps again aren't proving to be any success.

I've followed the Hoobs CL steps for configcreator, and it still gets stuck asking for the config.json file. I also ran the code you shared above to trouble shoot and this was my output (MyPlace is the bridge which both plugins are installed to:

/var/lib/hoobs/ringbridge/config.json
/var/lib/hoobs/yeelighterbridge/config.json
/var/lib/hoobs/myplace/config.json
/var/lib/hoobs/tplinksmarthomebridge/config.json

I restarted the install using the directory above for the config.json, and the following error was received:

INFO: fanSetup=fanSwitch
INFO: AdvAir.sh found: /var/lib/hoobs/myplace/node_modules/homebridge-cmd4-advantageair/AdvAir.sh

INFO: This process may take up to 1 minute!
INFO: Fetching and processing data from your AdvantageAir system (Aircon 192.168.87.239).... 

WARNING: No Homebridge config.json file located by the script!

Please enter the full path of your Homebridge config.json file,
otherwise just hit enter to abort copying "cmd4Config_AA_Aircon.json" to Homebridge config.json.
The config.json path should be in the form of /*/*/*/config.json 
> /var/lib/hoobs/myplace/config.json

INFO: The Homebridge config.json specified: /var/lib/hoobs/myplace/config.json

ERROR: no Cmd4 Config found in "/var/lib/hoobs/myplace/config.json"! Please ensure that Homebridge-Cmd4 plugin is installed
INFO: cmd4Config_AA_Aircon.json was created but not copied to Homebridge-Cmd4 JASON Config Editor!
      Please copy/paste the cmd4Config_AA_Aircon.json into Cmd4 JASON Config Editor manually

Any tips or advice?

mitch7391 commented 1 year ago

Hey @ScoopieFTW, can I get you in your terminal to punch in the following commands:

cd /var/lib/hoobs/myplace

and then:

ls -al

Please let me know what it shows :)

uswong commented 1 year ago

I suspect either homebridge-cmd4 has not been installed yet or has installed in a different bridge. You need homebridge-cmd4 to be installed in the same bridge as homebridge-cmd4-advantageair.

mitch7391 commented 1 year ago

Exactly where I was heading @uswong :D hopefully that is just the case!

ScoopieFTW commented 1 year ago

Hey @mitch7391

Here you go:

total 80
drwxr-xr-x    3 root root   4096 Feb 21 21:20 .
drwxrwxr-x  16  root root 4096   Feb 21 21:18 ..
-rw-r--r--            1 root root     52 Feb 21 21:20 cache
-rw-r--r--            1 root root    169    Feb 21 21:20 config.json
drwxr-xr-x      166 root root   4096 Feb 21 21:20 node_modules 
-rw-r--r--    1 root root    231    Feb 21 21:20 package.json
-rw-r--r--            1 root root  54215    Feb 21 21:20 yarn.lock

(Sorry about the formatting, for some reason copy wouldn't work).

ScoopieFTW commented 1 year ago

@uswong / @mitch7391, I wish that were the case but they are installed in the same Bridge!

image

EDIT: and to cofirm in the log that they are indeed in the same bridge:

image

uswong commented 1 year ago

Cool. My next suspect is the platform name of the Cmd4 plugin has deviated from Cmd4. Last time when @mitch7391 and I was helping another HOOB user, the platform name was not named as Cmd4 in the config but homebridge-cmd4. Yours may have a different name.

To find out, can you open and look at the config,json file and post it here?

mitch7391 commented 1 year ago

Hmmmm well there goes that idea… @ScoopieFTW bear with us and we will work out a solution for you!

mitch7391 commented 1 year ago

I thought that was only a problem after all of this @uswong, or maybe I am misremembering… The command will be:

cat /var/lib/hoobs/myplace/config.json | more
uswong commented 1 year ago

The ConfigCreator is looking for a platform with name either in 'Cmd4' or 'homebridge-cmd4`, if neither is found, then it will complain that the Cmd4 plugin may not be installed.

ScoopieFTW commented 1 year ago

You're on the money this time @uswong :)

Opened the config for Cmd4 and it was:

{
    "platform": "homebridge-cmd4"
}

Is it just a matter of renaming it to "cmd4" ?

ScoopieFTW commented 1 year ago

Good news @mitch7391 @uswong, I changed the name from the above to cmd4, and was able to perform the set up.

Ran the config check and got a passed result.

Thanks for the time, and really quick response time too!

uswong commented 1 year ago

Excellent! I would have thought that "homebridge-cmd4" should be accepted also. In any case, I am glad that you get the config generated and hopefully all working for you in homekit.

mitch7391 commented 1 year ago

I believe this is an issue with homerbridge-cmd4 requiring it to be set to Cmd4 for all the UI stuff to work (I have been learning a bit more about this lately) and not having the ability to set it correctly for HOOBS OR it is an issue with HOOBS setting it to that by itself assuming that it was what it is needed to be (this is what I believe is happening as it does not happen to Homebridge setups). I really wish this all was not so much of a pain for HOOBS users...

ScoopieFTW commented 1 year ago

I'm surprised that HOOBS has departed so much from how it works. Appreciate catering to those who use it!

ztalbot2000 commented 1 year ago

Hi, this is John Talbot, owner of Cmd4. I apologize that Cmd4 does not have a GUI yet to add its config.json entries. Not that I haven't tried. Cmd4 has so many Accessories and supports all the characteristics that the required config.schema file has to be auto generated and so far is over 8000 lines long, but that is really not the issue. I've never been able to figure out how to add in LinkedTypes or handle Standalone accessories as compared to Platform accessories. All of which extremely complicates the schema. So for this I do apologize on the effect it has on the AdvAir Plugin.

John

On Tue, Feb 21, 2023 at 6:53 PM ScoopieFTW @.***> wrote:

I'm surprised that HOOBS has departed so much from how it works. Appreciate catering to those who use it!

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

mitch7391 commented 1 year ago

Hey @ztalbot2000 I do not believe this is an issue with Cmd4 or how Cmd4 does not have a config.schema.json yet; so do not stress there! With all the hard work yourself, Ung Sing and I have put in, for this plug-in we do not need Cmd4 to have a config.schema.json. I do think this something HOOBS is doing in the background when installing Cmd4.