Changes between Version 91 and Version 92 of WikiStart
- Timestamp:
- 2013-11-04 22:39:05 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiStart
v91 v92 22 22 23 23 The latest version of the Vera plugin can be found here: 24 25 http://code.mios.com/git_public/mios/arduino-sensor.git/tree/refs/heads/master:/VeraArduino/Vera?js=1 24 http://code.mios.com/git_public/mios/arduino-sensor.git/tree/HEAD:/VeraArduino/Vera?js=1 26 25 27 26 [[Image(serial.png, align=right, 300px)]] 28 1. Download all files and upload them in Vera under APPS->Develop Apps->Luup files.29 2. To create the new device to to APPS->Develop Apps->Luup and enter "D_Arduino1.xml" in "Upnp Device Filename" and press "Create Device"27 1. Download all *_Arduino*.* files and upload them in Vera under APPS->Develop Apps->Luup files (you can skip the subfolders if you don't plan to use these sensors). 28 2. To create the Arduino Plugin device go to APPS->Develop Apps->Luup and enter "D_Arduino1.xml" in "Upnp Device Filename" and press "Create Device" 30 29 3. After the usual reload/refresh ritual the Arduino root device should pop up. 31 4. If you have your Arduino board plugged into Vera you should now configure which serial device to use. See image to the right. 30 4. If you have your Arduino board plugged into Vera you should now configure which serial device to use. See image to the right. Set baudrate to 115200. 32 31 33 32 == Using the Arduino library == … … 35 34 All the components developed and compiled here are Open Source. The Vera plugin was inspired by the excellent rfxtrx plugin. I've also written a Arduino library handling all encoding and communication between Arduino sensors and ArduinoGateway. The Vera plugin part automatically creates newly found sensors in Vera. 36 35 37 It should be pretty simple to use the library (some more documentation in [[http://code.mios.com/git_public/mios/arduino-sensor.git/blob/ refs/heads/master:/VeraArduino/Arduino/libraries/Vera/Vera.h?js=1|vera.h]]). But here follows the basic usage in your Arduino sketch:36 It should be pretty simple to use the library (some more documentation in [[http://code.mios.com/git_public/mios/arduino-sensor.git/blob/HEAD:/VeraArduino/Arduino/libraries/Vera/Sensor.h?js=1|vera.h]]). But here follows the basic usage in your Arduino sketch: 38 37 39 38 {{{ … … 42 41 #include <SPI.h> 43 42 #include <RF24.h> 44 #include < Vera.h>43 #include <Sensor.h> 45 44 #include <EEPROM.h> 46 45 47 48 // Set RADIO_ID to something unique in your sensor network (1-254) 49 // or set to AUTO if you want vera to assign a RADIO_ID for you. 50 #define RADIO_ID AUTO 51 52 // Create RF24 library instance using pin 9,10 which is what I've described how to hook up the radio module in this wiki. 53 RF24 radio(9,10); 54 55 // Create a Vera library instance 56 Vera sensors(RADIO_ID, &radio); 46 // Create a Sensor library instance 47 Sensor sensors(9,10); 57 48 58 49 void setup() 59 50 { 60 // Initialize and start up vera library (this also initializes the radio stuff )61 vera.begin( );62 63 // Register sensor(s) to Vera ( they will be created as child devices when found). The arguments as follows.51 // Initialize and start up vera library (this also initializes the radio stuff and node id) 52 vera.begin(AUTO); 53 54 // Register sensor(s) to Vera (vera must be in include mode to pick up sensor). The arguments as follows. 64 55 // childId Each Arduino can have up to 128 child sensors. 0-127. 65 56 // Here we register childId 0. … … 86 77 A sketch is a small program that you download to the Arduino boards. To get started download Arduino SDK here: http://arduino.cc/en/Main/Software 87 78 88 Also make sure to install all Arduino libraries I've created and collected here before trying to build the sensor sketches below. http://code.mios.com/trac/mios_arduino-sensor/browser/trunk/Arduino/libraries 79 Also make sure to install all Arduino libraries I've created and collected here before trying to build the sensor sketches below. 80 http://code.mios.com/git_public/mios/arduino-sensor.git/tree/HEAD:/VeraArduino/Arduino/libraries?js=1 89 81 90 82 Follow the description below on how to assemble hardware and configure each type of sensor. I've also tried to link all the hardware necessary to build each sensor [from aliexpress.com]. … … 97 89 [[Image(gw.jpg, align=right, 200px)]] 98 90 Acts as a link between Vera and your wireless sensors. 99 This is a mandatory sketch that shouldbe downloaded to an Arduino Nano. This nano is then connected to your Vera using a usb cable.100 It is important to use a Arduino Nano board for the ArduinoGateway as it contains a serial usb chipset recognized directlyby Vera.91 This is a mandatory sketch that must be downloaded to an Arduino Nano. This nano is then connected to your Vera using a usb cable. 92 It is important to use a Arduino Nano board for the ArduinoGateway because it contains a serial usb chipset recognized by Vera. 101 93 102 94 [[DallasTemperatureSensor|Dallas Temperature Sensor]] … … 183 175 184 176 == Changelog == 177 178 179 Planned features: 180 181 === CHANGES 1.3 (Beta 1) === 182 Download zip: 183 http://code.mios.com/git_public/mios/arduino-sensor.git/snapshot/HEAD.zip?js=1 184 Browse tree: 185 http://code.mios.com/git_public/mios/arduino-sensor.git/tree/HEAD?js=1 186 187 * More debug info is printed to serial monitor in sensors (can be turned off). 188 * Nodes that receive messages from vera don't need to busy wait. New API methods. 189 See new example code in RelayActuator sketch. 190 * Increased transfer speed (1MBPS) between radios. 191 * Sent time to sensors uses vera configured timezone 192 * Radio protocol updated. from/to/version/crc/binary added in message header. This change requires sensors to update their (1.2) library version. 193 * Variables in vera only gets updated if changed. 194 * Increased baudrate between vera gateway and vera. 195 * Message can be sent between sensors without being processed by vera. 196 * Vera library is now a subclass of RF24 . 197 * Remove gateway specific code from vera library. New class hierarchy RF24->Node->Relay->Gateway. 198 * Preserve memory by placing static strings in PROGMEM 199 * Inclusion mode. Can be started from the Arduino Vera plugin or by using digital input pin on vera gateway (inclusion button). All found devices during inclusion time will be created at once (no multi vera reload/restart cycle needed anymore). 200 * ArduinoGateway support blinking leds for RX/TX/ERR and a special blink when inclusion mode is activated. 201 * Dimmer support 202 * Lastupdate-variable is set in vera for all changes. 203 * A new device is created in vera for each physical arduino/radio 204 This device will hold info about node, such as library version, battery info 205 and relay information. 206 * Support for message relaying. All nodes can act as relay. This functionality 207 can be used for communicating with sensors far away. An relay node forwards 208 messages between sensors and vera gateway. Multiple relays (message hops) 209 is also supported. 210 See RelayActuator sketch for an example how to create an relay node. 211 * Relay node for a sensor (could be GW) is dynamically located each time a sensor is losing connection. This information is also sent to vera and can be seen in radio node device. 212 * Unit system can be configured in vera plugin (metric/imperial). Sensors can fetch this setting (isMetricSystem()) and send in data in the correct unit. 213 185 214 186 215 === CHANGES 1.2 ===