This page last changed on Nov 26, 2012 by mb.

Hi all.
I'm sorry but I wrote this message in the wrong forum page,
now I post here, in the Design forum.
Thanks.

I'm ready for teating the rrdj4.
1) The controller is OK. (my controller is 2.0.1)
....boot.log.
INFO 2012-11-23 13:01:00,141 : Initialized event processor : Drools Rule Engine
INFO 2012-11-23 13:01:00,359 : Initialized event processor : RRD4J Data Logger

2) The test.rdd is created
rw-rw-rw 1 guest guest 1781 Aug 15 23:04 rrd4j-config.xml
rw-rr- 1 admin administ 100640 Nov 14 18:17 test.rrd
[/mnt/ext/opt/filemanager/share/Download/OR/OR201/webapps/controller/rrd] #

3) Now with this designer "Version 2.13.7 (2012-10-07 Rosemary)" I can't create the command with "RRD4J Graph URL' protocol".

Where can I find "Online Designer 2.14.0 or above" ?

Thanks for any suggestions.

Maurizio

Please, try it at: http://composer.openremote.org/preview/login.jsp

Posted by yannph at Nov 27, 2012 07:53

Hi Yann,
I need your help

1) from boot.log:
INFO 2012-11-28 14:50:54,926 : Initialized event processor : Drools Rule Engine
ERROR 2012-11-28 14:50:55,019 : Cannot start event processor 'RRD4J Data Logger' : Error parsinf rrd4j-config.xml
org.openremote.controller.exception.InitializationException: Error parsinf rrd4j-config.xml
at org.openremote.controller.statuscache.rrd4j.Rrd4jDataLogger.parseConfigXML(Rrd4jDataLogger.java:234)
at org.openremote.controller.statuscache.rrd4j.Rrd4jDataLogger.start(Rrd4jDataLogger.java:106)
at org.openremote.controller.statuscache.EventProcessorChain.start(EventProcessorChain.java:112)
at org.openremote.controller.statuscache.StatusCache.start(StatusCache.java:120)
at org.openremote.controller.deployer.Version20ModelBuilder.buildSensorModel(Version20ModelBuilder.java:633)
at org.openremote.controller.deployer.Version20ModelBuilder.build(Version20ModelBuilder.java:555)
at org.openremote.controller.deployer.AbstractModelBuilder.buildModel(AbstractModelBuilder.java:154)
at org.openremote.controller.service.Deployer.startup(Deployer.java:840)
at org.openremote.controller.service.Deployer.startController(Deployer.java:318)
at org.openremote.controller.spring.SpringContext.initializeController(SpringContext.java:109)
at org.openremote.controller.service.ServiceContext.init(ServiceContext.java:364)
at org.openremote.controller.bootstrap.Startup.loadServiceContext(Startup.java:85)
at org.openremote.controller.bootstrap.servlet.ServletStartup.initializeServiceContext(ServletStartup.java:190)
at org.openremote.controller.bootstrap.servlet.ServletStartup.contextInitialized(ServletStartup.java:109)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.
at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipChar(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at org.openremote.controller.statuscache.rrd4j.Rrd4jDataLogger.parseConfigXML(Rrd4jDataLogger.java:185)
... 37 more

2) The two sensors using in my test seem OK in the boot:
INFO 2012-11-28 14:50:58,087 : Registered sensor : Sensor (Name = 'SN-TEMP-OUT', ID = '6428', State Mappings:

Unknown macro: {21.1=TEMPERATURE}
)
INFO 2012-11-28 14:50:58,179 : Registered sensor : Sensor (Name = 'SN-TERM-CASA', ID = '6336', State Mappings:
Unknown macro: {21,1=TEMPERATURE}
)

3) this is my rrd4j-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<rrd4j xmlns="http://www.openremote.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openremote.org http://www.openremote.org/schemas/rrd4j.xsd">

<rrdDB fileName="test.rrd" step="60">
<datasource name="SN-TERM-CASA" type="GAUGE" heartbeat="120" />
<datasource name="SN-TEMP-OUT" type="GAUGE" heartbeat="120" />
<archive function="AVERAGE" xff="0.5" steps="1" rows="300" />
<archive function="AVERAGE" xff="0.5" steps="10" rows="144" />
<archive function="AVERAGE" xff="0.5" steps="15" rows="672" />
<archive function="AVERAGE" xff="0.5" steps="60" rows="744" />
<archive function="AVERAGE" xff="0.5" steps="120" rows="4380" />
</rrdDB>

<rrd_graph_def name="graph2">
<options>
<vertical_label>Temp (°c)</vertical_label>
<title>YPH RRD4J Esempio</title>
</options>
<datasources>
<def>
<name>SENSORE TERMOMETRO CASA </name>
<rrd>test.rrd</rrd>
<source>SN-TERM-CASA</source>
<cf>AVERAGE</cf>
</def>
<def>
<name>SENSORE TEMPERATURA OUT</name>
<rrd>test.rrd</rrd>
<source>SN-TEMP-OUT</source>
<cf>AVERAGE</cf>
</def>
</datasources>
<graph>
<line>
<datasource>SN-TERM-CASA</datasource>
<color>#FF0000</color>
<legend>Temperatura CASA\r</legend>
<width>2</width>
</line>
<line>
<datasource>SN-TEMP-OUT</datasource>
<color>#0000FF</color>
<legend>Temperatura OUT\r</legend>
<width>2</width>
</line>
<comment>Questo foglio mostra le temperature rilevate.</comment>
</graph>
</rrd_graph_def>

</rrd4j>

Thanks YANN

Posted by mb at Nov 28, 2012 14:43

Hi Mauricio,
Sorry too take so long ... I've not yet look at this but is this error still an issue or have you solved it?
Regards

Posted by yannph at Dec 21, 2012 13:58

Hello,

in your rrd4j-config.xml, in
<graph><line><datasource>
datasource should be the same as <datasources><def><name> (in your cae : SENSORE TERMOMETRO CASA),
not <source> (SN-TEMP-OUT in your case)

Regards,

Veance

Posted by veance at Jan 05, 2013 12:12

Hi Vincent, thanks.

I modified in this way:
<graph>
<line>
<datasource>SENSORE TERMOMETRO CASA </datasource>
<color>#FF0000</color>
<legend>Temperatura CASA\r</legend>
<width>2</width>
</line>
<line>
<datasource>SENSORE TEMPERATURA OUT</datasource>
<color>#0000FF</color>
<legend>Temperatura OUT\r</legend>
<width>2</width>
</line>
<comment>Questo foglio mostra le temperature rilevate.</comment>
</graph>

And restarting the controller this is the boot.log
...
INFO 2013-01-11 15:41:13,578 : Initialized event processor : Drools Rule Engine
ERROR 2013-01-11 15:41:13,652 : Cannot start event processor 'RRD4J Data Logger' : Error parsinf rrd4j-config.xml
org.openremote.controller.exception.InitializationException: Error parsinf rrd4j-config.xml
at org.openremote.controller.statuscache.rrd4j.Rrd4jDataLogger.parseConfigXML(Rrd4jDataLogger.java:234)
at org.openremote.controller.statuscache.rrd4j.Rrd4jDataLogger.start(Rrd4jDataLogger.java:106)
at org.openremote.controller.statuscache.EventProcessorChain.start(EventProcessorChain.java:112)
at org.openremote.controller.statuscache.StatusCache.start(StatusCache.java:120)
at org.openremote.controller.deployer.Version20ModelBuilder.buildSensorModel(Version20ModelBuilder.java:633)
at org.openremote.controller.deployer.Version20ModelBuilder.build(Version20ModelBuilder.java:555)
at org.openremote.controller.deployer.AbstractModelBuilder.buildModel(AbstractModelBuilder.java:154)
at org.openremote.controller.service.Deployer.startup(Deployer.java:840)
at org.openremote.controller.service.Deployer.startController(Deployer.java:318)
at org.openremote.controller.spring.SpringContext.initializeController(SpringContext.java:109)
at org.openremote.controller.service.ServiceContext.init(ServiceContext.java:364)
at org.openremote.controller.bootstrap.Startup.loadServiceContext(Startup.java:85)
at org.openremote.controller.bootstrap.servlet.ServletStartup.initializeServiceContext(ServletStartup.java:190)
at org.openremote.controller.bootstrap.servlet.ServletStartup.contextInitialized(ServletStartup.java:109)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:474)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.xml.sax.SAXParseException; systemId: file:/home/pi/OR201/webapps/controller/rrd/rrd4j-config.xml; lineNumber: 1; columnNumber: 1;
Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:251)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:300)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:205)
at org.openremote.controller.statuscache.rrd4j.Rrd4jDataLogger.parseConfigXML(Rrd4jDataLogger.java:185)
... 37 more
ERROR 2013-01-11 15:41:36,565 : Creating sensor failed. Error : No component found with id '4,034'.
XML Element : <sensor xmlns="http://www.openremote.org" id="4033" name="RRDGrap hUrl" type="custom">
<include type="command" ref="4034" />
</sensor>
org.openremote.controller.exception.XMLParsingException: No component found with id '4,034'.
at org.openremote.controller.deployer.AbstractModelBuilder.queryElementById(AbstractModelBuilder.java:129)
at org.openremote.controller.model.xml.Version20SensorBuilder.parseSensorEventProducer(Version20SensorBuilder.java:414)
at org.openremote.controller.model.xml.Version20SensorBuilder.build(Version20SensorBuilder.java:286)
at org.openremote.controller.deployer.Version20ModelBuilder.buildSensorObjectModelFromXML(Version20ModelBuilder.java:791)
at org.openremote.controller.deployer.Version20ModelBuilder.buildSensorModel(Version20ModelBuilder.java:637)
at org.openremote.controller.deployer.Version20ModelBuilder.build(Version20ModelBuilder.java:555)
at org.openremote.controller.deployer.AbstractModelBuilder.buildModel(AbstractModelBuilder.java:154)
at org.openremote.controller.service.Deployer.startup(Deployer.java:840)
at org.openremote.controller.service.Deployer.startController(Deployer.java:318)
at org.openremote.controller.spring.SpringContext.initializeController(SpringContext.java:109)
at org.openremote.controller.service.ServiceContext.init(ServiceContext.java:364)
at org.openremote.controller.bootstrap.Startup.loadServiceContext(Startup.java:85)
at org.openremote.controller.bootstrap.servlet.ServletStartup.initializeServiceContext(ServletStartup.java:190)
at org.openremote.controller.bootstrap.servlet.ServletStartup.contextInitialized(ServletStartup.java:109)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:474)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)

I appreciate any suggestion...

Thanks...

PS: I'm testing the 2.0.1 controller on the raspberry PI
I apprecieate

Posted by mb at Jan 11, 2013 14:54

Hello,

Your code seems okay.

ERROR 2013-01-11 15:41:36,565 : Creating sensor failed. Error : No component found with id '4,034'.
XML Element : <sensor xmlns="http://www.openremote.org" id="4033" name="RRDGrap hUrl" type="custom">
<include type="command" ref="4034" />
</sensor>

beware with your sensor name="RRDGraphurl" without space.

Try the rrdgraph without sensor first, just go ton http://controller_IP:PORT/controller/graph?name=graph2

Let me know if it's working.

Veance

Posted by veance at Jan 11, 2013 15:16

for the first error, check your rrd4J-config.xml first line, "Content is not allowed in prolog" is an error generally emitted by the Java XML parsers when data is encountered before the <?xml... declaration.

from http://illegalargumentexception.blogspot.fr/2010/09/java-content-is-not-allowed-in-prolog.html


Veance

Posted by veance at Jan 11, 2013 15:23
Document generated by Confluence on Jun 05, 2016 09:32