- Platform information:
- Hardware: Raspberry Pi 3
- OS: openHABian
- openHAB version: 2.1
I’m stuck here and I do not find much here in the forums or through Google. Or maybe I just do not understand how to read and use what I found.
What I try to achive is creating global functions (like I know from PHP) which I can use in my rules. Especially notifications are the same for most of my rules, like for example:
sendXMPP("roi@jabber", new DateTimeType() + ": Text")
sendTelegram("telegram1", new DateTimeType() + ": Text")
sendXbmcNotification("kodi:firstname.lastname@example.org", 80, "Topic", "Text")
So I write the same again and again, also with the users and passwords and everything else (e.g. before sending a notification to Kodi/XBMC I check if the host is online).
So is there something I can use, like
which I define somewhere as a globally usable function?
Thank you very much for pushing me in the right direction.