beerduino
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:Beerduino
# BEERDUINO 

**BEERDUINO** is a small arduino project.

* The program is designed to run on Arduino Board + Ethernet Shield.
* Designed to read various Dallas DS18B20 sensors (on a 1wire bus).
* Reads multiple sensors temperatures.
* Embed a small web-server able to load simple HTML page and XML page with the temperature values.
* Can send a mail if temperature limits are reached.

Tested with Arduino 023 ( http://arduino.cc/ ) on a Duemilanove board.

Binary size < 16384 octets at this time.

## About the Java Program.

The JAVA program is intented to read to XML results published by the arduino board and to act according to the values read (for example, throwing a notification by mail, Notifry or PushTo).

## About the Java project.

* the sketchbook whole project is an Eclipse workspace (switch workspace to it), and the "java/" path is a Eclipse project ;
* needs Maven (external to Eclipse or embedded Maven 3 with Eclipse 3.7+) ;
* if Maven embedded, just right click project > Maven > Update dependencies ;
* configure "beerduino.cfg" as needed (arduino ip address, notifications, ...) ;
* run "src/main/java/Beerduino.java" (main entry point) ;

## About the C Arduino code

Use a few libraries (included in this github) :

* OneWire (v2) ( http://www.pjrc.com/teensy/td_libs_OneWire.html ) ;

* Webduino ( https://github.com/sirleech/Webduino ) ;

* Streaming ( http://arduiniana.org/2009/04/new-streaming-library/ ) ;

* DallasTemperature ( http://www.milesburton.com/?title=Dallas_Temperature_Control_Library ) ;

## The Arduino schema

![Beerduino bread board schema](https://github.com/SR-G/beerduino/raw/master/beerduino_breadboard.png)

![Beerduino schema](https://github.com/SR-G/beerduino/raw/master/beerduino_schema.png)



## Links.
* A good tutorial (for electric schema and various other information on 1wire) : http://www.mon-club-elec.fr/pmwiki_mon_club_elec/pmwiki.php?n=MAIN.ArduinoExpertCapteursComplexesDS18B20Detection
* Dallas DS18B20 specs : http://datasheets.maxim-ic.com/en/ds/DS18B20.pdf
* Arduino utorial about 1wire : http://www.arduino.cc/playground/Learning/OneWire
* Dallas sensors can be bought on ebay or here : http://www.domadoo.fr
* Fritzing editor for building Arduino schemas : http://fritzing.org/download/
* Another GITHub project with the same name and a related purpose : https://github.com/malcolmmp/Beerduino/blob/master/Beerduino.pde
* Yet another related project : http://www.uchobby.com/index.php/2007/10/08/arduino-beer-thermostat/

# What does the XML results published by the Arduino board look like ?


## 1. Sensors

Temperature results. One entry for each sensor.

### Attributs

Attributs Type Req Description
time String X Time the whole XML results file has been generated.
### Elements
Elements Type Req Description
Liste de sensor sensor X Individual sensor temperature result
### Exemple
<sensors time='...'>
   <!-- Liste de 'sensor' -->
   <sensor>
   . . .
   </sensor>
   .
   .
   .
   <sensor>
   . . .
   </sensor>
</sensors>
### Implémentation
Package org.tensin.beerduino
Classe TemperatureResults
## 2. Sensor Individual result for one sensor. ### Attributs
Attributs Type Req Description
value double X The read temperature
id String X The arduino sensor ID.
type String The temperature type (F|C).
seuil double The arduino temperature limit for this sensor (defined on the arduino board).
### Exemple
<sensor value='...' id='...' type='...' seuil='...' />
### Implémentation
Package org.tensin.beerduino
Classe TemperatureResult
# How to configure Preferences of the Java project ? ## 1. Preferences Beerduino global preferences. ### Attributs
Attributs Type Req Description
noNamespaceSchemaLocation String XSD internal definition
### Elements
Elements Type Req Description
arduinoIp String X IP address of the arduino board
arduinoPort int X Port of the arduino board. Default to 80.
arduinoCheckFrequency int Frequency of the arduino values checkout. In milliseconds. Default to 1000.
seuils seuil Temperatures warnings (after / below whom a notification will be sent)
Liste de mail mail X Notifications mechanism. Multiple notifications may be defined at the same time.
Liste de sms sms X Notifications mechanism. Multiple notifications may be defined at the same time.
Liste de notifry notifry X Notifications mechanism. Multiple notifications may be defined at the same time.
Liste de pachube pachube X Notifications mechanism. Multiple notifications may be defined at the same time.
Liste de push push X Notifications mechanism. Multiple notifications may be defined at the same time.
Liste de twitter twitter X Notifications mechanism. Multiple notifications may be defined at the same time.
Liste de url url X Notifications mechanism. Multiple notifications may be defined at the same time.
workDir String Temp directory.
### Exemple
<preferences noNamespaceSchemaLocation='...'>
   <!-- Description de 'arduinoIp' -->
   <arduinoIp>. . .</arduinoIp>

   <!-- Description de 'arduinoPort' -->
   <arduinoPort>. . .</arduinoPort>

   <!-- Description de 'arduinoCheckFrequency' -->
   <arduinoCheckFrequency>. . .</arduinoCheckFrequency>

   <!-- Description de 'seuils' -->
   <seuils>
   . . .
   </seuils>

   <!-- Liste de 'mail' -->
   <mail>
   . . .
   </mail>
   .
   .
   .
   <mail>
   . . .
   </mail>

   <!-- Liste de 'sms' -->
   <sms>
   . . .
   </sms>
   .
   .
   .
   <sms>
   . . .
   </sms>

   <!-- Liste de 'notifry' -->
   <notifry>
   . . .
   </notifry>
   .
   .
   .
   <notifry>
   . . .
   </notifry>

   <!-- Liste de 'pachube' -->
   <pachube>
   . . .
   </pachube>
   .
   .
   .
   <pachube>
   . . .
   </pachube>

   <!-- Liste de 'push' -->
   <push>
   . . .
   </push>
   .
   .
   .
   <push>
   . . .
   </push>

   <!-- Liste de 'twitter' -->
   <twitter>
   . . .
   </twitter>
   .
   .
   .
   <twitter>
   . . .
   </twitter>

   <!-- Liste de 'url' -->
   <url>
   . . .
   </url>
   .
   .
   .
   <url>
   . . .
   </url>

   <!-- Description de 'workDir' -->
   <workDir>. . .</workDir>
</preferences>
### Implémentation
Package org.tensin.beerduino
Classe Preferences
## 2. Seuil Definition of a temperature limit for a sensor ### Attributs
Attributs Type Req Description
capteur String X Sensor ID (usually a number, corresponding to the sensor linked to the arduino board)
temperature double Temperature limit : once reached, the notifications will be activated. Optional, if not set, the notification will always be emitted.
notifiers String The ID of the notifiers that are concerned by this limit. If empty, all notifiers will be notified.
### Exemple
<seuil capteur='...' temperature='...' notifiers='...' />
### Implémentation
Package org.tensin.beerduino
Classe TemperatureLimit
## 3. Mail Notification by sending an email. ### Attributs
Attributs Type Req Description
id String Internal ID defining the notification. Can be reused below (on the temperature limits for example)
smtpHostname String SMTP server for sending the mail
smtpLogin String SMTP username
smtpPassword String SMTP password
smtpPort int SMTP port. Default to 587 for gmail (TLS)
### Elements
Elements Type Req Description
destinataires destinataire X People to be notified by mail
### Exemple
<mail id='...' smtpHostname='...' smtpLogin='...' smtpPassword='...'
         smtpPort='...'>
   <!-- Description de 'destinataires' -->
   <destinataires>
   . . .
   </destinataires>
</mail>
### Implémentation
Package org.tensin.beerduino.notifications
Classe MailNotification
## 4. Destinataire Mail recipient whom the mail will be sent ### Attributs
Attributs Type Req Description
email String X Mail that will be used for the to: field
name String Name of the recipient
### Exemple
<destinataire email='...' name='...' />
### Implémentation
Package org.tensin.beerduino
Classe Recipient
## 5. Sms Notification by sending an SMS. Not done yet. Where are the free SMS services by the way ? ### Attributs
Attributs Type Req Description
id String Internal ID defining the notification. Can be reused below (on the temperature limits for example)
### Elements
Elements Type Req Description
number String X SMS number to send the notification
### Exemple
<sms id='...'>
   <!-- Description de 'number' -->
   <number>. . .</number>
</sms>
### Implémentation
Package org.tensin.beerduino.notifications
Classe SMSNotification
## 6. Notifry Notification by activating a Notifry notification. See http://notifrier.appspot.com/. ### Attributs
Attributs Type Req Description
id String Internal ID defining the notification. Can be reused below (on the temperature limits for example)
notifry-url String Notifry URL to use. Something like 'https://notifrier.appspot.com/notifry'.
source String X The Notifry source identification (to be grabbed from your notifry configuration panel).
signature String Signature that will be shown in the notifry notification sent.
### Exemple
<notifry id='...' notifry-url='...' source='...' signature='...' />
### Implémentation
Package org.tensin.beerduino.notifications
Classe NotifryNotification
## 7. Pachube Notification by pushing data to pachube. ### Attributs
Attributs Type Req Description
id String Internal ID defining the notification. Can be reused below (on the temperature limits for example)
### Exemple
<pachube id='...' />
### Implémentation
Package org.tensin.beerduino.notifications
Classe PachubeNotification
## 8. Push Notification by activating a PushTo notification. ### Attributs
Attributs Type Req Description
id String Internal ID defining the notification. Can be reused below (on the temperature limits for example)
pushto-url String The push-to URL to use. Something like 'http://pushme.to/'.
pushto-id String X Your pushTo ID (login)
signature String Signature that will be shown in the pushto notification sent.
### Exemple
<push id='...' pushto-url='...' pushto-id='...' signature='...' />
### Implémentation
Package org.tensin.beerduino.notifications
Classe PushToNotification
## 9. Twitter Notification by sending a Tweet. ### Attributs
Attributs Type Req Description
id String Internal ID defining the notification. Can be reused below (on the temperature limits for example)
dest String X Recipient ID that will receive the tweets
### Exemple
<twitter id='...' dest='...' />
### Implémentation
Package org.tensin.beerduino.notifications
Classe TwitterNotification
## 10. Url Notification by activating a single URL. ### Attributs
Attributs Type Req Description
id String Internal ID defining the notification. Can be reused below (on the temperature limits for example)
url String The single URL that will be activated.
### Exemple
<url id='...' url='...' />
### Implémentation
Package org.tensin.beerduino.notifications
Classe URLNotification
Contact : serge.simon@gmail.com

本源码包内暂不包含可直接显示的源代码文件,请下载源码包。