AC control piston help


#1

Hi,
I just made a fresh piston to control 3 of my Air Conditioners, I haven’t actually tested it yet but there’s somethings I would like to add but Im not entirely sure how-to. I struggled quite abit to make this piston and this is pretty much what I was capable of doing.
I set restriction to only happen during the day but what I would like is to also have a way to control my AC’s during the night but with a lower temperature conditions, do I need to make this piston from scratch and have the same piston but set a restriction for night time or is there a better way to handle “day / night” conditions?

Second question, kinda two in one type of question.
Instead of having set temperature conditions like the piston have below, can I somehow add a way to set the temperature conditions and the sensor’s conditions take reading from that instead of having to manually edit all temperature conditions?
Say if I feel like I would like to have it warmer certain days I could just flip a switch or edit two values instead of all of them in the piston?

Lastly, this piston is made to have a better energy consumption / stable temperature in the house and for me this one is easy since I have fixed working hours when I’m not home but my wife doesn’t. She could work late some days, early others and some days at home.
Is there a way to add a condition so this pistons only runs when we’re actually home?
Unfortunately I wasn’t able to install the smartthing app on her phone because somehow it says we’re from different regions so I couldn’t invite her to our “home”
I’m not sure how to fix this issue since both our phones are bought in Sweden so I’m not sure where this “region” thing is coming from so having to check if she’s working or not I’m clueless?

Anyone could help me out here?
Thanks alot for taking your time!
Best regards,
-Dixon


#2

yes you can do that… You need to use global variables…
You can even add alexa command in to this…
“Alexa set ac high temperature to 27”
(But you need to create simulated switches for each number) if you do 20-30-35 etc it will be less switches.

One note : Your piston is using ELSE. I’d recommend (and some Pros would agree) stay away from using else statements until you have a really good grip on Webcore. I worked with a pro and my house has over 100 active and some very complex pistons and zero ELSE usage.

let me know if you have any questions, i’ll be around/


#3

Hey, thanks for jumping in.
Im not entirely sure how I can get rid of Else If.
Could you share a similar piston as mine or edit mine so I can see how its used?
Regarding global variable aswell?

Sorry, I just started with webcore 4 days ago so its very new to me.

Im still unsure how to manage my night time control, should I put the time condition under execute and do a nested if for daytime and another if with night time condition then a nested if?

Thats all I can think of this moment, isnt there a easier / more consolidated way to handle this?
One longer piston or two long ones?

Edit: In regards to Alexa, I dont own one but thanks for sharing the tip about stimulated switches with different temperatures, I will look into this at a later day as what I have now is abit too much to grasp :slight_smile:
And the beauty of home automation for me is not having to do anything manually once setup.

I would like to keep everything consolidated into one piston, flip a switch to heat my house quickly or just let the piston handle itself.

Thanks for your help so far!
Best regards,

  • D

#4

no worries… each member in this forum did that at some point… even the creator Adrian.:))))

1 - I’d highly recommend to write 3 pistons for 3 ACs…
We all love to write complex and long pistons LOL but then we realize that the best piston is the simplest pistin…

Here is my upstairs unit’s piston

And this one is a little more complex but uses variables as temp…


#5

Hey, thanks for sharing the pistons. I dont make much sense of it unfortunately. Haha, Ill keep reading some more!

Edit: Ill start with doing three simple pistons, Ill keep with else if and make sure to break the chain of if else if correctly, other than that from what ive read using else if shouldnt be a problem? Or do multiple if’s whatever is easier.

Will be a pure mess creating so many pistons, so have different temperature control for morning,day,night.
Ahwell, good thing its only tedious once right? :joy:


#6

You can do all of it in a single piston no worries. What I meant was using multiple devices doing multiple things in a single piston…
I have 4 AC units in the house.
Each gets separate piston
But each piston can do multiple things - different temps, different times or even different home modes etc.

If you are going to have a smart home that is bigger than a studio apartment, you better get ready for at least 50+ pistons:))) most of us are dealing with well over 100 pistons.
it’s fun:))))


#7

50-100 pistons? That’s quite many! haha, hopefully I wont ever get that many!

my house is relatively small and I have 3 AC units, inverters that I want to control to cut energy bill when we’re not home and keep the temperature steady when we’re at home and someway to toggle warmer and lower temperature - I have no plans to ever use the cooling aspect of the pumps so it would only be for heating.

The piston I have right now with all of them combined into one piston works alright but it takes no regard if we’re home or not and if I ever want to have a higher temperature in my house or lower it kinda falls out of sync.

I had this idea of having one piston that changes global variables depending on time, date and what not
and three different pistons for my AC units to act acording to what the globals are
Would that work?

Edit: On second thought, I could set conditions inside the piston instead of using a global, perhaps Im just too dumb to understand the process… is there any benefits for me using globals?
Best regards,
D


#8

I’m not a Pro, so i’m not really sure which one is better or not…
But, with global variables, you can change/control them without executing a piston. Regular variables can only be changes IF the piston is executed.

In my house each room behaves according to how other rooms are behaving. So global variables are the bridge…