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

Home assistant have integration for Tasmota and NUT ( should be support APCUPSD too ), so both data will show on Unraid and HA.

Edited by Vr2Io

  • 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

Note that this plugin is very likely to be incompatible with 6.12+ and needs to be updated.

Most likely, without an update to the plugin, simply having it installed will prevent the dashboard from loading.  Since it is outside of CA's control (author could never be bothered to publish) there's no warnings etc I can give regarding this short of this post and the usual warning from FCP about "Unknown plugin installed"

I hope it gets updated, I use it every day!

 

image.png.78e40fa03a5106cf71953d069ac43f37.png

On 3/19/2023 at 10:28 AM, mbc0 said:

I hope it gets updated, I use it every day!

 

image.png.78e40fa03a5106cf71953d069ac43f37.png

@Flippo

+1

  • Author

I am looking for help to make you happy again.

 

 

  • 2 months later...
On 3/16/2023 at 6:49 PM, Squid said:

Note that this plugin is very likely to be incompatible with 6.12+ and needs to be updated.

Confirm thats plugin is not working on 6.12 anymore. 
So i hope somewhere can update this plugin. 

21 hours ago, Wetterchen said:

Confirm thats plugin is not working on 6.12 anymore. 
So i hope somewhere can update this plugin. 

I have created new page files for 6.12

 

image.png

 

These need to be loaded into /usr/local/emhttp/plugins/tasmotapm/

 

I would create a temp dir as /boot/tasmota and put files here

 

cp /boot/tasmota/* /usr/local/emhttp/plugins/tasmotapm/ into go file for now. Will try and create a plugin at somepoint or @Flippocould add to his repo and publish.

 

status.page statusmove.page

30 minutes ago, SimonF said:

I have created new page files for 6.12

 

image.png

 

These need to be loaded into /usr/local/emhttp/plugins/tasmotapm/

 

I would create a temp dir as /boot/tasmota and put files here

 

cp /boot/tasmota/* /usr/local/emhttp/plugins/tasmotapm/ into go file for now. Will try and create a plugin at somepoint or @Flippocould add to his repo and publish.

 

status.pageUnavailable statusmove.pageUnavailable

 

You're a legend 🥳

 

You beat me to it, was just looking at your repos git history (mainly the NUT one) to see what updates were required to migrate from 6.12 and how that would translate to this project.

 

My first time looking at Unraid plugins, but I'm a senior dev by trade so was giving it a go, looking through dev threads and 6.12 update changes to try and reverse what needs updating.

 

Looks like the dev wants a new owner for the projects:

 

Would you mind doing what you did for the NUT and IPMI projects and taking ownership? The plugin also requires posting onto CA as its currently unlisted.

 

I can take what you've done and publish a fork, with some guidance as this is the first Unraid plugin I'm looking at (especially CA publishing), but you seem to know what you are doing 😉

Edited by unraidyn

12 minutes ago, unraidyn said:

 

You're a legend 🥳

 

You beat me to it, was just looking at your repos git history (mainly the NUT one) to see what updates were required to migrate from 6.12 and how that would translate to this project.

 

My first time looking at Unraid plugins, but I'm a senior dev by trade so was giving it a go, looking through dev threads and 6.12 update changes to try and reverse what needs updating.

 

Looks like the dev wants a new owner for the projects:

 

Would you mind doing what you did for the NUT and IPMI projects and taking ownership? The plugin also requires posting onto CA as its currently unlisted.

 

I can take what you've done and publish a fork, with some guidance as this is the first Unraid plugin I'm looking at (especially CA publishing), but you seem to know what you are doing 😉

Are you able to test with a real device as i only used test data as dont have hw 

 

needs a code tidy still also

2 minutes ago, SimonF said:

Are you able to test with a real device as i only used test data as dont have hw 

 

needs a code tidy still also

 

Currently waiting on a time frame to update my box, will report back with findings, will probs be an hour or so.

53 minutes ago, unraidyn said:

 

Currently waiting on a time frame to update my box, will report back with findings, will probs be an hour or so.

Created fork and adding to ca. Make take time to appear.

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

 

32 minutes ago, SimonF said:

Created fork and adding to ca. Make take time to appear.

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

 

 

You amazing person you!

 

Just updated to 6.12, relitively smooth but had a panic with "Unmountable: Unsupported or no file system" after enabling the "Permit exclusive shares:" option. Luckily a reboot fixed it, panic over for now.

 

Now to take a look at this!

 

349496925_Screenshot2023-06-16at22_35_26.thumb.png.5eda8d327aefd30ba6c4dd9f6a0432be.png

 

Appears to be working - however, there appears to be a pretty nasty bug.

 

After a few seconds (iterations), the values stop updating at the set interval (tried at the default 1000ms, 2000ms, etc) and instead start racing along faster and faster until either the tab or browser crashes.

It also caused the plug to overload and reset as well, presumably due to the amount of requests being performed overloading its little webserver.

 

There is a video of it malfunctioning attached.

 

 

 

This is with the default polling rate of 1000ms, in FireFox 114.0.1.

 

Now that to me smells like instance stacking or something recursive calling successive setIntervals, causing it to scale exponentially. I'll start to debug, remembering to refresh regularly haha

Edited by unraidyn
specifics

Doing some debugging, it appears to be an N+1 problem. For some reason, the network calls to `/plugins/tasmotapm/status.php` are being stacked upon each setInterval call.

 

When each interval passes, by default every 1000ms, N+1 calls occur. Thats how it spirals so quickly.

Found the problem, it is indeed recursion:

 

https://github.com/SimonFair/tasmotapm-unraid/commit/42d19aa714319843114c626059dd9c5fae094a90#diff-ffc2f4755a67ff8df0cc721d1c185eee2502fd60ec1193caf6b36ecb34f1b9dbR106

 

The setInterval call needs to be at the page level as its a repeat call not a delayed call, as at the moment its nested within the tasmotapm_status() method, meaning each time its calling itself N+1 times.

 

The fix should be to move the setInterval call outside of the method. You can replace the page load call to start itself with the setInterval code.

 

I can submit a PR if you'd like.

6 minutes ago, unraidyn said:

Found the problem, it is indeed recursion:

 

https://github.com/SimonFair/tasmotapm-unraid/commit/42d19aa714319843114c626059dd9c5fae094a90#diff-ffc2f4755a67ff8df0cc721d1c185eee2502fd60ec1193caf6b36ecb34f1b9dbR106

 

The setInterval call needs to be at the page level as its a repeat call not a delayed call, as at the moment its nested within the tasmotapm_status() method, meaning each time its calling itself N+1 times.

 

The fix should be to move the setInterval call outside of the method. You can replace the page load call to start itself with the setInterval code.

 

I can submit a PR if you'd like.

Have a release a version with no refresh until I have time to fix.

1 minute ago, SimonF said:

Have a release a version with no refresh until I have time to fix.

 

I've just submitted a PR :)

2 minutes ago, unraidyn said:

 

I've just submitted a PR :)

Thanks will look to merge tomorrow.

4 minutes ago, SimonF said:

Thanks will look to merge tomorrow.

 

Super, thanks!

On 3/18/2023 at 2:13 PM, Squid said:

Most likely, without an update to the plugin, simply having it installed will prevent the dashboard from loading.  Since it is outside of CA's control (author could never be bothered to publish) there's no warnings etc I can give regarding this short of this post and the usual warning from FCP about "Unknown plugin installed"

@SquidCreated 6.12 version and added to CA.

Thank you very much SimonF 👍

 

Nice little plugin, I just found it!
But as a side note, the "Efficiency" at the bottom is in reality the power factor. Something completely different.

  • 4 months later...

Great plug-in,  thanks!

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.