IndigoDomotics / indigo-pushover

Indigo plugin to send push notifications via Pushover.
MIT License
17 stars 11 forks source link

Image support #16

Closed yamanote1138 closed 6 years ago

yamanote1138 commented 6 years ago

now that pushover's API supports images, the plugin should probably provide a hook for that. https://updates.pushover.net/post/170043375237/pushing-images-with-pushover-30

a simple use case would be sending push notification with image from security camera when motion is detected or door sensor is tripped.

also may be worth looking to see if there is any refactoring or other enhancements that could/should be implemented to coincide with 3.0 api release.

indigodomo commented 6 years ago

Sorry, I missed the changes you submitted in December. Then promptly realized the version number got reverted to lower than the current 1.2 release. I fixed that as well so the tips now have 1.2.1 as the version number (though since there were no functional changes I didn't create a new release). Feel free to submit any patches using the 1.2.1 version in tact and when done we'll just do an official 1.2.1 release.

yamanote1138 commented 6 years ago

been looking over some of the v7 goodies (mainly pub/sub and plugin action return values)

I am intimately familiar with the indigo-foscam plugin and am already using said plugin to post photos to my tumblr blog when my doorbell is rung.

There is a 'snap' function in the current version of the foscam plugin which uses a bit of a cheat to accomplish the aforementioned. It just saves the latest snapshot from the cam to a hard-coded path, /tmp/snap.jpg. Not particularly elegant, but it worked for what I wanted it to do.

However, it would seem that it really should be saving that snap with a meaningful (and unique) filename and then passing that path onto the next action...

It is at that point, I would think it'd make sense for the pushover plugin to receive that img path and then execute a 'sendPushWithImg' action.

So, in my particular setup, I have a TriggerLinc which is wired up to my doorbell which then executes an action group when someone rings the doorbell.

Ideally, I'd like that action group to look something like:

I'm totally open to suggestions or contributions. Hoping to have more playtime to try a rough pass at this soon :)

All the plugins I've contributed have been born from a relatively simplistic use-case. I love the idea of revisiting them from a more modular and interoperable viewpoint.

haavardNO commented 6 years ago

I have been waiting for image support in pushover since rich notifications was released. I cant help much with the programming, but I would be happy to help with the testing.

mlamoure commented 6 years ago

Hello, I've implemented the additions needed for attaching images. You can give a full path to the image, or use a variable to specify the path. I'm going to contact Jay to accept my pull request.

haavardNO commented 6 years ago

Excellent!

FlyingDiver commented 6 years ago

Released in version 1.4.0. Still working on getting the store entry updated.