Fma965

Community Developer
  • Posts

    175
  • Joined

  • Last visited

Posts posted by Fma965

  1. 20 hours ago, giganode said:

    Can some of you please test the plugins?

     

    Here is my version. It should also maintain backwards compatibility (thanks to @SimonF😞

    https://raw.githubusercontent.com/giganode/corsairpsu-unraid/master/corsairpsu.plg

     

    Happy for your feedback...

     

    Nice work, you can PR it if you want and also i'll grant you access to the repo, or you can host your own, CA is already configured for my repo though so whichever way is fine with me.

  2. I don't use UnRAID anymore so i am unlikely to fix this. UnRAID has too many breaking changes honestly.

     

    EDIT: i actually do use UnRAID again but i'm running it on Proxmox so i won't continue development of this plugin still, and realistically other than what has been done by giganode, there is nothing to develop, this relies on a couple of binaries that haven't been updated and don't support new PSU's

  3. 10 minutes ago, Olitrolli said:

     

    Thanks for the looking into this! 

     

    Here is the output from running the commands in the terminal:
     

    root@Tower:~# /usr/local/bin/corsairmi
    No compatible devices found.
    root@Tower:~# /usr/local/bin/cpsumon/cpsumoncli TTYNumber
    Corsair AXi Series PSU Monitor
    (c) 2014 Andras Kovacs - [email protected]
    -------------------------------------------
    
    Serial port (TTYNumber) open error.

     

    As mentioned above, I have the new version of the HX1000i --> https://www.corsair.com/us/en/Categories/Products/Power-Supply-Units/HXi-Series-Fully-Modular-ATX-Power-Supplies/p/CP-9020214-NA

     

    It shows up as:

    system devices: Bus 001 Device 003 Port 1-10ID 1b1c:1c1e Corsair HX1000i Power Supply.

     

    Thanks!

     

     

    Thanks, to clarify you need to replace TTYNumber with the corresponding port for the PSU, not just type TTYNumber
    /dev/tty...

     

    In addition https://github.com/ka87/cpsumon has not been updated for 7 years
    and https://github.com/notaz/corsairmi also not been updated in like 5 years

  4. Guys you can all keep reporting the issues with certain PSU's but if the underlying binary, CorsairRMI and cpsumoncli don't detect it then it's not going to work :)

     

    Run these commands via SSH/Terminal

     

    /usr/local/bin/corsairmi

     

    OR 

     

    /usr/local/bin/cpsumon/cpsumoncli TTYNumber

     

    If they give response then i can probably update the plugin, otherwise it will need a new binary

  5. 9 minutes ago, BoKKeR said:

    I have looked at it. The easy way is by getting rid of the plugin thus there would be no integration in unraid, The docker container would work as an API for home assistant only. There might be a way to rewrite the plugin to listen for the port of the docker container, but it all feels like too much work for such a niche feature.

    This would be pointless, netdata docker container already detects the PSUs, this plugin is purely for the integration in the dashboard at this point

     

     

    There is a super easy way though, plugin write to a text file, docker container read the text file, output to HA but again not really needed since netdata can do what you want.

     

    • Like 1
  6. 22 minutes ago, Squid said:

    I was going to reply back with https://forums.unraid.net/topic/86715-corsair-rmi-hxi-axi-psu-statistics-cyanlabss-fork/#comment-806215, but then noticed that you actually wrote that.

     

    Also, as a side note that code doesn't work any more, last time i tested this code did.

     

    It also technically doesn't have any security implications as all it does is disables auth on that page

     

    #!/bin/bash
    # Start the Management Utility
    /usr/local/sbin/emhttp &
    
    # Add Un-Authenticated access to Unraid 6.10-RC1+ for Status.php (Corsair Plugin)
    while [ ! -f /var/run/nginx.pid ]
    do
      sleep 2 # or less like 0.2
    done
    
    echo -e "# Fma965 Un-Authenticated Access\nlocation ~ /plugins\/corsairpsu\/status.php {\nallow all;\ninclude fastcgi_params;\n}\n\n# End Fma965 Un-Authenticated Access\n\n$(cat /etc/nginx/conf.d/locations.conf)" > /etc/nginx/conf.d/locations.conf;
    nginx -s reload
    # End Nginx Basic Auth Patch

     

  7. 1 minute ago, doron said:

    Okay this might be a stupid question but sometimes we stumble on these things (I know I do): Are you 100% sure that the USB stick indeed has a volume label of UNRAID?

    Yes, you can see this in the screenshot, also my USB 2.0 controller is not DDA compatible so that rules that test out.

     

    To clarify i tried both fresh Unraid USB and my existing baremetal one (which i knew 100% worked, non UEFI) and neither worked still

  8. 5 minutes ago, doron said:

    Sorry, I guess my Hyper-V ignorance is showing...

     

     

    (the screenshot you provided doesn't show the Unraid side.)

    Anyway, what version of Unraid are you loading? Is it latest (6.10.0-rc4)? I peeked at the kernel 5.15.30 xhci-pci driver and support for your controller seems to be included there, but older versions might not have it (which is one guess as to why Unraid does not see your USB stick).

    Also - if you have another - different - USB controller on your mobo, which you can free up and use for this, maybe that would also be worth a try.

     

    I didn't take a screenshot of the unraid side, but it's the standard no USB called UNRAID found error. the screenshot does however show the same VM with the same passthrough detecting the USB fine on a standard Linux Gparted live boot cd.

     

    Hmm interesting idea, unfortunately I have tried the latest stable and the latest RC with the same results, I also tried a Renesas USB controller but the same issue unfortunately.

     

    For context the computer is a 7820x on a X299-WS Pro Asus motherboard

     

    EDIT: i do have some USB 2.0 ports on this machine so i could try those i guess

  9. 47 minutes ago, doron said:

    If you use a VMDK copy of the USB, try to
    1. Change the label of the VMDK volume to something other than UNRAID
    2. Verify that the VM indeed sees both the virtual drive and the USB stick.

    Sent from my tracking device using Tapatalk
     

    Hey,

     

    Thanks for the suggestions, unfortunately i have already tried option 1, and i can not verify the VM sees the USB stick as Unraid shuts down without any chance of user intervention after 30 seconds of waiting for UNRAID volume, as per the screenshot though the same VM booted to gparted or TrueNAS shows that the USB drive is indeed mounted fine.

  10. Hey guys I'm a little confused, with DDA Hyper-V can support passing through PCI devices.

     

    I have passed through both my HBA and USB Controller to the VM, if i boot GParted or TrueNAS i can see both the controllers and the USB Device itself, but yet when I boot UnRAID (from a VMDK copy of the USB drive because Hyper-V can't USB Boot) Unraid says "waiting for UNRAID device" but i know it's passed through.

    image.png.0b96369033352e71d4d2ca6db336e86a.png]

     

    Any ideas what i could be missing here? Obviously DDA is relatively new but it is something that should make this possible, as shown in the picture above.

     

    Yes I know Unraid can do KVM etc, but for my own reasons I'm trying to do it this way.

     

  11. 1 hour ago, BoKKeR said:

    I am having problems with this plugin. Everything seems to work except home assistant cant reach the status.php page. And if I open in a new incognito mode the 

    http://10.0.0.40/plugins/corsairpsu/status.php

    page it redirects me to /login. I think this is the problem. There is no basic auth popup just a redirect to the unraid login. did anoyne else run into this? 

     

    If I login to unraid and open the status page I get the JSON response properly

    Yes because unraid removed basic auth and now uses a form auth, this is mentioned a few times in this thread.

  12. Since this plugin can be used with json output in Home Assistant etc but 6.8+ preventing Basic Auth, here is a go file tweak you can add to your go file to allow unauthenticated access to this script output and also to the system temperature plugin

     

    6.10-RC1 Go File

     

    #!/bin/bash
    # Start the Management Utility
    /usr/local/sbin/emhttp &
    
    # Add Un-Authenticated access to Unraid 6.10-RC1+ for SystemTemp.php and Status.php (Corsair Plugin)
    while [ ! -f /var/run/nginx.pid ]
    do
      sleep 2 # or less like 0.2
    done
    
    echo -e "# Fma965 Un-Authenticated Access\nlocation ~ /plugins\/corsairpsu\/status.php {\nallow all;\ninclude fastcgi_params;\n}\n\nlocation ~ /plugins\/dynamix.system.temp\/include\/SystemTemp.php {\nallow all;\ninclude fastcgi_params;\n}\n# End Fma965 Un-Authenticated Access\n\n$(cat /etc/nginx/conf.d/locations.conf)" > /etc/nginx/conf.d/locations.conf;
    nginx -s reload
    # End Un-Authenticated Access

     

    Home Assistant preview

    image.png.c19d8bd924b78ff6e59950f6a90c0f45.png

     

    6.8+ Go File (Patches Basic Auth back in)

     

     

  13. 7 hours ago, eontech said:

     

    Hi again, I think I made the PR. Its my first time, so let me know if I've do it right.

    I don't know how to add the option to toggle it :P any tips?

     

    btw, I added the estimation for 8 PSU, RMi and HX, I've tested with my RM850i and with an unknown, to check that don't fail to the rest of the users.

    Please let me know if anyone can check with others PSU.

    Thanks

    image.png.51fbd2a16aa044b5d5fd831af5dc9800.png

  14. 1 hour ago, eontech said:

    Hi,

    I made some changes to add the efficiency on my PS.
    I found a python version that include the metrics to calculate the efficiency, so I add this on the PHP.

    https://github.com/liquidctl/liquidctl/blob/main/liquidctl/driver/corsair_hid_psu.py

     

    the code:

    
        $output_power = round($data['total watts']);
        $input_voltage = round($data['supply volts']);
        $fpowin115 = 0.000122800024680 * $output_power * $output_power + 1.0159421430340847 * $output_power + 13.555472968718759;
        $fpowin230 = 0.000088160542548 * $output_power * $output_power + 1.0234738318592156 * $output_power + 10.832902491655597;
        $est_input_power = $fpowin115 + ($fpowin230 - $fpowin115) / 115 * ($input_voltage - 115);
        $efficiency = round($output_power * 100 / $est_input_power);

     

     

    SPOILER_unknown.png

    Nice work, send a PR and i'll merge it, maybe have a option to toggle it on or off though? 

  15. 15 hours ago, skidaddl3 said:


    Hi @Fma965
    I haven't had a chance to read through the whole thread.
    I have a Corsair AX1600i and I haven't managed to get this plugin working. I'm not sure if I have to add something to the device context? I have had it working while passed through to a VM and the USB header is connected to my server.
    Not sure how to get this binary code that you would need either?

    Cheers
    skidaddl3

    it uses a different protocol this won't work.