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] Synology Docker Homebridge Terminal Instructions #81

Closed jezzalencko closed 1 year ago

jezzalencko commented 1 year ago

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:

{
{
    "platform": "Cmd4",
    "name": "Cmd4"
}

Screenshots:

Advantage Air System:

Homebridge Environment:

jezzalencko commented 1 year ago

@mitch7391 and @uswong , so I've completely uninstalled Homebridge on Docker and installed it natively (like I did previously) and the same error has occurred. i.e. "ERROR: no Cmd4 Config found in "/volume1/homebridge/config.json"! Please ensure that Homebridge-Cmd4 plugin is installed".

I deleted all traces of it in Docker and installed it natively per these instructions.

Couple of things to note: Node.js Version is v16.16.0 DSM version is DSM 7.1.1-42962 Update 4

Bit deflated by this. Was quite excited at the prospect it was going to work this time!

jezzalencko commented 1 year ago

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.

@uswong just responding to this because you asked. This is the first 30 lines of cmd4Config_AA_Aircon.json, located in the homebridge folder: "platform": "Cmd4", "name": "Cmd4", "debug": false, "outputConstants": false, "statusMsg": true, "timeout": 60000, "stateChangeResponseTime": 0, "constants": [ { "key": "${AAIP}", "value": "192.168.0.193" } ], "queueTypes": [ { "queue": "AAA", "queueType": "WoRm2" } ], "accessories": [ { "type": "Thermostat", "displayName": "Aircon", "currentHeatingCoolingState": "OFF", "targetHeatingCoolingState": "OFF", "currentTemperature": 24, "targetTemperature": 24, "temperatureDisplayUnits": "CELSIUS", "name": "Aircon", "manufacturer": "Advantage Air Australia", "model": "MyAir5",

mitch7391 commented 1 year ago

Just a quick thought I had over the last few days while doing other work related to this project… When you first install Cmd4 through the Web UI install and then the tiny config pops up in the window, did you click save or close? If you click save, it should be adding that to your config.json, which we had seen before was missing.

mitch7391 commented 1 year ago

so I've completely uninstalled Homebridge on Docker and installed it natively (like I did previously)

I deleted all traces of it in Docker and installed it natively per these instructions.

Also these two comments sound like you have only tried the one installation method and it was this one linked? Just want to double check this Jeremy, as it is different to the method I linked up above and have working. I have not tried the method you have linked just now…

jezzalencko commented 1 year ago

oh my you've nailed it! I can't believe it was as simple as that!?!?? I feel a bit embarrassed. I was clicking CLOSE every time that pop-up came up (I was interpreting it as "job done" so now I need to "close" the pop-up). It's not until you've mentioned this now that I realised it saves and pushes cmd4 in!

wow. Thanks so much.

mitch7391 commented 1 year ago

Oh wow, jeez I wish I brought this up sooner then! I had been meaning to ask but thought I’d wait until you got back to us… Does everything else work now..?

jezzalencko commented 1 year ago

Thanks, yeah, seems to be ok. This is all new to me so just trying to get through the setup. Ultimately I want to apply some logic whereby I can tell MyPlace to turn off the aircon at night when the outside air temp drops below a cut-off value (which is derived from a separate non-MyPlace device). Not sure if I'm going to be able to achieve this or not. Might me the subject of a new thread... :)

Thanks again to yourself and @uswong for all your help on this.

mitch7391 commented 1 year ago

Phew, I’m so glad this was just the problem haha don’t beat yourself up over it, I was not aware that was something that could halt our entire installation process and will update the README next update so that it doesn’t catch out another person :)

Ultimately I want to apply some logic whereby I can tell MyPlace to turn off the aircon at night when the outside air temp drops below a cut-off value (which is derived from a separate non-MyPlace device).

As it stands we cannot pass a non Advantage Air temperature sensor to Advantage Air, but if the temperature sensor you are talking about is in HomeKit, you can set up automations in HomeKit to do exactly that. Or I use the plug-in homebridge-BOMgovau for outside sensors (there are other weather plug-ins you could use too).

Glad we could get this working for you and sorry you had so much trouble getting set up. If you ever have any other issues, or feature requests, feel free to submit an issue to reach out! Hope you enjoy the project!

mitch7391 commented 1 year ago

Here is a quick example of the automation made in HomeKit, using a temperature sensor from the plug-in I just linked (using the local weather current temperature outside) to turn off the Aircon when the temp drops below 25deg.

F271F77B-0C41-402F-A271-5BD6D2FBC45C

uswong commented 1 year ago

@uswong just responding to this because you asked. This is the first 30 lines of cmd4Config_AA_Aircon.json, located in the homebridge folder: "platform": "Cmd4", "name": "Cmd4", "debug": false, "outputConstants": false, "statusMsg": true,

Thanks for that. It is now water under the bridge haha.... In any case, that was the config required for the plugin to run and is created correctly. That should have been copied to the config.json now, since you have got it working.

jezzalencko commented 1 year ago

@mitch7391 thanks for this. Have set that up, now just need to test it later. Bit unsure what the "main" on/off for the Aircon has been setup as. i.e. on the app there is only really Aircon "Fan" to choose from. Guess I'll have to just test it out. Thanks.

mitch7391 commented 1 year ago

Hey @jezzalencko, the main on/off is incorporated into the Thermostat and Fan, by turning those on, you turn the unit on and by turning those off you will turn the unit off. If you have the thermostat on and then turn the fan on, it will switch to Fan mode (and turn the Thermostat off in HomeKit); it will do the same the other way around.

You can read more on the Wiki that I have oh together :)

mitch7391 commented 1 year ago

In the latest release, the README has been updated with instructions to make sure you click SAVE for the cmd4 config after installing and the install notes for jq and curl have been updated to make note of the different commands for Synology vs QNAP.