Pushover action

I have tried using the new Pushover action to send a HTML-formatted notication to my iPhone.
And the notification is received. But the HTML/image is not displayed on the phone.

Perhaps it is an error with the Pushover app on the iPhone.

But I would like hear if other had run into the same issue?

Here is the simple HTML if anyone would like to test.

<!DOCTYPE html>
<html>
<body><img src="https://www.w3schools.com/html/img_chania.jpg" alt="Flowers in Chania" width="460" height="345">
</body>
</html>

Sidenote
@peternlewis Is the API keys automatically removed when sharing af macro with the Pushover action?

I have just tested with HTML containing only text.
This works for me:

But what I would like to create is a macro, which snaps a picture everytime my user logs in and sends a Pushover notification with the image attached.

I went to the Pushover.Net website and used their local search engine and found several posts of people complaining that the Pushover service does not support images.

However, I can't guarantee that there's no way to do it. I can only say that I saw people complaining about it. This service is very new to me and I've spent only an hour testing it so far.

Once your data is sent to Pushover.NET, there's nothing that the KM Engine can do anymore.

1 Like

There's a plugin action that has the ability to include images.

I believe Pushover has a way of including an image, but I have not implemented that in the action (yet). It is on the todo list.

2 Likes

Similar to Pushover a PushCut action would be nice. Though I'm sure I can confect such a URL myself.

Thanks @noisneil

I actually have used it before, but would try to stay with a native KM action if possible.

And I can see from @peternlewis’ reply that it is on the todo list.

You might as well use it until Peter gets around to adding the image function. :man_shrugging:t2:

A bird in the hand...

2 Likes

@JimmyHartingtonwenn you can create an image token on the Pushover website and use it in the KM 11 version Pushover notification.

Just like the battery image appears in my example below.

Video

1 Like

@Airy it is probably not possible to embed individual images into the Mac pushover notifications for technical reasons.
However, if you use Pushover's iOS app, you can add it there for the Apple Watch, iPadOS and iOS
Like in the video in the following post:

@peternlewis yes, as seen here in the video:

With the external plugin, it is possible to insert images via the file path and then display them under iOS, iPad OS and WatchOS.
This is a huge advantage, as you would then have to create your own token for each image on the Pushover website.

Would it also be possible to integrate the selection of “Custom Sounds” like in the plugin?

1 Like

@noisneil??
In my video I show a way to use an individual image via the KM 11 pushover notification.
Wasn't that @JimmyHartington's question?

Perhaps I misunderstood. How do you reference/upload the image itself? The plugin has a direct file reference field for images.

1 Like

@noisneil the prerequisite is not to upload an image for the Keyboard Maestro application to the Pushover website.
This makes it possible to display individual images/icon in the KM 11 pushover notifications or the external pushover plugin.

Then create your own API token for the desired image on the website and insert it into the KM 11 pushover notification.

2023_10_27_Support_1

Please excuse me, I just read @JimmyHartington's 2nd post. You're right, this is probably only possible with the external Pushover plugin.

1 Like

I confess I'm struggling to follow some of this thread, but I may have a different approach that could work. Instead of using a link to an image, why not encode the image directly into the HTML, like the following. Note that there's a command in macOS called "base64" which can convert your image file into the text representation below. The entire string could probably be assembled in a single KM action, which you could then pass to the Pushover action in a single variable. Sounds a lot simpler than what I'm reading in this thread.

<img src="data:image/gif;base64,R0lGODlhDwAPAKECAAAAzMzM/////
wAAACwAAAAADwAPAAACIISPeQHsrZ5ModrLlN48CXF8m2iQ3YmmKqVlRtW4ML
wWACH+H09wdGltaXplZCBieSBVbGVhZCBTbWFydFNhdmVyIQAAOw=="
alt="Base64 encoded image" width="150" height="150"/>

EDIT: I just tried it, with HTML code, and both macOS and iOS say "No Message" unless I add additional text to the message, in which case the text appears but the image does not. So both of Apple's OS's are not interpreting this image code. I really had no idea if it would work or not. If this doesn't work, and nobody can tell me what I'm doing wrong, then I can't understand why an external image would work.

P.S. I have no idea what's in the image above, it was just an example base64 image from one of those technical websites explaining how to insert images into HTML code. Hopefully it's just a smiley face.

It's a 15x15 icon:

image

Noted.

Thanks for all the replies.

I did try the method with Base64 encoding an image. Did not work as well.

Until the new Pushover Action supports images I will activate my old macro.
See below.

Send loginimage to Pushover Macro (v11.0)

Send loginimage to Pushover.kmmacros (4.1 KB)

There might be a way for the KM Pushover action to support images, but the fact that the Pushover.Net service does not support the base64 encoded images means that that's a Pushover.Net problem, because nothing the KM engine can do can fix that particular issue. Once any message is sent to the Pushover.Net server, KM has no further involvement.