HowTo: Get notified on empty batteries

I assume you have javascript scripting installed in the addons.
Screenshot from 2023-11-25 09-24-51

One step further!
Unfortunately I can choose only DSL Rule. Do not have ECMAScript 262 Edition 11

After that following error comes:

No I do not. Let me try to install it first

Install the javascript scripting then you will get the option.

WORKS!
Message received. Thank you @ubeaut
If I would like to have a broadcast notification - push message on the phone. How to extend this in javascript?

I haven’t used push but if you want to use it you would just replace this line with the push statement:

          actions.get("mail", "mail:smtp:a514b96247").sendHtmlMail("you@gmail.com", heading, message );

Glad it works.
Like I said I don’t use DSL at all and assumed you had all the addons.

hmmm I research a little bit and found this

and detailed this page

Unfortunately I do not understand the parameters i shall give to the actions.thingActions ()
What could be the bindingID and ThingUID for the cloud user(s) notification.

You would have to install the addons and ask someone who uses it. I don’t use it I just email as it is not time critical for me.
It would be documented somewhere.

Put this in your code and replace the string with whatever you want to send out. It works for me, no guarantee for you.

actions.NotificationAction.sendBroadcastNotification("String to send");

Thanks! This works. Finaly I placed this line:

actions.NotificationAction.sendBroadcastNotification("Charge the Battery", "siren", "high");