Send pic Telegram

From externally one can send so the picture by Telegram

sendTelegramPhoto(“Openhabbot”,“”,null, “admin”, “pass”)

How is the code when I have the image in the tmp directory of Raspi /tmp/1.jpg?

if I try file: ///tmp/pic.jpg I get error message Invalid base64 image provided.

check the last examples on:

You can try another “trick” also: place the image in $OPENHAB_CONF/html and call it with a URL: http://localhost:8080/static/<image.jpg>

why not re-use the 2 year old thread? :slight_smile:


Alternatively, if on Linux you can create a symbolic link in $OPENHAB_CONF/html to the local directory where your images are stored. Having a symbolic link is especially useful if you have large images, or a lot of images, because it will keep your openHAB backups small. Well, maybe not small, but definitely smaller than they would be by putting the images in $OPENHAB_CONF/html. :wink:

1 Like

how does it work ?

Nobody paid attention at that time.and now I’ll try that again with Openhab 2 :slightly_smiling_face:
Thank you very much I will test and report.

1 Like

let’s say you have a subfolder in /tmp/something/ with all your image files (e.g. hot.png)
you can create a symbolic link to that subfolder within $OPENHAB_CONF/html/ in order to avoid copying the image files to that destination

the command would look like this:

ln -s /tmp/something/ /etc/openhab2/html/

This will create the “virtual” subfolder /etc/openhab2/html/something/

then, you can call the files with:


What he said above. :smile:

1 Like

Everything works very well. Thanks to all

1 Like