telegram.sh to post an PNG image from axis camera to telegram.
Code: Select all
convert http://192.168.10.106/axis-cgi/jpg/image.cgi image.jpg
curl -s -X POST "https://api.telegram.org/bot<MyCode>/sendPhoto" -F chat_id=<Mycahtid> -F photo="@/home/pi/domoticz/scripts/image.jpg"
imagetv.sh to post an image from axis camera with some tekst to my philips tv
Code: Select all
convert http://192.168.10.106/axis-cgi/jpg/image.cgi imageplaatje.png
/opt/JSTx/JSTx -F /opt/JSTx/font/decker.ttf -s 100 -x 60 -y 40 -i image:imageplaatje.png -x 600 -y 200 -t "$*" t -T 5 -b "100,100,100,128" -f "255,127,0,255" --dfb:quiet --remote=192.168.10.200./
Code: Select all
convert http://192.168.10.106/axis-cgi/jpg/image.cgi image.jpg
+ convert http://192.168.10.106/axis-cgi/jpg/image.cgi $'image.jpg\r'
curl -s -X POST "https://api.telegram.org/bot<MyCode>/sendPhoto" -F chat_id=<Mycahtid> -F photo="@/home/pi/domoticz/scripts/image.jpg"
+ curl -s -X POST https://api.telegram.org/bot<MyCode>/sendPhoto -F chat_id=<Mycahtid> -F photo=@/home/pi/domoticz/scripts/image.jpg
The second script is working ok.
Code: Select all
convert http://192.168.10.106/axis-cgi/jpg/image.cgi imageplaatje.png
+ convert http://192.168.10.106/axis-cgi/jpg/image.cgi imageplaatje.png
/opt/JSTx/JSTx -F /opt/JSTx/font/decker.ttf -s 100 -x 60 -y 40 -i image:imageplaatje.png -x 600 -y 200 -t "$*" t -T 5 -b "100,100,100,128" -f "255,127,0,255" --dfb:quiet --remote=192.168.10.200./
My Problem 2; I would like to use http://user:[email protected]/axis-cgi/jpg/image.cgi to fetch the image.(or something else to use user password) now i have to turn of security for the live vieuw in the axis camera.
My problem 3l I thik its also posible to use a url in the telegram curl. Instead of a lokal file, so i dont need to use the covert script, telegram can use JPG images.
Any sugestions?
Thanks!