Passive House External Solar Shade custom script

Hi, I’m a developer but new to smart things. I’m building a passive house and would love to get some feedback

Problem: overheating can occur on a warm winter sunny day.

Solution: custom script that monitors the following variables and uses a custom algorithm to decide if external shades should be deployed.


  • outdoor temperature
  • indoor temperature
  • luminosity sensor
  • orientation of sun relative to window


Phase 1: deploy shades by indoor temperature + luminosity thresholds. If temperature rises and luminosity is bright, deploy the shades.

Phase 2: I want to maximize heat gain on cold days and cold nights. Forecast heat loss and solar heat gain to restrict deployment of shades if the home needs to store more heat (in thermal mass) appropriate for overnight temperatures.

From a sensor perspective, I’ll need indoor, outdoor, and illumination sensors. Although probably not necessary, it would be interesting to embed temperature sensors in our concrete floor (thermal mass). The rest of the script will involve retrieving data from weather APIs and solar orientation data and calculations.

Any suggestions for hardware and also how to house an app on a server to periodically collect data, run calculations and issue commands?

I’ll also want to allow manual overrides and allow automation to resume after a predefined length of time.

“smart app” webcore can be wrangled to do what you want. You got a lot of tweakin ahead. If you don’t simplify then you will probably wonder what is going on, all the time. I do not expect full automatic in my systems - it’s less work.

I do a simple man-umatic version to manage house solar gain - notifiy-me if attic temperature exceeds my setpoint by a particular time-of-day, then I can decide to vent never, vent early or leave it on schedule, depending on season.

Hardware, use standard wireless stuff. Most sensors have ambient temperature.

For OA values I enjoy the weather underground integration device (something “SmartWeather Tile” (version1) which includes a calculated lumens. Someone else provides the weather-station hardware - pretty cheap. I believe there is little benefit to maintaining your own sensors for outside.

Angle of sun?!? - not me, but go nuts - calculate in webcore. You could schedule shade deployments for day-of-year, time-of-day. Sun angle does not change much on earth until the next big strike.

Monitor your thermostat heating/cooling cycles, runtime to gauge the effect of your interventions. You don’t really need a smart thermostat for this, but it may help. I put a separate current status switch on fan, and discharge temperature sensor in duct (mostly I was monitoring a failing furnace controller but it also makes it easy to log runtime without all the thermostat setpoint changes).

1 Like

WebCore is essentially a scripting language for SmartThings and should be able to handle the logic you describe:

As far as devices, there are sensors of all those types available, it just comes down to the details of what features you want, what Percision you need, and what your budget is. :sunglasses:

Thanks for the feedback. I’ll check out webcore.

I read a tip somewhere that I can figure out if solar heat gain is occurring by having two indoor thermostats. One in the shade and one where the sun will hit and measure the difference in temp. That way I don’t need luminosity values.

Budget is unlimited. I’m willing to pay for reliability. Any specific recommendations on hardware would be appreciated.

I can also add indoor sensors to prevent automatic operation of the solar shades if the sliding door is open. We’ll have about 6 doors and external shades to monitor.

solar heat gain approximation is one purpose of monitoring attic temp. The attic+roof is probably always exposed to whatever sun is present. In my house attic temp (located near the roof), has a direct effect on heat loss / added-heating-required. You could put a temperature sensor in every window orientation and it will still just be an approximation.

For specific hardware I can recommend you AVOID ST multipurpose gen2 sensor that uses coincell CR2045 - Smartthings IDE says it is Centralite part# model: 3321-S but I never see that part# in vendor sites.

IMO what you describe will never be “reliable”, unless you consider 99% to be reliable. Most wireless temperature sensor hardware is fine, but your sequence is too complicated, and it’s driven through the cloud. If you can accept maintenance of it as an ongoing hobby then it can work 99%. I don’t think more money in the ST domain, will improve its reliability.

99% reliability is pretty good.

I should have mentioned that I do not have an attic. It’s a flat roof.

I’m a very seasoned software developer, so writing software is easy for me. Dealing with bad hardware that’s unreliable is what I want to avoid, and it sounds like that’s not a huge concern if I’m careful about what I choose. Cloud based systems sounds problematic. Something that could run on a dedicated server seems like a better solution. I really don’t know what’s out there and what’s possible though.

A perfect scenario for me would be to build a ruby server that can send raw commands to devices. That way I can write my own custom app and do whatever I want. Essentially I would periodically read telemetry data from devices, run calculations in whatever way I can conceive, and then issue commands to devices. In a perfect world, that’s what I would want to do.

Hi Mike,

How did you get on with this?
I’ve been using ST since completing the house (also passiv) 2 yrs ago.
I’m more hardware oriented than software, but OK with software & using webCore happily.

I’m most interested in the sun angle part - I have 9 motorised external solar blinds - at the moment control is just based on temperature and before or after midday.
I want to improve this to include outdoor temperature, weather forecast and actual angle of incidence of the sun - if I can steal code I will!

All the best,