March 22, 20215 yr 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: Settings: 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
March 23, 20215 yr By checking around which smart plug fit this project, this is quite hard to confirm or buy a suitable hardware. Seems Sonoff POW R2 is right thing to do that, ESP32 solution with unknow power metering chips ( suppose same chips / driving method as your smartplug ), so I have buy one for try. Do you identify the efficiency reading quite low, does all reading come from Smartplug, none of that generate by plugin ? ( or it should be 94% instead 0.94% ) Thanks your Plugin !!! Below are the video about flash POW-R2 with Tasmota firmware Edited March 23, 20215 yr by Vr2Io
March 23, 20215 yr This should work sonoff s31 I have a half dozen flashed with Tasmota and integrated into home assistant Edited March 23, 20215 yr by mrbilky
March 23, 20215 yr 11 minutes ago, mrbilky said: This should work sonoff s31 I have a half dozen flashed with Tasmota and integrated into home assistant Does s31 have power metering feature ( circuity ) ? It have, seems it is US version. So good. Edited March 23, 20215 yr by Vr2Io
March 23, 20215 yr @Flippo Thank you for the great Plugin! Would it be eventually possible to integrate espurna: Github? He also has a neat little RESTAPI that you can get data from: Click
March 23, 20215 yr Author Take a look at Tasmota Device Templates Repository. There you will find many devices that have a measurement option. Which exactly one owns cannot not say. Often, however, there is a power monitoring plug in the title. If you go to a device there is often something like "For more accurate energy consumption measurements this device requires power monitoring calibration". And in the GPIO table there are more entries than relay, button and LED. Compare it to other devices. Maybe that will help you with the selection. The plugin only reads the values from the device. It sounds as simple as that. It shows the data that are called in the WebUI console with the Status 8 command. Only the price calculation takes place in the plugin. So power * price. Nice Vr2lo you found the first bug. Of course you are right. It has to be 94%. This is shown as a factor in the WebUI. Will correct it. Maybe there will be some more. Then it's worth it.
March 23, 20215 yr Author 29 minutes ago, ich777 said: @Flippo Thank you for the great Plugin! Would it be eventually possible to integrate espurna: Github? He also has a neat little RESTAPI that you can get data from: Click Can you open a separate topic for it and post the url with all parameters for your request and a json with the answer. Then we can discuss it there. I think that it would be better off in a separate plugin. The structure would be almost identical.
March 25, 20215 yr Author I fixed the incorrect display of efficiency. A few problems that occurred when shifting the display within the dashboard should also be resolved.
March 30, 20215 yr Just a feedback, Sonoff POW R2 work great. I short the relay output, so won't power off out of expectation, then set "SetOption21" to 1 (Energy monitoring when power is off) to save unnecessary power usage from relay. Thanks this plugin. Screen shoot of communication / flash firmware under Unraid, install 3 component Edited March 30, 20215 yr by Vr2Io
April 9, 20215 yr Author On 3/23/2021 at 11:05 AM, ich777 said: @Flippo Thank you for the great Plugin! Would it be eventually possible to integrate espurna: Github? He also has a neat little RESTAPI that you can get data from: Click Wishes sometimes come true. Here it is...
April 13, 20215 yr This plugin breaks the layout. I can't arrange the dashboard widget, the sort order randomly changes. The widget is sometimes shown twice, but the corsair widget disappears. Did you change the html classes while adapting from the Corsair PSU Plugin, because i use this also. tnxs greetz Stefan Edited April 13, 20215 yr by corgan
June 11, 20215 yr Author On 4/13/2021 at 5:06 AM, corgan said: This plugin breaks the layout. I can't arrange the dashboard widget, the sort order randomly changes. The widget is sometimes shown twice, but the corsair widget disappears. Did you change the html classes while adapting from the Corsair PSU Plugin, because i use this also. tnxs greetz Stefan Hi Stefan, maybe a bit late, sorry. I need to change the code a bit. Previously, I had the same problem with multiple ads when moving. Take a look at the use of @sortnr. status.page This was previously a fixed number. Now it is dynamic. I had a really hard time with this error. The table header has now been moved to the table body. It doesn't make sense, but otherwise I couldn't get it to work.
August 29, 20214 yr Can this plugin be searchable from Community applications? I have a cheap tuya plug (BSD33), ripped the plug apart, flashed tasmota, calibrated power metering, and conected with the plugin. Works fine, although I would like to read the power consumpltion with MQTT and not http.
August 29, 20214 yr 2 hours ago, Maor said: read the power consumpltion with MQTT and not http. Tasmota support MQTT and Http in parallel run. I apply power off if power usage larger then xx watts ( actually won't power off due to I already short the reply switch ), then as result LED will on if power usage larger then xx watts and off once less. 20:22:40.842 MQT: stat/tasmota_B88B5C/WARNING = {"Time":"2021-08-29T20:22:40","MaxPowerReached":90} 20:22:40.856 MQT: stat/tasmota_B88B5C/RESULT = {"POWER":"OFF"} 20:22:40.861 MQT: stat/tasmota_B88B5C/POWER = OFF 20:22:46.876 MQT: stat/tasmota_B88B5C/WARNING = {"Time":"2021-08-29T20:22:46","MaxPowerReached":91} 20:22:46.890 MQT: stat/tasmota_B88B5C/RESULT = {"POWER":"OFF"} 20:22:46.895 MQT: stat/tasmota_B88B5C/POWER = OFF 20:22:52.842 MQT: stat/tasmota_B88B5C/WARNING = {"Time":"2021-08-29T20:22:52","MaxPowerReached":90} 20:22:52.858 MQT: stat/tasmota_B88B5C/RESULT = {"POWER":"OFF"} 20:22:52.863 MQT: stat/tasmota_B88B5C/POWER = OFF Edited August 29, 20214 yr by Vr2Io
February 15, 20224 yr On 4/14/2021 at 12:07 PM, kevinshane said: awesome job, could you please support multiple sonoff pow? Late reply. Same Problem. I edit /usr/local/emhttp/plugins/tasmotapm/status.php and add the number of channel to the array, looks like this: $json = array( 'Total' => $data['StatusSNS']['ENERGY']['Total']['0'], 'Today' => $data['StatusSNS']['ENERGY']['Today']['0'], 'Yesterday' => $data['StatusSNS']['ENERGY']['Yesterday']['0'], 'Voltage' => $data['StatusSNS']['ENERGY']['Voltage'], 'Current' => $data['StatusSNS']['ENERGY']['Current']['0'], 'ApparentPower' => $data['StatusSNS']['ENERGY']['ApparentPower']['0'], 'ReactivePower' => $data['StatusSNS']['ENERGY']['ReactivePower']['0'], 'Factor' => $data['StatusSNS']['ENERGY']['Factor']['0'], 'Power' => $data['StatusSNS']['ENERGY']['Power']['0'], 'Costs_Price' => $tasmotapm_costs_price, 'Costs_Unit' => $tasmotapm_costs_unit ); On http://IP_OF_YOUR_DEVICE/cm?cmnd=Status%208 you seen the number of the channel you need. Edited February 15, 20224 yr by HrzM
May 6, 20224 yr Thanks for this fantastic plugin! would it be possible to add multiple plugs? I have 16 in the house and would be great to have one place to look at all of them 🙂
October 26, 20223 yr Stumbled across this plugin when watching THIS video on reducing power usage, works well! As others have mentioned, should get its added to the CA store so its easier to find as really good!
December 27, 20223 yr Does this plugin still work? I use a tasmota device with 12.3.0 and I have no values at all on the dashboard. They are just empty.
December 28, 20223 yr On 12/27/2022 at 7:18 PM, Twix said: Does this plugin still work? I use a tasmota device with 12.3.0 and I have no values at all on the dashboard. They are just empty. 12.3.1.2 no problem. You can enable web debug logging and check the error in web console 20:51:01.642 HTP: Command 20:51:01.651 SRC: WebCommand from 0.0.0.0 20:51:01.653 HTP: Bad userid and/or password 20:54:41.001 HTP: Command 20:54:41.006 SRC: WebCommand from 192.168.X.X 20:54:41.009 CMD: Grp 0, Cmd 'STATUS', Idx 1, Len 1, Pld 8, Data '8' Edited December 28, 20223 yr by Vr2Io
February 23, 20233 yr I am having problems with this plugin and my flashed to latest Tasmota (12.4.0) Shelly Plug S. When the script is activated the Shelly will reconnect from time to time (flashing LED for WLAN) + lose power for 0.5 seconds. The idea was to use the plug for monitoring only my Unraid server. With all the reconnects it will be a nightmare.. When disabling the script everything is fine and there are no disconnects. Any ideas?
March 14, 20233 yr Is it possible, to save the stats to e.g. influxdb or another db? especially to use it for grafana?
March 14, 20233 yr Amazing work, thank you! I came across this plugin while i was searching for a way to transmit the ups power consumption readings via mqtt to my home assistant setup. Do anyone know if something like this even exists?
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.