LUUP for Notifications (without scenes)

I need to add a lot of notifications but don’t want to clutter the list of scenes, i.e. I want to add notifications without creating a scene. Today I found out how to do this, i.e. you go to the device’s properties (by clicking on the wrench), select the Notifications tab and add notifications. Note that this is on UI6 and I am not sure if this is the same on UI5.

However, I do not see any option to add LUUP code. My goal is the execute the notification only when certain criteria are met, e.g. time of day, etc. So my question is, how can I add notifications with conditions and without this showing up as a scene.

I believe your best option is PLEG - as suggested in your previous thread. A single PLEG device can handle many notification events.

[quote=“maja, post:1, topic:180357”]I need to add a lot of notifications but don’t want to clutter the list of scenes, i.e. I want to add notifications without creating a scene. Today I found out how to do this, i.e. you go to the device’s properties (by clicking on the wrench), select the Notifications tab and add notifications. Note that this is on UI6 and I am not sure if this is the same on UI5.

However, I do not see any option to add LUUP code. My goal is the execute the notification only when certain criteria are met, e.g. time of day, etc. So my question is, how can I add notifications with conditions and without this showing up as a scene.[/quote]

Another suggestion would be to do it in a scene (which is one of the easiest ways) and then hide the scene from view. I assume you do not want the scenes because you are afraid to clutter up the UI or a mobile app?

If you want to do your notifications in LUA code …
Then create one scene called notifications …
Then create an input trigger for each notification and put your Notification in the LUA for the trigger (NOT the scene).
In fact if you want you can set some global message string in trigger LUA i.e.

NotificationMsg = "Door is open"

Then in the LUA code for the SCENE you can have one copy of the code that sends the message:

       luup.log("Sending message:"  ... NotificationMsg)
       luup.call_action( .....          Arg=NofificationMsg ....) 

A notification attached to a device is internally implemented the same as a scene. Its just that people writing UIs do not display them. Its very common when you see a new UI program come out that they show these notification scenes … until someone notices and then they add the appropriate filtering.