Uptime-kuma to home-assistant

Congrats! I like keeping things out of HA as well in terms of automation and logic. Glad to hear you got it working.

Is it possible to install this a custom component while we wait for it to be merged into core?

2 Likes

I suppose it would be possible to add it to HACS until it gets merged in. This would require some additional work (I’m not sure how much). If someone wants to submit a pull request on my repository, I’d be glad to take a look at it and merge it in so we can use it via HACS. It’s becoming a bit discouraging seeing how long it takes to get things merged into core…

2 Likes

Hey @rjchu, do you mind sharing your Apprise MQTT URL? been trying to get this working but it keeps giving an error every time I tried to test it.

URL I’m trying to use =
apprise -vvv -b mqtt://mqtt_username:[email protected]:1883/uptime_kuma

I can check when I get back in front of a computer but from memory it wasn’t nearly as complete as you’re listing. Have you tried it with just MQTT://your details here ? I’m pretty sure that’s all I had to do but I’ll check.

Do you mean without ā€œapprise -vvv -bā€? doesn’t work

I was following the guide below.

[Syntax](https://github.com/caronc/apprise/wiki/Notify_mqtt#syntax)
Valid syntax is as follows:

mqtt://{user}:{password}@{host}:{port}/{topic}

I even tried as below

[Example](https://github.com/caronc/apprise/wiki/Notify_mqtt#example)
# Assuming we're just running an MQTT Server locally on your box
# Assuming we want to post our message to the topic: `my/topic`
apprise -vvv -b "whatever-payload-want" "mqtt://localhost/my/topic"

Here’s what mine looks like…

Tried that as well, still error’s out.

Just came across the following in the logs.

Error: 2022-02-10 04:15:35,993 - ERROR - mqtt:// is disabled on this system.
2022-02-10 04:15:35,994 - ERROR - You must specify at least one server URL or populated configuration file.
Usage:  [OPTIONS] SERVER_URL [SERVER_URL2 [SERVER_URL3]]

That’s odd. I didn’t do anything special to enable it. I’m running Kuma 1.10.0 and like I said in an earlier reply to someone else I’m running Kuma installed on a vm NOT in Docker. I did have to install the packages paho-mqtt and mosquito-clients as well alongside with Kuma. Perhaps that’s the piece you’re missing?

:+1: Yep, it’s outlined here, but still doesn’t work, also some discussion here.

Did you install mosquito too on the same box as Kuma? Don’t start it but maybe just install it in case there’s some dependency missing that isn’t in the mosquitto-client package.

I did both

pip3 install --no-cache-dir paho-mqtt
pip3 install paho-mqtt

There seem to be some discussions of a known issue running in docker in the uptime kuma issues section on github.

I’m saying to try installing mosquito and mosquito-client and see if that fixes things. Your post shows paho-mqtt twice.

My mistake, I did try as you specified with same results.

I have having the same issue. Running HA , eclipse-mosquitto, and uptime-kuma same docker host.

Error: 2022-02-11 09:55:09,833 - ERROR - mqtt:// is disabled on this system.
2022-02-11 09:55:09,833 - ERROR - You must specify at least one server URL or populated configuration file.
Usage:  [OPTIONS] SERVER_URL [SERVER_URL2 [SERVER_URL3]]
  Send a notification to all of the specified servers identified by their
  URLs the content provided within the title, body and notification-type.
  For a list of all of the supported services and information on how to use
  them, check out at https://github.com/caronc/apprise
Options:
  -b, --body TEXT                Specify the message body. If no body is
                                 specified then content is read from <stdin>.
  -t, --title TEXT               Specify the message title. This field is
                                 complete optional.
  -c, --config CONFIG_URL        Specify one or more configuration locations.
  -a, --attach ATTACHMENT_URL    Specify one or more attachment.
  -n, --notification-type TYPE   Specify the message type (default=info).
                                 Possible values are "info", "success",
                                 "warning", and "failure".
  -i, --input-format FORMAT      Specify the message input format
                                 (default=text). Possible values are "text",
                                 "html", and "markdown".
  -T, --theme THEME              Specify the default theme.
  -g, --tag TAG                  Specify one or more tags to filter which
                                 services to notify. Use multiple --tag (-g)
                                 entries to "OR" the tags together and comma
                                 separated to "AND" them. If no tags are
                                 specified then all services are notified.
  -Da, --disable-async           Send all notifications sequentially
  -d, --dry-run                  Perform a trial run but only prints the
                                 notification services to-be triggered to
                                 stdout. Notifications are never sent using
                                 this mode.
  -l, --details                  Prints details about the current services
                                 supported by Apprise.
  -R, --recursion-depth INTEGER  The number of recursive import entries that
                                 can be loaded from within Apprise
                                 configuration. By default this is set to 1.
  -v, --verbose                  Makes the operation more talkative. Use
                                 multiple v to increase the verbosity. I.e.:
                                 -vvvv
  -e, --interpret-escapes        Enable interpretation of backslash escapes
  -D, --debug                    Debug mode
  -V, --version                  Display the apprise version and exit.
  --help                         Show this message and exit.
    at Apprise.send (/app/server/notification-providers/apprise.js:19:19)
    at Function.send (/app/server/notification.js:94:57)
    at Socket.<anonymous> (/app/server/server.js:1047:46)
    at Socket.emit (events.js:400:28)
    at Socket.emitUntyped (/app/node_modules/socket.io/dist/typed-events.js:69:22)
    at /app/node_modules/socket.io/dist/socket.js:466:39

Hey i converted your integration into a HACS compatible one, it installs and can set it up, but once it does its thing no services / entities is listed under the integration

So if you like, i can transfer the repo to you and you can look into the code, let me know

2 Likes

Cool, thanks for your work on this. I’d be willing to take a look for sure. At this point I’m wondering if it will ever be looked at for an official integration.

I just took another look at your custom integration and it looks like it’s creating entities but it’s not listing them on the integrations page.

If you search in developer tips for
ā€˜binary_sensor.<your_uptimekuma_monitor>ā€˜ you should find them.

You are right, i found them in the dev tools, which is good,

I have transfered the repo to you, think you just have to accept it.

1 Like