Jump to content

ElectricBrainUK

Members
  • Posts

    133
  • Joined

  • Last visited

Posts posted by ElectricBrainUK

  1. Hi everyone, sorry for my absence here. I appreciate that it has not been working since 6.11, I will produce a final update to fix the issue at some point but I don't have much time at the moment with other projects and my job. Then I will deprecate it as I no longer have the time to work on this.

     

    I won't remove it from the app store as there are plenty of people who still need it's functionality and although i haven't been active here I have been somewhat active on the discord still. I may leave it active until unraid make their official API available. Plus it still works on older unraid versions.

     

    The application is open source so others are welcome to make changes as well!

    • Like 6
  2. 14 minutes ago, Wieuwzak said:

    I cannot make this work. I enter my hashed host IP without https://, enable https checkmark, and then provide the login details. Nothing happens. Do I enter my local login details or my unraid.net login?

    The user is always the root user+password combination. Including the Https:// shouldn't make a difference either way - if it continues to fail it may be worth checking your logs

  3. Yeah looks like there is a memory leak - unfortuantely I dont have the time to fix it. Happy to merge pull requests if someone else has the time to look into it.

     

    @bobobeastie I just have https://hash.unraid.net as I only set it up via https and not via myservers plugin

    On 5/30/2022 at 4:01 PM, bobobeastie said:

    I think this container was slowing and then killing the unraid web ui after filling up logs after updating to 6.10.  A reboot of unraid fixes the issue temporarily.  My log is filled with this:

    May 29 08:49:08 NAStheRIPPER nginx: 2022/05/29 08:49:08 [error] 8928#8928: *1899305 limiting requests, excess: 20.348 by zone "authlimit", client: 172.17.0.15, server: , request: "POST /login HTTP/1.1", host: "192.168.1.10"

    I see here that we are supposed to use the hash URL, I wasn't using the MyServers plugin previous to updating to 6.10.  I'm not sure I got the hash URL correct, I recently rebooted to get things working more quickly, otherwise pages to 5-10 minutes to load, and I'm still seeing errors, 2st is docker log, 2nd is unraid log

    Get Main Details for ip: https://NUMBERS.CENSORED.myunraid.net:444/ Failed
    
    May 30 10:38:49 NAStheRIPPER nginx: 2022/05/30 10:38:49 [error] 8994#8994: *64073 limiting requests, excess: 20.086 by zone "authlimit", client: 192.168.1.1, server: NUMBERS.CENSORED.myunraid.net, request: "GET /login HTTP/1.1", host: "NUMBERS.CENSORED.myunraid.net:444"

    Note: The censored "NUMBERS" after server is my unbraid local IP, and for host it is different and matches the hashed URL.

     

     

    I may have initially had the wrong url, like I hadn't removed https://, and I may have included too much at the end.  Now I am using NUMBERS.CENSORED.myunraid.net in the unraid api web ui, and checking the https box.   The list there is populated, and I can, for example, pause a container, after being asked for username and password again. But at the same time I'm still getting the errors which leads me to believe I'm back on my way to having a full log file and slow to no web gui response. I'm at 3% log file after around an hour.

     

    I have a second unraid box that seems like it should have the same issue, but I don't see anything in the syslog and it hasn't had any slow or unresponive web ui issues, I updated the unraid api settings and now its log has the same errors.

    nastheripper-diagnostics-20220530-1054.zip 300.8 kB · 0 downloads

     

  4. On 5/2/2022 at 6:42 PM, MrLinford said:

    @ElectricBrainUK Any idea what could make the above happen?

    As you mentioned you should be using the hashed url not the ip - the host unreachable error suggests to me that you have the unraid api on a custom bridge on the same machine as the unraid box itself? Unraid does not allow custom bridged dockers to reach the host.

     

    On 5/9/2022 at 12:07 PM, nt7561 said:

    Hi everyone. 

    I'm trying to setup everything iot be able to monitor my unraid server on my homeassistant.

    Home Assistant runs as a vm on unraid.

    I hame made all the configs but I'm getting some errors.

    I am attaching some pictures of my settings and the error.

    Please advice

    Regards Nick

    unraid api (on unraid).png

    unraid api settings.png

    unraid settings.png

    error unraid api.png

    It looks like you have this set up in both home assistant and unraid? You only need the api in one or the other - I would recommend using the unraid one as the home assistant one is unreliable and outdated. It also looks like youre hosting the mqtt broker on home assistant - assuming that is all set up correctly with auto discovery and the unraid api is configured to read in from the unraid server you should be good to go

    • Like 1
  5. On 1/28/2022 at 4:05 PM, tasmith88 said:

    I appreciate it. I have gone on the discord, however haven't received any help in getting all of the together as I would like to utilize UUD 1.6 to its full capacity. I appreciate it. I am open to however you want to walk me through it.

    What was your discord username? I thought I'd replied to all of the active chats but may have missed you sorry.

     

    I am not familiar with UUD though as that is developed by a separate group

  6. Hi all

    @Jokerignoi I don't have a way to save the state right now but I can look into it. Though I'm not sure how it would work

     

    @tasmith88 Those fields are for the mqtt broker, you need to open the UI of the API and connect your server there

     

    @giustancas Sorry but the API installed via home assistant is not working well and I don't have time to support it I'm afraid - I'd recommend using the docker on unraid rather than on the homeassistant itself

     

     

  7. On 11/6/2021 at 4:23 PM, Jokerigno said:

    Hi all,

     

    after a reboot all dockers seems to be offline in Home Assistant. But becomes available after a while (1 h or so).

     

    Anyone has a suggestion?

    Hey - you should check your MQTTCacheTime variable - it wont update all the topics until that time elapses (default is 1 hour) as this saves spamming your home assistant

    • Like 1
  8. 12 hours ago, corgan said:

    You was right, there was a authentication problem. Now the container can talk to unraid.

    Sadly the outcomming is the same.

     

    I have hidden nearly all docker container, but get a mqtt switch and an entity for each container.

    This was a complete fresh start. Appdata and the broker db was wiped.


    App and syslog are fine:

    grafik.thumb.png.701910c80c45e361c427578a7bf094bc.png

     

    129 MQTT Topics:

     

    grafik.thumb.png.9a5d8953e4edad1c461132713b0d1f25.png

     

    API manual settings:

     

    grafik.thumb.png.52b57839ebcb09aabec44e02d88b8e0d.png

     

    what do i miss here?

    Hmm, everything looks correct - do the mqtt topics continue to be updated? I may have to try and replicate this as the hide function has always worked in the past and I don't really know why it isn't for you sorry

  9. 5 minutes ago, corgan said:

    Thanks for the quick answer..

    I deleted my mqtt/ha test server, removed the unraid-api app and the appdata folder to start fresh.

    But after reinstalling the app, the api cant get docker/vm data?

     

     

    I checked the login ten times, the login is 100% correct.

    Are there new security restrictions in place?

    The 503 error means it is failing to authenticate but there could be a lot of different reasons as to why - check your unraid server logs, it might be that because of the restarts etc the server has blocked it for too many requests, may just be worth stopping the docker over night and trying again in the morning. Otherwise there could be new security changes on the new rc but unfortunately I won't be able to check until next week as I'm going on holiday tomorrow. 

     

    One thing to check though, what is the network config for the docker itself? Is it just a port on the servers IP? Or have you bridged it its own ip? If it has its own ip it can't communicate with the host

  10. 15 minutes ago, corgan said:

    How to hide unused container from blowing up my devices list?

    I have around 60 docker container, but i only need 2 of them controlled via Home-Assistant.

     

    I disabled all containers in the manual settings

     

    grafik.thumb.png.f282d5bdc48a5de9902fdc23a5f9b1ef.png

     

    But they are shown as MQTT Devices + Entity.

     

    grafik.png.c3757238b847506495ce2f2a61ff8c82.png

     

    grafik.thumb.png.e71fcf6febc6af11adcc072f7956f634.png

     

     

    So how to setup this, that i only see the both container, which are not hidden?

    tnxs

    Hi,

    The logs from the unraid api are what I need, the error you have shared is when the request comes via mqtt however when you do it from the unraid apis ui itself the logs will not contain mqtt etc. and may give a better idea of the issue.

     

    Once you have hidden a device from that menu you need to delete it from home assistant as it remembers old devices even once they stop sending messages

     

    Cheers

  11. 16 hours ago, giustanca said:

    Hello. I have the following problem with the unraid-api docker.

    Home assistant sees the dockers and unraid-api sees the mqtt (HA) broker.
    However, it is impossible to start any docker from Home Assistant, with the following error message contained in the log:

     

     

    > [email protected] start
    > cross-env NUXT_HOST=0.0.0.0 NODE_ENV=production node server/index.js
    WARN mode option is deprecated. You can safely remove it from nuxt.config
    Connected to mqtt broker
    READY Server listening on http://0.0.0.0:80
    Received MQTT Topic: homeassistant/nas/clamav/dockerState and Message: started assigning ID: MQTT-R-ku2txnez
    Part of MQTT-R-ku2txnez failed.

     

     

    What is the problem?

    My Unraid version in 6.10.0-rc1.

    Thanks for help

     

     

    Hi, are you able to start and stop that docker from the unraid api ui? What about from the unraid ui as well? Could you share the logs for the former as well

    Thanks

  12. On 9/13/2021 at 9:40 AM, CRTech said:

    One more thing i found now - this behavior starts when i run HA VM and Unraid API docker together. If i start Unraid API after clean reboot of the server without HA VM - no writes to USB, if i then start HA VM,it also start writing to USB. Then i stop HA VM and leave it stopped,stop UA - no writes but if i start UA next time (with HA VM stopped) writing to USB continue... It looks like some network or communication settings persist in Unraid and makes this problem, not UA alone.. 

    Okay thanks for letting me know, it is very odd and I've not seen this behavior before but I will try to reproduce it using the details you've provided

  13. On 9/11/2021 at 11:54 AM, CRTech said:

    Hi,  in Unraid API log is only this,i dont know if it means something but it shows when i stop this plugin, last message when is running is : Connected to mqtt broker

    > [email protected] start
    > cross-env NUXT_HOST=0.0.0.0 NODE_ENV=production node server/index.js
    
    
    WARN mode option is deprecated. You can safely remove it from nuxt.config
    
    
    READY Server listening on http://0.0.0.0:80
    
    Connected to mqtt broker
    Connected to mqtt broker
    npm ERR! path /app
    npm ERR! command failed
    
    npm ERR! signal SIGTERM
    npm ERR! command sh -c cross-env NUXT_HOST=0.0.0.0 NODE_ENV=production node server/index.js
    
    npm ERR! A complete log of this run can be found in:
    npm ERR! /root/.npm/_logs/2021-09-11T10_42_35_003Z-debug.log

    in this file is :

    0 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
    1 info using [email protected]
    2 info using [email protected]
    3 timing config:load:defaults Completed in 2ms
    4 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 1ms
    5 timing config:load:builtin Completed in 1ms
    6 timing config:load:cli Completed in 2ms
    7 timing config:load:env Completed in 1ms
    8 timing config:load:file:/app/.npmrc Completed in 0ms
    9 timing config:load:project Completed in 1ms
    10 timing config:load:file:/root/.npmrc Completed in 0ms
    11 timing config:load:user Completed in 0ms
    12 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
    13 timing config:load:global Completed in 0ms
    14 timing config:load:cafile Completed in 0ms
    15 timing config:load:validate Completed in 0ms
    16 timing config:load:setUserAgent Completed in 0ms
    17 timing config:load:setEnvs Completed in 1ms
    18 timing config:load Completed in 9ms
    19 verbose npm-session 96251fc38a486791
    20 timing npm:load Completed in 19ms
    21 timing command:run-script Completed in 111880ms
    22 timing command:start Completed in 111883ms
    23 verbose stack Error: command failed
    23 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js
    :64:27)
    23 verbose stack     at ChildProcess.emit (node:events:378:20)
    23 verbose stack     at maybeClose (node:internal/child_process:1067:16)
    23 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
    24 verbose pkgid [email protected]
    25 verbose cwd /app
    26 verbose Linux 5.10.28-Unraid
    27 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
    28 verbose node v15.8.0
    29 verbose npm  v7.5.1
    30 error path /app
    31 error command failed

    thats all,syslog is clean..

    That looks relatively normal, do you have any mappings other than /app/config?

  14. On 9/9/2021 at 11:58 AM, CRTech said:

    Hi,

    first,big thanks for this plugin, i use it with HA.

    I configured everything,everything is working but i have one big problem. If i start docker container with this plugin, i get excessive writes on USB drive. I traced it and found that last updated file  is /boot/config/domains.cfg . The content of this file is not changing, with other dockers i dont have this problems. i get maybe 10000 writes/hour, this can destroy boot usb disk in short period of time. For now, i stopped it..  

    Hi, I'm afraid I've not seen this error before and I don't know what could be causing it. Is there anything in the logs for the unraid api that is suspicious? Or the system logs when the writes are high? Otherwise there is this issue where forcing the api onto a background thread causes it to behave unusually: https://github.com/ElectricBrainUK/UnraidAPI/issues/33

  15. On 8/8/2021 at 1:15 AM, okkies said:

    ok, i got some zigbee2mqtt usb sticks forwarded to my Home-assistant VM. 

    How do i start. 

    what i want to do is, start a userscript. (stopping VM-A, and starting VM-B with a delay) from a zigbee button....
    How en where do i start ?

    Assuming you have zigbee2mqtt set up with an mqtt broker that is connect to home assistant? If not look into zigbee2mqtt and an mqtt broker

     

    Once you have that set up, you want to set up the unraid API adding all of your mqtt broker details in the docker set up, then on the UI adding your unraid server details.

     

    There is currently no way to trigger user scripts from the API. So what you would do is create an automation in home assistant that when you press your zigbee button, it turns on VM A and then VM B rather than calling the script.

  16. Hi guys,

    For the first issue I'm unsure what the problem would be unless pi hole is blocking the api somehow, though I doubt that as it doesn't really use domain names. Try reconfiguring the server in the unraid api and failing that checking the logs of both the api and the unraid server itself

     

    @Irithor
    glad you appreciate, happy it's worked so far. I'm surprised you got the ha app working at all as it has a few problems that I need to sort out! I guess the main thing would be to check the share it is pointing to when it tries to write to config/* and make sure it's properly mapped outside of the docker onto the host somewhere. Not a problem on the unraid docker as the mappings all work but it can be a bit more fiddly in HA! Let me know if you need more help and how you get on. Check here to start with, it should be mapped to a /share folder but it may not be: https://developers.home-assistant.io/docs/add-ons/configuration/

    • Like 1
  17. 17 hours ago, 1471 said:

    Thanks for the awesome container, really useful for Unraid metrics in Grafana. I'm having problems securing the container using the method suggested though, any ideas what i'm doing wrong?

     

    I've changing the container variable 'KeyStorage' from config to secure but can still access the api without a username/password prompt, with the following in the logs:

     

    Error: ENOENT: no such file or directory, open 'secure/mqttKeys'

     

     

    Hey - that is unusual Im guessing the API is sending a cached response probably something I need to fix and not a problem with your config.. Ill look into it - it should mean that you cant perform actions without auth but the bug with the cache means the data about the server is still shared

  18. On 5/31/2021 at 3:12 PM, paulmorabi said:

     

    Have removed the add-on from HA completely. I also removed config and container and started again with same results. There is nothing really in the error logs:

     

    
    READY Server listening on http://0.0.0.0:80
    
    Failed to retrieve config file, creating new.
    
    
    ERROR ENOENT: no such file or directory, open 'config/mqttKeys'
    
    
    at Object.openSync (node:fs:492:3)
    at Proxy.readFileSync (node:fs:393:35)
    at default (api/getServers.js:27:36)
    at call (node_modules/connect/index.js:239:7)
    at next (node_modules/connect/index.js:183:5)
    at next (node_modules/connect/index.js:161:14)
    at next (node_modules/connect/index.js:161:14)
    at SendStream.error (node_modules/serve-static/index.js:121:7)
    
    at SendStream.emit (node:events:378:20)
    at SendStream.EventEmitter.emit (node:domain:470:12)
    
    
    ERROR ENOENT: no such file or directory, open 'config/mqttKeys'
    
    
    at Object.openSync (node:fs:492:3)
    at Proxy.readFileSync (node:fs:393:35)
    at default (api/getServers.js:27:36)
    at call (node_modules/connect/index.js:239:7)
    at next (node_modules/connect/index.js:183:5)
    at next (node_modules/connect/index.js:161:14)
    at next (node_modules/connect/index.js:161:14)
    at SendStream.error (node_modules/serve-static/index.js:121:7)
    
    at SendStream.emit (node:events:378:20)
    at SendStream.EventEmitter.emit (node:domain:470:12)
    
    
    ERROR ENOENT: no such file or directory, open 'config/mqttKeys'
    
    
    at Object.openSync (node:fs:492:3)
    at Proxy.readFileSync (node:fs:393:35)
    at default (api/getServers.js:27:36)
    at call (node_modules/connect/index.js:239:7)
    at next (node_modules/connect/index.js:183:5)
    at next (node_modules/connect/index.js:161:14)
    at next (node_modules/connect/index.js:161:14)
    at SendStream.error (node_modules/serve-static/index.js:121:7)
    
    at SendStream.emit (node:events:378:20)
    at SendStream.EventEmitter.emit (node:domain:470:12)
    
    Error: ENOENT: no such file or directory, open 'config/mqttKeys'
    
    at Object.openSync (node:fs:492:3)
    at Proxy.readFileSync (node:fs:393:35)
    at updateMQTT (/app/mqtt/index.js:272:30)
    at Timeout._onTimeout (/app/mqtt/index.js:304:5)
    at listOnTimeout (node:internal/timers:556:17)
    at processTimers (node:internal/timers:499:7) {
    errno: -2,
    syscall: 'open',
    code: 'ENOENT',
    path: 'config/mqttKeys'
    }
    The secure keys for mqtt may have not been generated, you need to make 1 authenticated request via the API first for this to work
    
    ERROR ENOENT: no such file or directory, open 'config/mqttKeys'
    
    
    at Object.openSync (node:fs:492:3)
    at Proxy.readFileSync (node:fs:393:35)
    at default (api/getServers.js:27:36)
    at call (node_modules/connect/index.js:239:7)
    at next (node_modules/connect/index.js:183:5)
    at next (node_modules/connect/index.js:161:14)
    at next (node_modules/connect/index.js:161:14)
    at SendStream.error (node_modules/serve-static/index.js:121:7)
    
    at SendStream.emit (node:events:378:20)
    at SendStream.EventEmitter.emit (node:domain:470:12)
    
    
    ERROR ENOENT: no such file or directory, open 'config/mqttKeys'
    
    
    at Object.openSync (node:fs:492:3)
    at Proxy.readFileSync (node:fs:393:35)
    at default (api/getServers.js:27:36)
    at call (node_modules/connect/index.js:239:7)
    at next (node_modules/connect/index.js:183:5)
    at next (node_modules/connect/index.js:161:14)
    at next (node_modules/connect/index.js:161:14)
    at SendStream.error (node_modules/serve-static/index.js:121:7)
    
    at SendStream.emit (node:events:378:20)
    at SendStream.EventEmitter.emit (node:domain:470:12)
    
    Get Docker Details for ip: 192.168.1.66 Failed
    
    Request failed with status code 503
    
    Get Main Details for ip: 192.168.1.66 Failed
    
    Request failed with status code 503

     

    Those are the logs from unraid api however I mean the ones from unraid itself - there may be something there which explains why the api is failing to connect, did you try reconfiguring the server in the api as well?

  19. 2 minutes ago, paulmorabi said:

     

    Thanks for replying. Yes, something is very odd and this is after months of there being no issues. The only thing that changed is I moved my Home Assistant to a different VM and restored from backup. Even then, it seemed to work afterwards but die later.

     

    I've tried with one container, alternatively on the HA VM and the Unraid box and each gives the same result, albeit, slighttly different behavior:

     

    * On the Unraid box, after logging in, it does not show a second pop up window to log in again. It loads the details of the VM but only very partiually, no containers, vm's or anything.

    * On the HA VM, the container asks me to login again after the first auth and then does similar to above, only displaying a few details.

     

    Then the logs begin filling with 503 errors.

     

     

     

     

     

    Okay, I have heard a couple of users report a similar issue, I would suggest not using the HA VM one as that is in alpha and not consistently working at the best of times.

     

    For the unraid one, have you tried deleting the server altogether (in the menu on the left under manual config) and then restarting the docker and reconfiguring? This may help otherwise try deleting the config folder and starting from scratch. You could also check the server logs on unraid itself to see if there is any extra details on why it is failing to connect there. 

  20. On 5/30/2021 at 9:35 AM, paulmorabi said:

    I've suddenly started noticing these errors:

     

    
    Get VM Details for ip: 192.168.1.66 Failed
    Request failed with status code 503

     

    There's nothing else I can see in the logs. When I access the WebUI, I can log in and the details for the VM momentarily appear before disappearing (and VM/docker sections are empty).

     

    Also, just to confirm, do I need to have the Unraid API running on both the homeassistant VM and Unraid?

    Hey,

    That is odd, 503 suggests it cannot authenticate or is being blocked, try re entering your server details in the ui as sometimes they expire especially if you have the config location set to secure. If you have changed the network config to have its own ip on br0.1 etc then it will not work and will throw this error though this may not be the case.

     

    You do not need the unraid api on both, the unraid one works more reliably so I would suggest using only that.

  21. 13 minutes ago, svh1985 said:

    Is there a way to secure the webui and api? Currently everyone on the lan can stop and start the array. Thanks!

    Hey, it should prompt you for a username and password if you set the keystorage variable to secure, however you will also have to authenticate rest requests. Otherwise you could put the UI behind some other reverse proxy or something that adds auth

  22. On 5/7/2021 at 2:31 PM, Driveman said:

    Hi everyone i have a question regarding this application.

    Is there any way to make the web UI only be reachable over HTTPS and having authentication or is this not supported yet?

     

    Hey, currently HTTPS is not supported, you can force it to authenticate more requests by setting the KeyStorage variable to secure

  23. 8 hours ago, Jokerigno said:

    I rebooted but it's still there.

     

    If you remember me I'm the say guy who noticed that there's a warning message in HA.

     

     

    I think there are spare pieces in my config and I would like to delete them and start all over. Can you suggest me how to remove all traces in HA and Unraid?

    In unraid with the docker removed and the app data config deleted you should be fine. For HA I'm less familiar but removing the docker and then all data in the share as well as any references in the config should work fine.

     

    For others that come across the issue with cpu usage that jokeringo and I have discussed here there is a solution: https://github.com/ElectricBrainUK/UnraidAPI/issues/33

    • Like 1
×
×
  • Create New...