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

Does 2 constants require 2 thermostats in the Config #1

Closed
sushenmathur opened this issue Oct 20, 2020 · 20 comments · Fixed by #4
Closed

Does 2 constants require 2 thermostats in the Config #1

sushenmathur opened this issue Oct 20, 2020 · 20 comments · Fixed by #4
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@sushenmathur
Copy link

sushenmathur commented Oct 20, 2020

Hi,
My ezone has two zones as constants so If I dont create the switch for those zones do I need to assign two "type": "Thermostat" values to create a thermostat for those zones ?

Thanks for your help

@mitch7391
Copy link
Owner

Oh cool my first ever issue :) my system is only a single constant zone, I assume maybe you have a two story house? Does your e-zone or my air app let you have those two constant zones at different temperatures?

Depending on that, this will determine if we need more than one thermostat or we treat this other constant zone the same as I am currently treating the first one.

@mitch7391
Copy link
Owner

Also if I have understood Advantage Air’s tech guy correctly when I drilled them with questions a long time ago, technically all of these zones can be kept at different temperatures (as long as the overall mode is the same; heat, cool, etc.). This means we could have all zones as individual thermostats, with some code that makes sure they all stay on the same mode if turned on; but free to allow individual temperatures... I kept it simple for my system as I always use one temperature across my zones and am a complete noob who is learning as I go. I was waiting to see if this got more interest before I tried something like that haha...

@mitch7391 mitch7391 added the good first issue Good for newcomers label Oct 20, 2020
@mitch7391 mitch7391 self-assigned this Oct 20, 2020
@sushenmathur
Copy link
Author

That’s right I have a 2 storied house when check json response with getSystemData I can see zones z01 and z08 are set as constants. This is great work by the way.

@mitch7391
Copy link
Owner

So I just had a look over the code for this to refresh myself as it has been a while. And I would say the only major thing you must do is not create the ‘switch’ accessory for zones 1 and 8; as you do not want to try close these as they must stay open at all times.

Based on my previous comment of keeping all my zones the same temperature (due to how I personally use my e-zone), I have added a line of code that when I set the temperature on my thermostat accessory it will set the temperature on all of my zones to be the same (z01-z06); this is in line 90 of ezone.sh and would therefore not set it for your zones z07, z08 and more (if you have more than 8 zones).

If you need any help tweaking this or changing the functionality I mentioned then please let me know and we can give it a shot; or if you need any help with your config.json just let me know :) otherwise it does work very well for how I need it and I wouldn’t have been able to do it without the help of the people in the special mentions who very patiently helped me through this!

@sushenmathur
Copy link
Author

Thanks @mitch7391
I will add those extra zones in the ezone.sh script but I was hoping to add another thermostat accessory for my z08 so I set different temperatures though out first and ground floor because z01 -z04 are first floor zone and z05-z08 are ground floor zones. Can this be achieved ??

@mitch7391
Copy link
Owner

That can most definitely be achieved :) I will see if I can get some time today to throw something together for you to test out!

@sushenmathur
Copy link
Author

Thanks, for now I have created switches for z01 and z08 and when i turn on the thermostat those two constant switches turn on it self.

@mitch7391
Copy link
Owner

@sushenmathur just a couple more questions about your system so that I can try and work out what changes will and will not be required for you needs.

  • Are you able to turn the air-con on with z01 on whilst having z08 off and visa versa? E.g. Have you lower floor air-con on and the upper floor air-con off?

  • Does your app treat this as two separate air-cons? If you have any screenshots of how your app looks that would be awesome (just blank out any personal info just in case).

  • If you are familiar with the data dump from getSystemData, does it show your system as having ac1 and ac2? A copy of your data dump from that could also be handy (once again take out in personal info), but not needed badly if you do not know how to get it.

@mitch7391 mitch7391 added the enhancement New feature or request label Oct 21, 2020
@sushenmathur
Copy link
Author

@mitch7391
I can turn on the aircon and it turn on z01 or z08 based what zones was turn on last. if both were on it turns on both and if only one was on it turns on one.
The app treats them as zones and not seperate aircons the json response for getSystemData only has ac1 with and constants are defined as below

"ac1":{ "info":{ "activationCodeStatus":"noCode", "airconErrorCode":"", "cbFWRevMajor":8, "cbFWRevMinor":46, "cbType":2, "climateControlModeIsRunning":false, "constant1":1, "constant2":8, "constant3":0, "countDownToOff":0, "countDownToOn":0, "fan":"high", "filterCleanStatus":0, "freshAirStatus":"none", "mode":"cool", "myAutoModeCurrentSetMode":"cool", "myAutoModeIsRunning":false, "myZone":0, "name":"AC", "noOfConstants":2, "noOfZones":8, "quietNightModeIsRunning":false, "rfSysID":0, "setTemp":24.0, "state":"off", "uid":"fffff", "unitType":17 },

@sushenmathur
Copy link
Author

Here is what the app interface looks like

B18B6EAC-1F5B-4E52-B11A-AB6A667BEF64
3C140CA3-8D3E-413E-95A5-3A569372CF46
4182ACD6-1B8A-4714-B9A8-D10A82EDB28D

@mitch7391
Copy link
Owner

mitch7391 commented Oct 22, 2020

Bugger if it was treated as two separate air-cons that would have been easier haha but it is still possible. I figured it would only need one of the constant zones open at the least and obviously to use the air-con on a particular floor it’s respective constant zone must be open.

And good to see the app looks exactly the same as mine and the addition of another constant zone does not change much of the functionality by the looks. Thanks for all the info!

One small issue I can foresee already is when we have two thermostats is that when you turn one on (which will turn on the main unit), it will turn on the other thermostat as well based on the same manner you mentioned on how the constant zones will be off/on based on previous use; which is not the end of the world as the app already does this!

@sushenmathur
Copy link
Author

I really appreciate all the effort, if its in the too hard basket dont worry, as I said just creating the switches for those two zones is working fine. and they do automatically get turned on as I turn on the main thermostat. I can probably manage the floor zoner by creating a dummy switch in homebridge for floor and set homekit automations to turn on/off zone switches based on the floor switch. Thats one options

@mitch7391
Copy link
Owner

I’m still learning and like a challenge, so I’m definitely going to give it a go! In my house it’s just my wife and I and she has a habit of leaving the back of the house zones on and when we put the air-con later we are wasting energy on that room for hours without realising it haha... So I had set an automation at some odd hour of the morning to shut all zones besides the constant and our bedroom as no one would be using those zones at ungodly hours of the morning :)

@mitch7391
Copy link
Owner

@sushenmathur just updating you on the work so far, I have created a test branch for me to work on. This actually has been a lot harder than I first thought when you take into account how the app works and how we have 'integrated' features to work in homekit. That being said after a lot of work today I have a shell script that no longer gets rejected by homebridge and am now going through bugs as I test bits and pieces.

Complete testing is a little hard for me as I actually do not have two constant zones, but am pretending my zone 6 is for the sake of it. I will test and debug as far as I think the limits of my system will allow and then we can try it out on your system and further fault find :) this may be a slower process than I first thought, but I am sure we can work through it!

@sushenmathur
Copy link
Author

@mitch7391 thanks for the update. take all the time you need. No rush.

@mitch7391
Copy link
Owner

Last night I was able to knock one major bug on the head for our prototype shell script. This issue involved when I open one Thermostat and then open the other, it would issue the state of the one just opened to e-zone. E.g. Thermostat z01 was Cooling and Thermostat z06 was off; if I opened Thermostat z06 it would then issue the off command and shut off the entire air-con. This has been rectified by the last commit to the master branch (this one was driving me crazy!)

The last lingering major issue I have with the new shell script is some logic I have built that is not working and I assume is just how I am applying it. It acts so that if both constant zones are open (so in your case using the two thermostats) and you turn one off, then it will close the zone (and therefore make that thermostat appear off) and not shut off the entire air-con. If only one of the constant zones was open (the thermostat you would be turning off at the time), then turn off the entire air-con. Something in how I have implemented the logic is not correct and when I try it, it always shuts off the whole air-con... Slowly getting there :)

@mitch7391
Copy link
Owner

@sushenmathur it looks like I have finally had some success! Now my testing process had me pretend one of my zones was actually a constant zone; so I would like you to do the final testing for me as confirmation before I commit the changes to the master branch.

You can find everything you need in the 'test' branch, all you will need to do is change your IP address and constant zones in ezone.sh and add an extra fan and thermostat in your config (make sure you use the state_cmd_suffix set as your constant zones). I am not sure if it is easier for you to create a new script alongside your current ezone.sh for the sake of easily swapping back if you have any issues. I would do this by entering sudo nano ezone2.sh and paste the contents in, save and close; you will then need to update your config to use ezone2.sh to use the new script. If you have any questions please ask away and fingers crossed this works as well for you as it has been for me.

@mitch7391
Copy link
Owner

One other thing I did almost forget is that you will have to manually add/change the location of zones on line 182 and line 187 so that your first and second storey zones are with their matching constant zone:

image

However, I do now remember you said in your other issue that you do not use the e-zone temperature sensors; so I am not sure how much this may affect you.

@mitch7391 mitch7391 linked a pull request Dec 11, 2020 that will close this issue
@mitch7391
Copy link
Owner

@sushenmathur just checking in to see if you had given this a go yet and if there were any issues with it?

@mitch7391
Copy link
Owner

@sushenmathur sorry to bug you again, just curious if you ever gave these scripts a go? Other than my mock tests, you are the only user I had that would be able to test it properly. No troubles if you have moved on, just wanted to reach out :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants