Is there a way that I’m not seeing to send messages via a telegram bot when you’re defining a rule in the web UI? Or does it have to be in a rules file under /etc/openhab/rules/ ?
Same question for putting statements in the log file.
Would you give us a clue what language you are scripting with in the UI?
What have you seen in a ‘file’ DSL that you cannot reproduce in your UI rule?
Just trying to implement a message to a telegram bot when defining a rule in the web interface. I don’t see any way to define an action to do that. If it has to be a rules file I’m okay with that.
Currently I go to Rules → Create Rule → Add Action and there doesn’t seem to be any way there to setup which bot and what content to send.
I do see Send Log message under Show All which I missed before.
make a script and trigger with a rule
Rossko’s question relates to the fact that there is no graphical configuration of actions in the rule creation editor. It is quite possible to have actions run but you have to choose the
Run Script action and then add the code for the action as found in the docs. For example, if you use a js script your telegram line would be:
actions.get("telegram", "telegram thing UID here").sendTelegram("Telegram message");
Got it working using an ECMAScript. New to that sort of syntax in the web UI but I’m getting my head wrapped around it slowly.