Display Real-Time Solar Energy Data in WordPress | IAMMETER-Cloud API Plugin
WordPress IAMMETER Plugin
Github: WordPress IAMMETER Plugin
This article is the second part in our series on plugins developed using the IAMMETER-Cloud API. The first article introduced the IAMMETER-Cloud Joomla Plugin.
In this article, we’ll cover the IAMMETER-Cloud WordPress plugin, which allows you to display real-time power and energy data directly within your WordPress website.
IAMMETER-Cloud provides rich API functions, enabling users to access real-time energy data managed by IAMMETER-Cloud.
These energy data sets can represent:
- A solar PV system’s generation and consumption, or
- Grid energy usage in a home, business, or industrial facility.
We have developed a WordPress plugin based on these APIs and made the source code publicly available.
This guide explains how to use the plugin to display real-time metering data from IAMMETER inside your WordPress site.
WordPress Deployment
Reference: Blog Tool, Publishing Platform, and CMS – WordPress.org
Installing the IAMMETER Plugin
Go to your WordPress admin dashboard, and navigate to: Plugins → Add New → Upload Plugin
Then upload and install iammeter.zip.
After installation, activate the plugin.
You will now see the IAMMETER plugin listed among your installed plugins.
Configure the IAMMETER Plugin
Go to Settings → IAMMETER.
Obtain your API token directly from the IAMMETER-Cloud web interface.
You can also refer to this guide for how to get the token via API: How to Use IAMMETER-Cloud More Efficiently by API
Paste the obtained API Token and Serial Number (SN) in their respective fields, and then enable the meter.
Single-phase meter:
Three-phase meter:
Click Add New Meter if you wish to add multiple meters.
Remember to set Cache Time to 300 seconds, since IAMMETER Cloud API limits requests to once every 5 minutes. After all configurations are complete, click Save Settings.
Now your plugin is fully configured, and you can display your IAMMETER energy data in WordPress posts using the shortcode [iammeter]
.
Displaying IAMMETER Data in WordPress Posts
Go to Posts → Add New.
Insert [iammeter]
in the post content, and click Publish.
Open your WordPress post, and you’ll see the real-time IAMMETER energy data displayed — including voltage, current, power (bi-directional), power factor, grid consumption energy, and feed-in energy. IAMMETER-Cloud updates the data every minute.