Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppDaemon Health Sensor in Home Assistant. #739

Open
jeroenvdwaal opened this issue Sep 29, 2019 · 3 comments
Open

AppDaemon Health Sensor in Home Assistant. #739

jeroenvdwaal opened this issue Sep 29, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@jeroenvdwaal
Copy link

jeroenvdwaal commented Sep 29, 2019

First of all, thank you very much for making AppDeamon

Would it be nice to have AppDeamon 'Health-Sensor' that informs about the health of all configured App's?

So 'Healthy' means that all apps could be loaded and are running without throwing exceptions. 'Not Healthy' means that one or more apps are having troubles.

The Not Healthy status can be used for the developer to start digging in the logs about what is wrong.

One solution is observing the log file to match particular texts. But maybe it is nicer if AppDeamon just submits an event which can be listened for. This happens every time when something goes wrong in any of the running Apps. This event can be used to create the AppDaemon Health-Sensor in HA.

The sensor may help in the following example scenarios:

  • The device name of a sensor is changed, but the AppDaemon script that uses that sensor is not changed.
  • An App is added but the app.yaml configuration is not correct. When the App tries to do operate on the configured items it fails.
  • A callback does not have the right signature.
  • turn_on is called on a non-existing entity
@arnoldpistorius
Copy link

If you could do that, that would be great.

@benleb
Copy link
Contributor

benleb commented Oct 2, 2019

Some kind of an enhanced version of a mixture of https://github.com/benleb/ad-healthcheck and https://github.com/benleb/ad-ench ?

I like (some parts of) the idea, maybe I will implement them sometime... If nobody else did it until then...

@acockburn
Copy link
Member

We already have some of this and a framework to expand it in AD 4.0. Each app has it's own entity with a status value, which is visible form the Admin Interface. We already catch apps that don;t initialize, it wouldn't be too hard to add some additional info, we have already planned some enhancements to what is currently there. A summary sensor or entity would be fairly easy to add, and some enhanced information around errors and overall state of the app would be doable.

@acockburn acockburn added the enhancement New feature or request label Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants