Push Services
Meteobridge provides some additional "push services", which can distribute weather information to you via email, or to your twitter acoount. When you have email or twitter configured, Meteobridge can send alarms to you when a certain weather condition is met. When you have your ohen web server or MYSQL database server running, Meteobridge can also feed these with weather data.
The following sections will explain how to setup push services in detail. These options are a bit more for the tech-savvy user, but they are not mandatory for Meteobridge's core task, to feed weather data to weather networks. So you can keep that all switched off, when you don't need it.
Twitter Upload
Meteobridge allows you to send weather data snippets to your twitter account. As twitter requires a bit complicated authentication you will have to run through 6 steps.
6. To fill message text with weather data and/or a timestamp, you can make use of Meteobridge variables as explained in Templates section. Example above is a result of this message text: [hh]:[mm]h Outdoor temp: [th0temp-act=F.1:--]°F
Individual HTTP Upload
Data will be sent as HTTP GET requests with URL parmeters you can define to your liking. Parameters of a URL consist of name-value pairs seperated by '&'. You can define names yourself and can use a certain set of variables provided by Meteobridge to be used as values. Variable names will be automatically replaced by their current values, each time a HTTP request is sent. Please have a look at the example below.
Upload schedule is defined to every 10 seconds. URL specifies server address, where to deliver data ("http://myserver.com/upload.php" in the example above). "Success Condition" allows to specify a matching string which is compared to to the return message from the server to decide if upload was successful or not.
Weather data is transported to the server by means of URL parameters. Meteobridge provides a large set of variables that can be used to feed URL parameters with current sensor data. Section Templates will explain how to use these variables to fill URL parameters with recent sensor data.
Individual MYSQL Uploads
When you prefre to store your weather station's data in your own MYSQL database, Meteobridge can feed sensor data to it in a very easy way. Just state
- Host: server name or IP of server when DNS can' resolv the name
- Port: port number where to reach MYSQL database on your server
- Database: name of database to feed
- User: name of database user to use for data upload
- Password: password for user name.
- Query: payload that should be sent to the database. Query usually contains a MSQL insert statement followed by a table name and a list of column names and values. The query ist subject to template replacement, so you can use Meteobridge variables to upload weather data to your database.
Query insert upload (temp, wind) values ([th0temp-act.1:-9999], [wind0wind-act=kmh.1:-9999]) in example above stores actual outdoor temperature to field "temp" of table "upload" of database "test". Field "wind" is filled with current non averaged wind speed in km/h. When temperature or wind data is not there a value of -9999 is stored.
Details of using variables in templates are explained in Templates section.
Upload schedule is defined to every 10 seconds. URL specifies server address, where to deliver data ("http://myserver.com/upload.php" in the example above). "Success Condition" allows to specify a matching string which is compared to to the return message from the server to decide if upload was successful or not.
Weather data is transported to the server by means of URL parameters. Meteobridge provides a large set of variables that can be used to feed URL parameters with current sensor data. Section Templates will explain how to use these variables to fill URL parameters with recent sensor data.
Individual E-mail Service
Meteobridge can send you customizable e-mails at certain time intervals. To get this service started you have to work through the following settings
- Send interval: defines how often the e-mail should be sent. If you don't want to send weather data on regular schedule but want to send e-mails just on alarm conditions, set this to "on alarm only". Drop-down box next to this on the right allows you to choose how many e-mail send retries should be done in case e-mail sending does fail. Next drop-down box allows you to defne how authorization of the SMTP server that transports the e-mail into the Internet should be done. You choose between:
- none: This setting does not ive any authentication information to the SMTP server. Only servers in closed LANs will provide that (if at all).
- basic: Old-fashioned user name and password authentication, without SSL encryption
- tls: authentication with SSL encryption (a variant not used very often)
- starttls: standard authentication with SSL encryption (most often used)
- SMTP Host: scifies the IP or name of the SMTP server to use.
- Port: port number where SMTP server listens for mails (standard ports are 25 for non-SSL and 587 for SSL communication)
- User: user name to be used for authentication
- User: name of database user to use for data upload
- Password: password to be used
- To-Addr.: E-mail address of the recipient
- From-Addr.: E-mail address of the sender (many SMTP servers only accept mails with a sender address being in the same domain as the SMTP server itself)
- Body: This contains the text to be sent via email. You can use a '#' sign to separate the subject from the boday of the mail. This string is subject to template replacement and therefore does allow you to use Meteobridge variables inside your e-mail.
Body weather conditions#temp [th0temp-act.1:--]°C\n[wind0wind-max60=kmh.1:--]km/h in example above generates an e-mail with subject "weather conditions" and a body containing two lines (separated by a line feed character "\n"). First line will report current outdoor temperature like "13.4°C" and second line will report max gust speed during last hour, like "34.7km/h". Details of using variables in templates are explained in Templates section.