Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Determine Camera Based on Email Subject #96

Open
erwinloh opened this issue Jan 18, 2021 · 25 comments
Open

Determine Camera Based on Email Subject #96

erwinloh opened this issue Jan 18, 2021 · 25 comments
Labels
enhancement New feature or request long running

Comments

@erwinloh
Copy link

erwinloh commented Jan 18, 2021

Hi, I have 2 cameras from the same server - but you can only name 1 camera - how do I set it up for 2 cameras?

Thanks!

@Sunoo
Copy link
Owner

Sunoo commented Jan 18, 2021

Do you have notifications enabled in the home app?

@erwinloh
Copy link
Author

@Sunoo Ok I worked it out, all working now for that Frontyard camera!

The only question is how do I get 2 cameras working? Both cameras are sending notifications to the 1 camera as I can only have 1 email address.

@erwinloh erwinloh changed the title Email is being sent and it's received but no notification received in Home app? How to get 2 cameras working with only 1 email address? Jan 18, 2021
@Sunoo
Copy link
Owner

Sunoo commented Jan 18, 2021

Hmm... not sure how to handle that, it was kinda written around the idea of unique emails per camera. Can you control anything per camera? I could potentially add an option to check the subject?

@erwinloh
Copy link
Author

It's fine, I can set two emails at once, so 1 camera motion will just notify both cameras in Home - I tested it and it works - I'll just have to check to see which one in Home. Not sure how else we can work around this.

@Sunoo
Copy link
Owner

Sunoo commented Jan 18, 2021

Can you share a screenshot of whatever options you have in your email setup? Maybe I can figure something out.

@erwinloh
Copy link
Author

Here:

image

@Sunoo
Copy link
Owner

Sunoo commented Jan 18, 2021

Oh, yea... that’s not a lot of options. Not sure what I can do there unfortunately.

@erwinloh
Copy link
Author

It's fine - at least I can send 1 notification to both cameras!

@erwinloh
Copy link
Author

@Sunoo I analysed the contents of the emails, and they are different from each camera.

Are you able to add a new field that is a keyword in the Subject of the email, and use that to decide which camera is being triggered, instead of the email address?

For example, with my two cameras, the subject includes the term "Channel A1" or "Channel A2" depending on the camera. They both go to the same email address.

@Sunoo
Copy link
Owner

Sunoo commented Jan 22, 2021

Could you share what the emails look like? I could probably find a way to support them.

@erwinloh
Copy link
Author

Screen Shot 2021-01-22 at 4 28 57 pm

@Sunoo
Copy link
Owner

Sunoo commented Jan 22, 2021

I should be able to support that, will try to work on it this weekend if I’ve got some time.

@Sunoo Sunoo added the enhancement New feature or request label Jan 22, 2021
@Sunoo Sunoo changed the title How to get 2 cameras working with only 1 email address? Determine Camera Based on Email Subject Jan 22, 2021
@erwinloh
Copy link
Author

Thanks! That would be great - this means you can support multiple devices off the same email address, by redirecting the email to different devices based on the subject.

@Sunoo
Copy link
Owner

Sunoo commented Jan 22, 2021

Yea, just want to determine a clean way to support it. I have some ideas, but I’ll need to test them.

@erwinloh
Copy link
Author

Thanks. In fact, once you've added this, I intend to also use it to allow my security alarm system, which can send an email to let me know when it's armed or disarmed, to send the email to your plugin, and I'm going to create "fake sensors" in home, that will trigger notifications to say that Alarm On has motion, and Alarm Off has motion. At least that's the theory...

@erwinloh
Copy link
Author

Basically, using your plugin to trigger notifications in Home for other devices that can send SMTP emails.

@Tomcraft1980
Copy link

I give this +1
Your plugin is the only one working so far. This would really be a great enhancement as owners of NVRs only can setup one email address on the NVR for all cameras.
I did not get the following plugins to work but both of them support parsing the mail for keywords:
https://github.com/rpruden/smtp2http
https://github.com/SphtKr/homebridge-smtpsensor
Maybe you can use some ideas from these plugins to enhance your nicely working plugin. ;-)

Emails from the Reolink NVR look like this:

Bildschirmfoto 2021-02-15 um 23 57 34

@Sunoo
Copy link
Owner

Sunoo commented Feb 15, 2021

I have an idea for how to implement this. I have a version that should be coming in the next few days. This should be in the version after that, hopefully not too much later.

@Tomcraft1980
Copy link

lol... that reply was fast! ;-)
Awesome news! Can't wait to test the new plugin version.
Thanks in advance!

@erwinloh
Copy link
Author

Thanks in advance too!

@Tomcraft1980
Copy link

Did you get any further on this topic? I'm so excited to test the new feature.

@Sunoo
Copy link
Owner

Sunoo commented Apr 14, 2021

I’m in the middle of a move, so that’s kinda cut in the my ability to write code. I have the feature maybe 70% complete, but at this point I can’t work on it at all for the next maybe two weeks.

@Tomcraft1980
Copy link

Thanks for the quick update.
I wish you a hopefully relaxed move.

@beezkneezdeez
Copy link

Hey! thought I would checkin on this, it would surely help a tremendous amount of people :)

@soxrok2212
Copy link

Hi @Sunoo, any update on this feature? I have an NVR with multiple cameras linked up, but can only get an e-mail from one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request long running
Projects
None yet
Development

No branches or pull requests

5 participants