ajnart / homarr

Customizable browser's home page to interact with your homeserver's Docker containers (e.g. Sonarr/Radarr)
https://homarr.dev
MIT License
6.09k stars 279 forks source link

Have an offline/online status indicator for each service #78

Closed mario-campos closed 2 years ago

mario-campos commented 2 years ago

Description

My use-case is that some services may be deliberately offline as part of a WoL host. But I can also see this being used as a general "is it down?" status indicator.

Bonus points: it would be nice for some services to be marked as "WoL service" such that if it is indicated to be offline, Homarr can bring it online by sending the WoL magic packet.

Priority

Low (Nice-to-have)

c00ldude1oo commented 2 years ago

Also, maybe have it, so this can be a togglable setting in the setup/settings of the service.

SmartPhoneLover commented 2 years ago

I would also like to have such feature added. Maybe something like a small dot in a corner of every card?

Or maybe, add an option to customize the colors of them.

94579286 copia

ajnart commented 2 years ago

I would also like to have such feature added. Maybe something like a small dot in a corner of every card? 94579286 copia

First, I love you ❤️ . This image is so clear and really helps me out a LOT. Secondly, I'm going to work on it asap its a good suggestion, and I've had multiple people ask me for it

ajnart commented 2 years ago

chrome_nwVoIB5J6Z Done ! 🚀 Feel free to test with NextJS or with the Docker image tagged after the PR to make returns

(in the GIF, portainer goes from green to red. This is because while testing React.strictmode() renders the components 2 times, so it pinged portainer 2 times fast and second one got rejected)

kopf commented 1 year ago

Hi @ajnart , the ability to not just monitor the on/off status of devices but to wake them up by sending a WoL packet was mentioned in the original issue. I skimmed the commit 2896423 and it didn't look like it was implemented - but I might be wrong as I'm not a typescript guy. Are there any plans on this / is it possible to do from typescript?

ajnart commented 1 year ago

Hi @ajnart , the ability to not just monitor the on/off status of devices but to wake them up by sending a WoL packet was mentioned in the original issue. I skimmed the commit 2896423 and it didn't look like it was implemented - but I might be wrong as I'm not a typescript guy. Are there any plans on this / is it possible to do from typescript?

Hello. This feature is not currently planned as you can already start / stop docker containers within homarr, also I don't think a lot of people are using WOL so it might be a waste of time for us to look into that

kopf commented 1 year ago

@ajnart - aha, I understand. I have a different use-case (running homarr on my router, where it's always accessible, and turning off my server when it's not in use but needing to be able to turn it back on remotely). I'll create an issue some point in the future and we can gauge interest then, I guess.

Thanks for your work on homarr, it looks great!

SmartPhoneLover commented 1 year ago

Hi @ajnart , the ability to not just monitor the on/off status of devices but to wake them up by sending a WoL packet was mentioned in the original issue. I skimmed the commit 2896423 and it didn't look like it was implemented - but I might be wrong as I'm not a typescript guy. Are there any plans on this / is it possible to do from typescript?

I suggest the following solutions:

kopf commented 1 year ago

Hi @ajnart , the ability to not just monitor the on/off status of devices but to wake them up by sending a WoL packet was mentioned in the original issue. I skimmed the commit 2896423 and it didn't look like it was implemented - but I might be wrong as I'm not a typescript guy. Are there any plans on this / is it possible to do from typescript?

I suggest the following solutions:

  • Install a separate docker container for this (ex0nuss/remote-wake-sleep-on-lan-docker), and add it as another app within Homarr.
  • Depending on your router, you could enable WoL feature, if available. For example in my Mikrotik, there's an option to wake devices from it, also I can create a small script in the router itself to interact with it.
  • If you use Home Assistant in another server, you could create a flow in NodRED to accomplish that. But it would be better for automations.
  • If you have a Rpi you can install 'etherwake' and wake up your devices by this way (ssh connection).
  • With an Android app called 'Tasker' you could build a small project (or just a tasks to be called as a widget from your launcher) to do that. I have built long time ago a project on this app, but this works with its plugins. But you could use an app called Termux to install the package from the previous point. This is my project: WoL Project (example).

Thanks for the suggestions! I'd considered simply enabling a WoL function on my router's http UI, but I need something that would be easy for non-tech people to use, which is why I asked here. Your first and last suggestions sound good, I'll look into them. Thanks again!

manuel-rw commented 1 year ago

We are planning to make a Home Assistant integration. Using that, you could create any automation for WOL. But until then, you'll have to use a different solution

SchnitzelPommes commented 9 months ago

I had the same Idea to Wake My Fileserver via homarr running on my other server and i found a working solution which may be usefull for some ppl here also this method could be build on verry easy i did not do it maybe someone else can or maybe even put it into homarr directly. Credits to Ryan Steffer since he basicly provided all the infos.

Requirements :

Install the wakeonlan packgage i.e. sudo apt-get install wakeonlan on the Webserver create a php file on the webserver with the content :

<?php
    $mac = '11:11:22:A4:FE:2E';

    exec("wakeonlan $mac");
    echo "<script>window.close();</script>";
?>

Change the $mac Variable to ur mac Adress.

In Homarr create an App link to the just created file and done.

As mentioned creating a integration for this would be nice to have also it should be possible to integrate it completly into homarr itslef.

as is its not a clean way but it works for my usecase.

Edit : It should be clear to everyone but Note that this is in No way secure and should Not Be used in amy production Type Server at least make the PHP Script only acessable via LAN !