Plug-and-play solar kits are quickly gaining popularity. They’re simple to set up, affordable, and an excellent way to reduce your carbon footprint while producing clean electricity. If you’re looking for a smart entry into solar power, this is a brilliant starting point.
Once your panels are soaking up the sun, you’ll naturally want to know how much electricity you’re generating. That’s where energy monitoring becomes essential.
This guide walks you through measuring solar output using OpenHAB—a powerful, open-source home automation platform. You’ll learn how to visualize energy production from your plug-and-play system with helpful charts and data insights.
Track your Measure Your Plug-and-Play Solar by OpenHAB – here’s how it can look:

Monitor your plug-and-play solar setup by OpenHAB
Index: How to Monitor Plug-and-Play Solar Power by OpenHAB
Project Overview
Here’s what I’m using in this OpenHAB-based tracking setup:
- A standard plug-and-play solar kit—available from Amazon, Lowe’s, Home Depot, or other retailers
- A myStrom smart plug to record real-time power consumption and generation
- An OpenHAB installation that pulls it all together with dashboards and charts
Configuration Steps for OpenHAB
To make this work and display solar data clearly, we’ll define some OpenHAB items, build a sitemap for the interface, enable persistence for data history, and write a rule to ensure proper chart display. Here’s how it’s done:
Items configuration:
Group gSQLBalkonkraftwerk Switch PlugSwitch "Plug" {channel="mystrom:mystromplug:Balkonkraftwerk:switch"} Number:Temperature PlugTemperature "Temperature: [%.1f °C]" {channel="mystrom:mystromplug:Balkonkraftwerk:temperature"} Number:Power PlugPower "Power: [%.1f W]" <solar> (gSQLBalkonkraftwerk) {channel="mystrom:mystromplug:Balkonkraftwerk:power"} Number Statistiken_PlugPower "Chart Selector" <solar> (gSQLBalkonkraftwerk) Number:Energy PlugEnergyConsumedSinceLastCall "Ws: [%.1f Ws]" {channel="mystrom:mystromplug:Balkonkraftwerk:energy-consumed-since-last-call"} Number:Energy PlugEnergyConsumedSinceLastCall_Statistiken "Ws: [%.1f Ws]"
Sitemap file:
sitemap default label="Solar Monitor" { Text item=PlugPower icon="solar" { Switch item=Statistiken_PlugPower label="Power Output Timeframe" mappings=[0="4h",1="12h",2="1 Day",3="3 Days",4="1 Week",5="1 Month",6="4 Months",7="1 Year"] Chart item=PlugPower label="Output: Last 4 Hours" refresh=300000 service="jdbc" period=4h visibility=[Statistiken_PlugPower==0] legend=true Chart item=PlugPower label="Output: Last 12 Hours" refresh=300000 service="jdbc" period=12h visibility=[Statistiken_PlugPower==1] legend=true Chart item=PlugPower label="Output: Last 24 Hours" refresh=300000 service="jdbc" period=D visibility=[Statistiken_PlugPower==2] legend=true Chart item=PlugPower label="Output: Last 3 Days" refresh=300000 service="jdbc" period=3D visibility=[Statistiken_PlugPower==3] legend=true Chart item=PlugPower label="Output: Last Week" refresh=300000 service="jdbc" period=W visibility=[Statistiken_PlugPower==4] legend=true Chart item=PlugPower label="Output: Last Month" refresh=300000 service="jdbc" period=M visibility=[Statistiken_PlugPower==5] legend=true Chart item=PlugPower label="Output: 4-Month History" refresh=300000 service="jdbc" period=4M visibility=[Statistiken_PlugPower==6] legend=true Chart item=PlugPower label="Output: Last Year" refresh=300000 service="jdbc" period=Y visibility=[Statistiken_PlugPower==7] legend=true } }
Persistence configuration:
Strategies { everyMinute : "0 * * * * ?" every15min : "0 0/15 * * * ?" everyHour : "0 0 * * * ?" everyDay : "0 0 0 * * ?" default = everyChange } Items { gSQLBalkonkraftwerk* : strategy = everyMinute, every15min Statistiken_PlugPower : strategy = everyChange, restoreOnStartup }
Rules file:
rule "Set default chart period" when System started then if (Statistiken_PlugPower.state == NULL || Statistiken_PlugPower.state == UNDEF) { Statistiken_PlugPower.sendCommand(0) } end
Tip: if you rename items or groups, make sure changes are consistent across all files for everything to function correctly.
Further Resources
Don’t have OpenHAB yet? You can set one up using this helpful guide: Set Up OpenHAB
Enjoyed this post? Stay in the loop at myhowto.blog. Here’s how:
- Follow on X
- Bookmark this page and check back for new posts
If you find improvements, run into errors, or want me to add something, get in touch via this contact form. I’d love to hear from you!
If this article helped you, feel free to link to it on your website or share it with others. Linking to <a