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

[Support] ERROR: no Homebridge config.json found #84

Closed antoniokly closed 1 year ago

antoniokly commented 1 year ago

Config Creator error

Followed the steps in readme, installed homebridge-cmd4 and jq. I have input the device name and ip correctly in Settings, but when I click Config Creator, I got this error. ERROR: no Homebridge config.json found in "/"! Please copy "cmd4Config_AA_MyPlace.json" to cmd4 JASON Config manually. No such file "cmd4Config_AA_MyPlace.json" was found in the entire system.

Paste of Logs:

[20/05/2023, 11:15:21 pm] [Cmd4] Initializing Cmd4 platform...
[20/05/2023, 11:15:21 pm] [Cmd4] Class Cmd4Platform
[20/05/2023, 11:15:21 pm] Loading 5 accessories...
[20/05/2023, 11:15:21 pm] [Sonoff-sv] Initializing mqttthing accessory...
[20/05/2023, 11:15:22 pm] [Sonoff-sv-humidity-sensor] Initializing mqttthing accessory...
[20/05/2023, 11:15:22 pm] [Sonoff-sv-temperature] Initializing mqttthing accessory...
[20/05/2023, 11:15:22 pm] [Sonoff] Initializing mqttthing accessory...
[20/05/2023, 11:15:22 pm] [Security] Initializing security-system accessory...
[20/05/2023, 11:15:22 pm] [Security] Default mode (Off)
[20/05/2023, 11:15:22 pm] [Security] Arm delay (0 second/s)
[20/05/2023, 11:15:22 pm] [Security] Trigger delay (0 second/s)
[20/05/2023, 11:15:22 pm] [Security] Audio (Disabled)
[20/05/2023, 11:15:22 pm] [Cmd4] Cmd4Platform didFinishLaunching
[20/05/2023, 11:15:22 pm] [Cmd4] No queued polling characteristics
[20/05/2023, 11:15:22 pm] Publishing bridge accessory (name: Homebridge, publishInfo: {
  username: 'CC:23:4D:A3:CE:33',
  port: 51826,
  pincode: '***-**-***',
  category: 2,
  bind: [ 'br0', [length]: 1 ],
  mdns: undefined,
  addIdentifyingMaterial: true,
  advertiser: undefined
}).

Cmd4 Config:

{
        "platform": "Cmd4",
        "name": "Cmd4",
        "debug": true
}
image

Advantage Air System:

Homebridge Environment:

mitch7391 commented 1 year ago

Hey @antoniokly, just double checking but did you also install homebridge-cmd4 as well?

mitch7391 commented 1 year ago

Sorry just saw you said that, should not be reading before my morning coffee… Give me a little and I will come back with some suggestions haha

mitch7391 commented 1 year ago

@antoniokly can you confirm for me if you installed homebridge-cmd4 via the Homebridge web UI install tab or via the instructions found on Cmd4’s page?

antoniokly commented 1 year ago

I installed homebridge-cmd4 via the Homebridge web UI

mitch7391 commented 1 year ago

Thanks for confirming that, I think I was still on the wrong train of thought before. We are both using the same hosting machine, so I am confident we will get you up and running.

Can I get you to run the following command for me?

config1=$(find /usr/local/lib -name ConfigCreator.sh 2>&1|grep -v find|grep -v System|grep -v cache|grep node_modules|grep cmd4-advantageair|grep ConfigCreator.sh)

when it is done, then run the following command and paste the response back here.

echo "$config1"
uswong commented 1 year ago

Hey @mitch7391 and @antoniokly, based on the error message from ConfigCreator, it seems that homebridge storage path is set to / which is very unusual. Would @antoniokly please post the system information of your homebridge installation? It can be found on your homebridge web UI, it looks something like this:

image

On Raspbian installation, the storage path should have been /var/lib/homebridge/ or something like that. It should not be /.

antoniokly commented 1 year ago

response of echo "$config1"

/usr/local/lib/node_modules/homebridge-cmd4-advantageair/ConfigCreator.sh

antoniokly commented 1 year ago
image
antoniokly commented 1 year ago

I notice I have an older version of Raspbian, in the mean time, let me set up another raspberry with the latest OS. Thanks for the investigation.

antoniokly commented 1 year ago

I have set up another Homebridge with latest Raspbian, and it is working! Probably not worth to fix the issue I had on the older version of Raspbian. Thanks so much

BTW, just nice to have, can the Zone control displayed as a Fan with rotation speed in stead of a Dimmer with brightness?

uswong commented 1 year ago

can the Zone control displayed as a Fan with rotation speed in stead of a Dimmer with brightness?

The Zone control is currently using lightbulb accessory as a proxy, and it is certainly possible to use Fan accessory as a proxy instead but that involve a bit of modification in the code. Mitch and I have preferred lightbulb accessory as a proxy during development stage so that the zone controls do not confuse with the fanSpeed control. What I have done in Homekit is to change the Zone control 'lightbulb' icon to appear like a square ceiling vent outlet (example shown below):

WhatsApp Image 2023-05-22 at 10 06 22

mitch7391 commented 1 year ago

Glad to hear it is all sorted @antoniokly! Really frustrating when it is just a reinstall job, definitely not the first time we have seen it.

BTW, just nice to have, can the Zone control displayed as a Fan with rotation speed in stead of a Dimmer with brightness?

In regards to this, we had to make a few broad choices with how we are defining devices due to how many Advantage Air offer now; I am not sure if it would confuse it as a light and be affected by collective commands like “set all lights to 50%”. I’ll refresh myself on the code and see if it’s something that is as simple as changing the config ‘linkedType’ over and you can test it out yourself :)

mitch7391 commented 1 year ago

Always posting at the same time @uswong 😂

mitch7391 commented 1 year ago

What I have done is to change the Zone control 'lightbulb' icon to appear like a square ceiling vent outlet

I have had many great suggestions from users over the last few years, it’s just hard to keep everyone happy haha one user wanted the zones to be ‘window covering’ accessory, which would also work in place of the light for zones.

What I have done is to change the Zone control 'lightbulb' icon to appear like a square ceiling vent outlet

This is what I would do too, to trick myself into thinking it is a vent. Mine are temperature controlled so mine are just the Switch accessories.

uswong commented 1 year ago

Mine are temperature controlled so mine are just the Switch accessories.

Hey Mitch, it is actually very easy to get your Zone control with temperature sensor to appear like lightbulb accessory by just changing the accessory type in the config from Switch to Lightbulb. No change in the AdvAir.sh code required. As such, it won't affect any existing users!

If that is the desire for the way forward, we only need to make a minor modification to ConfigCreator.sh to create lightbulb accessory without the brightness characteristic instead of a Switch accessory for Zone control with temperature sensor. On second thought, I would have preferred it to be consistently using Lightbulb accessory as the proxy for all Zone control with or without temperature sensor.

I did tested using window covering accessory but I did not like it.

This does not affect my system and that of @antoniokly, as our systems are without temperature sensor.

uswong commented 1 year ago

Mine are temperature controlled so mine are just the Switch accessories.

In fact, Mitch, you can also make the Switch accessories to "Display As" "Light" in Homekit, then can change the Lightbulb icon to appear like a square ceiling vent outlet.

mitch7391 commented 1 year ago

Hey Mitch, it is actually very easy to get your Zone control with temperature sensor to appear like lightbulb accessory by just changing the accessory type in the config from Switch to Lightbulb.

The reason I had not gone ahead with this was it creates the illusion that you can control your zone percentage open as a temperature sensor user (percentage open for these users is determined by the controller itself). When I had tested, you could set your zone percentage, but it would revert back to what the controller had decided it would be when the accessory updated. I felt users would think this was a mistake in our work and submit issues for it haha... That being said, it could be nice see the percentage open as long as users know they cannot set the value... Maybe we should think about this more!

I did tested using window covering accessory but I did not like it.

Glad we agree here :D

In fact, Mitch, you can also make the Switch accessories to "Display As" "Light" in Homekit, then can change the Lightbulb icon to appear like a square ceiling vent outlet.

You are right! And I do not know how this escaped me as I do it for the broadlink plugin lol just changed them over now in HomeKit and have them as the square vent looking ones now! Love it!

uswong commented 1 year ago

it could be nice see the percentage open as long as users know they cannot set the value... Maybe we should think about this more!

This is definitely a good idea... I like it!

mitch7391 commented 1 year ago

BTW, just nice to have, can the Zone control displayed as a Fan with rotation speed in stead of a Dimmer with brightness?

@antoniokly you may have noticed in the latest update, but we have made this an option now!