Two of the key features that I wanted to implement in this project from the outset was 1) having a facility of being informed when my irrigation system was operating, or not as the case may be, and 2) having a means of over-riding the system via mobile 3G.
When it came to being informed, Twitter was the most obvious choice. But then after spending a considerable amount of time trying to get my head around Twitter's OAuth mechanisms I came across www.SuperTweet.net who simplify this process using a Basic Auth connection to their proxy servers .... with the OAuth process being completed by SuperTweet.
This section will deal with setting up your Twitter App, completing the SuperTweet requirements and by the end of the section we'lll post random Tweets from the Linux command prompt .... and also setup the Python scripts that will be sending the Irrigation Alerts.
1 - The first prerequisite in this process is that you will need to install cURL
In Linux Terminal - at the command prompt;
type : $ sudo apt-get install curl
2 - Next head over to Twitter and create yourself a new Twitter account. If you already have a Twitter account you'll be needing another email address to setup the account as Twitter doesn't allow the same email address to be used for multiple accounts. Obviously make a note of the username and password you setup the account with.
3 - You now need to create yourself a Twitter App.
Visit https://dev.twitter.com/ and sign in with the username / password you have just created
In the top right hand corner of the screen click under
your Avatar and choose 'My Applications'
Now click on 'Create Application'
Fill in all the fields and Save
You will then be taken to your Twitter App.
Notice that your Access Level is 'Read Only'
Click on 'Create My Access Token'
When you are returned back to your app - go to
'Settings' -> 'Application Type' and choose
Read, Write and Access Direct Messages
Then scroll to the bottom of the page and
'Update The Twitter applications settings'
That's it - your are done with Twitter ..... next its time for SuperTweet