Message but no image via pushover

Hey there,

I’m trying to transfer the image of the Pi Camera to my tablet via Pushover. I receive a message but no image. Here is my method:
I created this item:
Switch PiCam_Snapshot “PiCam Snapshot” {http=">[ON:GET:http://192.168.188.131:8051/0/action/snapshot]",expire=“10s,command=OFF”

After that i ceated the following rule:
var Timer CamFrontDoorbellSnapshotDelay = null

rule “Snapshot machen”
when
Item TFkontakt_optisch changed from CLOSED to OPEN
then
PiCam_Snapshot.sendCommand(ON)
end

rule “Sende Snapshot”
when
Item PiCam_Snapshot changed to ON
then
CamFrontDoorbellSnapshotDelay = createTimer(now.plusSeconds(1)) [ |
sendPushoverMessage(pushoverBuilder(“Besucher”).withAttachment("/var/lib/motion/lastsnap.jpg"))
]
end

Does anybody know, what’s the problem? The path to the file should be correct.

Hi,
Which oh Version?
Maybe this is related to Send Picture via Telegram not working

the latest OH 2.3 version

Does anyboby have any idea or solution? :slight_smile:

Hey,

I have changed the title of your topic, since you wrote “pushbullet” there.
That was one reason for me not to look in here first, since i don’t use pushbullet :slight_smile:

About the problem:

Did you try to add

.withContentType("image/jpg")

(Just a quick shot.)

I can try to test it later at home with an image too.
Also it would be interesting to know if there are any logs which state an error.
And i am wondering if the path could be the reason.

Oh, thank you very much! :slight_smile:

Should i type this instead of .withAttachment or behind?

Thanks for your effort!

See Basic examples here: https://www.openhab.org/addons/actions/pushover/#actions
So behind of withAttachment.

Maybe Pushover recognizes that theres a picture attached then.

If you still have this problem I would play around with the 1 second timer - you might not be giving enough time to your Pi to take the picture and save it down before trying to send it to pushover.

Yetkin