Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[PLUGIN] Tasmota Power Monitor

Featured Replies

Thanks a lot! Using this with a Tasmota flashed Shelly Plug S. Is there any possibility to add time active field to “Total”? Total is quite useless unless you know when it was reset last. I haven’t seen this on the Tasmota UI either, so perhaps it’s not possible to do.

  • 5 weeks later...
  • Replies 87
  • Views 33.2k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Wishes sometimes come true. Here it is...  

  • planetwilson
    planetwilson

    Any chance we can get the power in watts to display on the bottom status bar like I have my CPU temp?  

  • I have created new page files for 6.12     These need to be loaded into /usr/local/emhttp/plugins/tasmotapm/   I would create a temp dir as /boot/tasmota and put files h

Posted Images

Hello Flippo
This is how it appears for me
Is that correct? I would like to see it displayed like they do.
Best regards

Screenshot 2024-01-04 000846.png

Edited by DarthRidar

  • 1 month later...

Any chance we can get the power in watts to display on the bottom status bar like I have my CPU temp?

 

image.thumb.png.d71b3f57868046998d85a6f8e362ef8c.png

  • 3 weeks later...

Any chance to use this Plugin for multiple tasmota devices?

 

  • 2 weeks later...

What total field refers to? It is from the start of the plugin or monthly? 

47 minutes ago, maTTi said:

What total field refers to? It is from the start of the plugin or monthly? 

The reading come from tasmota device. It is accumulated energy usage from last reset, you can reset it under device web console anytime.

Edited by Vr2Io

  • 1 month later...

Great Plugin. Is it possible to monitor more than one tasmota devices in the same network?

22 hours ago, DeeBop said:

Great Plugin. Is it possible to monitor more than one tasmota devices in the same network?

Not without development. @DataCollector I have other projects I am working on but happy to have people raise PRs

  • 1 month later...
On 3/23/2021 at 12:04 AM, Flippo said:

Hi guys,

 

I want to introduce you to my Tasmota Power Monitor.

 

With this UnRaid plugin you can turn a Tasmota device into an energy monitor for your server.

I got the idea from corsairpsu-unraid, but since I don't have a suitable Corsair PSU, I found an alternative in a Tasmota Power Plug.

 

It shows the most common measured values and offers the option of costing for electricity consumption.

 

Dashboard:

grafik.png.c93a5b683b5f81032d83b20382f26aac.png

 

Settings:

grafik.png.a3170d5d1f22a5012fa7d8781cbb7ee2.png

The password is saved in plain text.

 

Introduction

Before you start, be sure that you protect your Tasmota device against incorrect operation. So that you don't accidentally turn off your server. I solved this for myself with the command: PowerOnState 4 This sets the on / off switch in the WebUI and on the device to always on. Therefore, check what would be best for your device before using it. Have a look at the Tasmota Documentation. Use the plugin and device at your own risk. I will not be responsible for any damage.

 

I use an Aisirer Power Monitoring Plug (AWP07L) with Tasmota firmware 8.5.1 and this template. {"NAME":"AWP07L","GPIO":[56,255,255,255,255,134,255,255,131,17,132,21,255],"FLAG":0,"BASE":18}

 

 

Created and tested with Unraid 6.9.1.

 

Installation as usual...

https://raw.githubusercontent.com/Flippo24/tasmotapm-unraid/main/tasmotapm.plg

 

Thank you for this nice plugin @Flippo.

I saw that you have also created a plugin for espurna.

I use home assistant and my energy meter plug is flashed with esphome.

 

Would be great I you could also write an unraid plugin for esphome 😃

Edited by ElVit

I have no experience with unraid plugin development.

But I think the file "status.php" should look something like this for EspHome:

 

<?php
$esphomepm_cfg = parse_ini_file( "/boot/config/plugins/esphomepm/esphomepm.cfg" );
$esphomepm_device_ip = isset($esphomepm_cfg['DEVICE_IP']) ? $esphomepm_cfg['DEVICE_IP'] : "";
$esphomepm_device_user = isset($esphomepm_cfg['DEVICE_USER']) ? $esphomepm_cfg['DEVICE_USER'] : "";
$esphomepm_device_pass = isset($esphomepm_cfg['DEVICE_PASS']) ? $esphomepm_cfg['DEVICE_PASS'] : "";
$esphomepm_costs_price = isset($esphomepm_cfg['COSTS_PRICE']) ? $esphomepm_cfg['COSTS_PRICE'] : "0.0";
$esphomepm_costs_unit = isset($esphomepm_cfg['COSTS_UNIT']) ? $esphomepm_cfg['COSTS_UNIT'] : "USD";

if ($esphomepm_device_ip == "") {
	die("esphome Device IP missing!");
}
if ($esphomepm_device_user == "") {
	die("esphome username missing!");
}
if ($esphomepm_device_pass == "") {
	die("esphome password missing!");
}

$json = array(
	'Power' => getvalue($esphomepm_device_ip,"power",$esphomepm_device_user, $esphomepm_device_pass),
	'Voltage' => getvalue($esphomepm_device_ip,"voltage",$esphomepm_device_user, $esphomepm_device_pass),
	'Current' => getvalue($esphomepm_device_ip,"current",$esphomepm_device_user, $esphomepm_device_pass),
	'Factor' => getvalue($esphomepm_device_ip,"factor",$esphomepm_device_user, $esphomepm_device_pass),
	'Energy' => getvalue($esphomepm_device_ip,"energy",$esphomepm_device_user, $esphomepm_device_pass),
	'ApparentPower' => getvalue($esphomepm_device_ip,"apparent",$esphomepm_device_user, $esphomepm_device_pass),
	'ReactivePower' => getvalue($esphomepm_device_ip,"reactive",$esphomepm_device_user, $esphomepm_device_pass),
	'Costs_Price' => $esphomepm_costs_price,
	'Costs_Unit' => $esphomepm_costs_unit
);

//header('Content-Type: application/json');
echo json_encode($json);

function getvalue($ip, $param, $username, $password) {
	$Url = "http://" . $ip . "/sensor/" . $param;
	$curl = curl_init($Url);
	curl_setopt($curl, CURLOPT_FAILONERROR, true);
	curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
	curl_setopt($curl, CURLOPT_HTTPGET, true);
	curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
	curl_setopt($curl, CURLOPT_USERPWD, $username . ":" . $password);
	curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
	$resultJson = curl_exec($curl);
	curl_close($curl);

	$resultObj = json_decode($resultJson, true);
	$value = $resultObj->{'value'};
	$value = isset($value) ? $value : "0";
	return $value;
}

?>

 

  • 3 weeks later...

Has anyone had any luck using this plugin with a plug flashed with OpenBK? After a bit of tweaking I've managed to pull live power usage from the plug, but I can't get Unraid to pull energy history even though it's reported via the plug GUI:

 

Screenshot2024-07-18at11_48_54.png.0374a13f85b00dcbe17677f083c2c353.png

(the 1.5W is probably accurate - the plug is currently not supplying my server, there's just a USB thingy plugged into it)

 

Screenshot2024-07-18at11_45_55.png.e43904e2e8d8233465957eafcb404800.png

 

Just to clarify: I have no idea what I'm doing here. Tasmota and its forks seem to be a massive and technical black hole.

 

Edited by Fozzuk

On 7/18/2024 at 12:56 PM, Fozzuk said:

Has anyone had any luck using this plugin with a plug flashed with OpenBK? After a bit of tweaking I've managed to pull live power usage from the plug, but I can't get Unraid to pull energy history even though it's reported via the plug GUI:

 

Screenshot2024-07-18at11_48_54.png.0374a13f85b00dcbe17677f083c2c353.png

(the 1.5W is probably accurate - the plug is currently not supplying my server, there's just a USB thingy plugged into it)

 

Screenshot2024-07-18at11_45_55.png.e43904e2e8d8233465957eafcb404800.png

 

Just to clarify: I have no idea what I'm doing here. Tasmota and its forks seem to be a massive and technical black hole.

 

 

I have 2 Smart Plugs lying around here, 1 Tasmota and 1 OpenBeken flashed on.

Here are the outputs if put

http://IP_OF_YOUR_DEVICE/cm?cmnd=Status%208

in the browser:

 

OpenBeken:
{
  "StatusSNS": {
    "Time": "2024-07-19T14:33:13",
    "ENERGY": {
      "Power": 12.699999,
      "ApparentPower": 12607.089843,
      "ReactivePower": 12607.083984,
      "Factor": 0.001007,
      "Voltage": 233.464630,
      "Current": 54.000000,
      "ConsumptionTotal": 483.106109,
      "Yesterday": 482.320281,
      "ConsumptionLastHour": 0.004588
    }
  }
}

Tasmota:
{
  "StatusSNS": {
    "Time": "2024-07-19T15:32:08",
    "ENERGY": {
      "TotalStartTime": "2024-07-19T14:34:49",
      "Total": 0.001,
      "Yesterday": 0.000,
      "Today": 0.001,
      "Power": 13,
      "ApparentPower": 13,
      "ReactivePower": 0,
      "Factor": 1.00,
      "Voltage": 233,
      "Current": 0.054
    }
  }
}

 

As you can see some values are not matching.

For me the OpenBeken Plug does not work at all with this Unraid Plugin...

 

grafik.png.be20372222bafc17cab05fa2d70792de.png

 

But the Tasmota Plug is working 😃

Edited by ElVit

  • 2 weeks later...

Hello, I have an electricity tariff that changes every hour. Is it possible to integrate a function to store an API from e.g. Tibber or Awattar to use the hourly electricity price instead of a fixed contribution?

  • 2 weeks later...

Hi,

 

I have not read the whole thread and also find nothing to this in the internet.

 

Can I change the description of the block in the dashboard and could I display a second device/box there?

For example instead of "Tasmota Power Monitor" , "Starlink" or network.

And can I translate the measurements description to German anywhere?

Screenshot_20240811-184347.png

  • 6 months later...

I would also very much like to be able to monitor more devices. But if it needs too much development, could I instead just add a 2nd instance of the plugin somehow? Just with different name/variables?

 

I see some containers have "container ABC" and then "container ABC extra instance" with some slight changes to be able to run them side by side. Can this be easily achieved with the plugin?

  • 3 weeks later...
On 2/23/2025 at 1:18 AM, PeterHS said:

I would also very much like to be able to monitor more devices. But if it needs too much development, could I instead just add a 2nd instance of the plugin somehow? Just with different name/variables?

 

I see some containers have "container ABC" and then "container ABC extra instance" with some slight changes to be able to run them side by side. Can this be easily achieved with the plugin?

+1

Hi,

I would very much welcome a minimal change, so that when minimize the widget we can at least see the actual power consumption. Like it is with all other widgets.... Actually it is consuming much space in the dashboard.

Thanks.

 

Bildschirmfoto2025-03-14um22_25_44.thumb.png.5c6ce79bc68ad03988cf16e6da34bb80.png

Edited by bernieJo

On 2/23/2025 at 12:18 AM, PeterHS said:

I would also very much like to be able to monitor more devices. But if it needs too much development, could I instead just add a 2nd instance of the plugin somehow? Just with different name/variables?

 

I see some containers have "container ABC" and then "container ABC extra instance" with some slight changes to be able to run them side by side. Can this be easily achieved with the plugin?

So each one will be in a new panel like GPU stat?

On 3/14/2025 at 2:43 PM, SimonF said:

So each one will be in a new panel like GPU stat?

I would also be interested in this feature.

Will allow 3 to start with,

 

Does anyone have sample data they can supply?

 

http://IP/cm?cmnd=Status%208 

 

This is for no user + password

Example View. I can add IP add an option for a description to show on the top line next to usage?

 

image.png

 

I have not been able to test with data.

 

Here is a test package, copy to your system and run installpkg path

 

tasmotapm-2025.03.16-x86_64.txz

Release 2025.03.18a allows three devices.

 

image.png

 

Display with sample data for 1 and 2, not found for 3.

 

image.png

8 hours ago, SimonF said:

Release 2025.03.18a allows three devices.

It work, thanks !!

 

A minor issue, the placement will reset if page refresh, even already lock.

( Seems only happen once either window in top left, then it will change all at top horizontal )

 

image.png.086eea0f3bab8edb92977bfdba706934.png

 

 

image.png.a53eb4cbf4d3c4b8751a70695031c715.png

Edited by Vr2Io

12 hours ago, Vr2Io said:

It work, thanks !!

 

A minor issue, the placement will reset if page refresh, even already lock.

( Seems only happen once either window in top left, then it will change all at top horizontal )

 

image.png.086eea0f3bab8edb92977bfdba706934.png

 

 

image.png.a53eb4cbf4d3c4b8751a70695031c715.png

Fixed in 2025.03.19

I have installed the Tasmota device and I can connect to the web interface but I do not get any data on the Unraid plugin what am I doing wrong do I need to set a password in the plugin that matches the Tasmota config ? 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.