Visualizing energy with Raspberry pi, dancing LEDs, and Sense

Firstly, where all my developers at? This list of tags is severely lacking and I don’t have permission to create tags I guess. [raspberrypi, api, coding, developer]

We just finished installing Solar panels for the second time (we sold our last home when we moved to NY), and I of course immediately re-installed sense solar monitor.

Before my first week of operation had passed I was tinkering on fun ways to watch progress. It started with an idea that I was able to print animated objects to my screen.

LED Mockout
|   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |-X-|   |   |
|   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |-X-|   |   |
|   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |-X-|   |   |
|   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |-X-|-X-|   |
|-X-|-X-|-X-|   |   |   |   |   |   |   |   |   |  /|\  |   |   |   |   |   |   |   |   |-X-|-X-|   |
|   |-X-|   |   |   |   |   |   |   |   |   |   |-X-|-X-|   |   |   |   |   |   |   |   |   |-X-|-X-|
|-X-|-X-|-X-|   |   |   |   |   |   |   |   |-X-|-X-|-X-|-X-|   |   |   |   |   |   |   |   |-X-|-X-|
|   |-X-|   |   |   |   |   |   |   |   |   |   |-X-|-X-|   |   |   |   |   |   |   |   |   |   |-X-|
|   |-X-|   |   |   |   |-X-|   |   |   |   |   |-X-|-X-|   |   |   |   |-X-|   |   |   |   |   |-X-|
 [Grid]                                       [House]                [Energy]       [Solar panels]

From Solar:  -0%|          | -7.00/8.00k [00:00<-1:59:59, -7.09kwatts/s]
Consumption:  12%|█▏        | 1.74k/15.0k [00:00<00:00, 1.40Mwatts/s]
From Grid:  12%|█▏        | 1.75k/15.0k [00:00<00:00, 1.67Mwatts/s]

Another week of tinkering have left me with something I am rather proud of and a poorly shaped plug icon to replace my poorly shaped house icon.

Full code and parts list is open to anyone interested in building something fun of their own.

If you’ve built something fun using Sense API, I want to see it!

2 Likes

I used the realtime websocket to get live info every ~10 seconds or so and feed it into some dancing LEDs.

The pixels will show energy flowing from panels to grid, or grid to panels depending on production & consumption. Taller waves mean more energy. A small monochrome screen below shows the actual values and a digital wheel showing how much is flowing.

Code:

Quick video:

3 Likes

Wow! Very cool stuff.

we have a dev group… called Data-Analysis https://community.sense.com/c/data-analysis/

1 Like