Help Email Openhab with picture with Samsung Cam

It all worked great and so did

var  Cam = "pic" +".jpg"
executeCommandLine("wget http://user:pass@selfhost.eu:58081/cgi-bin/video.cgi?msubmenu=jpg -O /tmp/" + Cam",5")
Thread::sleep(1000)
sendMail("openhab@gmail.com","Besucher","Besucher hat um "+now.toString("HH:mm:ss")+" geklingelt","file:///tmp/"+Cam)

The update from Samsung, http access is no longer just RTSP stream
That looks so

 rtsp://user:pass@192.168.178.129/profile5/media.smp

But this is not supported by Openhab
Who could help me with the implementation
Rtsp stream as image in the open and save it

Your can use ffmpeg to get a image from your web cam :

ffmpeg -i rtsp://user:pass@192.168.178.129/profile5/media.smp -s 640x360 -f image2 -vframes 1 pic.jpg -y

How do you think that? How should I write this in the rules?I’m still a beginner

Same as your code. Using the call to the command line.

Do you mean that??

var  Cam = "pic" +".jpg"
executeCommandLine("ffmpeg -i rtsp://user:pass@192.168.178.129/profile5/media.smp -s 640x360 -f image2 -vframes 1 pic.jpg -y /tmp/" + Cam",5")
Thread::sleep(1000)
sendMail("openhab@gmail.com","Besucher","Besucher hat um "+now.toString("HH:mm:ss")+" geklingelt","file:///tmp/"+Cam)

yep

pi@raspberrypi:~ $ ffmpeg
-bash: ffmpeg: Kommando nicht gefunden.
pi@raspberrypi:~ $ ?

I still have something to install??

yes. the whole “ffmpeg” application.

maybe this would help :

Thank you. I will now test :blush:

@AV_HomeAuto

executeCommandLine("ffmpeg -i rtsp://admin:pass@192.168.178.128/profile5/media.smp -s 480x300 -f image2 -vframes 1 pic.jpg -y /tmp/1.jpg")
Thread::sleep(1000)
sendMail("openhab@gmail.com","Besucher","Besucher hat um "+now.toString("HH:mm:ss")+" geklingelt","file:///tmp/1.jpg")

executeCommandLine("ffmpeg -i rtsp://192.168.178.124/ch0_0.h264 -s 480x300 -f image2 -vframes 1 pic.jpg -y /tmp/3.jpg")
Thread::sleep(1000)
sendMail("openhab@gmail.com","Besucher1","Besucher1 hat um "+now.toString("HH:mm:ss")+" geklingelt","file:///tmp/3.jpg")

This works!!!:grinning: thank you !!!

1 Like