# Presentation data from WallRouter to iDigi web

**URL:** <https://forums.digi.com/t/presentation-data-from-wallrouter-to-idigi-web/3230>\
**Category:** Device Manager\
**Created:** [December 22, 2009, 10:58pm UTC](https://forums.digi.com/t/presentation-data-from-wallrouter-to-idigi-web/3230 "2009-12-22T22:58:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wim](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@Wim](https://forums.digi.com/u/Wim)\
**Post date:** [December 22, 2009, 10:58pm UTC](https://forums.digi.com/t/presentation-data-from-wallrouter-to-idigi-web/3230/1 "2009-12-22T22:58:02Z")

</div>

Hallo,  
I have the next problem:  
I want to present the data from the wallrouter to [https://developer.idigi.com/home.do](https://developer.idigi.com/home.do) ([sd1-na.idigi.com](http://sd1-na.idigi.com))  
The telnet session works fine. What am i doing wrong?

---

<div class="post-metadata">

**Author:** ![Wim](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@Wim](https://forums.digi.com/u/Wim)\
**Post date:** [December 22, 2009, 11:06pm UTC](https://forums.digi.com/t/presentation-data-from-wallrouter-to-idigi-web/3230/2 "2009-12-22T23:06:08Z")

</div>

PS How can I upload an attachement?

---

<div class="post-metadata">

**Author:** ![Wim](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@Wim](https://forums.digi.com/u/Wim)\
**Post date:** [December 25, 2009, 1:05am UTC](https://forums.digi.com/t/presentation-data-from-wallrouter-to-idigi-web/3230/3 "2009-12-25T01:05:14Z")

</div>

Maybe I must get a little more specific. As you can see is the setup of this part of the X2 and the WallRouter ok. But why can i not pusch the data into the iDigi platform? Please help!

# This configuration file is used to specify which components will be

# specified for use with the iDigi Dia Sensor Demo.

# Essentially, we will be selecting the sources of information, and how

# that information is presented. This demo is intended to be used with

# the number of devices configured in this file. If you wish to use a

# larger number of devices, you will need to change the configuration

# of the cwm\_exist presentation near the bottom of this file.

# The devices section specifies settings for devices

devices:

# First we specify an XBee Device Manager. Since the XBee is considered,

# a shared resource on our system, we need a device which can manage

# requests from other devices relating to the XBee.

- name: xbee\_device\_manager  
driver: devices.xbee.xbee\_device\_manager.xbee\_device\_manager:XBeeDeviceManager

# Here we are including a Digi LTH (Light, Temperature, Humidity)

# XBee Sensor in our system. Configuration is similar to the Smart Plug.

# The main addition is that since the LTH Sensor will likely be battery

# powered, we have set the XBee to sleep between samples.

- name: wall\_router0  
driver: devices.xbee.xbee\_devices.xbee\_sensor:XBeeSensor  
settings:  
xbee\_device\_manager: xbee\_device\_manager  
extended\_address: “00:13:a2:00:40:30:0d:5d!”  
sleep: True  
sample\_rate\_ms: 1000  
awake\_time\_ms: 320

# The presentation section allows us to specify the ways in which

# information in our system is available.

presentations:

# Here we define a standard console method. Using this,

# someone can connect (with telnet in Windows for example),

# to get a quick and simple look at the current state of the

# system. They can view the status of all channels, and set

# any channels that support being configured.

- name: console  
driver: presentations.console.console:Console  
settings:  
type: tcp  
port: 80

# The cwm\_exist presentation layer is what allows us to

# interact with the iDigi Platform Cache (temp) Storage Service.

# This presentation layer tracks when updates are made to any

# of the channels. After a certain interval of time (defined by

# the interval setting), or after the number of new samples has

# exceeded our sample\_threshold, we combine all of the sample

# information in an XML file, and then push it up to Connectware

# through an available network connection.

# 

# Each time we push up to iDigi Platform, we are essentially creating

# a file to store our information. The file\_count lets us choose the

# maximum number of files we will have at one time as a result of this

# presentation layer. It will cycle through and overwrite old data.

# 

# If you wish to increase the number of devices in this demo, remember

# that each device can potentially have multiple channels. You will want

# to ensure that sample\_threshold parameter is greater than the total

# number of channels that are actively configured or the cwm\_exist

# presentation will constantly attempt to combine all sample information

# and send to iDigi Platform.

- name: cwm\_exist  
driver: presentations.cwm\_exist.cwm\_exist:CWMExist  
settings:  
interval: 30  
sample\_threshold: 100  
collection: sensor\_demo  
file\_count: 20  
filename: sensor\_reading

# Create a web presentation instance. When running on a PC this will

# start a new web-server on a default port

# When running on a Digi device this presentation will “extend” the

# web-server built in to the Digi device with a new page named

# “digi\_dia.html”. See the file src/presentations/web/web.py form more

# information.

- name: web0  
driver: presentations.web.web:Web  
settings:  
page: digi\_dia.html

# The RCIHandler allows for channel dumps, querying a channel, and setting

# a channel. The RCIHandler parses an incoming XML formatted message

# to determine what you wish to do. The messages are shown below. If

# an error is encountered, the request you sent will have a child error

# element specifying the error information.

- name: rci\_handler  
driver: presentations.rci.rci\_handler:RCIHandler  
settings:  
target\_name: digi\_dia

## iDigi Device Integration Application Version 1.1.17 Using settings file: dia.yml Core: initial garbage collection of 0 objects. Attempting to read “dia.yml” in “WEB/python/dia.zip”… Core: post-settings garbage collection of 25 objects. Starting Channel Manager… Starting Device Driver Manager… XBeeDeviceManager(xbee\_device\_manager): node ‘00:13:a2:00:40:30:0d:5d!’ moved to CONFIGURE state. XBeeDeviceManagerConfigurator: request to configure node ‘00:13:a2:00:40:30:0d:5d!’ XBeeDeviceManagerConfigurator: node ‘00:13:a2:00:40:30:0d:5d!’ will sleep and first configuration attempt. XBeeDeviceManagerConfigurator: deferring configuration for node ‘00:13:a2:00:40:30:0d:5d!’ XBeeDeviceManager(xbee\_device\_manager): 00:13:a2:00:40:30:0d:5d! next config attempt deferred 198 seconds. Starting Presentation Manager… XBeeDeviceManagerConfigurator: request to configure node ‘00:13:a2:00:40:30:0d:5d!’ XBeeConfigBlockDDO.apply\_config: trying ‘00:13:a2:00:40:30:0d:5d!’ = ‘DL’ to ‘\x40\x4a\x70\x77’ XBeeConfigBlockDDO.apply\_config: trying ‘00:13:a2:00:40:30:0d:5d!’ = ‘P1’ to ‘0x3’

Exception during core initialization:  
Traceback (most recent call last):  
File “src\core\core\_services.py”, line 212, in run  
File “src\presentations\presentation\_manager.py”, line 80, in **init**  
File “src\settings\settings\_base.py”, line 170, in **init**  
File “src\presentations\presentation\_manager.py”, line 86, in apply\_settings  
File “src\presentations\presentation\_manager.py”, line 101, in \_\_reenumerate\_presentations  
File “src\presentations\presentation\_manager.py”, line 141, in driver\_load  
PresentationClassLoadError: unable to load ‘presentations.cwm\_exist.cwm\_exist:CWMExist’: exceptions.MemoryError:  
CoreServices: fatal exception caught! Halting execution.  
GarbageCollector: collected 0 objects.  
Exception in thread console:  
Traceback (most recent call last):  
File “./threading.py”, line 442, in \_\_bootstrap  
File “src\presentations\console\console.py”, line 107, in run  
File “src\presentations\console\console\_tcp\_server.py”, line 182, in **init**  
File “C:\Python24\Lib\SocketServer.py”, line 330, in **init**  
File “C:\Python24\Lib\SocketServer.py”, line 341, in server\_bind  
File “”, line 1, in bind  
error: (112, ‘Address already in use’)

XBeeConfigBlockDDO.apply\_config: trying ‘00:13:a2:00:40:30:0d:5d!’ = ‘DH’ to ‘\x00\x13\xa2\x00’  
XBeeConfigBlockDDO.apply\_config: trying ‘00:13:a2:00:40:30:0d:5d!’ = ‘IR’ to ‘0x3e8’  
XBeeConfigBlockDDO.apply\_config: trying ‘00:13:a2:00:40:30:0d:5d!’ = ‘IC’ to ‘0x800’  
XBeeConfigBlockDDO.apply\_config: trying ‘00:13:a2:00:40:30:0d:5d!’ = ‘D2’ to ‘0x2’  
XBeeConfigBlockDDO.apply\_config: trying ‘00:13:a2:00:40:30:0d:5d!’ = ‘D3’ to ‘0x2’  
XBeeConfigBlockDDO.apply\_config: trying ‘00:13:a2:00:40:30:0d:5d!’ = ‘D1’ to ‘0x2’  
XBeeConfigBlockDDO.apply\_config: applying changes (AC)  
: broadcasting new SP = 0x64  
XBeeConfigBlockSleep: trying ‘00:13:a2:00:40:30:0d:5d!’ = ‘SP’ to ‘0x64’  
XBeeConfigBlockSleep: trying ‘00:13:a2:00:40:30:0d:5d!’ = ‘SO’ to ‘0x0’  
XBeeConfigBlockSleep: trying ‘00:13:a2:00:40:30:0d:5d!’ = ‘SN’ to ‘0x1’  
XBeeConfigBlockSleep: trying ‘00:13:a2:00:40:30:0d:5d!’ = ‘SM’ to ‘0x4’  
XBeeConfigBlockSleep: trying ‘00:13:a2:00:40:30:0d:5d!’ = ‘ST’ to ‘0x140’  
XBeeConfigBlockSleep: applying changes (final AC)  
XBeeConfigBlockFinalWrite: trying ‘WR’ to ‘00:13:a2:00:40:30:0d:5d!’  
XBeeConfigBlockSleep: trying ‘00:13:a2:00:40:30:0d:5d!’ = ‘ST’ to ‘0x140’  
XBeeConfigBlockSleep: applying changes (final AC)  
XBeeConfigBlockFinalWrite: trying ‘WR’ to ‘00:13:a2:00:40:30:0d:5d!’  
XBeeDeviceManager(xbee\_device\_manager): configuration done for node ‘00:13:a2:00:40:30:0d:5d!’ promoting to RUNNING state.  
XBeeSensor(wall\_router0): running indication  
XBeeSensor(wall\_router0): DD info (module\_id, product\_id) = (0x0002, 0x0008)  
XBeeSensor(wall\_router0): sensor is a ‘Digi XBee Wall Router’ no humidity capability.  
XBeeSensor(wall\_router0): raw sample L: 52, T: 703  
XBeeSensor(wall\_router0): raw sample L: 57, T: 703  
XBeeSensor(wall\_router0): raw sample L: 52, T: 703  
XBeeSensor(wall\_router0): raw sample L: 51, T: 703  
XBeeSensor(wall\_router0): raw sample L: 56, T: 703  
XBeeSensor(wall\_router0): raw sample L: 57, T: 703  
XBeeSensor(wall\_router0): raw sample L: 55, T: 703  
XBeeSensor(wall\_router0): raw sample L: 50, T: 703  
XBeeSensor(wall\_router0): raw sample L: 53, T: 703  
XBeeSensor(wall\_router0): raw sample L: 56, T: 703  
XBeeSensor(wall\_router0): raw sample L: 57, T: 703  
XBeeSensor(wall\_router0): raw sample L: 52, T: 703  
XBeeSensor(wall\_router0): raw sample L: 51, T: 703  
XBeeSensor(wall\_router0): raw sample L: 55, T: 703  
XBeeSensor(wall\_router0): raw sample L: 57, T: 703  
XBeeSensor(wall\_router0): raw sample L: 55, T: 703

See also:

> **[Digi Technical Support Forums](https://forums.digi.com/?check=true&amp%3Bitemid=1)**
>
> Support forums for Digi International products and services

> **[Digi Technical Support Forums](https://forums.digi.com/?check=true&amp%3Bitemid=2)**
>
> Support forums for Digi International products and services

> **[Digi Technical Support Forums](https://forums.digi.com/?check=true&amp%3Bitemid=3)**
>
> Support forums for Digi International products and services

> **[Digi Technical Support Forums](https://forums.digi.com/?check=true&amp%3Bitemid=4)**
>
> Support forums for Digi International products and services

---

<div class="post-metadata">

**Author:** ![cpopp](https://avatars.discourse-cdn.com/v4/letter/c/cab0a1/32.png) [@cpopp](https://forums.digi.com/u/cpopp)\
**Post date:** [December 26, 2009, 5:44am UTC](https://forums.digi.com/t/presentation-data-from-wallrouter-to-idigi-web/3230/4 "2009-12-26T05:44:49Z")

</div>

Hi,

The more detailed information helps quite a bit.

The important part of that log is the following:

PresentationClassLoadError: unable to load ‘presentations.cwm\_exist.cwm\_exist:CWMExist’: exceptions.MemoryError:  
CoreServices: fatal exception caught! Halting execution.

The X2 is somewhat limited for memory, so when using the Dia, you’ll have to keep the number of presentations you are using low. Remove the console, web, and telnet presentations, and just try it with the CWMExist presentation to make sure it works. Then you can check the free memory of the device and add back in presentations as long as the memory doesn’t get very low.

Also, you might want to give the 1.2.19 version of Dia a try if you don’t have any specific ties to the 1.1.x versions. I think it should be more friendly on memory usage.

Chris

---

<div class="post-metadata">

**Author:** ![clohfink](https://avatars.discourse-cdn.com/v4/letter/c/a8b319/32.png) [@clohfink](https://forums.digi.com/u/clohfink)\
**Post date:** [December 28, 2009, 2:19pm UTC](https://forums.digi.com/t/presentation-data-from-wallrouter-to-idigi-web/3230/5 "2009-12-28T14:19:22Z")

</div>

also the

```auto
File "src\presentations\console\console_tcp_server.py", line 182, in ...
...
error: (112, 'Address already in use')

```

might mean that you are running multiple instances of the Dia which may consume a lot of the available memory. Rebooting the device after updating will make sure that any previous are running.

---

<div class="post-metadata">

**Author:** ![Wim](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@Wim](https://forums.digi.com/u/Wim)\
**Post date:** [December 28, 2009, 3:55pm UTC](https://forums.digi.com/t/presentation-data-from-wallrouter-to-idigi-web/3230/6 "2009-12-28T15:55:31Z")

</div>

Thanks cpopp and clofink! It works fine now! The 1.2.19 consumes indeed less memory.  
Little problem was that in the Dia version 1.2.19 there is no cwm\_exist presentation. I took it from the 1.1.17 Dia.

---

<div class="post-metadata">

**Author:** ![cpopp](https://avatars.discourse-cdn.com/v4/letter/c/cab0a1/32.png) [@cpopp](https://forums.digi.com/u/cpopp)\
**Post date:** [December 28, 2009, 4:10pm UTC](https://forums.digi.com/t/presentation-data-from-wallrouter-to-idigi-web/3230/7 "2009-12-28T16:10:57Z")

</div>

Hi,

It has actually just been renamed to idigi\_db. Easy to miss, but there is a note about it in the release notes under the doc directory:

Presentation Changes:

```
* Renamed cwm_exist Presentation to idigi_db. Added "secure" setting to upload data via HTTPS.

```

Chris
