Use "Enter" in output Telegram Notification Topic is solved

Post Reply
User avatar
Brutus
Posts: 322
Joined: Friday 26 September 2014 9:33
Target OS: Windows
Domoticz version:
Location: Heerlen, The Netherlands
Contact:

Use "Enter" in output Telegram Notification

Post by Brutus » Saturday 15 September 2018 18:37

Normally you can send a Telegram message in LUA with the following command:

Code: Select all

commandArray['SendNotification']='Subject#Text: '..Sensor..'#0'
I would like to create a more clean output with an "Enter" after the text so the Sensor data comes on the next line in the message.

Code: Select all

commandArray['SendNotification']='Subject#Text: "enter" '..Sensor..'#0'
Is this possible? I can't find any thing on Wiki or the forum.

Greetings.
1x Intel NUC D54250WYK (Windows 7 x64)
1x Aeon Labs USB Z-Stick S2
1x P1 Smart Meter USB
19x Fibaro Modules

SweetPants
Posts: 2350
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V4.10196
Location: The Netherlands
Contact:

Re: Use "Enter" in output Telegram Notification

Post by SweetPants » Saturday 15 September 2018 19:03

Have you tried adding "\r\n" to the string?
Ubuntu 16.04.5 LTS, Intel NUC, MySensors 2.3.0-alpha, Pro Mini 3.3/8M RFM69(HW), ESP8266 (SDK2.2.0), Sonoff, RFLink, RFXcom, MQTT, NodeRed, Domoticz Beta (from source)

User avatar
Brutus
Posts: 322
Joined: Friday 26 September 2014 9:33
Target OS: Windows
Domoticz version:
Location: Heerlen, The Netherlands
Contact:

Re: Use "Enter" in output Telegram Notification

Post by Brutus » Saturday 15 September 2018 19:08

SweetPants wrote:
Saturday 15 September 2018 19:03
Have you tried adding "\r\n" to the string?
Thnx for your reply!

Can you please put that in my example? So i don't make a mistake.
1x Intel NUC D54250WYK (Windows 7 x64)
1x Aeon Labs USB Z-Stick S2
1x P1 Smart Meter USB
19x Fibaro Modules

SweetPants
Posts: 2350
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V4.10196
Location: The Netherlands
Contact:

Re: Use "Enter" in output Telegram Notification

Post by SweetPants » Saturday 15 September 2018 19:12

commandArray['SendNotification']='Subject#Text: \r\n'..Sensor..'#0'
Ubuntu 16.04.5 LTS, Intel NUC, MySensors 2.3.0-alpha, Pro Mini 3.3/8M RFM69(HW), ESP8266 (SDK2.2.0), Sonoff, RFLink, RFXcom, MQTT, NodeRed, Domoticz Beta (from source)

User avatar
Brutus
Posts: 322
Joined: Friday 26 September 2014 9:33
Target OS: Windows
Domoticz version:
Location: Heerlen, The Netherlands
Contact:

Re: Use "Enter" in output Telegram Notification

Post by Brutus » Saturday 15 September 2018 19:16

SweetPants wrote:
Saturday 15 September 2018 19:12
commandArray['SendNotification']='Subject#Text: \r\n'..Sensor..'#0'
That works like a charm, Thanx!!

Were did you find this :) ?
1x Intel NUC D54250WYK (Windows 7 x64)
1x Aeon Labs USB Z-Stick S2
1x P1 Smart Meter USB
19x Fibaro Modules

SweetPants
Posts: 2350
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V4.10196
Location: The Netherlands
Contact:

Re: Use "Enter" in output Telegram Notification

Post by SweetPants » Saturday 15 September 2018 19:20

Brutus wrote:
Saturday 15 September 2018 19:16

That works like a charm, Thanx!!

Were did you find this :) ?
It's just plane LUA, just googeld for it
Ubuntu 16.04.5 LTS, Intel NUC, MySensors 2.3.0-alpha, Pro Mini 3.3/8M RFM69(HW), ESP8266 (SDK2.2.0), Sonoff, RFLink, RFXcom, MQTT, NodeRed, Domoticz Beta (from source)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest