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.
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).
- 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) ;
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 ) ;
- 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/
Temperature results. One entry for each sensor.
Attributs | Type | Req | Description |
---|---|---|---|
time | String | X | Time the whole XML results file has been generated. |
Elements | Type | Req | Description |
---|---|---|---|
Liste de sensor | sensor | X | Individual sensor temperature result |
<sensors time='...'> <!-- Liste de 'sensor' --> <sensor> . . . </sensor> . . . <sensor> . . . </sensor> </sensors>
Package | org.tensin.beerduino |
Classe | TemperatureResults |
Individual result for one sensor.
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). |
<sensor value='...' id='...' type='...' seuil='...' />
Package | org.tensin.beerduino |
Classe | TemperatureResult |
Beerduino global preferences.
Attributs | Type | Req | Description |
---|---|---|---|
noNamespaceSchemaLocation | String | XSD internal definition |
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 | 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 | 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. |
<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>
Package | org.tensin.beerduino |
Classe | Preferences |
Definition of a temperature limit for a sensor
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. |
<seuil capteur='...' temperature='...' notifiers='...' />
Package | org.tensin.beerduino |
Classe | TemperatureLimit |
Notification by sending an email.
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 | Type | Req | Description |
---|---|---|---|
destinataires | destinataire | X | People to be notified by mail |
<mail id='...' smtpHostname='...' smtpLogin='...' smtpPassword='...' smtpPort='...'> <!-- Description de 'destinataires' --> <destinataires> . . . </destinataires> </mail>
Package | org.tensin.beerduino.notifications |
Classe | MailNotification |
Mail recipient whom the mail will be sent
Attributs | Type | Req | Description |
---|---|---|---|
String | X | Mail that will be used for the to: field | |
name | String | Name of the recipient |
<destinataire email='...' name='...' />
Package | org.tensin.beerduino |
Classe | Recipient |
Notification by sending an SMS. Not done yet. Where are the free SMS services by the way ?
Attributs | Type | Req | Description |
---|---|---|---|
id | String | Internal ID defining the notification. Can be reused below (on the temperature limits for example) |
Elements | Type | Req | Description |
---|---|---|---|
number | String | X | SMS number to send the notification |
<sms id='...'> <!-- Description de 'number' --> <number>. . .</number> </sms>
Package | org.tensin.beerduino.notifications |
Classe | SMSNotification |
Notification by activating a Notifry notification. See http://notifrier.appspot.com/.
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. |
<notifry id='...' notifry-url='...' source='...' signature='...' />
Package | org.tensin.beerduino.notifications |
Classe | NotifryNotification |
Notification by pushing data to pachube.
Attributs | Type | Req | Description |
---|---|---|---|
id | String | Internal ID defining the notification. Can be reused below (on the temperature limits for example) |
<pachube id='...' />
Package | org.tensin.beerduino.notifications |
Classe | PachubeNotification |
Notification by activating a PushTo notification.
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. |
<push id='...' pushto-url='...' pushto-id='...' signature='...' />
Package | org.tensin.beerduino.notifications |
Classe | PushToNotification |
Notification by sending a Tweet.
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 |
<twitter id='...' dest='...' />
Package | org.tensin.beerduino.notifications |
Classe | TwitterNotification |
Notification by activating a single URL.
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. |
<url id='...' url='...' />
Package | org.tensin.beerduino.notifications |
Classe | URLNotification |
Contact : serge.simon@gmail.com