[Logo] Serotonin Software Community
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Messages posted by: chrapchp
Forum Index » Profile for chrapchp » Messages posted by chrapchp
Author Message
Ctrl-F5, Clear recent history (Firefox), tried in in IE, restarted mango, still the same dialog.
I upgraded to 1.9 and wanted to change the update period on the modbus data source. I get a dialog box that says error and no description.

Used to work in v1.8.
So I downloaded v1.9 and wanted to try out the pachube feed. I have data collected over modbus and wanted to publish a point to pachube as my "hello world" test.

I created a point link from modbus point to pachube point. That worked. Is that the best practice for doing this under Mango?
Great. It is nice when progress is made.

I transfer write registers to separate variables. If I need feeback of a write I use seperate read registers. That way I know my embedded code is performing correctly.

I will be hacking a broadcast as well for my nightly time syncs. Slave ID of 0 is not allowed from the ui. I will pick one arduino to respond to an address 1 request while the others are passive and used that as my broadcast address.
I used that one as well. It does not have a modbus function 6 which is what is sent out from Mango. I hacked a function 6 in the arduino and I can write to it now. It is not pretty and plan on create a class someday to abstract the communication layer.




The Mango datapoint entry UI is set to accept a slave address of 1-240 so if I understand your reply, Mango cannot support modbus broadcast without changes to the application layer of Mango?

I suppose hack my ardiunos to take address 1 as a "broadcast" rather than the standard 0 address and hardcode only one device to send a response back.

What I ended up doing was setting a softpoint to contain the epoch in local time based on a CRON pattern. e.g. every 10 seconds. I can't think of another way to get the current timestamp to use in the event handler.


I used the schedule to fire once a day to feed an event to set the time into the given setpoint to be sent to the slave.

What I wanted was to use the softpoint to do it. e.g. CRON once a day, then set the the time for all slave devices. e.g. p.value = timestamp. Alas, this cannot be done at the softpoint level. It seems I have to create a schedule time event for each slave, then a event handler for each schedule event.

Another option is that I can change the arduino code to deal with slave ID of 0 and implement a broadcast write. Will Mango deal with broadcasts and if it does what doe it expect back?

I am trying to figure out the easiest way to send a command once a day to trigger a time update on my arduino devices. I can manually do it and now I want to automate the write to a modbus register. I created a scheduled event via CRON and not sure how it can be used to trigger a softpoint to create a time stamp and write it to a setable modbus register.
Thanks. I know I did it once--I just installed Mango a couple of days ago--but forgot how to get there.

I'll get used to the UI navigation.

BTW, nice work.
Am I correct to assume that if a polled point does not change from the last sample, a new pointvalue is not going to be persisted to the DB? I got an HTTP retriever going out for weather and it does not change much from that source. The mySQL db has the just first sample.

From a trending perspective I trend internal temp with external temp. Until I set up a temp sensor outside, the external site will do. The issue is that the slow changing temp is not interpolate along with the other trend. Even as a single trend for external temp, I would expect a horizontal trend line. I get a single point.

I can live with that constraint for now and implement a different charting approach to deal with interpolation.

Made the correction, dropped the mysql tables., restared app. Now works. Thanks.
I'm having problems upgrading to mySQL. The tables get created in mySQL during start up, but something else during the execution fails. There is no data in the mySQL DB.

env.properties set up as per instruction. All Data from from derby was gone when I restored the env.properties to default settings. I'm using version 1.8.

Some of the exceptions I get.

SEVERE: A web application registered the JBDC driver [org.apache.derby.jdbc.AutoloadedDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
15-Feb-2010 2:45:44 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: A web application registered the JBDC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.


EVERE: Exception sending context initialized event to listener instance of class com.serotonin.mango.MangoContextListener
org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [ create table events ( id int not null auto_increment, typeId int not null, typeRef1 int not null, typeRef2 int not null, activeTs bigint not null, rtnApplicable char(1) not null, rtnTs bigint, rtnCause int, alarmLevel int not null, message longtext, ackTs bigint, ackUserId int primary key (id) type=InnoDB; ]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(id) type=InnoDB' at line 1
at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.translate(SQLExceptionSubclassTranslator.java:7
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:237)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:406)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:42
at com.serotonin.mango.db.BasePooledAccess.runScript(BasePooledAccess.java:89)
at com.serotonin.mango.db.BasePooledAccess.createSchema(BasePooledAccess.java:106)
at com.serotonin.mango.db.MySQLAccess.newDatabaseCheck(MySQLAccess.java:66)
at com.serotonin.mango.db.DatabaseAccess.initialize(DatabaseAccess.java:86)
at com.serotonin.mango.MangoContextListener.databaseInitialize(MangoContextListener.java:24
at com.serotonin.mango.MangoContextListener.contextInitialized(MangoContextListener.java:85)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
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:526)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
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:593)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(id) type=InnoDB' at line 1
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.Util.getInstance(Util.java:381)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:254
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2477)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:741)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:587)
at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:266)
at org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:421)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:395)
... 31 more



 
Forum Index » Profile for chrapchp » Messages posted by chrapchp
Go to:   
Powered by JForum 2.1.9 © JForum Team