danielpiccoli Posted January 26, 2021 Share Posted January 26, 2021 @ElectricBrainUK Have you seen this error ?? i can make a setup, it will post into MQTT a few times, but after a day or 2, it will just stop and not connect anymore showing the below error messages. if i delete the .json files and server config and let it regenerate, it will setup again and start to work, until it fails with the same error in 2 days time. Any ideas ? Quote Link to comment
ElectricBrainUK Posted January 26, 2021 Author Share Posted January 26, 2021 Hi @giustanca and @danielpiccoli, it looks like you are both having the same problem, relating around it failing to get a piece of information about dockers. Do you guys have dockers enabled? And which version of unraid are you each running? Quote Link to comment
danielpiccoli Posted January 26, 2021 Share Posted January 26, 2021 (edited) 3 hours ago, ElectricBrainUK said: Hi @giustanca and @danielpiccoli, it looks like you are both having the same problem, relating around it failing to get a piece of information about dockers. Do you guys have dockers enabled? And which version of unraid are you each running? running 6.8.3, using multiple dockers, all of them work like a charm, unraid-API keeps crashing. also: as out of the box as it gets. I also attempted giving it a fixed IP: 10.0.0.6 erased everything, reconfigured, now the error is: although it says connected Edited January 26, 2021 by danielpiccoli Quote Link to comment
giustanca Posted January 26, 2021 Share Posted January 26, 2021 The docker works after first installation. If I restart the unraid server it stops working and won't start even if I start it manually. The unraid version is 6.8.3 and I have multiple dockers fully functional. Quote Link to comment
ph0b0s101 Posted January 26, 2021 Share Posted January 26, 2021 11 hours ago, ElectricBrainUK said: Hey sorry I missed this, it does seem that way - I will look into it. If you would like the functionality in the meantime I recommend you use the unraid docker - sorry for the inconvenience @ElectricBrainUK Thank you for giving a short feedback. So then I will wait for an update. Quote Link to comment
ElectricBrainUK Posted January 27, 2021 Author Share Posted January 27, 2021 Hi @giustanca and @danielpiccoli, I have pushed a potential fix, please let me know if it solves your problem 1 Quote Link to comment
danielpiccoli Posted January 27, 2021 Share Posted January 27, 2021 1 hour ago, ElectricBrainUK said: Hi @giustanca and @danielpiccoli, I have pushed a potential fix, please let me know if it solves your problem Seems like your fix worked - it came up, connected and fetched / posted data... let me leave it running for a while now and see if the past problem persists. Quote Link to comment
ElectricBrainUK Posted January 27, 2021 Author Share Posted January 27, 2021 53 minutes ago, danielpiccoli said: Seems like your fix worked - it came up, connected and fetched / posted data... let me leave it running for a while now and see if the past problem persists. Cool cheers, let me know Quote Link to comment
ph0b0s101 Posted January 31, 2021 Share Posted January 31, 2021 (edited) On 1/5/2021 at 4:22 PM, ElectricBrainUK said: Sure: - see if there are updates for dockers/plugins/unraid OS - WIP - able to shut down the server - Available via mqtt command /basetopic/servername/poweroff - correct info disk usage - Done - parity check - Available via mqtt command /basetopic/servername/check (also move for mover) - reboot server - Available via mqtt command /basetopic/servername/reboot But an unraid api addon in HA would be even better - There is an alpha version available on the github page but there are problems with it communicating over mqtt Hello ElectricBrainsUK, its me again and I am running your Unraid-API Docker directly in Unraid and it's working pretty good so far. I have only one open Request left do be 100% statisfied. So is it possible to get also an switch for sleep mode? You have already implemented an reboot and power_off, for me only sleep is left for maximum flexiblity. Maybe I can help to achive this? Edited January 31, 2021 by ph0b0s101 typo Quote Link to comment
ElectricBrainUK Posted January 31, 2021 Author Share Posted January 31, 2021 35 minutes ago, ph0b0s101 said: Hello ElectricBrainsUK, its me again and I am running your Unraid-API Docker in directly in Unraid so far and it's working pretty good so far. I have only one open Request left do be 100% statisfied. So is it possible to get also an switch for sleep mode? You have already implemented an reboot and power_off, for me only sleep is left for maximum flexiblity. Maybe I can help to achive this? Hey, I'm glad it has been useful! Just to check do you mean sleeping the unraid host? I could probably do that relatively easily Quote Link to comment
ph0b0s101 Posted January 31, 2021 Share Posted January 31, 2021 Just now, ElectricBrainUK said: Hey, I'm glad it has been useful! Just to check do you mean sleeping the unraid host? I could probably do that relatively easily Thank you for your fast response. Yes I mean to bring the unraid host to sleep state, like the s3 plugin does. Quote Link to comment
ElectricBrainUK Posted January 31, 2021 Author Share Posted January 31, 2021 4 minutes ago, ph0b0s101 said: Thank you for your fast response. Yes I mean to bring the unraid host to sleep state, like the s3 plugin does. Okay great, I'll let you know when I have an update, will take a look tomorrow 1 Quote Link to comment
Jokerigno Posted January 31, 2021 Share Posted January 31, 2021 Hi all, I use this docker container from a while now and I noticed a issue that maybe it's not related to the container because it seems no other has is. This are my settings: What I noticed is that it tooks more time than declared : HA tooks some time to see the status of the containers, vm etc. Look at this picture: status is "started" but the switch created by HA is in "off" status. Any hint? Quote Link to comment
ElectricBrainUK Posted January 31, 2021 Author Share Posted January 31, 2021 2 minutes ago, Jokerigno said: Hi all, I use this docker container from a while now and I noticed a issue that maybe it's not related to the container because it seems no other has is. This are my settings: What I noticed is that it tooks more time than declared : HA tooks some time to see the status of the containers, vm etc. Look at this picture: status is "started" but the switch created by HA is in "off" status. Any hint? Hey, that is unusual, I'll take a look tomorrow as well. However I don't recommend having a mqtt cache time and refresh rate of one, you could end up spamming your home assistant and slowing it down or even crashing it depending on the spec of your home assistant box/VM 1 Quote Link to comment
ElectricBrainUK Posted February 2, 2021 Author Share Posted February 2, 2021 Hi both, sorry for the delay. @Jokerigno Ive looked and I cant see why you would be experiencing this issue, the only thing I can think of is your home assistant appears to be in a language other than English, do you think it could be because my unraid api isnt playing nicely with that? Seems unlikely but it is the only thing I can think of. @ph0b0s101 sleep is definitly achievable but I would like to know if you currently sleep your unraid machine and how you do it? Hooking into an existing function would be easier than writing one from scratch but one from scratch might be more universal Quote Link to comment
Jokerigno Posted February 3, 2021 Share Posted February 3, 2021 19 hours ago, ElectricBrainUK said: language other than English Yes my system is in italian (ui) but status are always in english (on - off, true - false) and are visibile in the other language only in the frontend. I don't think it is related. Moreover I want you to notice that it's just a delay. After some time the status is updated. Quote Link to comment
ElectricBrainUK Posted February 3, 2021 Author Share Posted February 3, 2021 5 hours ago, Jokerigno said: Yes my system is in italian (ui) but status are always in english (on - off, true - false) and are visibile in the other language only in the frontend. I don't think it is related. Moreover I want you to notice that it's just a delay. After some time the status is updated. Ah okay sure, just a thought. If it is just a delay then I would say it was probably because your MQTTRefreshRate variable is too fast, MQTTCacheTime is also a little fast but that shouldnt matter as much. Try setting them to at least 5. 1 Quote Link to comment
ph0b0s101 Posted February 4, 2021 Share Posted February 4, 2021 On 2/2/2021 at 7:53 PM, ElectricBrainUK said: Hi both, sorry for the delay. @Jokerigno Ive looked and I cant see why you would be experiencing this issue, the only thing I can think of is your home assistant appears to be in a language other than English, do you think it could be because my unraid api isnt playing nicely with that? Seems unlikely but it is the only thing I can think of. @ph0b0s101 sleep is definitly achievable but I would like to know if you currently sleep your unraid machine and how you do it? Hooking into an existing function would be easier than writing one from scratch but one from scratch might be more universal Sorry for my late response, i was really busy the last days. I have installed the s3 Sleep plugin, which handles the standby so far. When I manually bring the server in standby mode, I use the sleep button which is in the dashboard, after installation of the dynamics s3 sleep plugin. Sorry that I cannot provide any code 😞 Quote Link to comment
ElectricBrainUK Posted February 7, 2021 Author Share Posted February 7, 2021 On 2/4/2021 at 8:47 PM, ph0b0s101 said: Sorry for my late response, i was really busy the last days. I have installed the s3 Sleep plugin, which handles the standby so far. When I manually bring the server in standby mode, I use the sleep button which is in the dashboard, after installation of the dynamics s3 sleep plugin. Sorry that I cannot provide any code 😞 Hey @ph0b0s101 thanks for the details, I have updated the beta tag with a sleep command, if it works fine for you Ill move it into the latest tag. If you dont know how to switch tags, when you edit the docker, under repository add :beta to the end of electricbrainuk/unraidapi to make electricbrainuk/unraidapi:beta. If you are using Home Assistant / MQTT you need to call it via /basetopic/servername/sleep or via the REST API it would be POST /api/changeServerStatus { action: "sleep", server: "IPAddress", auth: Base64(user:password)) If you could let me know how you get on that would be really helpful, thanks (Also let me know if there is anything you need help with) Quote Link to comment
ph0b0s101 Posted February 7, 2021 Share Posted February 7, 2021 (edited) 3 hours ago, ElectricBrainUK said: Hey @ph0b0s101 thanks for the details, I have updated the beta tag with a sleep command, if it works fine for you Ill move it into the latest tag. If you dont know how to switch tags, when you edit the docker, under repository add :beta to the end of electricbrainuk/unraidapi to make electricbrainuk/unraidapi:beta. If you are using Home Assistant / MQTT you need to call it via /basetopic/servername/sleep or via the REST API it would be POST /api/changeServerStatus { action: "sleep", server: "IPAddress", auth: Base64(user:password)) If you could let me know how you get on that would be really helpful, thanks (Also let me know if there is anything you need help with) Hi @ElectricBrainUK, thank you for your update. I already installed the version from your beta repository. But I am not 100% sure how to use is with MQTT or the REST API. I tried it via developer tools in home assistant with the following code: but this command did not bring the server into standby mode. And for the REST API Call i did not know where I have to put the provided code example. Could you please provide some more in depth details? Sorry I am a total newbie in this subject. Reboot, Restart and so on has switches in home assistant: Edited February 7, 2021 by ph0b0s101 Quote Link to comment
ElectricBrainUK Posted February 8, 2021 Author Share Posted February 8, 2021 (edited) On 2/7/2021 at 5:28 PM, ph0b0s101 said: Hi @ElectricBrainUK, thank you for your update. I already installed the version from your beta repository. But I am not 100% sure how to use is with MQTT or the REST API. I tried it via developer tools in home assistant with the following code: but this command did not bring the server into standby mode. And for the REST API Call i did not know where I have to put the provided code example. Could you please provide some more in depth details? Sorry I am a total newbie in this subject. Reboot, Restart and so on has switches in home assistant: Hey, sorry for the delay - you don’t need to worry about the REST one using home assistant. Could you try updating again and trying again with the mqtt command now? Could you also let me know if there is anything unusual in the logs after you run the command? Edited February 8, 2021 by ElectricBrainUK Quote Link to comment
ph0b0s101 Posted February 8, 2021 Share Posted February 8, 2021 31 minutes ago, ElectricBrainUK said: Hey, sorry for the delay - you don’t need to worry about the REST one using home assistant. Could you try updating again and trying again with the mqtt command now? Could you also let me know if there is anything unusual in the logs after you run the command? Thank you for your reply, i assume, there must be any error on my site firing the mqtt command. Because there is nothing in the logs after i have issued the command. But when I trigger one of the docker switches it will work perfectly fine: > [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 Received MQTT Topic: homeassistant/sger-unraid01/binhex-lidarr/dockerState and Message: started assigning ID: MQTT-R-kkx2p44f MQTT-R-kkx2p44f succeeded Received MQTT Topic: homeassistant/sger-unraid01/binhex-lidarr/dockerState and Message: stopped assigning ID: MQTT-R-kkx2qvab Received MQTT Topic: homeassistant/sger-unraid01/binhex-lidarr/dockerState and Message: stopped assigning ID: MQTT-R-kkx2qvab MQTT-R-kkx2qvab succeeded So maybe I have to alter the command? On the mqtt manual from homeassistant there is mentioned that the payload is nessecary? https://www.home-assistant.io/docs/mqtt/service/ Sorry that I am not a big help so far 😞 Quote Link to comment
ElectricBrainUK Posted February 8, 2021 Author Share Posted February 8, 2021 2 minutes ago, ph0b0s101 said: Thank you for your reply, i assume, there must be any error on my site firing the mqtt command. Because there is nothing in the logs after i have issued the command. But when I trigger one of the docker switches it will work perfectly fine: > [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 Received MQTT Topic: homeassistant/sger-unraid01/binhex-lidarr/dockerState and Message: started assigning ID: MQTT-R-kkx2p44f MQTT-R-kkx2p44f succeeded Received MQTT Topic: homeassistant/sger-unraid01/binhex-lidarr/dockerState and Message: stopped assigning ID: MQTT-R-kkx2qvab Received MQTT Topic: homeassistant/sger-unraid01/binhex-lidarr/dockerState and Message: stopped assigning ID: MQTT-R-kkx2qvab MQTT-R-kkx2qvab succeeded So maybe I have to alter the command? On the mqtt manual from homeassistant there is mentioned that the payload is nessecary? https://www.home-assistant.io/docs/mqtt/service/ Sorry that I am not a big help so far 😞 Ah you’re right, the command I gave you is wrong, there should be no / before homeassitant. Thank you for your help, I appreciate it, there is no need to apologise these things often take time to work out the teething issues and by helping me test you are being very helpful. Quote Link to comment
ph0b0s101 Posted February 8, 2021 Share Posted February 8, 2021 12 minutes ago, ElectricBrainUK said: Ah you’re right, the command I gave you is wrong, there should be no / before homeassitant. Thank you for your help, I appreciate it, there is no need to apologise these things often take time to work out the teething issues and by helping me test you are being very helpful. Hm it still seems that no command will reach the unraid server. Quote Link to comment
ElectricBrainUK Posted February 8, 2021 Author Share Posted February 8, 2021 16 minutes ago, ph0b0s101 said: Hm it still seems that no command will reach the unraid server. Ah yeah there was a bug, I’ve pushed a fix if you could try again that would be great Quote Link to comment
Recommended Posts
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.