Page 1 of 1

Twitter problem with Cumulus v1.9.4 (1099)

Posted: Sat 04 Mar 2017 1:33 pm
by De Hout
Twitter posts by Cumulus have always worked. It stopped working since feb 5 2017. See: https://twitter.com/AlkmaarsWeer

What has changed at my side since then:

The PC running Cumulus crashed. It had Windows 7 OS.
I replaced it with an old laptop with Windows XP, and transferred Cumulus. The laptop is too slow for Win 7.
All is working ok, except for posting on Twitter.

Cumulus is not sending anything to Twitter, while settings are definitely correct.

Could this be a Win XP compatability problem? I'm out of options.

Re: Twitter problem with Cumulus v1.9.4 (1099)

Posted: Sat 04 Mar 2017 3:43 pm
by steve
You could try deleting the 'tokens' from Cumulus.ini. This FAQ tells you how to do that - http://wiki.sandaysoft.com/a/FAQ#I.27ve ... te_Twitter

If that doesn't help, turn on debug logging by adding

Logging=1

to the [Station] section of Cumulus.ini, then start Cumulus. The debug.log file will show the attempts to communicate with Twitter and may helo diagnose the problem.

Re: Twitter problem with Cumulus v1.9.4 (1099)

Posted: Sat 04 Mar 2017 6:03 pm
by De Hout
I already tried deleting the tokens without success.

I'll turn on debugging and will post the result here.

Re: Twitter problem with Cumulus v1.9.4 (1099)

Posted: Sun 05 Mar 2017 8:19 pm
by De Hout
Here is the overnight debug file. (I don't see anything in it what has to do with Twitter)
Twitter frequency is set to every 1 minute.

In the meantime I tested with a clean Cumulus install on the laptop. The new install refuses to post on Twitter as well.
I also copied the Cumulus map from the laptop to another PC with Win 7. On that PC tweeting works good.

I still think that Win XP is the problem, but I have no clue where to look.

Re: Twitter problem with Cumulus v1.9.4 (1099)

Posted: Sun 05 Mar 2017 8:29 pm
by steve
Sorry, I had forgtten how it works in Cumulus 1 - turning on debug logging causes extra Twitter logging to the diags file - have a look in the latest one and there should be something in there.

It could be XP, but I can't remember any problems with XP and Twitter. A firewall issue is also a possibility.

Re: Twitter problem with Cumulus v1.9.4 (1099)

Posted: Mon 06 Mar 2017 6:51 pm
by De Hout
Ok, found something:
5-3-2017 13:33:05.239 : Starting Twitter thread
5-3-2017 13:33:05.239 : Starting Twitter thread
5-3-2017 13:33:05.369 : TwitterOauthToken available
5-3-2017 13:33:05.369 : Twitter data:13:33 #Alkmaar #weer Temp 10,2°C|Wind ZW 3 Bft|Druk 994,7 hPa Langzaam dalend|Regen 0,5 mm|Vocht 54%
http://dehout.ddns.net
5-3-2017 13:33:05.369 : Twitter URL: https://api.twitter.com/1.1/statuses/update.json

<snip personal codes and passwords>

5-3-2017 13:33:05.459 : Twitter update error: Could not load SSL library.
5-3-2017 13:33:05.459 : Twitter Response:
5-3-2017 13:33:05.459 : Twitter thread exit

Re: Twitter problem with Cumulus v1.9.4 (1099)

Posted: Mon 06 Mar 2017 6:55 pm
by steve
De Hout wrote:5-3-2017 13:33:05.459 : Twitter update error: Could not load SSL library.
Then I think you are correct and it is a problem with XP - it apparently can't load the SSL library provided with Cumulus; I don't know why that would be.

Re: Twitter problem with Cumulus v1.9.4 (1099)

Posted: Mon 06 Mar 2017 8:49 pm
by De Hout
Thanks, Steve.
I'll do without Twitter for a while, and hope I can find another, preferrably cheap, laptop which is able to run on Win7.

Derk.

Re: Twitter problem with Cumulus v1.9.4 (1099)

Posted: Thu 20 Sep 2018 4:54 pm
by Shugrover
I have the same issue. Running Windows 10, pc decided to hang for some reason, restarted ok, ran Cumulous and it stop tweeting. Tried a laptop and migrated everything over. Log file shows error 504 for Twitter. Don’t understand why

Re: Twitter problem with Cumulus v1.9.4 (1099)

Posted: Fri 21 Sep 2018 11:46 am
by steve
Twitter changed their authentication method again, and Cumulus can no longer obtain the authentication tokens. Even if you copied the cumulus.ini file containing the tokens to the new PC, it is possible that they won’t work on that machine - I don’t know.

Re: Twitter problem with Cumulus v1.9.4 (1099)

Posted: Sun 23 Sep 2018 7:28 pm
by ExperiMentor
I have a workaround for this problem that will help if you are using a Linux machine (eg Raspberry Pi) to run Cumulus MX.

It involves using Cumulus to generate the text string to be tweeted, then using a separate simple (Python) program to tweet the text string when required (eg every hour). I've got mine set to tweet a webcam image at the same time.
You can see the result at @LiesbergDorf

My program is as follows but this isn't a full 'Tutorial'. If enough people ask for it I will write it up properly!
I have removed my Twitter passcodes for obvious reasons - you'll need to create a Twitter App to get your own codes.

Code: Select all

#!/usr/bin/env python

from twython import Twython

# This program executes a single time, tweets tweet.txt and image.img, then exits
# Use crontab to control how often it runs

# Define constants
CONSUMER_KEY = 'NOT TELLING YOU'
CONSUMER_SECRET = 'MY SECRET'
ACCESS_KEY = 'FOR MY EYES ONLY'
ACCESS_SECRET ='GUESS'

# 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)

# Tweet tweet.txt and image.jpg
# Not covered: how to get webcam image into localimage.jpg on Pi
photo = open('/home/pi/Programs/IPcamFTP/localimage.jpg','rb') # need to open the file
text = open('/home/pi/CumulusMX/tweet.txt','rb') # Cumulus has been set to create tweet.txt by processing twitter.txt
api.update_status_with_media(media=photo, status=text)

# api.update_status is now deprecated, but works, and is simpler than the below [untested]
# New code should be as below, but new version of Twython came out late on Raspbian. Could test this:
#response = twitter.upload_media(media=photo) # this sends photo to Twitter servers where it is stored for 60 minutes
# Then it can be added to a tweet by using the media_id that is returned as response
#twitter.update_status(status=text, media_ids=[response['media_id']])resemble
Other things you'll need are:

In CumulusMX at Settings / Extra Files:
Set Local Filename to /home/pi/Cumulus/twitter.txt
Set Remote Filename to /home/pi/Cumulus/tweet.txt
Tick 'Process'

and in Settings / Internet Settings / Web/FTP settings, enable 'Auto update'

Re: Twitter problem with Cumulus v1.9.4 (1099)

Posted: Sun 23 Sep 2018 9:08 pm
by ConligWX
I use Twidge for forecasts on Twitter.

https://github.com/jgoerzen/twidge/wiki

Re: Twitter problem with Cumulus v1.9.4 (1099)

Posted: Thu 04 Oct 2018 9:43 pm
by joglz
Shugrover wrote:I have the same issue. Running Windows 10, pc decided to hang for some reason, restarted ok, ran Cumulous and it stop tweeting. Tried a laptop and migrated everything over. Log file shows error 504 for Twitter. Don’t understand why
I've the same problem :cry:

Re: Twitter problem with Cumulus v1.9.4 (1099)

Posted: Thu 04 Oct 2018 9:47 pm
by joglz
Shugrover wrote:I have the same issue. Running Windows 10, pc decided to hang for some reason, restarted ok, ran Cumulous and it stop tweeting. Tried a laptop and migrated everything over. Log file shows error 504 for Twitter. Don’t understand why
I've the same problem on Windows 10c :cry:

Re: Twitter problem with Cumulus v1.9.4 (1099)

Posted: Thu 04 Oct 2018 9:57 pm
by steve
Cumulus may be prevented from posting to Twitter completely, for everyone, soon. Twitter have created yet more obstacles. It seems I have to submit a justification for the amount of tweets that Cumulus does, so that they can consider allowing it to continue. I am currently on holiday on a canal boat and don’t know when or if I will find time to do this.