Closed jezzalencko closed 1 year ago
Hey @jezzalencko is there any reason why you are using the terminal instructions for the ConfigCreator and not using the Homebridge Web UI?
For the issue with installing jq
, the error message is telling you that apk
does not exist to call as a function, so either you do not have apk
installed or (and more than likely) your OS does not use that method. Unless I have this the wrong away around, from memory a previous QNAP user had to use the following commands:
apt-get install jq
and apt-get install curl
Let me know how you go!
Hi @mitch7391, I would actually prefer using the UI (as I'm a coding n00b), but when I click on CONFIG CREATOR there I get: ERROR: no Cmd4 Config found in "/var/lib/homebridge/config.json"! Please ensure that Homebridge-Cmd4 plugin is installed
with same error pop-up (see attached).
But the strange this is that I DO have it installed. See attached shots. Any ideas?
hey @jezzalencko, have you installed jq and curl as @mitch7391 suggested? If you have done that successfully and you still get the same error using UI, then check that /var/lib/homebridge/config.json exists with the following command:
ls /var/lib/homebridge/config.json
Thanks @uswong. I have used those apt-get commands from @mitch7391 and they "seem" to have been installed ok? See screenshots here:
I can also confirm the congif.json file exists in the homebridge folder on my NAS (using Docker container). Contents here:
but I'm still getting the error message when I run the CONFIG CREATOR :(
I have used those apt-get commands from @mitch7391 and they "seem" to have been installed ok?
@jezzalencko it looks like those have now installed correctly and this will have saved you the next lot of issues you will have once you are past the issue with the ConfigCreator. You can always confirm they installed correctly by using jq -V
and curl -V
.
@uswong, I have got a little rusty on the ConfigCreator, any reason it would return a blank result?
@jezzalencko it could be worth while we sort out a solution for you to uninstall homebridge-cmd4
and homebridge-cmd4-AdvantageAir
via the Homebridge Web UI and then install them again via the same method. You will not need to install jq
or curl
again.
Hey @jezzalencko & @mitch7391, it looks to me that the Cmd4 config is not in the config.json. @jezzalencko, can you please confirm whether something like below is part of your config.json?
I suspect the cmd4AdvatageAir
is present in your config but not the Cmd4
.
{
"name": "cmd4AdvantageAir",
"devices": [
{
"name": "Aircon",
"ipAddress": "192.168.x.xxx",
"debug": false
}
],
"platform": "cmd4AdvantageAir"
},
{
"platform": "Cmd4",
"name": "Cmd4"
}
If not, try to do what @mitch7391 suggested to uninstall homebridge-cmd4 and homebridge-cmd4-advantageair and reinstall them again, then check the content of config.json. If config.json contains both the cmd4advantageair
and Cmd4
, then it should be good to go to rerun Config Creator.
Hi @mitch7391 and @uswong, so I did as you said and uninstalled both plugins and re-installed. When I restarted homebridge, I noticed this interesting piece: "The plugin "homebridge-cmd4-advantageair" requires Node.js version of ^14.18.2 || ^16.13.1 which does not satisfy the current Node.js version of v18.13.0. You may need to upgrade your installation of Node.js - see https://homebridge.io/w/JTKEF" and then it goes onto say: "No plugin was found for the platform "cmd4AdvantageAir" in your config.json. Please make sure the corresponding plugin is installed correctly." which I suspect is related to this node.js version issue. I have v18.13.0 installed. I went to a bit of trouble to make sure I was running the latest version of Homebridge, but in doing so it seems I may have gone "beyond" the version that cmd4/advantageair is familiar with? Is that right? Would this be the source of my problem? What would you recommend I do here? Thanks for your patience and help thus far.
Hey @jezzalencko , it should not be a problem with the No plugin error and the other one is just a warning, probably and hopefully you can get away with it.
Please check the /var/lib/homebridge/config.json to see if both cmd4AdvantageAir and Cmd4 platforms are in the config.json.
if so, go ahead to run the ConfigCreator as per README.
if not, please check whether the path for AdvAir.sh is at one of the following locations:
ls -ltr /var/lib/node_modules/homebridge-cmd4-advantageair/AdvAir.sh
or
ls -ltr /usr/lib/node_modules/homebridge-cmd4-advantageair/AdvAir.sh
or
ls -ltr /usr/local/lib/node_modules/homebridge-cmd4-advantageair/AdvAir.sh
@uswong see screenshot of /var/lib/homebridge folder here:
Also, config.json contents shown here:
{ "bridge": { "name": "Homebridge E036", "username": "0E:6C:1C:35:E0:36", "port": 51668, "pin": "203-77-647", "advertiser": "bonjour-hap" }, "accessories": [], "platforms": [ { "name": "Config", "port": 8581, "platform": "config" }, { "name": "cmd4AdvantageAir", "devices": [ { "name": "Aircon", "ipAddress": "192.168.0.193" } ], "platform": "cmd4AdvantageAir" } ] }
So you can see that cmd4AdvantageAir is there, but there isn't a separate cmd4 only platform. Is that normal? It would explain the error message. Should I put it in manually to the config.json file? Clearly the homebridge Cmd4 plugin isn't inserting it for some reason?
btw, just checked jq and curl. Seems ok?
jq-1.6 and curl 7.68.0 (presumably these are the versions that are installed?)
So you can see that cmd4AdvantageAir is there, but there isn't a separate cmd4 only platform. Is that normal? It would explain the error message. Should I put it in manually to the config.json file? Clearly the homebridge Cmd4 plugin isn't inserting it for some reason?
That is the issue, somehow the Cmd4 plugin did not install in the same directory as cmd4AdvantageAir. It has to be for it to work. I wonder why? @mitch7391, do you have any idea??
You can't just put it in manually. If you put it in manually, ConfigCreator will run but it won't work for you in Homekit.
You have reinstalled Cmd4 as well, right? You might want to try to reinstall Cmd4 again.
jq-1.6 and curl 7.68.0 (presumably these are the versions that are installed?)
No issue with that.
Yep, uninstalled and re-installed Cmd4 multiple times over but no effect. The node_modules for it seem to exist ok? What should I be seeing in the main homebridge folder when it's installed properly? What is the correct folder structure?
The directory and the files look quite fine there. To check further, can you do this for me:
ls -ltr /var/lib/node_modules/homebridge-cmd4-advantageair
ls -ltr /var/lib/node_modules/homebridge-cmd4
I want to see if all the necessary file are installed properly for both plugins.
Sure. The cmd4 folder:
and the advantageair folder:
Seem ok?
Yes, all look pretty normal. Thanks.
It is puzzling that why Cmd4 did not install its config in /var/lib/homebridge/config.json.
In your first post you have Cmd4 platform posted. Where did you find that file?
{
{
"platform": "Cmd4",
"name": "Cmd4"
}
If I go to SETTINGS in the Homebridge Cmd4 tile in the UI, this is what is shows:
ok.
I am pretty sure now that there is more than one config.json files in your system.
Let's try to locate them. Do the following commands on a terminal:
find /var/lib -name config.json 2>&1 | grep -v find
find /usr/lib -name config.json 2>&1 | grep -v find
find /usr/local/lib -name config.json 2>&1 | grep -v find
cd
cd .homebridge
ls -ltr
The last set of commands is to find out if there is a hidden homebridge directory in your home directory. MacOS will create a hidden homebridge directory.
One more thing, do you see the Cmd4 platform if you click the config at the top menu bar?
Hi @uswong, appreciate you staying committed to this!.... So, have done what you said, results here. Didn't seem to show anything?
Also, cmd4 plugin not shown on the Config tab on the UI. Screenshot here:
I would expect at least the first command should return at least one file /var/lib/homebridge/config.json
. I am a little concern that you don't. In one of your posts earlier, you have config.json in that directory.
Anyway, the fact the Cmd4 platform is not in the config, it probably means that somehow Cmd4 is not installed properly. I will have to escalate this to the owner of Cmd4 @ztalbot2000. John, would you please have a look at @jezzalencko issue of not having the Cmd4 config in the homebridge/config.json
after installing Cmd4 plugin?
@uswong, I took out the path (because I was already in /var/lib/homebridge and it gave these results: So the file is definitely there. And I've looked through the folders and can't see any other instance of config.json.
So I'm at a loss and hopefully @ztalbot2000 can help us as you say.
Thanks again for your help thus far.
Oh I meant to say there was that instance of config.json in the Extras folder as shown there, but I'm guessing that's normal? Seems to be quite a big list of parameters (see start of the content here)...
Sorry for the drop off in replies, early bed time for work!
"The plugin "homebridge-cmd4-advantageair" requires Node.js version of ^14.18.2 || ^16.13.1 which does not satisfy the current Node.js version of v18.13.0. You may need to upgrade your installation of Node.js - see https://homebridge.io/w/JTKEF" and then it goes onto say: "No plugin was found for the platform "cmd4AdvantageAir" in your config.json. Please make sure the corresponding plugin is installed correctly."
These will not cause your issues or stop anything from working; but they are two things I plan to update and fix on the next release so people do not think they cause issues...
jq-1.6 and curl 7.68.0 (presumably these are the versions that are installed?)
Yep, these are installed correctly now.
Oh I meant to say there was that instance of config.json in the Extras folder as shown there, but I'm guessing that's normal? Seems to be quite a big list of parameters (see start of the content here)...
This is just an example config from Cmd4, from memory. We are looking to see if your homebridge has scattered plug-ins across directories. Can you run the command whereis node_modules
for us?
Also I just want to double check, have you been using this method to install the plug-ins? Or have you used it at any point?
Hey @jezzalencko, I am just a bit surious.....
Can you check what is the content of config.json.copy in /var/lib/homebridge directory. It should be just a backup copy of config.json ConfigCreator created but let's turn that stone.....
Can you run the command
whereis node_modules
for us?
Yep, see here:
have you been using this method to install the plug-ins? Or have you used it at any point?
Nope, only ever used the UI to install the plugins.
what is the content of config.json.copy in /var/lib/homebridge directory.
@uswong, yep the config.json.copy file looks to be an exact replica. No cmd4 in there. See below:
{ "bridge": { "name": "Homebridge E036", "username": "0E:6C:1C:35:E0:36", "port": 51668, "pin": "203-77-647", "advertiser": "bonjour-hap" }, "accessories": [], "platforms": [ { "name": "Config", "port": 8581, "platform": "config" }, { "name": "cmd4AdvantageAir", "devices": [ { "name": "Aircon", "ipAddress": "192.168.0.193" } ], "platform": "cmd4AdvantageAir" } ] }
@jezzalencko thanks for checking these. I might have been mistaken and the command I needed you to use was which node_modules
, I get the two confused and am not in front of a terminal to test before suggesting.
Nope, only ever used the UI to install the plugins.
Thank you for confirming this. Maybe we try the complete opposite of what I have suggested. Can you please uninstall the two plug-ins via the Homebridge Web UI and then attempt to install them via the terminal's suggested hb-service add homebridge-cmd4
and hb-service add homebridge-cmd4-advantageair
; then see if the ConfigCreator works via Homebridge Web UI or through the terminal instructions. My thought process here is that maybe the particular operating system is affecting the install method.
the command I needed you to use was
which node_modules
@mitch7391 no worries, I've run that command but it also just seems to draw blanks.
Will try that install method now...
You can try this command to find out the location of your node_ modules:
npm root -g
Ooooo good point Ung Sing, I forgot about that one! I am wondering if it will show us multiple file paths... Let us know how the different install method goes!
Let us know how the different install method goes! Seems to be same effect. Still not placing cmd4 into config.json.
npm root -g
See here:
Thanks for the file path @jezzalencko, have you had any further luck with the ConfigCreator after this installation method?
Nope. As mentioned, ran the ConfigCreater after that install method and still got the error message.
Was worth a shot I guess.
Should I completely un-install Homebridge itself and try re-installing that again?
@jezzalencko I would say leave it for now until we can think of anything more for you to try.
@uswong is there any reason why ConfigCreator is not looking in /opt/homebridge/
? I will look through my emails and Reddit messages, I know I have a QNAP user that has this app working; I just need to search for what we did to help out.
Clutching at straws here, but could it be related to me running Homebridge from a Docker container on my Synology NAS? I'm assuming all settings here are correct. See processes that are running.
Oh, this is a Synology not a QNAP! Looking back over the original post, I clearly got confused... I have never used Homebridge docker myself but I could actually try install and run it up on my Synology at home after work... Had you followed the official Homebridge instructions? As it does not look like they use docker...
Had you followed the official Homebridge instructions? As it does not look like they use docker...
So a bit more background I should have mentioned. I tried this method initially, however the problem I had was that I was not able to update the node.js version. I read a few posts about this and noted that the way people had got around it was to use Docker instead... see here.
Hence why I went down the Docker route. And that seemed to fix the node.js version issue because Homebridge is showing [v18.13.0].
@jezzalencko, what machine are you having docker on? Is it a Mac? If so, I would recommend install homebridge on Mac natively rather than in a docker container. I also have a Mac and have installed Homebridge on it natively. It works brilliantly.
Both cmd4AdvantageAir and Cmd4 plugins do not need node v18, mine is node v16.19.0 and is working perfectly fine.
@uswong is there any reason why ConfigCreator is not looking in /opt/homebridge/?
@mitch7391: No option yet to look into /opt/homebridge by current version of ConfigCreator. This is the first time we come across that path, however ConfigCreator is looking into /opt/homebrew/ if it did not find config.json anywhere else. Since it found config.json in /var/lib/homebridge it will use that and should be the correct one since cmd4AdvantageAir config is in it.
In this case, I think Cmd4 might have installed in /opt/homebridge. @jezzalencko can you do this to find out whether there is a config.json somewhere in that directory tree:
find /opt/homebridge -name config.json 2>&1 | grep -v find | grep -v cache | grep -v System
If so, please post the content of config.json found there.
please post the content of config.json found there.
@uswong that opt/ folder doesn't seem to exist?
recommend install homebridge on Mac
not sure if you mean a Mac or a Synology NAS. I don't want to run it on a mac because the Mac isn't always on. My NAS is always on and so that's why I want it to run on that. There is a a Homebridge Package there in the Synology Package Centre (see below) but as I mentioned, when I run this the Node.js is an older version and so won't run. I could try it all again. Presumably I'd need to delete the Docker container first in case there are clashing issues?
No option yet to look into /opt/homebridge by current version of ConfigCreator. This is the first time we come across that path, however ConfigCreator is looking into /opt/homebrew/ if it did not find config.json anywhere else. Since it found config.json in /var/lib/homebridge it will use that and should be the correct one since cmd4AdvantageAir config is in it.
Well this would be the problem then right? Is there any way we can sort out a temp solution?
not sure if you mean a Mac or a Synology NAS.
I think Ung Sing was unsure what device you were using, while we have this working for Mac users, you should be able to get this working on your Synology NAS; we just might have to add new functionality to get the ConfigCreator to work for your case.
@uswong that opt/ folder doesn't seem to exist?
It exists since you found the directory /opt/homebridge/lib/node_modules
before but no config.json found anywhere in /opt/homebridge directory tree. We are still unsure where the Cmd4 config was installed.
@mitch7391, if there is no config.json somewhere in /opt/homebridge directory tree, then not looking into /opt/homebridge is not the issue in this case. The fact that cmd4AdvantageAir config is installed in /var/lib/homebridge, you would expect Cmd4 config should also be there. Both has to be in the same directory for the ConfigCreator to work properly.
If Cmd4 plugin is somehow installed properly with its config.json somewhere in the system (yet to be located), then alternatively @jezzalencko can copy and paste the cmd4Config_AA_Aircon.json into Cmd4 setting for the Cmd4 plugin to work. First of all, can you post the top part of the file cmd4Config_AA_Aircon.json (says the top 30 lines or so)? I just want to verify that ConfigCreator has created it properly.
I think Ung Sing was unsure what device you were using, while we have this working for Mac users, you should be able to get this working on your Synology NAS; we just might have to add new functionality to get the ConfigCreator to work for your case.
I am very new to Synology NAS setup. Once we figure out how it behaves, we can definitely add new functionality in ConfigCreator to cater for users with such a setup. The immediate hurdle is to find out where Cmd4 config is installed in the system and why.
@mitch7391, if there is no config.json somewhere in /opt/homebridge directory tree, then not looking into /opt/homebridge is not the issue in this case. The fact that cmd4AdvantageAir config is installed in /var/lib/homebridge, you would expect Cmd4 config should also be there. Both has to be in the same directory for the ConfigCreator to work properly.
Very fair point @uswong. I have plans tonight, but I can try set Homebridge up on my Synology NAS tomorrow if you think that will help..?
@jezzalencko I would say at this stage, sit tight and I will try an install myself on my NAS. Ung Sing and I will go back and forth over email until we have a result for you. It will save you a lot of trouble while we figure out what is going wrong. Hopefully we will have a solution for you soon :)
I have some bad news for you @jezzalencko... It all installed for me without a single issue haha... So, a few questions for you!
It looks like you have no other plug-ins based on the screenshots above, so I am assuming this is your first dive into Homebridge? I am feeling like something has gone wrong in the installation process, but hopefully answering the above questions may help me narrow down on what has gone wrong.
Just some further proof to give you hope:
My real homebridge setup has a good 60-odd accessories.
Hi Mitch yeah that’s good and bad news for me!
I’m actually not near my NAS at the moment so will need to wait a few days. What I can say from memory though is: 1) I have a DS415+ 2) it’s running the latest version of DSM (all I know is that’s it’s the latest, not sure what version number) 3) yep 4) I’ll have to do that later
Spot on, it’s my very first dive into homebridge. I have a Vera z-wave hub so haven’t had a burning need, but it’s always bugged me that I haven’t been able to incorporate MyPlace Advantage Air system and so that’s how I stumbled on Homebridge.
On Sat, 4 Mar 2023 at 11:07 am, Mitch Williams @.***> wrote:
I have some bad news for you @jezzalencko https://github.com/jezzalencko... It all installed for me without a single issue haha... So, a few questions for you!
- What Synonlogy NAS do you have?
- What DSM version are you on?
- Did you follow these homebridge docker instructions https://neellik.com/how-to-install-homebridge-on-your-synology-nas-with-docker/ ?
- If yes, can you please share the 'user defined script' you pasted from Step 4 of the instructions?
It looks like you have no other plug-ins based on the screenshots above, so I am assuming this is your first dive into Homebridge? I am feeling like something has gone wrong in the installation process, but hopefully answering the above questions may help me narrow down on what has gone wrong.
— Reply to this email directly, view it on GitHub https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/issues/81#issuecomment-1454352825, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALHNUOWLYHNTG65TURBE4JTW2KWV5ANCNFSM6AAAAAAVM4GWB4 . You are receiving this because you were mentioned.Message ID: @.***>
-- Kind Regards, Jeremy Goodchild. ph: 0414476385.
I suppose it is good and bad news haha...
1) I have a DS415+
Ok looking at the stats of this, I do not see any issues that would be hardware based; I have a DS920+ myself.
2) it’s running the latest version of DSM (all I know is that’s it’s the latest, not sure what version number)
The latest is in the version that has just popped up in the last couple of weeks? I have not yet updated to this. I will uninstall homebridge, update DSM and attempt to install again to see if I face your issue.
3) yep
Good to confirm we followed the same instructions.
4) I’ll have to do that later
All I will you to confirm in there is if you changed the hostname 'Galactica' to your hostname (which I think based on your homebridge terminal should be 'JezStation'). I do feel like if you got this wrong then homebridge would not work at all for you, but who knows... Essentially I feel we are going to send you down the route of completely removing homebridge and installing it all again.
Looks like a re-install after updating DSM to it's latest version (v7.1.1-42962 Update 4) is still working. I would suggest when you do the uninstall Jeremy to make sure you got to Docker and stop the container, then delete it from there, go to File Station delete the 'homebridge' folder you created under 'docker' and lastly delete the 'user defined script' you created in Task Scheduler; that should remove all traces of Homebridge from what I can see.
Ok awesome will try all those things and reinstall and report back. So it was running fine with an older node.js version?
On Sat, 4 Mar 2023 at 4:17 pm, Mitch Williams @.***> wrote:
Looks like a re-install after updating DSM to it's latest version (v7.1.1-42962 Update 4) is still working. I would suggest when you do the uninstall Jeremy to make sure you got to Docker and stop the container, then delete it from there, go to File Station delete the 'homebridge' folder you created under 'docker' and lastly delete the 'user defined script' you created in Task Scheduler; that should remove all traces of Homebridge from what I can see.
— Reply to this email directly, view it on GitHub https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/issues/81#issuecomment-1454661942, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALHNUOW6Z3ZZZU4EIIL4TBTW2L3CNANCNFSM6AAAAAAVM4GWB4 . You are receiving this because you were mentioned.Message ID: @.***>
-- Kind Regards, Jeremy Goodchild. ph: 0414476385.
Hey @jezzalencko I had not upgraded Node.js on it at all and left it at what it was when installed; which worked out to be v18.13.0
.
Hi, I'm stuck on the steps required for the configcreater. Both steps 4 and 5 return no result in Terminal so not sure what to do next.
Also, I wasn't able to perform this step in the readme: Install jq via your Homebridge UI terminal or through ssh:
Synology/QNAP NAS apk add jq
So not sure if that has anything to do with it. When I try running this in homebridge terminal or ssh terminal I get: bash: apk: command not found
Cmd4 Config:
Screenshots:
Advantage Air System:
Homebridge Environment: