kolinger / rd-usb

Web GUI for RuiDeng/Riden USB testers (UM34C, UM24C, UM25C, TC66C)
GNU General Public License v3.0
225 stars 29 forks source link

Interface needs a way to reliably reset accumulated power between sessions (or to choose not to?) #42

Closed SiteRelEnby closed 2 months ago

SiteRelEnby commented 7 months ago

Sometimes, after recording a session, when I go to start another the accumulated power doesn't reset.

A couple of possible solutions:

Great project, very useful :)

kolinger commented 7 months ago

This app reflects numbers on the display of the USB meter more-or-less and that's why it's possible to do new session and still have previous accumulated data since they didn't reset on the USB meter itself and this apps just reads what meter reports.

The intendent way to reset accumulated data is via the USB meter interface. UMxxC clears the accumulated data by holding PREV button. UCxxC clears the data by holding K1 button. You don't like this?

I don't know if these meters support reset of accumulated data remotely via some command. Quick research shows this is likely possible for UM but not for TC. I don't like to have something for one type and not the other type, that will just make people ask why it's missing for the other. That's why reset via the meter itself it's better since it's universal.

There is always software way - we could just start measurement with current accumulated values and then it's easy to substract this starting value from every sample and thus you will get relative numbers starting from 0 but this way the meter will still show the continuous accumulated values though so only RD-USB will show the "correct" values.

Razor512 commented 5 months ago

One method I use is with an old smartphone running the old Ruideng android app, and I will simply disconnect the rd-usb app from the device, then have the Ruideng app connect to the UM25C, and that will allow for the app to reset the values, then I have the rd-usb application reconnect. Sadly their app crashes on newer versions of android. Added some images to an imgur album since attaching images to a reply seems to leave them at their original size with no way to scale them down while allowing access to the original resolution. https://imgur.com/a/sKzWMS0

The only issue is that it doesn't clear the recording data, so for a completely remote reset, I also use a smart outlet device to turn the charger off and on. My exact setup overall is a TP-Link HS105 smart outlet > USB charger > UM25C

The software also works decently on an old compute stick as well (cheap basic one with 2GB of RAM but running windows 10 (stripped down) :), sadly on windows, newer versions of the app cause windows defender to freak out on the compute stick) but with older versions, it works reliably as a largely unattended monitoring setup that is also low power, and since the web UI is accessible remotely as well, resetting the logging is quite easy remotely.

kolinger commented 2 months ago

I added ability to zero accumulated values in table view and also added zeroed values to CSV export. It's simple software side subtraction but it should allow you to see accumulated mAh or mWh value after measurement is done even if you did forget to reset the meter.

I don't think there is option to reset the accumulated values on the meter for TC66C, that's why I added software side solution that will work for all meters.