Platform information:
Hardware: Raspberry pi 4
OS: raspbian
Java Runtime Environment: 8
openHAB version: 3.1
Issue of the topic:
Could anyone please advise how to send a simple message using telegram using ECMA (and not dsl) code? I know its all correctly working and configured using the DSL code provided in the wiki but the problem is I want to incorporate this added line into an existing ECMA script instead.
I’ve unsuccessfully tried:
var OPENHAB_CONF = Java.type('java.lang.System').getenv('OPENHAB_CONF');
load(OPENHAB_CONF + '/automation/lib/javascript/core/actions.js');
Telegram.sendTelegram("telegramBot:717f3621c2", "Test")
Any suggestions? Many thanks in advance!