Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Support] HOOBS Installation Issue #70

Closed
QLDRiddler opened this issue Aug 16, 2022 · 82 comments
Closed

[Support] HOOBS Installation Issue #70

QLDRiddler opened this issue Aug 16, 2022 · 82 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@QLDRiddler
Copy link

Hi Mitch, thanks for developing this plugin, just what I am looking for. However, getting stuck at the first hurdle! I'm trying to install on my Hoobs setup, I've already downloaded and installed the CMD4 plugin and then installed the AdvantageAir one.

I accessed the Terminal and followed the instructions but when I enter $config, I get an error messgae back stating ERROR: either your AdvantageAir system is inacessible or your IP address /var/lib/hoobs/cmd4bridge/node_modules/homebridge-cmd4-advantageair/ConfigCreator.sh is invalid! - I thought this step was mean to ask for the ip address of my AA system? What am I doing wrong?

@uswong
Copy link
Contributor

uswong commented Aug 16, 2022

Hi @QLDRiddler,

Please try the following command

/var/lib/hoobs/cmd4bridge/node_modules/homebridge-cmd4-advantageair/ConfigCreator.sh

Then enter your ip address of your AdvantageAir system

@QLDRiddler
Copy link
Author

QLDRiddler commented Aug 16, 2022 via email

@uswong
Copy link
Contributor

uswong commented Aug 16, 2022

that is a bit strange.

make sure that you are in your home directory, then try this command

/var/lib/hoobs/cmd4bridge/node_modules/homebridge-cmd4-advantageair/ConfigCreator.sh "xxx.xxx.xxx.xxx"

@QLDRiddler
Copy link
Author

QLDRiddler commented Aug 16, 2022 via email

@uswong
Copy link
Contributor

uswong commented Aug 16, 2022

For some reasons, I can't see your screen grab images.

can you please test the following on your terminal?

curl -s -g --max-time 15 --fail --connect-timeout 15 "http://xxx.xxx.xxx.xxx:2025/getSystemData"

If the command returned the Json file, then your ip address xxx.xxx.xxx.xxx must be correct.

If not, then there are two reasons for the inaccessible message.

  1. one is wrong ip address. you have rule that out, I think.
  2. another reason is that your system is running quite slow and took more than 15 seconds.

to overcome the later, edit the line 802 in ConfigCreator.sh
myAirData=$(curl -s -g --max-time 15 --fail --connect-timeout 15 "http://${IPA}:2025/getSystemData")

change the number 15 to 60, to become the following:
myAirData=$(curl -s -g --max-time 60 --fail --connect-timeout 60 "http://${IPA}:2025/getSystemData")

For your reference, if everything is working well, you should see the following messages:

My installation is on Raspberry Pi and it looks like this:

image

@QLDRiddler
Copy link
Author

QLDRiddler commented Aug 16, 2022 via email

@uswong
Copy link
Contributor

uswong commented Aug 16, 2022

OK, your system is actually running fast, the max-time of 15 seconds is not the issue.

The issue is your jq installation.

try

jq -V

you should see a response something like this:
jq-1.6

if not, you have to install jq first

@uswong
Copy link
Contributor

uswong commented Aug 16, 2022

for Raspbian/Hoobs:
sudo apt-get install jq

@mitch7391
Copy link
Owner

@uswong thanks for jumping on this one for me. I really dislike HOOBS haha if I remember correctly they restrict what commands and access the user has at the terminal with their image... It was a very long time ago I tried HOOBS and I had to do a whole heap of extra steps to use some basic commands. I do not think we have 100% confirmed any users have this working on HOOBS yet, I did have a user who had trouble getting set up before had UI integration and never heard back from them on if they had a win or not in the end.

@uswong
Copy link
Contributor

uswong commented Aug 16, 2022

haha... I never come across HOOBS. I just googled it and this is what I got:

HOOBS is the number one solution for Homebridge.

they restrict what commands and access the user has at the terminal with their image...

If jq is actually installed and if Hoobs restrict the use of jq at the terminal, then I guess our next version of ConfigCreator which is running within Homebridge-ui environment should work better for @QLDRiddler.

@mitch7391
Copy link
Owner

HOOBS is the number one solution for Homebridge.

Yeah they would say that lol they are an early fork from homebridge-config-ui-x back in the day and use homebridge to create their own image/platform. It is designed for users who are not tech savvy to jump straight into the RPi and Homebridge world with no experience; this sounded great until I used it and found I could do nothing custom with it and requiring workarounds to elevate privileges.

The problem is they charge (with a mark up) for parts you could buy yourself and use a restricted version of what is a free image you could acquire; as you know. Anyway I should stop distracting from the point and my aim has always been to support HOOBS as well. @QLDRiddler I would suggest if you want a nicer experience with all your plug-ins (earlier updates, more support in the community, etc.) you should swap over to homebridge (but no pressure):

https://github.com/homebridge/homebridge-raspbian-image/wiki/How-to-migrate-from-HOOBS-to-Homebridge

@mitch7391
Copy link
Owner

@uswong I am not quite ready to roll out the new version of ConfigCreator just yet as I will have to do all the admin work for it; including grabbing screenshots to update the install instructions (the lengthy part). I have merged and tested it and it works as expected. What I can do in the mean time if @QLDRiddler is keen to give it a go, I could give some instructions on how to install it from 'git clone' so they can test it before it is rolled out.

@QLDRiddler did you want to give that a try? It would tell us if the new integration will get around any limitations applied by HOOBS...

@mitch7391 mitch7391 changed the title Installation issue [Support] HOOBS Installation Issue Aug 16, 2022
@QLDRiddler
Copy link
Author

QLDRiddler commented Aug 16, 2022 via email

@mitch7391 mitch7391 self-assigned this Aug 16, 2022
@mitch7391 mitch7391 added the help wanted Extra attention is needed label Aug 16, 2022
@mitch7391
Copy link
Owner

Give me a few secs to type out the instructions for you and worst case is it will not be any worse than what you have now. You will then just re-install the plug-in to revert.

@mitch7391
Copy link
Owner

  1. Open your terminal.
  2. Type:
    cd /tmp
    
  3. Type:
    git clone https://github.com/mitch7391/homebridge-cmd4-AdvantageAir.git
    
  4. Type:
    cd homebridge-cmd4-AdvantageAir
    
  5. Type:
    npm pack
    
  6. Type:
    sudo npm install -g ./homebridge-cmd4-advantageair-3.6.0.tgz --unsafe-perm
    
  7. Open you plug-ins tab and it should now say you have v3.6.0 and try the ConfigCreator as you were before :)

To revert just re-install the plugin as you had done the first time. Not sure if HOOBS will let you do any of this but worth a shot!

@mitch7391
Copy link
Owner

mitch7391 commented Aug 16, 2022

Actually there will be slightly different steps for using the ConfiCreator now, so don't follow the steps on the Wiki again.

  1. On the plug-in page, click SETTINGS for this plug-in and it will bring up a UI.
  2. Scroll to the bottom and type in the name of your system (E-zone, Aircon, Riddler, etc.).
  3. Type in your IP address.
  4. Click SAVE.
  5. You might need to launch the SETTINGS again.
  6. At the top of the UI press Config Creator.
  7. Hopefully everything worked!
  8. If it did, then run the Check Configuration.

@uswong
Copy link
Contributor

uswong commented Aug 18, 2022

Hey Mitch, I tested the above git clone procedure and got an error sh: husky: command not found. when I did npm pack command.

image

What I did to resolve the error was before the npm pack command, I have to do a npm i to install husky first, then everything worked.

image

image

image

@ztalbot2000
Copy link
Collaborator

ztalbot2000 commented Aug 18, 2022 via email

@mitch7391
Copy link
Owner

Hey @uswong I was not aware it would need husky installed to just do a npm pack... Just a npm install husky would suffice if that error holds you up, or similar to what John has said about; a npm install --include-dev should do.

@QLDRiddler sorry to pressure you, but did you get a chance to give this a go? Please let us know if you face any troubles or need further guidance.

@QLDRiddler
Copy link
Author

QLDRiddler commented Aug 18, 2022 via email

@mitch7391
Copy link
Owner

Hey @QLDRiddler, completely understandable if the above got confusing and what we have asked you to do still might not actually work.

Just to reassure you that the steps you will be taking will not harm your setup in anyway. The directory we end up creating in ‘/tmp’ ends up getting deleted once you reboot your RPi. The extra installation of ‘husky’ or ‘include-dev’ does not cause any issues to your system and takes up barely any space.

Anyway, revised steps as requested:

  1. Reboot your RPi to clear ‘/tmp’.
  2. Open your terminal.
  3. Type:
    cd /tmp
    
  4. Type:
    git clone https://github.com/mitch7391/homebridge-cmd4-AdvantageAir.git
    
  5. Type:
    cd homebridge-cmd4-AdvantageAir
    
  6. Type:
    npm pack
    
    If you have an error here about husky not being installed. Use:
     npm install husky
    
    Reattempt the npm pack.
  7. If successful, type:
    sudo npm install -g ./homebridge-cmd4-advantageair-3.6.0.tgz --unsafe-perm
    
  8. Open you plug-ins tab and it should now say you have v3.6.0.
  9. On the plug-in page, click SETTINGS for this plug-in and it will bring up a UI.
  10. Scroll to the bottom and type in the name of your system (E-zone, Aircon, Riddler, etc.).
  11. Type in your IP address.
  12. Click SAVE.
  13. You might need to launch the SETTINGS again.
  14. At the top of the UI press Config Creator.
  15. Hopefully everything worked!
  16. If it did, then run the Check Configuration.

If at any stage of these steps that you get stuck or stopped by some sort of error, please capture a screenshot or copy the error for us so we can further help.

@QLDRiddler
Copy link
Author

QLDRiddler commented Aug 19, 2022 via email

@mitch7391
Copy link
Owner

This is an interesting one @QLDRiddler... It looks like everything you have done has worked and is correct, but it is then not reflecting in the plug-in itself. My colleague @uswong says he is experiencing the same strange issue himself on his Homebridge RPi; I am not experiencing the issue and have tried it three times...

I would say at this point we will stop wasting your time by getting you to attempt it over and over. I will get my butt into gear tonight or tomorrow and push forward the release so you can install it the normal way (instead of our dev way). Sorry for all this inconvenience so far!

Also, the npm funding is just npm itself wanting people to fund projects (like a donate button); it will ask you about that every time you do an npm update, so just ignore that as it will not affect anything you are wanting to do.

I have also just dug up a very old HOOBS OS ZIP file download from back when they used to let you have the image for free (hopefully it lets me update for free too); I cannot believe they charge $10 for just the image download! I think it is fair time that I fired this up on my spare RPi3 and make sure I can get through the install myself and update any notes for future users.

@ztalbot2000
Copy link
Collaborator

ztalbot2000 commented Aug 19, 2022 via email

@QLDRiddler
Copy link
Author

QLDRiddler commented Aug 19, 2022 via email

@ztalbot2000
Copy link
Collaborator

ztalbot2000 commented Aug 19, 2022 via email

@ztalbot2000
Copy link
Collaborator

ztalbot2000 commented Aug 19, 2022 via email

@uswong
Copy link
Contributor

uswong commented Aug 26, 2022

Yes, I think it is best not to touch the directory of the v3.5.1 installation but create the file in the Home drive for now, so that there is no permission issues also when running the script.

Hey Mitch, may be you can post the screen shot of your test on your HOOBS for QLDRiddler's reference.

@QLDRiddler
Copy link
Author

QLDRiddler commented Aug 26, 2022 via email

@uswong
Copy link
Contributor

uswong commented Aug 26, 2022

The issue now is the config.json file required not found. Can you locate the config.json file in your system?

ls -al /var/lib/hoobs/cmd4bridge
Do you see config.json file in that directory?

if not, that is something you need to find out. Try the following commands, hopefully one of them will find your config.json file:
find /var/lib -name config.json | grep -v find | grep -v node_modules | grep -v cache | grep -v System | grep config.json
or
find /usr/lib -name config.json | grep -v find | grep -v node_modules | grep -v cache | grep -v System | grep config.json
or
find /usr/local/lib -name config.json | grep -v find | grep -v node_modules | grep -v cache | grep -v System | grep config.json

@mitch7391
Copy link
Owner

It should be located in /var/lib/hoobs/hoobs/config.json right?

@uswong
Copy link
Contributor

uswong commented Aug 26, 2022

It should be located in /var/lib/hoobs/hoobs/config.json right?

The script would have found it if it is there.

@mitch7391
Copy link
Owner

Disregard me again… I should stop jumping in lol mine might be there because I do not have a bridge setup; I will leave this to you Ung Sing, I am muddying the waters haha…

@QLDRiddler
Copy link
Author

OK, there was a config.json file in /var/lib/hoobs/cmd4bridge so I added those details when promoted in the ConfigCreator process. Seemed to go OK and I got prompted to reboot but still showing as 3.5.1 in the versions :(

image

@mitch7391
Copy link
Owner

Anything in your accessories tab now @QLDRiddler..? :)

@uswong
Copy link
Contributor

uswong commented Aug 26, 2022

Nice! It still show v3.5.1 is because the v3.6.0.beta.2 was not installed successfully. That is ok.

can u do this command for me to check the validity of the config.json

cat /var/lib/hoobs/cmd4bridge/config.json | more

if you see something like “platform”: “Cmd4” in there, then the script has done its job and your MyPlace accessories should have been created and you should see it in HOOBS and in HomeKit.

From here on, Mitch should be able to help you more as he has tested it with his own HOOBS installation.

@uswong
Copy link
Contributor

uswong commented Aug 26, 2022

the command should be:

cat /var/lib/hoobs/cmd4bridge/config.json | more

@uswong
Copy link
Contributor

uswong commented Aug 26, 2022

Hi @QLDRiddler, would you be able to issue the following command and see what you get on your system?

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

If your config.json is in /var/lib/hoobs/cmd4bridge then the script should have found it. Why it did not find it is a bit puzzle to me.

@QLDRiddler
Copy link
Author

So the cat command produces a bunch of text which includes

{"platform":"cmd4AdvantageAir"}.

It does also include this:

{"platform":"Cmd4","name":"Cmd4","debug":false,"outputConstants":false,"statusMsg":true,"timeout":60000,"stateChangeResponseTime":0,"constants":[{"key"

but shouldnt there be } and ] symbols at the end of that string before the next "key" string starts?

Also confirming teh Find command did locate a ferw instances of config.json including one in cmd4bridge.

I can now see all my zones, temps etc in Accessories but theyre not showing up in my Apple Home app :-(

Finally, anyway of changing the name I gave my system during install? I clicked on the Config button on the plugin but that didnt have any info.

image

@mitch7391
Copy link
Owner

@QLDRiddler if you are seeing all of the expected accessories in the ‘Accessories’ tab on HOOBS UI then this has been a success. From HomeKit you should be able to scan the QR code provided for your bridge on HOOBS UI and it should then add the accessories for you to HomeKit. I actually had not done this step myself on my HOOBS machine as I did not want to add them to my HomeKit as duplicates haha…

@mitch7391
Copy link
Owner

Finally, anyway of changing the name I gave my system during install? I clicked on the Config button on the plugin but that didnt have any info.

Do you mean the name you have to the ConfigCreator or your bridge? If you mean the former, you can run it all again or you can modify that ‘config.json’ from the terminal or HOOBS UI (click config on a plug-in and on the left should show your plugins and an ‘advanced’ section; modify it in there).

@uswong
Copy link
Contributor

uswong commented Aug 26, 2022

Also confirming teh Find command did locate a ferw instances of config.json including one in cmd4bridge.

Hi @QLDRiddler, Would u be able to post all the instances of the find commands? This is for me trying to understand better the directory structure of HOOBS installation. I was expecting a single instance. Multiple instances is the reason it did not work at the first place.

@QLDRiddler
Copy link
Author

First of all, apols for being such a doofus and not scanning the QR code to add to my Homekit, have done that now and all shows up.

I posted above the contents of the advanced config screen on the bridge, the only entry is "platform": "cmd4AdvantageAir" so no chance to change the name there. Is that possibly related to the }] situation I mentioned?

Here's the output from the Find command:

image

@uswong
Copy link
Contributor

uswong commented Aug 26, 2022

Try
cat /var/lib/hoobs/cmd4bridge/config.json

then you should see the full complete json file.

What you saw before was only part of config.json

@uswong
Copy link
Contributor

uswong commented Aug 26, 2022

Thanks for the output of the find command, I know now what I have to do to pick up only the right one. I will get u an updated version later tonight or tomorrow.

@uswong
Copy link
Contributor

uswong commented Aug 26, 2022

Hey Mitch and @QLDRiddler,

Please download an updated version of ConfigCreator.sh.

HOOBS has multiple config.json files if you have created multiple bridges in it. As such, I have to scan all the config.json files for "Cmd4" or "homebridge-cmd4" to get the correct config.json file to use.

https://github.com/uswong/homebridge-cmd4-AdvantageAir/blob/master/ConfigCreator.sh

Please test it out. @QLDRiddler should no longer need to input the full path to config.json. It should also work for homebridge users too.

@uswong
Copy link
Contributor

uswong commented Aug 26, 2022

{"platform":"Cmd4","name":"Cmd4","debug":false,"outputConstants":false,"statusMsg":true,"timeout":60000,"stateChangeResponseTime":0,"constants":[{"key"
but shouldnt there be } and ] symbols at the end of that string before the next "key" string starts?

What you saw above was only part of config.json (in compact form) and that is why you see that the brackets are not balanced. What you saw above was correct config.json file for the plugin but incomplete.....

Try
cat /var/lib/hoobs/cmd4bridge/config.json

then you should see the full complete config.json file and all the square and curly brackets are balanced.

If you rather want to see the config.json in an expanded form, try the command below:

jq --indent 4 '.' /var/lib/hoobs/cmd4bridge/config.json

@QLDRiddler
Copy link
Author

Hey Mitch and @QLDRiddler,

Please download an updated version of ConfigCreator.sh.

HOOBS has multiple config.json files if you have created multiple bridges in it. As such, I have to scan all the config.json files for "Cmd4" or "homebridge-cmd4" to get the correct config.json file to use.

https://github.com/uswong/homebridge-cmd4-AdvantageAir/blob/master/ConfigCreator.sh

Please test it out. @QLDRiddler should no longer need to input the full path to config.json. It should also work for homebridge users too.

Worked first time :) You little beauties!!

Couple more questions for you:

  1. Does your wonderful plugin allow the user to change the focus zone?
  2. Can you change the fan labels from a % to Low, Medium and High?
  3. When I'm in the Apple Home app it's grouping the temperature sensor controls in my "Air Conditioning" room together, I'm guessing that's by design? When I click into that temperature group, its calling out a couple of the controls as having low batteries? Does that literally mean I need to swap out the button batteries in those sensors? I havent seen that info on the main Advantage Air app.
    73084A2A-8264-445F-A04A-48195DC868AB

@mitch7391
Copy link
Owner

Hey @QLDRiddler sorry for the late reply, I had an evening out planned last night; but you were in good hands with Ung Sing in my absence!

First of all, apols for being such a doofus and not scanning the QR code to add to my Homekit, have done that now and all shows up.

Easy mistake to make when we have given you so many things to do :p I am very glad it was just a simple thing like this and not something more major haha...

I posted above the contents of the advanced config screen on the bridge, the only entry is "platform": "cmd4AdvantageAir" so no chance to change the name there. Is that possibly related to the }] situation I mentioned?

I may not have described this as well while I was in an Uber last night as I did not have HOOBS in front of me. It looks like you went to the advanced section of 'cmd4-advantageair' but not the advanced section I meant. Here is where I meant:

image

This is the config that the 'ConfigCreator' has made for you and from here, you can now manually edit the displayName's of any of your accessories if you want to.

Does your wonderful plugin allow the user to change the focus zone?

I might need a little more information about your system, do you mean the 'constant zone' represented as a C in your Advantage Air app? Or do you my the 'myZone' represented as an M in some systems? If you mean the C, I believe only the installer can change this, but if you mean the M we have not added the support yet, but has been on my mind as a small feature that I keep forgetting about. I believe the M is one you can change around to whichever room you like at any given time (I do not have this feature in my e-zone system).

Can you change the fan labels from a % to Low, Medium and High?

This is a limitation imposed by Apple themselves for HomeKit; they only support fans that turn on/off or have % based speed. We have set up a conversion in our code to do the low/med/high/auto as 1-33% for low, 34-67% for medium, 68-99% for high and 100% for 'auto' or 'ezfan'. You can read about it all here in my Wiki if you are interested.

When I'm in the Apple Home app it's grouping the temperature sensor controls in my "Air Conditioning" room together, I'm guessing that's by design?

That is correct and how I like to keep mine so when I pull up the temperature status indicator on the home page it shows them in all one place and not scattered across rooms making you scroll down to see them all. You can change this by long pressing on the temperature sensor accessory, scrolling down and changing what room it lives in.

When I click into that temperature group, its calling out a couple of the controls as having low batteries?

Yes, this means you do have low batteries if the code is working properly; to be 100% sure cross reference with your Advantage Air app and check the zones tab to see if they have any errors on them. In our plug-in the default for 'no reading' is the 25.0deg value; so based on what you have shown me, the batteries have died and are no longer communicating to the control unit any more or they have somehow lost comms to the control unit itself and cannot get a read of value or battery. Please let us know if your Advantage Air app tells you they are reading fine.

I think I have answered all your questions? But please let me know if I have missed any. I just also wanted to thank you for your patience and help; I know we had a lot of kinks to iron out to get this working for you, but your hard work has ensured that the next HOOBS user will have a much smoother experience :) Please continue to raise issues for any bugs you find or features you would like to see!

@QLDRiddler
Copy link
Author

Wow, such a comprehensive response. Thank you. Quick reply from me.

Yes, I did mean the feature M zone - I will look out for future updates if youre able to get this included.

I've gone into the tech setup on my AA panel to check the sensors and its reporting all is OK, as per the photo below, as is the zones tab of the app so not sure where the battery warning is coming from.

IMG_0650

@mitch7391
Copy link
Owner

Yes, I did mean the feature M zone - I will look out for future updates if youre able to get this included.

I will talk with Ung Sing and we will look into adding it as one of the future updates :) should not be a hard one to implement.

I've gone into the tech setup on my AA panel to check the sensors and its reporting all is OK, as per the photo below, as is the zones tab of the app so not sure where the battery warning is coming from.

I am not terribly familiar with that Advantage Air UI design, is that the ‘zone10e’ that you have? If not, which app is it that you are using?

I have just pulled the battery out of one of my sensors to show you. For my temperature sensors, it will show here:

E8A5505A-56DC-4BC9-8DFB-0FB5004B338F

You can always swap the batteries around to be sure; it can take up to 15mins for the Advantage Air controller to recognise the new battery I have found. Otherwise we will have to try figure out what is going wrong for these two temperature sensors for you!

@QLDRiddler
Copy link
Author

QLDRiddler commented Aug 27, 2022 via email

@mitch7391
Copy link
Owner

@QLDRiddler yep that makes sense, same for my 'e-zone' app in terms of what can accessed on the phone app vs the master control tablet; I just took my screenshot from my phone as it was easier for uploading a photo to GitHub. What I need to know to work out if we still need to help out the two temperature sensors is the following:

  1. What is the name of the app you are using? Is it 'zone10e', 'MyAir', 'MyPlace', 'e-zone', etc.?
  2. Can we get you to put some new batteries in those two zones that have the warnings, wait at least 15 minutes and let us know if they are still showing with an error? It looks like form what you have shown me on the master app that they should be healthy, but I am still unsure due to not knowing which app that is.

@mitch7391
Copy link
Owner

Closing this issue due to the latest version released covering all the work completed to get HOOBS working. Please continue to comment @QLDRiddler if you need further help with those temperature sensors or feel free to open another issue :)

@QLDRiddler
Copy link
Author

QLDRiddler commented Oct 11, 2022 via email

@mitch7391
Copy link
Owner

No worries @QLDRiddler, it sounds like something is still not set right then. Please open a new issue if you face any problems and we will try our best to help you out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants