Panel photon pointillism painting

I’ve been doing some painting.

It’s taken 6 months—and an unreasonably broad definition of “painting”—to produce this perfect pointillism…

Lots of coloured dots

I can’t credit myself with any kind of creativity though: my skills in abstract art are absolute zero.

No. It’s a rendering of the skyline behind our house, painted entirely by data from solar panels. No sleight of hand; just natural beauty arising from some chance data.

If you want proof that it’s a painting of a real skyline, skip to the end for the spoiler. Or, read on…

The basics

Obviously, solar panels generate more electricity when there’s more sunlight.

Let’s represent the amount of electricity generated as coloured dots. A large orangey-red dot shows the solar panels are producing lots of electricity, meaning we have lots of sunlight. A small blue dot is less sunlight.

A line of coloured dots from orange to blue

Most solar panels will tell you how much electricity they’re generating. In my case, I measure the electricity generation every 10 seconds or so, and squirrel that data away in case it’s useful later.

It’s about time

As well as measuring how much electricity—and therefore sunlight—I’m recording the date and time of that measurement. If you know where you are on earth, and you know the time, you can calculate the position of the Sun in the sky.

So. Our coloured dots now represent the amount of sunlight, and the position of the Sun.

We can draw that on a graph. Here’s all those dots drawn on the first day of summer.

Arc of coloured dots, orange at the top middle and blue at the tail ends

See how the brightest sunlight is at midday when the Sun is highest in the sky and at “180 degrees Azimuth”—or “South” as normal humans call it.

This should be familiar to most people living in the Northern Hemisphere, where the Sun is always directly South at midday (or maybe 1pm if you’re in BST/DST)

Celestial considerations

Next piece of the painting is that the Sun moves differently across the sky on each day of the year. Northern winter has the Sun tracking much lower across the sky, and higher during summertime. It’s the opposite in the Southern Hemisphere.

By recording our electricity data for each part of the day, on each day of the year, the data literally paints a picture of how much Sun the solar panels can “see.”

The lowdown

First, for reference, here’s a wide-angle photo of the skyline behind our house. The solar panels are directly behind us in this photo, facing the same direction.

Skyline of back of houses

You can tell this photo is taken from quite low down; our solar panels are mounted on a single-storey garage. It was easier than putting them on the roof of the house, with the trade-off that the Sun often dips below the other houses during winter. No worries: the Sun is always low in the sky during Northern winters, so you don’t get much solar electricity either way.

But: bonus!

The Sun pops in and out of shadow from the surrounding skyline—and the solar panels “see” this as a varying amount of electricity. Our solar panels have become a camera!

Albeit it’s taken 9 months to take 1 exposure.

Before the final reveal, here’s the data plot of that 9 months of sunlight strength as seen by the solar panels:

Lots of coloured dots showing Sun position over 9 months

The final picture

And the final proof that data is beautiful: when laid onto the wide-angle photo, the data has traced the outline of the houses in remarkable detail.

Skyline photo overlayed with dots

It’s striking how the “V” shape gap between the houses is strongly coloured red where the Sun pops through. Conversely the blue shadow cast by the large lime tree on the left of the picture.

Likewise looking right down the back lane, there’s a vertical sliver of yellow as the Sun briefly comes out from one row of houses, before being hidden by the next row just off-camera to the right.

So there you go. Some beautiful pointillism arising from a serendipitous set of data. Art from science!

Epilogue

This should look even better once there’s another year of data behind it. Some of the blue streaks represent cloudy days, sometimes several in a row. That’ll average-out with more data, so I’ll post again when that’s done.

And finally, for the tech nerds:

Solar InverterGrafanaInfluxDBHome AssistantMQTTNode-REDRaw data1Raw data2Aggregated data3Aggregated data4Processed data5Long-term data6Solar InverterGrafanaInfluxDBHome AssistantMQTTNode-RED

Home automation isn't scary

Not so long ago, the height of home automation was aspiring to a garage with a remote controlled door. Simpler times.

And then things got complex. Designer homes for the well-heeled, replete with extensive electronics to control lighting and home entertainment. Industrious individuals—brave individuals—would charge handsomly for installing these systems; taking on the risk when they inevitably didn’t work quite as well as their client expected.

Messy cabling

But happily these days, anyone with even the slightest of tech abilities can automate virtually every electronic device in their household.

If you’ve not tried it yet, I’d like to persuade you it’s time to start.

Why bother?

The wonderful thing about home automation is there’s no single answer to the “why”. It’s so phenomenally broad that there’ll always be a topic that appeals to your unique motives. Pick that as your own starting point. A few ideas:

  • Mood lighting that changes depending on what movie you’re watching
  • Coffee pot that switches on when you’re nearly home
  • Home heating that comes on earlier if it’s cold outside
  • Watering your houseplants when you’re away on holiday

Corporate clout

There’s a good chance you’ve already started on home automation. Your favourite multinational corporation-tax specialists^1 have sold more than 100 million Alexa units. Maybe there’s one in front of you now. Congratulations, you’ve started on home automation!

Sort of.

While incredibly sophisticated, this approach to home automation is fundamentally built around corporate motivations. They’re happy to integrate with your Spotify account and automate the music—but that’s because there’s money changing hands.

For most of the fun stuff, you’ll want to break out of the corporate world. And it’s much easier than it sounds.

Home Assistant

This is a truly amazing piece of software. And it’s free! Run Home Assistant on a computer in your home and it’ll let you combine your smart devices in powerful ways.

In many cases it will configure itself completely automatically. Here’s a screenshot from my Home Assistant: entirely of its own accord it’s discovered a Sony smart TV and a Brother laser printer (yes, an actual printer…)

Home Assistant auto discovering smart devices

Dive in

If the scale of Home Assistant sounds intimidating: don’t worry about exactly what you want to do, and give it a try. The first time you use it will probably be a throw-away attempt anyway, so use it to experiment.

The easiest way to install Home Assistant is on a Raspberry Pi. Given you’re interested enough to have read this far, then you’re probably the kind of person who’s got (or would enjoy) a Raspberry Pi to play with generally. I won’t go through the install instructions here because the Home Assistant Raspberry Pi guide is pretty straightforward.

Start small

Once it’s up and running I really recommend adding the Node-RED add-on. This lets you create fully automated tasks, and takes just a few mouse clicks to set up. To install it go to Settings, Add-ons, click “Add-On Store”, then Node-RED.

For example if you’ve got WiFi plugs in the home, you could use Node-RED to automate “if I’m coming home, turn the coffee pot on.” It’s super easy: just drag a few things onto the Node-RED page and link them together:

Node-RED connecting person with coffee pot

That really is it. Home Assistant has figured out the hard bits, like how to tell you’ve come home, and how to control the WiFi plugs. I’ll be honest there is a bit of “your mileage may vary”: you’ll need some WiFi plugs, for a start. Not to mention a coffee pot.

A worked example

But start small, and just experiment with whatever Home Assistant has found in your house. So you might not have WiFi plugs; but maybe do a similar thing to turn your smart TV off when you leave the house? We’ll work through an example.

Step 1

Node-RED zone config

  1. Find the blue “zone” node from the panel on the left side, and drag it onto the page. Double-click it.
  2. Set the “Entity” to be person.(whatever your name is)
  3. Set the “Event” to be Leave
  4. Set the “Zone” to be zone.home
  5. Click Done

Step 2

Node-RED zone config

  1. Find the blue “call service” node and drag it onto the page. Double-click it.
  2. Set the “Domain” to be remote (meaning, remote control for a TV)
  3. Set the “Service” to be turn_off
  4. Set the “Entity” to be whatever your TV is called.
  5. Click Done

Step 3

  1. Finally, drag a line between the two nodes to connect them together. Then click “Deploy”. Done!

Node-RED connecting person with tv

Where next?

As you add more capabilities into Home Assistant, so you get more creative with it.

Because home automation is about combining things in interesting ways, your scope for creativity multiplies up with the number of devices.

With just 1 type of device to automate… Well, there’s only 1 option. Increase that to 5, and—mathematicians, look away now—you’ve got n! = 120 ways to combine them!

My automation journey started with Tado home heating control to optimise gas usage. From there, almost everything has been about carbon reduction. And I love it: real problem-solving and a tangible environmental benefit.

To show how home automation becomes a journey, increasing in creativity as you add more aspects, I’ll leave you with a tube map representing my own journey. I started small on the left side, with the Tado heating. Then each time I added new capabilities, they’ve multiplied-up to become more creative and sophisticated along the way. I’ll dive into these in more detail in later posts.

Home_Assistant_Journey!Home_Assistant_capabilitiesWater_heating_efficiencyPower_efficiencyHouse_data_intelligenceSolar_PV_efficiencyRaspberry Pi!Added Tado heatingAdded Node-REDAdded watertank sensorTemp and humidity calcsFancy chartsRate of change calcs Detect showers onHeat hot water using TadoAdded Wifi PlugsAutomated clothes dryingAdded home/away detectionAutomated coffee machineAutomated Octopus Energy SavingAdded Solar PV Battery integrationGather Solar PV StatsPredict energy useTurn on dishwasher when optimalOptimise overnight chargingAdd voice control

(for any Git-nerds: you’re right, I did use Gitgraph/Mermaid for this diagram)

About Me

I’m a STEM enthusiast and software professional living in the United Kingdom.

This blog came about because someone asked me to describe my personal values. It’s not something I’d thought about consciously before, but the answer came immediately: curiosity about the world around us, and wanting to enthuse other people to be curious too.

So it’s likely my hobbies and interests will pop up here. I’m fortunate to have a lovely family who enjoy the same things as me, too. In absolutely no order: cycle touring, photography, home automation, STEM, board games, astronomy, and comedy.

I’ll also blog about software tech. I work as a software consultant for Waterstons: a technology company with offices in the UK and Australia. This introduces me to organisations who are doing amazing things in their own industries, and gives me the scope to be curious about technology that will help them. I’d like to share some of that curiosity here.

dark
sans