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.
Storage Snapshot Camera
MarcelTimmermans
Member
in Developers
Hi,
I am busy with an app connecting to my Dahua Camera. I am building the functions I need and one of them is snapshot. Can I store (temporary) store a file (the snapshot image) and then email to my account and delete the snapshot again?
I am busy with an app connecting to my Dahua Camera. I am building the functions I need and one of them is snapshot. Can I store (temporary) store a file (the snapshot image) and then email to my account and delete the snapshot again?
Comments
/userdata/`
is writable for your app (source).You can (probably) use a module like `nodemailer` to e-mail the photo somewhere. If you hook things up properly, you may not even need to store the file locally: `nodemailer` can use streams for attachments, and I assume that the snapshot data is downloaded through a stream as well.
There is an "Image token" function built into Homey: https://developer.athom.com/docs/apps/Image.html
This is a place where you can store the image, which is compatible with other apps. I use this with the ImageGrabber app, for example, and other apps use it as well (I think the Ring.com doorbell app, for example).
There are already a few apps that have support for the Homey image tokens, for example:
- Telegram
- Email.sender
Users will have to install that app but can then drag the image token into it. This means you won't have to do the email functionality, but can just instruct your users to install the Email.sender app. Or the Telegram app if they want to send it to their Telegram account.