Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/wiki'
Browse files Browse the repository at this point in the history
  • Loading branch information
mjung85 committed Oct 9, 2015
2 parents e13e708 + a0df064 commit 49c3ae2
Show file tree
Hide file tree
Showing 29 changed files with 3,960 additions and 0 deletions.
57 changes: 57 additions & 0 deletions 6LoWPAN.md
@@ -0,0 +1,57 @@
# Introduction #

The goal is to have the IoTSyS interface directly on the end device. To show the feasibility below a simple example illustrates how to deploy the CoAP/oBIX stack on a constrained microcontroller.

The example is based on the Contiki operating system and currently mainly on the Erbium CoAP engine example. Providing a proper oBIX framework for Contiki is ongoing work.

# How to #

Download Instant Contiki (> 2.7) from www.contiki-os.org.

Clone the forked repository:
git clone https://github.com/mjung85/contiki

In the contiki base directory of the working copy init the submodule
```
contiki# git submodule init
contiki# git submodule update
```

For the simple example we use a Z1 sensor node from Zolertia. It can also be run in the simulator.

**Simulator (Cooja):**
```
contiki/examples/iotsys# make TARGET=cooja iotsys.csc
```
This starts a simple simulation with one RPL border router and a Z1 sensor node that runs a CoAP/oBIX server.

The host operating system can connect to the simulated WSN by creating a tunnel connection to the RPL border router.

```
contiki/examples/iotsys# make connect-router-cooja
```
Afterwards, the mote can be reached using the IPv6 address aaaa::c30c:0:0:2. Just test it by using the Firefox plugin Copper.

**Note**: For working properly you have to select CoAP 13, enable Debug options and set accept to application/xml.

**Z1 deployment**
```
contiki/examples/iotsys# make TARGET=z1 savetarget
contiki/examples/iotsys# make iotsys-server.upload && make z1-reset
```

# Z1 specific #

See [ZolertiaWiki](http://zolertia.sourceforge.net/wiki/index.php/Mainpage:Contiki_apps#Change_the_default_MAC_address_and_Node_ID.2C_and_burn_it_to_flash).

Burn node id (used for stateless IPv6 auto configuration):

```
/contiki/examples/z1$
make clean && make burn-nodeid.upload nodeid=158 nodemac=158 && make z1-reset && make login
```

List available motes:
```
make TARGET=z1 z1-motelist
```
165 changes: 165 additions & 0 deletions AppscaleAPI.md

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions BACnetConnector.md
@@ -0,0 +1,33 @@
# Introduction #

BACnet is a mature standard in the domain of building automation. BACnet uses a quite generic information model and BACnet controllers are interfaced using the BACnet/IP connectivity.

# Connection configuration #
One or many BACnet connections can be configured in the `devices.xml` configuration file.

A connector configuration consists of a connection configuration section and zero or more configured devices. For the configuration the broadcast IP address and the local UDP port and a local BACnet device identifier need need to be configured.

```
<name>BACnet E-Lab</name>
<enabled>false</enabled>
<localDeviceID>23345</localDeviceID>
<broadcastAddress>192.168.161.255</broadcastAddress>
<localPort>47808</localPort>
```

# Device configuration #

For the initialization of a device, one has to specify the type of the class implementing the according oBIX contract for BACnet. A BACnet device is initialized with one or multiple BACnet data point address information consisting of the device identifier, the object type and the property identifier used for the communication. The `href` field specifies the relative path that is used to uniquly identify the oBIX object representing the BACnet device. `historyEnabled` allows to enable or disable the oBIX history for all basic data points of an oBIX object. `historyCount` limits the number of history values that are collected for each data point.


```
<device>
<type>at.ac.tuwien.auto.iotsys.gateway.obix.objects.iot.actuators.impl.bacnet.FanSpeedActuatorImplBacnet
</type>
<address>2098177, 1, 4, 85, 2098177, 4, 4, 85</address>
<href>fanAirOut</href>
<historyEnabled>false</historyEnabled>
</device>
```

See the `devices.xml` for more examples.
47 changes: 47 additions & 0 deletions COAPinteraction.md
@@ -0,0 +1,47 @@


# Introduction #

For the CoAP interaction you browser needs to provide a user agent for the Constrained Application Protocol (CoAP). The [Copper](https://addons.mozilla.org/en-us/firefox/addon/copper-270430/) add-on provides such a user agent for the Firefox browser.

**NOTE: CoAP 13-** The gateway currently supports the CoAP 13 draft.

# Discover available resources #
<img src='https://iotsys.googlecode.com/hg/misc/img/coap/discover.png' />
According to the CoRE link format you can query the gateway using the `/.well-known/core` URL.

**Request:**
```
COAP GET coap://localhost/.well-known/core
```

**Response (Excerpt):**
```
</watchService>;rt="obix:WatchService";if="obix"
</alarms>;rt="obix:AlarmSubject";if="obix"
</VirtualDevices/virtualPresence>;rt="iot:PresenceDetectorSensor";if="obix"
</VirtualDevices/virtualPresence/presenceStatus>;rt="obix:bool";if="obix"
</VirtualDevices/virtualBrightnessActuator>;rt="iot:BrightnessActuator";if="obix"
</VirtualDevices/virtualBrightnessActuator/value>;rt="obix:obj";if="obix"
</VirtualDevices/virtualBrightnessActuator/value/history>;rt="obix:int";if="obix"
</VirtualDevices/virtualBrightnessActuator/value/history/count>;rt="obix:int";if="obix"
</VirtualDevices/virtualBrightnessActuator/value/history/start>;rt="obix:abstime";if="obix"
</VirtualDevices/virtualBrightnessActuator/value/history/end>;rt="obix:abstime";if="obix"
```

# Query or modify a sensor or actuator #
Use the same oBIX interaction like with [HTTP](HTTPinteraction.md).

**Be sure to select coap13 - selection button in upper right of Copper**

# Observe a resource using CoAP #
One big advantage of CoAP is the support for asynchronous communication. Use the `OBSERVE` protocol verb to subscribe to a resource, like a temperature sensor or brightness actuator.

**Request:**
```
COAP OBSERVE coap://localhost/VirtualDevices/virtualBrightnessActuator/value
```

Issue some `PUT` requests in parallel, e.g. using a [HTTP client](HTTPinteraction.md).

**Be sure to select coap13 - selection button in upper right of Copper**

0 comments on commit 49c3ae2

Please sign in to comment.