migrated from Bugzilla #434010
status NEW severity enhancement in component Core for ---
Reported in version unspecified on platform All
Assigned to: Project Inbox
On 2014-05-02 11:23:59 -0400, Kai Kreuzer wrote:
It would be nice to have a notification mechanism that can be used throughout the system and where the user can configure, how he wants to receive the notifications (e.g. as push on a smartphone, SMS, email, etc.). Different notification categories and severities could make use of different channels.
This service should also allow to mark notifications as read or to delete them.
On 2015-04-20 05:42:01 -0400, Greg EVA wrote:
Some other ideas that are seen in commercial products:
Predefined notification destinations and methods depending on time of day, day of week, business/non-business hours, holidays.
- this allows fine grained customization and pertinent notification using users and groups which can then be easily managed (manually or automatically)
- groups such as "On Premise Users" or "On Call Maintenance" can then be used to only notify users who are interested or impacted by something
- Groups could also be used to limit distribution of notifications of things like system errors to the people who would deal with them
The methods to use to notify someone depend on severity, as well as if the other attempts to notify someone have failed or not. A severe error should perhaps be sent first to a smartphone UI, and if it is not acknowledged in a certain time be redispatched to an SMS, and eventually be able to be redispatched to someone else if a particular person is not responding.
There should be a way to "Snooze" a notification/alarm so that it will come back later should.... but here I think I am treading between the subjects of alarms and notifications which are obviously closely related.
On 2015-04-20 16:05:52 -0400, karel goderis wrote:
Kai,
this is very much https://github.com/jpmens/mqttwarn which works well with openHAB, but would deserve an full integration into the core
On 2015-04-21 04:04:25 -0400, Kai Kreuzer wrote:
Thanks for the hint, Karel, this is indeed a good source for inspiration and we can try to more closely integrate it.
On 2015-04-21 04:14:17 -0400, Benjamin Cabé wrote:
CC'ing JP Mens from mqttwarn, who might be interested in the discussion :)
On 2015-04-21 04:20:24 -0400, Jan-Piet Mens wrote:
Interested? Sure, Benjamin. :-)
I think Karel has hit the nail on the head in terms of mqttwarn's capabilities (and thank you, Karel). I'm not sure how much integration this would need in Smarthome core (please note: I don't have a clue of its inner workings), but I know many people are using MQTT extensively (some very successfully with mqttwarn) within current openHab with appropriate MQTT updates.
On 2015-04-21 04:26:05 -0400, karel goderis wrote:
Cfr a post in another thread/place, we could image things like NotificationStrategy (similar to Persistence in fact) that are bound to Items, etc.
I use mqqtwarn as well, but it clutters a bit the Rules as you have to explicitly write code to have things notified. Having this tucked away in the core would be nice
On 2015-04-21 04:32:34 -0400, Kai Kreuzer wrote:
Please also note this related discussion: https://www.eclipse.org/forums/index.php/t/1065848/
I think we should split the "general" notification mechanisms and the "alarm rule" definitions - this issue here is only about the notification mechanisms, where MQTT(warn) would be one "sink".
On 2015-04-21 04:57:01 -0400, Ben Jones wrote:
I am going to chime in here (after getting prodded by JP). I am definitely on board with this and agree it is something we need to get right from the start.
I currently use mqttwarn exclusively for all my notifications. Decoupling notifications from my rules was one of the best things I did in terms of simplifying my solution. Now I just have a series of virtual Notify_Xxx items in openHAB, bound to MQTT topics. So to generate a 'trace' notification I simply add Notify_Trace.postUpdate("message") to a rule.
I have various levels of notification which I use through out my rules. Never once having to directly call any particular notification 'channel'.
Then mqttwarn is configured to route the different notifications (via the MQTT topics) to different channels and end points. This has numerous benefits, one being that if say my Gmail password changes, I only have to update one piece of config, rather than every rule. Likewise if I decide that the wife doesn't need to receive Info messages anymore, it is a one line change to the mqttwarn config. Or I can disable all notifications instantly.
But like Karel - I agree this needs to be 'baked' into openHAB/ESH for it to be widely adopted.
On 2015-04-21 11:17:10 -0400, Greg EVA wrote:
I like and agree with the NotificationStrategies approach, but think that it should be possible to have two (or more) notification types for the same trigger. If I understand the idea properly, this would mean that the notification would be defined separately in two different *.notify files, and this could be troublesome to manage as it is the same notification. The UI could tie these together however.
I agree that this should be tied into the core. Certain notifications may need a response, or at least that the core knows that they were received/read. For example perhaps a notification would continue being sent to many people until someone read or responded to it.
On 2015-04-21 11:48:57 -0400, karel goderis wrote:
It would be like the Persistence feature.
Now, with responses to Events we could be a bridge to far, and a straight channel (e.g. using mqtt binding or other) could be a better solution. If a requirement, you could imagine that the response is given via the REST interface, e.g. make URI available for a given amount of time after the event is generated, but then, you have the problem of enumerating the events with a unique code, which might create compatibility problems with specific event notification channels/sinks
K
On 2015-04-23 03:55:27 -0400, Markus Rathgeb wrote:
Could someone state what kind of messaging is planned and what are the requirements for the different type of messages?
I am using messages as a synonym for different kind of stuff that should be send (not different kind of notification "levels").
Perhaps we need notifications, alarms, a message box, ...
The different kind of message types (notification, alarm, ...) need to suffer different requirements:
- severity / level
- read / unread flag
- persistent stored or could be volatile
So, what topics need to be catch by "this" notification this bug is used for?
On 2015-08-27 14:16:48 -0400, karel goderis wrote:
For all involved, pls see https://www.eclipse.org/forums/index.php/m/1706571/#msg_1706571
I have started an initial implementation based on the above, and inspired by mqttwarn
On 2015-08-29 16:05:10 -0400, Kai Kreuzer wrote:
Karel, I would suggest to keep the further discussion on this issue for the moment.
Before going into prototyping, my feeling is that we need to discuss many more details and design decisions. Once there is a rough design done, I think we should have it summarized in a post like https://www.eclipse.org/forums/index.php?t=msg&th=1066185&goto=1694087&#msg_1694087 or https://www.eclipse.org/forums/index.php?t=msg&th=668424&goto=1266584&#msg_1266584, which summarizes the requirements and shows the suggested design.
I think Markus' questions (https://bugs.eclipse.org/bugs/show_bug.cgi?id=434010#c1) are very good and worthwhie to answer, as he rightly points out that everybody has some different vision and ideas behind the word "notification".
For me personally, I think that a new notification feature should be MUCH more than just an extended/configurable event routing. Read-flags, re-sending, updating, deletion, a context, unique ids, possibly intents (=attached/linked actions) are all mandatory features from my pov. We probably can learn (and copy!) a lot from existing notification frameworks like http://developer.android.com/guide/topics/ui/notifiers/notifications.html.
On 2015-08-30 07:21:59 -0400, karel goderis wrote:
I would first of all look at who or what will be consuming the notifications. Adding all those fields or features to a notification might be interesting, but you will end up with a swiss army knife of which one will only use the tin opener. By that I mean, glansing at the services supported by mqttwarn, there are none that offer this kind of API. So, why would you build that? All these services take simple text messages, and depending on the service, some configuration parameter that is service specific, e.g. not something that can be generalised. Taking the route you propose, you would have to "blow up" Events into a Notification, with all the handling (sequencing, flows etc around it), to then strip all that away back to the original "string" that is compatible with the external notification service. That is a lot of complexity for little or no added value. You would also need to create a whole infrastructure to have a user interact with Notifications, e.g. change how the GUI's behave, introduce things like pop-ups? or dialog boxes and so forth. [Maybe it could be an idea to enhance openhab.ios to support for example push messages, badging and so forth]. Maybe the way forward is the re-evaluate Events, and make these more rich, introduce acknowledgments on the EventBus, etcetera
To me the biggest frustration of all those that are using solutions like MQTT binding+mqttwarn is that it is very hard to get any information out of openHAB/ESH. What you propose might be more interesting or challenging from the point of view of a code developer, but I just want to stay pragmatic and have a simple solution that works literally tomorrow. If you want to call it something else than notification, fine for me. If it has to be refactored into something more meta in the future, then this is fine as well.
Let me finish what I am actually hacking together, then rediscuss around that? I do not have a tool that yanks out OML schema's, so that's another reason to have this Agile-like approach.
On 2015-08-30 16:25:07 -0400, Kai Kreuzer wrote:
there are none that offer this kind of API. So, why would you build that?
Well, the most important use case in my case is exactly THIS API, i.e. notifications within Android (or iOS). So why not look at existing APIs for this, if this is one of the main use cases?
Another consumer are the web-based UIs like Paper UI and Basic UI. They might want to display the "current" notifications, so there must be a way for them to request them.
For all UIs likewise, if I receive a notification for my doorbell, I would like to be able to directly click on it and open a sitemap page with its IP cam - just as one example for a linked action. Furthermore, if I receive a notification that a certain device is not reachable anymore, I would like to have the context (here Thing UID), so that I can directly jump to the admin page of this device to reconfigure it etc.
you would have to "blow up" Events into a Notification
I think this is our misunderstanding. I am talking about notifications as a new concept, you are thinking of enhanced events instead. To me, events and notifications are fundamentally different concepts. Events are fire&forget. Notifications are "something that needs the users attention". A low-battery event it nice in a log file, but as a notification I only want to see it, if the battery hasn't been replaced meanwhile or if I haven't marked it as read on any of my UIs.
What you propose might be more interesting or challenging
It is not just me - from what I understand from the comments, it is also what Greg, Markus, Dennis and others have in mind here. That's why I asked to first align on the requirements.
Please also remember the discussion about the "alarm binding", which is also about managing state of alarms and not merely sending stateless events.
If you want to call it something else than notification, fine for me.
Indeed, maybe what you propose is not related to this issue here at all, but should rather be a kind of clever event-routing.
Let me finish what I am actually hacking together, then rediscuss around that?
Well, this depends of course on you. I just wanted to avoid that you are doing work that needs to be overhauled when discussing the requirements only after you already implemented it.
In this context, please note that I consider the ".persist" files to be 1.x legacy, since they do not fit well into the "manageable through REST/UI approach". It is one of the topics that I would like to modernize after tackling the Things, the rule engine and the sitemaps. So taking the current persistence infrastructure as a blueprint might not be a good idea at all.
On 2015-08-31 02:10:03 -0400, karel goderis wrote:
(In reply to Kai Kreuzer from comment # 15)
Well, the most important use case in my case is exactly THIS API, i.e.
notifications within Android (or iOS). So why not look at existing APIs for
this, if this is one of the main use cases?
I did, but I found this one in particular very much tied to the mobile phone as a platform. I think it is too specific. What I would grab from it are
- needs acknowledgement or not flag
- prioritisation level
- call back mechanism to send ACKs
Another consumer are the web-based UIs like Paper UI and Basic UI. They
might want to display the "current" notifications, so there must be a way
for them to request them.
For all UIs likewise, if I receive a notification for my doorbell, I would
like to be able to directly click on it and open a sitemap page with its IP
cam - just as one example for a linked action. Furthermore, if I receive a
notification that a certain device is not reachable anymore, I would like to
have the context (here Thing UID), so that I can directly jump to the admin
page of this device to reconfigure it etc.
Yep - I have those usecases as well, but I think a lot of time will pass before this is really integrated.
you would have to "blow up" Events into a Notification
I think this is our misunderstanding. I am talking about notifications as a
new concept, you are thinking of enhanced events instead. To me, events and
notifications are fundamentally different concepts. Events are fire&forget.
Notifications are "something that needs the users attention". A low-battery
event it nice in a log file, but as a notification I only want to see it, if
the battery hasn't been replaced meanwhile or if I haven't marked it as read
on any of my UIs.
Ah - I do not agree here. For me, an Event = Notification + {requires acknowledge}=false
Please also remember the discussion about the "alarm binding", which is also
about managing state of alarms and not merely sending stateless events.
Having developed a binding for the UTS ATSAdvanced alarm system I learned a lot about the complexity of alarm systems. It is really really complex stuff, I am not sure that we want that in ESH/OH. If one would opt then to have a kind of common front-end to alarm systems, then IMHO that will be very much limited to something like switch on/switch off.
In this context, please note that I consider the ".persist" files to be 1.x
legacy, since they do not fit well into the "manageable through REST/UI
approach". It is one of the topics that I would like to modernize after
tackling the Things, the rule engine and the sitemaps. So taking the current
persistence infrastructure as a blueprint might not be a good idea at all.
Mhh... that is almost a separate discussion. I presume that before they are tossed out, that a new mechanism to store configuration "state" will have to be implemented right?
K
On 2015-08-31 03:46:46 -0400, Dennis Nobel wrote:
I think we more or less agreed, that the notification concept has two parts:
- Design and implement a Notification API and storage (maybe taking Android Notification as example)
- Design and implement a configurable and extensible Notification push mechanism
We can not implement 2) before we implemented 1). So if you only want to dispatch events via some remote channels, it has nothing to do with notifications. Maybe it can be a separate add-on called remote-events.
But the Notification API is definitely a bigger topic and needs some discussions. If you want to implement a fast solution for remote evening, you can do that, but then let´s stop the discussion on this issue, as this is not related to it. Maybe it can be used later to implement 2).
On 2015-09-02 15:34:23 -0400, karel goderis wrote:
I have just created #436 cfr the discussion here below
On 2015-09-04 03:46:21 -0400, karel goderis wrote:
All,
I dunno what you use as UML tool, but since I do not have a professional tool at hand, I installed the Obeo Eclipse plug-in so that schema files can be pushed easily to github. Unless there is another better proposal to move forward, we could use that mechanism to share schema to stimulate the discussion/development?
K
On 2015-09-04 03:56:31 -0400, Dennis Nobel wrote:
I sometimes use https://www.draw.io/ or Google Draw, or just Power Point or plantUML. I don´t think that we need a professional UML tool for designing concepts. It should just help to visualize the ideas and should not be taken as some kind of technical reference.
On 2015-09-05 05:06:39 -0400, Kai Kreuzer wrote:
For diagrams that end up in the ESH documentation, we actually decided to use https://www.draw.io/, so that everybody has the chance to easily update it.
On 2015-09-05 05:28:46 -0400, karel goderis wrote:
I have already redrawn the diagram in draw.io. I will create a new thread on the ESH forum to discuss it