Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » Mail Binding or IO for new rule engine(Using mails as trigger)
Mail Binding or IO for new rule engine [message #1713901] Sat, 07 November 2015 19:01 Go to next message
Smart Home is currently offline Smart HomeFriend
Messages: 109
Registered: February 2015
Senior Member
I want to be able to listen to incoming mails and trigger a rule based on criteria (== condition).

I don't know what is the right approach to add this capability:

1. Add binding with Mail thing that will send event on incoming mails (StringType or new type for mail?). This way triggers will be based on item event.

2. Define the functionality in IO package and add triggers which will use listener to capture incoming mails.

What is the preferred option? Is there a third option?

Re: Mail Binding or IO for new rule engine [message #1714150 is a reply to message #1713901] Tue, 10 November 2015 10:12 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
I think this is a perfect example of what an extension for the new rule engine should look like.
We will still have to define the namespace and structure of such extensions, but it could be something like a bundle org.eclipse.smarthome.automation.module.mail, which then contains module types like a "mail trigger" and a "mail action".
This would be the successor of "action" bundles from openHAB 1 (like https://github.com/openhab/openhab/wiki/Actions#mail-actions).

Regards,
Kai
Re: Mail Binding or IO for new rule engine [message #1714158 is a reply to message #1714150] Tue, 10 November 2015 10:57 Go to previous messageGo to next message
Smart Home is currently offline Smart HomeFriend
Messages: 109
Registered: February 2015
Senior Member
Kai,

If I understand your suggestion, your suggest to go with option 2 which means that all the receive logic will be inside the module (and will not be exposed as a "thing").

In OpenHAB 1 there is a MailControl binding and this is why I raised also the option to have Mail Thing.

Am I right?
Re: Mail Binding or IO for new rule engine [message #1714160 is a reply to message #1714158] Tue, 10 November 2015 11:06 Go to previous message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
Yes, there is definitely no straight line between automation modules and bindings and it will depend on the concrete functionality. The MailControl binding is rather an edge case as it allows controlling/updating items based on the content of e-mail messages - this is imho not a regular usecase.

You would mainly want to use mail related stuff in your rules (like sending them (with configurable content) and checking for new mails (with certain filters), both perfect use cases for module types, where you do not need items.
Previous Topic:How to get all handlers for certain thingtype
Next Topic:channel automaticaly create
Goto Forum:
  


Current Time: Thu Apr 18 05:32:27 GMT 2024

Powered by FUDForum. Page generated in 0.03000 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top