This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
Homey Image Grabber app
I just created an "Image Grabber" for Homey. You can input the URL of an image file to this app inside a Homey flow, and then it will grab it and convert it to an "image token" that you can use to send the image data to the Telegram app.
That's all it does, although in the future more apps could be made compatible with this type of imaging.
It's quite cool, I use the snapshot URL of my IP cam (http://<IP>/img/snapshot.cgi for my IP cam, not every cam supports this or uses the same) to post images of the IP cam to Telegram using Homey.
It is posted at https://github.com/jordenc/image.grabber and submitted for approval to the Athom appstore (not yet available there).
That's all it does, although in the future more apps could be made compatible with this type of imaging.
It's quite cool, I use the snapshot URL of my IP cam (http://<IP>/img/snapshot.cgi for my IP cam, not every cam supports this or uses the same) to post images of the IP cam to Telegram using Homey.
It is posted at https://github.com/jordenc/image.grabber and submitted for approval to the Athom appstore (not yet available there).
Comments
Can you make a screenshot from your flows?
And this is the 2nd flow. Sent the pic to Telegram bot:
I See that you have a card with "stuur een afbeelding" from the App telegram. I have installed the latest version from telegram and use it for some time now, but i have only the card " stuur een bericht". Am i something missing here, besides the card "stuur een afbeelding"
@glijie
Download latest telegram app from github
PS: Selected the "telegram app" because image grabber is not there to select yet.
Only thing I found was that it doesn't work with HTTPS with my Foscam, HTTP works fine.
Something you can look into / add?
I can probably work around it by setting a parameter.
So, I guess the problem could be that it doesn't trust the certificate. To be honest, I'm not sure how to check Homey's logs.
I can say that if I run the same command via curl, I need to use the -k / --insecure option to ignore the cert errors.
Made two flows (grab image / send image).
When I use 'send message' for telegram, I get a string as a result (GltZyBzcmM9Ii4uL3NuYXBQaWMvU25hcF8yMDE3MDQxOC0xMDA5NDguanBnIi8 PC9ib2R5PjwvaHRtbD4=)
When I use 'send image', I don't get anything at all...
I use the same cgi-url as Roco posted (and the url works in IE), so I guess that should be OK.
Any ideas?
Is it a http:// or https:// URL?
It's http.
When I test-run the grabbing flow manually, I get a green checkmark on the card. But not when I run the send flow.
Very strange...
Does the URL provided only have an image, or is a HTML page that loads the image? (If you open it in your browser, is there a "view source" button or is it only the image?)
I have submitted version 0.0.2 to the app store which does not check for valid certificates on https URL's. @Veldkornet (not yet approved)
Does your image grabber store the file somewhere in Homey's storage?
It seems to be okay looking at that URL. But it also seems that the URL is generated "on the fly", probably by loading a snapshot.cgi (or something similar). The image grabber will only work with the direct URL to the .jpg file, not with the snapshot.cgi (unless the snapshot.cgi outputs the image and nothing but than the image).
(I am using snapshot.cgi because that's the name of the function on my cam, it is probably called differently on your cam).
I'll check with Roco how he got it working
So if you have a Foscam and use this url: /cgi-bin/CGIProxy.fcgi?cmd=snapPicture&usr=admin&pwd
Make sure you type it exactly as shown here or it won't work.
[edit]
Also, there are 2 url's available, snapPicture and snapPicture2. You have to use snapPicture2, this one returns a jpeg, the other an html-page which won't work.
Is it possible to add the ability to send the image to a channel so multiple users can see it?