Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Twitter uploads

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
User avatar
raul_sbd
Posts: 94
Joined: Wed 16 Jan 2013 7:58 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 10
Location: Glossop
Contact:

Twitter uploads

Post by raul_sbd »

Hi everyone,

Sorry if this is been asked before but does anyone knows how to set up Twitter uploads? I know there is an option in Cumulus web options to enter Twitter credentials but do you need anything else apart of a Twitter dedicated account?
Can you provide step by step instructions if there is the option for the uploads please?

Many Thanks!!
My Weather Site Sale M33 (Uk)

http://raulsbd.co.uk/index.htm
User avatar
PaulMy
Posts: 3777
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Twitter uploads

Post by PaulMy »

The Twitter updates from Cumulus stopped working several years ago due to some Twitter issue. However Twitter can be updated by Weathercloud, and Weathercloud is one of the third-party weather services that can be updated by Cumulus.
https://twitter.com/KomokaWeather
https://app.weathercloud.net/d0280022074#current

Enjoy,
Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm

Image
User avatar
raul_sbd
Posts: 94
Joined: Wed 16 Jan 2013 7:58 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 10
Location: Glossop
Contact:

Re: Twitter uploads

Post by raul_sbd »

PaulMy wrote: Fri 26 Nov 2021 7:42 pm The Twitter updates from Cumulus stopped working several years ago due to some Twitter issue. However Twitter can be updated by Weathercloud, and Weathercloud is one of the third-party weather services that can be updated by Cumulus.
https://twitter.com/KomokaWeather
https://app.weathercloud.net/d0280022074#current

Enjoy,
Paul
Thank you Paul I have created the Weathercloud account now and linked my weather station in Cumulus Mx.. after that how do I do it to link to the Twitter account?
My Weather Site Sale M33 (Uk)

http://raulsbd.co.uk/index.htm
User avatar
PaulMy
Posts: 3777
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Twitter uploads

Post by PaulMy »

after that how do I do it to link to the Twitter account?
I expected this question :bash: but can't remember what I had to do as it has been a few years :oops:
I am sure there is a setting somewhere... I'll look again.

Enjoy,
Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm

Image
User avatar
raul_sbd
Posts: 94
Joined: Wed 16 Jan 2013 7:58 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 10
Location: Glossop
Contact:

Re: Twitter uploads

Post by raul_sbd »

My bad Paul!! I have done it now ;)

There it is ;

https://app.weathercloud.net/d6743448014

Many thanks for your help ;)
My Weather Site Sale M33 (Uk)

http://raulsbd.co.uk/index.htm
User avatar
PaulMy
Posts: 3777
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Twitter uploads

Post by PaulMy »

Hi,
Glad you got it added.
Took a while but found the place to add Twitter and have attached in case someone else wants to give it a try.

Enjoy,
Paul
You do not have the required permissions to view the files attached to this post.
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm

Image
BigOkie
Posts: 272
Joined: Tue 28 May 2013 1:06 am
Weather Station: Davis VP2 Plus
Operating System: Raspian Buster (RPi 3b)
Location: Tulsa, OK

Re: Twitter uploads

Post by BigOkie »

If you want to use a direct solution and not have to rely on WeatherCloud as a proxy, I use a Python script and cron (I use a RPI 3). It takes some configuration though. It's been so long since I configured it I might take a while to get it all together if anyone is interested.

EDIT: I think regardless if anyone says yes or no I will go ahead and provide details on how I did this.

Pre-requisites - *must* have Python 3 installed, and must install Twython (the Twitter wrapper for Python 3) The assumption here is that you are doing this using some form of Linux, whether it be a full-fledged version, or the Raspian OS. You must also generate consumer keys and access keys assigned to the app (in my instance I just have a generic). To do this visit https://dev.twitter.com

Once you have Python 3 and Twython imported (I believe you still do this by issuing the 'pip modulename' command), you create a python script to do what you need. I have mine and will provide it (with tokens masked of course but you'll get the idea).

Code: Select all

#!/usr/bin/env python

from twython import Twython
# delay 5 seconds
import time
time.sleep(5)
# Define constants
CONSUMER_KEY = 'xxxxxxxxxxxxxxxxxxxx'
CONSUMER_SECRET = 'xxxxxxxxxxxxxxxxxxxx'
ACCESS_KEY = 'xxxxxxxxxxxxxxxxxxxx'
ACCESS_SECRET ='xxxxxxxxxxxxxxxxxxxx'


# Create a copy of the Twython object with all our keys and secrets to allow easy commands.
api = Twython(CONSUMER_KEY,CONSUMER_SECRET,ACCESS_KEY,ACCESS_SECRET)

text = open('/path/to/generated/tweet.txt','rb') # Cumulus has been set to create tweet.txt by processing tweetT.txt
api.update_status(status=text)

# api.update_status is now deprecated, but works, and is simpler than the below [untested]
#twitter.update_status(status=text)
You will need to create a template file that you generate using the web interval with the tags you want to include in the tweet. As an example, here's what I use (template filename is tweetT.txt) but you can include or exclude whatever you want:

Code: Select all

Temp: <#temp>°F DP: <#dew>°F  HtIdx: <#heatindex>°F High today: <#tempTH>°F @ <#TtempTH> Low today: <#tempTL>°F @ <#TtempTL> Wind: <#wdir> @ <#wspeed> mph Baro: <#press> inHg and <#presstrend> Rain Today <#rfall>in Rain for <#shortmonthname>: <#rmonth>in #okwx
Generate the file, and name it whatever you want, but make sure the file reference in the python script above is the path and filename to the file generated.

Once you've done this, I would suggest you test it first before you set to a schedule in a cron job.

Assuming you've named the python script 'twitter.py', issue the following command:

Code: Select all

python3 twitter.py
Be patient, it may take a few seconds to complete. There is no progress indicator, but as long as you don't see any error it should work. Once completed, this was what I saw after my test:
2021-11-27_121858.png
If there are any question, please reply here and I will answer them to the best of my ability.
You do not have the required permissions to view the files attached to this post.
User avatar
dazza1223
Posts: 860
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Pro 2 plus
Operating System: Raspberry pi 4 (4gb)
Location: Worthing
Contact:

Re: Twitter uploads

Post by dazza1223 »

is there one for Facebook page ? or can it be done in this way?
Have fun and keep learning

dazza :D

https://www.davisworthing.co.uk

Image
Pondlife
Posts: 2
Joined: Fri 20 Jan 2012 2:26 pm
Weather Station: WH1080
Operating System: WIndows 7
Location: South Wales

Re: Twitter uploads

Post by Pondlife »

Apologies for thread bumping.

How do you create the twitter.txt output file please?

I guess it's somewhere under internet settings but can't find the right place.

TIA.
BigOkie
Posts: 272
Joined: Tue 28 May 2013 1:06 am
Weather Station: Davis VP2 Plus
Operating System: Raspian Buster (RPi 3b)
Location: Tulsa, OK

Re: Twitter uploads

Post by BigOkie »

Pondlife wrote: Tue 14 Jun 2022 3:55 pm Apologies for thread bumping.

How do you create the twitter.txt output file please?

I guess it's somewhere under internet settings but can't find the right place.

TIA.
Extra web files. Not internet settings.

This is what I use, but you'll need to suit it for your needs. You shouldn't need to do anything but process the file. The python script should do all the work. Those pathnames obviously can be whatever you want to use. Also, if you're using Windows 7, I can't help much there as my example as stated is using Raspberry Pi (some form of Linux).
2022-06-14_161059.png
You do not have the required permissions to view the files attached to this post.
Pondlife
Posts: 2
Joined: Fri 20 Jan 2012 2:26 pm
Weather Station: WH1080
Operating System: WIndows 7
Location: South Wales

Re: Twitter uploads

Post by Pondlife »

Sorted thanks
Post Reply