Thanks for the info.
The image cannot be shown in the app because the camera is not integrated there and also, the related plugin is a work in progress.
I can think of the following solution:
- Create a WebHook SmartApp using the SmartApp SDK
b. This tutorial of a Simple SmartApp can help you to understand this type of integration:
- Define a config input for the contact sensor and the subscription should correspond to the open event. Eg.
//Entry for the config page
page.section('sensors', section => {
section.deviceSetting('sensor').capabilities(['contactSensor']).required(true);
});
//Subscription to the "open" event
context.api.subscriptions.subscribeToDevices(context.config.sensor, 'contactSensor', 'contact.open', 'openDeviceEventHandler')
- As this is NodeJS, you can include some libraries to send an email from there.
a. I think Nodemailer could be helpful (I was able to send an email with this tool)
b. If you’ll use Gmail, you can add an app password in your account to improve security in the authorization.
c. You would have to check how to include attachments in the email but I read it’s possible.