App as a Nest or Ecobee Alternative

My house has many zones and thermostats which I manage fairly well using zwave. I would love to add the smarts of the Nest or Ecobee algorithms without buying a bunch of very expensive thermostats. Is there an app or pleg template someone has developed to use motion, temp, outside temp and other such sensor inputs to mimic the effect of those smart thermostats?



Are you looking for more than "if then " control ?

I already do that. I mean more of the smart stuff the others claim to do. Like figuring out when to turn back on or off based on outside temp, heat loss historical data, etc.