Carriage return in Twitter Service

All about the standard Meteobridge devices based on mobile routers from TP-Link, D-Link, ASUS

Moderator: Mattk

Post Reply
User avatar
WessexWeather
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: Sun Apr 17, 2016 9:54 am
Location: Wimborne, Dorset, UK
Contact:

Carriage return in Twitter Service

Post by WessexWeather » Tue Nov 27, 2018 12:49 am

Hi, I’ve got a perfect Twitter Service string set up, except for one thing...

Can anyone tell me how to insert a carriage return into the string, so that information within the tweet is separated into separate lines? Twitter now supports this but I cannot figure out how to add it to the string.

This is now my tweets currently look: -

11:30 #Wimborne, #Dorset, 29m • Sunrise 07:41 • Sunset 16:10 • Temp 8.2°C • Max 8.2°C at 11:29 • Min 2.1°C at 03:19 • Pressure 1014.9mb (ST) • Wind 4.0mph N • Gust 11.0mph at 10:34 • Humidity 77﹪ • DP 4.4°C • Rain 0.0mm • http://bit.ly/1TeCMBi

Any advice much appreciated.
Simon (WessexWeather)

Image

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5879
Joined: Mon Oct 01, 2007 10:51 pm

Re: Carriage return in Twitter Service

Post by admin » Tue Nov 27, 2018 3:34 pm

Did you try "\n" and "\\n" or "\n\r" and "\\n\\r"?

User avatar
WessexWeather
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: Sun Apr 17, 2016 9:54 am
Location: Wimborne, Dorset, UK
Contact:

Re: Carriage return in Twitter Service

Post by WessexWeather » Thu Nov 29, 2018 1:12 am

Yes I’ve tried all those combinations, which seem to stop the auto tweets from posting at all.
Simon (WessexWeather)

Image

pb2rdf
Fresh Boarder
Fresh Boarder
Posts: 8
Joined: Tue Aug 28, 2018 5:42 pm

Re: Carriage return in Twitter Service

Post by pb2rdf » Tue Dec 04, 2018 3:11 am

hello admin,

Any solution yet for making possible to send tweets with more lines?

ie :
#WeatherReport [hh]:[mm] Temp: [th0temp-act]/[th0temp-dmax]/[th0temp-dmin]°C Rain: [rain0total-dmax]/[rain0total-mmax]/[rain0total-ymax]mm Wind: [wind0wind-act]/[wind0wind-dmax]m/s [wind0dir-act=nldir] Baro: [thb0press-act]hPa RH: [th0hum-act.ab:--] Sun: [sol0rad-act.ab:---]/[sol0rad-dmax.abc:---]Wm2 UV: [uv0index-act.a:-]/[uv0index-dmax.a:-]

Has this result :
#WeatherReport 00:21
Temp: 8.5/8.6/8.5°C
Rain: 0.0/17.0/540.4mm
Wind: 2.2/3.6m/s NW
Baro: 1008.0hPa
RH: 90
Sun: 0/0Wm2
UV: 0/0


Thanks in advance.
regards, Peter

Pebblebacon
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: Sat Jul 13, 2019 12:48 am

Re: Carriage return in Twitter Service

Post by Pebblebacon » Wed Aug 21, 2019 5:46 am

Any further update?

User avatar
ConligWX
Gold Boarder
Gold Boarder
Posts: 215
Joined: Wed Nov 14, 2018 12:48 pm
Location: Conlig, Co. Down, UK
Contact:

Re: Carriage return in Twitter Service

Post by ConligWX » Wed Aug 21, 2019 2:55 pm

Pebblebacon wrote:
Wed Aug 21, 2019 5:46 am
Any further update?
have you tried using unicode? only issue is amount of characters on the tweet.

https://developer.twitter.com/en/docs/b ... cters.html

LF = U+000A
CR = U+000D

have you tried that? dont know if it works, but worth a try since Twitter mentions unicode.

Pebblebacon
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: Sat Jul 13, 2019 12:48 am

Re: Carriage return in Twitter Service

Post by Pebblebacon » Sat Aug 24, 2019 3:38 am

I have not. I know nothing of Unicode and haven't the slightest idea how to incorporate any of those option into #if##then##else##fi# structure.

Pebblebacon
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: Sat Jul 13, 2019 12:48 am

Re: Carriage return in Twitter Service

Post by Pebblebacon » Mon Sep 02, 2019 6:05 am

No go.

Post Reply