• J
    jmpy

    Another error we see sometimes: (in this case trying to force a point read)

    ERROR 2017-02-28 21:22:56,224 (com.serotonin.m2m2.web.dwr.util.ExceptionDetectionFilter.doFilter:38) - DWR invocation exception 
    java.lang.ClassCastException: com.serotonin.bacnet4j.transport.ServiceFutureImpl cannot be cast to com.serotonin.bacnet4j.service.acknowledgement.ReadPropertyAck
    	at com.serotonin.ma.bacnet.BACnetDataSourceRT.forcePointRead(BACnetDataSourceRT.java:373)
    	at com.serotonin.m2m2.rt.RuntimeManager.forcePointRead(RuntimeManager.java:650)
    	at com.serotonin.m2m2.web.dwr.BaseDwr.forcePointRead(BaseDwr.java:278)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at org.directwebremoting.impl.ExecuteAjaxFilter.doFilter(ExecuteAjaxFilter.java:34)
    	at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428)
    	at com.serotonin.m2m2.web.dwr.util.TranslationsFilter.doFilter(TranslationsFilter.java:37)
    	at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428)
    	at com.serotonin.m2m2.web.dwr.util.ExceptionDetectionFilter.doFilter(ExceptionDetectionFilter.java:26)
    	at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428)
    	at com.serotonin.m2m2.web.dwr.util.DwrPermissionFilter.doFilter(DwrPermissionFilter.java:45)
    	at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428)
    	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:431)
    	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:283)
    	at org.directwebremoting.servlet.PlainCallHandler.handle(PlainCallHandler.java:52)
    	at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101)
    	at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
    	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
    	at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83)
    	at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300)
    	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    	at org.springframework.web.filter.ShallowEtagHeaderFilter.doFilterInternal(ShallowEtagHeaderFilter.java:87)
    	at com.serotonin.m2m2.web.filter.MangoShallowEtagHeaderFilter.doFilterInternal(MangoShallowEtagHeaderFilter.java:47)
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
    	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
    	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
    	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
    	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
    	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
    	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
    	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
    	at org.eclipse.jetty.server.Server.handle(Server.java:499)
    	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
    	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
    	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
    	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
    	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
    	at java.lang.Thread.run(Thread.java:745)
    
    

    posted in User help read more
  • J
    jmpy

    Hi phil,

    I now tested the jar you sent, and it doesn't seem to help. Those errors pop up by the hundreds on start, but then appear much less after the system has settled a little.
    The thing that did became much more common is the "java.lang.reflect.InvocationTargetException" exception.

    ERROR 2017-02-28 18:48:42,379 (com.serotonin.bacnet4j.event.DefaultExceptionListener.receivedException:48) -  
    com.serotonin.bacnet4j.exception.ReflectionException: java.lang.reflect.InvocationTargetException
    	at com.serotonin.bacnet4j.type.Encodable.read(Encodable.java:214)
    	at com.serotonin.bacnet4j.type.Encodable.readWrapped(Encodable.java:400)
    	at com.serotonin.bacnet4j.type.Encodable.readEncodable(Encodable.java:364)
    	at com.serotonin.bacnet4j.type.constructed.PropertyValue.<init>(PropertyValue.java:88)
    	at sun.reflect.GeneratedConstructorAccessor54.newInstance(Unknown Source)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    	at com.serotonin.bacnet4j.type.Encodable.read(Encodable.java:202)
    	at com.serotonin.bacnet4j.type.constructed.SequenceOf.<init>(SequenceOf.java:80)
    	at com.serotonin.bacnet4j.type.Encodable.readSequenceOf(Encodable.java:273)
    	at com.serotonin.bacnet4j.service.unconfirmed.UnconfirmedCovNotificationRequest.<init>(UnconfirmedCovNotificationRequest.java:90)
    	at com.serotonin.bacnet4j.service.unconfirmed.UnconfirmedRequestService.createUnconfirmedRequestService(UnconfirmedRequestService.java:78)
    	at com.serotonin.bacnet4j.apdu.UnconfirmedRequest.parseServiceData(UnconfirmedRequest.java:91)
    	at com.serotonin.bacnet4j.transport.DefaultTransport.receiveAPDU(DefaultTransport.java:540)
    	at com.serotonin.bacnet4j.transport.DefaultTransport.receiveImpl(DefaultTransport.java:465)
    	at com.serotonin.bacnet4j.transport.DefaultTransport.run(DefaultTransport.java:406)
    	at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.reflect.InvocationTargetException
    	at sun.reflect.GeneratedConstructorAccessor91.newInstance(Unknown Source)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    	at com.serotonin.bacnet4j.type.Encodable.read(Encodable.java:202)
    	... 16 more
    Caused by: java.lang.IndexOutOfBoundsException: Index: 11, Size: 3
    	at java.util.ArrayList.rangeCheck(ArrayList.java:653)
    	at java.util.ArrayList.get(ArrayList.java:429)
    	at com.serotonin.bacnet4j.type.constructed.Choice.read(Choice.java:73)
    	at com.serotonin.bacnet4j.type.constructed.Choice.<init>(Choice.java:62)
    	at com.serotonin.bacnet4j.type.constructed.TimeStamp.<init>(TimeStamp.java:75)
    	... 20 more
    

    also, something is just found: (that the scanner also throws exceptions)
    0_1488318985039_Screenshot_2017-02-28_18-48-11.png

    The routers we are using are these: KMC BAC-5051E (BTL listed)

    We are capable of collecting more information, just let's us know what do you need...

    posted in User help read more
  • J
    jmpy

    Hi, we have an instalation with a medium bacnet network (a server connected via an ethernet backbone to 6 mstp routers connected to ~100 devices total), and we are having a couple of stability issues, watching the log we found errors being thrown ALL the time, the errors are:

    feb 23 17:25:12 bms-server ma.sh[16335]: ERROR 2017-02-23 17:25:12,189 (com.serotonin.bacnet4j.transport.DefaultTransport.run:416) - Error during expire messages:
    feb 23 17:25:12 bms-server ma.sh[16335]: java.lang.RuntimeException: Invalid arguments: router address not provided for remote recipient Address [networkNumber=501, macAddress=[53]]
    feb 23 17:25:12 bms-server ma.sh[16335]:         at com.serotonin.bacnet4j.npdu.Network.sendAPDU(Network.java:104)
    feb 23 17:25:12 bms-server ma.sh[16335]:         at com.serotonin.bacnet4j.transport.DefaultTransport.sendForResponse(DefaultTransport.java:851)
    feb 23 17:25:12 bms-server ma.sh[16335]:         at com.serotonin.bacnet4j.transport.DefaultTransport.expire(DefaultTransport.java:804)
    feb 23 17:25:12 bms-server ma.sh[16335]:         at com.serotonin.bacnet4j.transport.DefaultTransport.run(DefaultTransport.java:414)
    feb 23 17:25:12 bms-server ma.sh[16335]:         at java.lang.Thread.run(Thread.java:745)
    
    
    feb 23 17:59:38 bms-server ma.sh[16335]: ERROR 2017-02-23 17:59:38,892 (com.serotonin.bacnet4j.transport.DefaultTransport.run:395) - Error during send: com.serotonin.bacnet4j.transport.DefaultTransport$OutgoingConfirmed@17efad5
    feb 23 17:59:38 bms-server ma.sh[16335]: com.serotonin.bacnet4j.exception.BACnetRuntimeException: Cannot enter a client into the un-acked messages list. key=Key(address=Address [networkNumber=201, macAddress=[5c]], linkService=[a,a2,5,c3,ba,c0], invokeId=-4, fromServer=true)
    feb 23 17:59:38 bms-server ma.sh[16335]:         at com.serotonin.bacnet4j.transport.UnackedMessages.addClient(UnackedMessages.java:69)
    feb 23 17:59:38 bms-server ma.sh[16335]:         at com.serotonin.bacnet4j.transport.DefaultTransport$OutgoingConfirmed.sendImpl(DefaultTransport.java:314)
    feb 23 17:59:38 bms-server ma.sh[16335]:         at com.serotonin.bacnet4j.transport.DefaultTransport$Outgoing.send(DefaultTransport.java:281)
    feb 23 17:59:38 bms-server ma.sh[16335]:         at com.serotonin.bacnet4j.transport.DefaultTransport.run(DefaultTransport.java:392)
    feb 23 17:59:38 bms-server ma.sh[16335]:         at java.lang.Thread.run(Thread.java:745)
    
    

    this one is not that common:

    feb 23 18:32:38 bms-server ma.sh[16335]: ERROR 2017-02-23 18:32:38,607 (com.serotonin.bacnet4j.event.DefaultExceptionListener.receivedException:48) -
    feb 23 18:32:38 bms-server ma.sh[16335]: com.serotonin.bacnet4j.exception.ReflectionException: java.lang.reflect.InvocationTargetException
    feb 23 18:32:38 bms-server ma.sh[16335]:         at com.serotonin.bacnet4j.type.Encodable.read(Encodable.java:214)
    feb 23 18:32:38 bms-server ma.sh[16335]:         at com.serotonin.bacnet4j.type.Encodable.readWrapped(Encodable.java:400)
    feb 23 18:32:38 bms-server ma.sh[16335]:         at com.serotonin.bacnet4j.type.Encodable.readEncodable(Encodable.java:364)
    feb 23 18:32:38 bms-server ma.sh[16335]:         at com.serotonin.bacnet4j.type.constructed.PropertyValue.<init>(PropertyValue.java:88)
    feb 23 18:32:38 bms-server ma.sh[16335]:         at sun.reflect.GeneratedConstructorAccessor64.newInstance(Unknown Source)
    feb 23 18:32:38 bms-server ma.sh[16335]:         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    feb 23 18:32:38 bms-server ma.sh[16335]:         at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    feb 23 18:32:38 bms-server ma.sh[16335]:         at com.serotonin.bacnet4j.type.Encodable.read(Encodable.java:202)
    feb 23 18:32:38 bms-server ma.sh[16335]:         at com.serotonin.bacnet4j.type.constructed.SequenceOf.<init>(SequenceOf.java:80)
    feb 23 18:32:38 bms-server ma.sh[16335]:         at com.serotonin.bacnet4j.type.Encodable.readSequenceOf(Encodable.java:273)
    feb 23 18:32:38 bms-server ma.sh[16335]:         at com.serotonin.bacnet4j.service.unconfirmed.UnconfirmedCovNotificationRequest.<init>(UnconfirmedCovNotificationRequest.java:90)
    feb 23 18:32:38 bms-server ma.sh[16335]:         at com.serotonin.bacnet4j.service.unconfirmed.UnconfirmedRequestService.createUnconfirmedRequestService(UnconfirmedRequestService.java:78)
    feb 23 18:32:38 bms-server ma.sh[16335]:         at com.serotonin.bacnet4j.apdu.UnconfirmedRequest.parseServiceData(UnconfirmedRequest.java:91)
    feb 23 18:32:38 bms-server ma.sh[16335]:         at com.serotonin.bacnet4j.transport.DefaultTransport.receiveAPDU(DefaultTransport.java:538)
    feb 23 18:32:38 bms-server ma.sh[16335]:         at com.serotonin.bacnet4j.transport.DefaultTransport.receiveImpl(DefaultTransport.java:463)
    feb 23 18:32:38 bms-server ma.sh[16335]:         at com.serotonin.bacnet4j.transport.DefaultTransport.run(DefaultTransport.java:404)
    feb 23 18:32:38 bms-server ma.sh[16335]:         at java.lang.Thread.run(Thread.java:745)
    feb 23 18:32:38 bms-server ma.sh[16335]: Caused by: java.lang.reflect.InvocationTargetException
    feb 23 18:32:38 bms-server ma.sh[16335]:         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    feb 23 18:32:38 bms-server ma.sh[16335]:         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    feb 23 18:32:38 bms-server ma.sh[16335]:         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    feb 23 18:32:38 bms-server ma.sh[16335]:         at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    feb 23 18:32:38 bms-server ma.sh[16335]:         at com.serotonin.bacnet4j.type.Encodable.read(Encodable.java:202)
    feb 23 18:32:38 bms-server ma.sh[16335]:         ... 16 more
    feb 23 18:32:38 bms-server ma.sh[16335]: Caused by: java.lang.IndexOutOfBoundsException: Index: 11, Size: 3
    feb 23 18:32:38 bms-server ma.sh[16335]:         at java.util.ArrayList.rangeCheck(ArrayList.java:653)
    feb 23 18:32:38 bms-server ma.sh[16335]:         at java.util.ArrayList.get(ArrayList.java:429)
    feb 23 18:32:38 bms-server ma.sh[16335]:         at com.serotonin.bacnet4j.type.constructed.Choice.read(Choice.java:73)
    feb 23 18:32:38 bms-server ma.sh[16335]:         at com.serotonin.bacnet4j.type.constructed.Choice.<init>(Choice.java:62)
    feb 23 18:32:38 bms-server ma.sh[16335]:         at com.serotonin.bacnet4j.type.constructed.TimeStamp.<init>(TimeStamp.java:75)
    feb 23 18:32:38 bms-server ma.sh[16335]:         ... 21 more
    

    an example point config:

    0_1487884179654_Screenshot_2017-02-23_17-55-03.png

    the routing table of one of our bacnet routers:
    0_1487884535594_Screenshot_2017-02-23_18-14-39.png

    BACNet local device config:
    0_1487886040805_Screenshot_2017-02-23_18-39-18.png

    Some help would be appreciated! :)

    posted in User help read more
  • J
    jmpy

    I second this,

    another option (easier but not a replacement) could be to add the scheduler to the rest api, so on can write a handling html/angular directive/whatever.

    regards.

    posted in Wishlist read more
  • J
    jmpy

    Hmmm, ok. Thanks for the fast response.
    How is it then, that virtual points can be written with the publisher?
    Also, we tested one more thing:

    • we had our modbus point A
    • we created a virtual data point VirtA
    • we created two 'onchange' point links, A->VirtA and VirtA->A
    • voilá, it worked, point A could be written using the bacnet publisher!
    • (it also worked using a metapoint and a single pointlink)

    thoughts?

    posted in User help read more
  • J
    jmpy

    Hi, i'm trying to read mango data from python using the rest api. I read all I could find in the forum, but still the cors looks like it's not working. I tried adding as many headers to "Access-Control-Allow-Headers", and send as little headers as possible from my python code. I tried with GET and POST. Please. Any help will be appreciated.

    the debugging console in python (you can see that mangoApiHeaders is loading just fine):

    send: 'GET /rest/v1/login/admin?password=admin HTTP/1.1\r\nHost: 127.0.0.1:8087\r\nAccess-Control-Allow-Origin: *\r\nX-Requested-With: XMLHttpRequest\r\nAccept-Encoding: gzip, deflate\r\n\r\n'
    reply: 'HTTP/1.1 406 Not Acceptable\r\n'
    DEBUG:requests.packages.urllib3.connectionpool:"GET /rest/v1/login/admin?password=admin HTTP/1.1" 406 0
    header: Date: Wed, 10 Feb 2016 16:33:05 GMT
    header: Access-Control-Max-Age: 3600
    header: Access-Control-Allow-Headers: X-Requested-With,Content-Type,Accept,Origin, X-XSRF-TOKEN, Set-Cookie, Expires, Connection, User-Agent, Accept-Encoding, Host , LOGOUT, PASSWORD
    header: Access-Control-Allow-Origin: *
    header: Access-Control-Allow-Credentials: true
    header: Access-Control-Allow-Methods: PUT, POST, GET, OPTIONS, DELETE
    header: Set-Cookie: MANGO8087=1ekrvt78inh341m02r56n06vu8;Path=/
    header: Expires: Thu, 01 Jan 1970 00:00:00 GMT
    header: messages: 
    header: errors: Invalid login
    header: Content-Length: 0
    header: Server: Jetty(9.2.12.v20150709)
    send: 'POST /rest/v1/login/admin?password=admin HTTP/1.1\r\nHost: 127.0.0.1:8087\r\nX-Requested-With: XMLHttpRequest\r\nAccess-Control-Allow-Origin: *\r\nCookie: MANGO8087=1ekrvt78inh341m02r56n06vu8\r\nAccept-Encoding: gzip, deflate\r\nContent-Length: 0\r\n\r\n'
    DEBUG:requests.packages.urllib3.connectionpool:"POST /rest/v1/login/admin?password=admin HTTP/1.1" 406 0
    reply: 'HTTP/1.1 406 Not Acceptable\r\n'
    header: Date: Wed, 10 Feb 2016 16:33:05 GMT
    header: Access-Control-Max-Age: 3600
    header: Access-Control-Allow-Headers: X-Requested-With,Content-Type,Accept,Origin, X-XSRF-TOKEN, Set-Cookie, Expires, Connection, User-Agent, Accept-Encoding, Host , LOGOUT, PASSWORD
    header: Access-Control-Allow-Origin: *
    header: Access-Control-Allow-Credentials: true
    header: Access-Control-Allow-Methods: PUT, POST, GET, OPTIONS, DELETE
    header: Content-Length: 0
    header: Server: Jetty(9.2.12.v20150709)
    

    My files:
    overrides/web/override-web.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <!--
        Copyright (C) 2015 Infinite Automation Systems Inc. All rights reserved.
        @author Terry Packer
    -->
    
    <web-app xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
        version="2.5">
     
      <!-- 
        Filter definitions.
       -->
      <filter>
        <description>Filter to allow custom headers to be added to the REST API responses</description>
        <filter-name>customHeadersFilter</filter-name>
        <filter-class>com.serotonin.m2m2.web.mvc.rest.v1.CustomHeadersFilter</filter-class>
      </filter>
      
      <filter-mapping>
       <filter-name>customHeadersFilter</filter-name>
       <url-pattern>/rest/*</url-pattern>
      </filter-mapping>
      
    </web-app>
    
    

    /web/modules/mangoApi/classes/mangoApiHeaders.properties

    Access-Control-Allow-Origin=*
    Access-Control-Allow-Methods=PUT, POST, GET, OPTIONS, DELETE
    Access-Control-Allow-Credentials=true
    Access-Control-Max-Age=3600
    Access-Control-Allow-Headers=X-Requested-With,Content-Type,Accept,Origin, X-XSRF-TOKEN, Set-Cookie, Expires, Connection, User-Agent, Accept-Encoding, Host , LOGOUT, PASSWORD
    

    Re: REST API access custom software

    posted in Development general discussion read more
  • J
    jmpy

    Hi, we are connecting our system to mangoES via modbus rtu.
    All works ok withing mango, we can read points, write points, no problem.

    When publishing points using bacnet ip publisher, we can't write point values to modbus points.
    We tried changing write priority (1 and 16), but it doesnt help.

    We recreated the issue using a simple modbus relay module running at 9600 bauds and trying to write to it using another mango instance. We write virtual vars just fine, but the modbus point just stays the same (we can write to it just fine in the watchlist)

    I attach the config we used on our tests, using mango: (core 2.6.0 build 373, bacnet 2.2.0, and modbus 1.6.0 )

    $ java -version
    openjdk version "1.8.0_66-internal"
    

    config on the 'publisher' side

    {
       "dataSources":[
          {
             "xid":"DS_362292",
             "name":"bugtest",
             "enabled":true,
             "type":"VIRTUAL",
             "alarmLevels":{
                "POLL_ABORTED":"URGENT"
             },
             "purgeType":"YEARS",
             "updatePeriodType":"HOURS",
             "updatePeriods":9999,
             "editPermission":"",
             "purgeOverride":false,
             "purgePeriod":1
          },
          {
             "xid":"DS_277802",
             "name":"modSerial",
             "enabled":true,
             "type":"MODBUS_SERIAL",
             "alarmLevels":{
                "POINT_WRITE_EXCEPTION":"URGENT",
                "POLL_ABORTED":"URGENT",
                "DATA_SOURCE_EXCEPTION":"URGENT",
                "POINT_READ_EXCEPTION":"URGENT"
             },
             "purgeType":"YEARS",
             "updatePeriodType":"HOURS",
             "concurrency":"SYNC_TRANSPORT",
             "baudRate":9600,
             "characterSpacing":0,
             "commPortId":"\/dev\/ttyUSB0",
             "dataBits":8,
             "echo":false,
             "encoding":"RTU",
             "flowControlIn":0,
             "flowControlOut":0,
             "messageFrameSpacing":0,
             "overrideTiming":false,
             "parity":0,
             "stopBits":2,
             "contiguousBatches":false,
             "createSlaveMonitorPoints":false,
             "discardDataDelay":0,
             "ioLogFileSizeMBytes":1.0,
             "logIO":false,
             "maxHistoricalIOLogs":1,
             "maxReadBitCount":2000,
             "maxReadRegisterCount":125,
             "maxWriteRegisterCount":120,
             "multipleWritesOnly":false,
             "quantize":false,
             "retries":2,
             "timeout":500,
             "updatePeriods":5,
             "editPermission":"",
             "purgeOverride":false,
             "purgePeriod":1
          }
       ],
       "dataPoints":[
          {
             "xid":"DP_829661",
             "name":"a",
             "enabled":true,
             "loggingType":"INTERVAL",
             "intervalLoggingPeriodType":"MINUTES",
             "intervalLoggingType":"AVERAGE",
             "purgeType":"YEARS",
             "pointLocator":{
                "dataType":"NUMERIC",
                "changeType":{
                   "type":"NO_CHANGE",
                   "startValue":"0"
                },
                "settable":true
             },
             "eventDetectors":[
             ],
             "plotType":"SPLINE",
             "unit":"",
             "templateXid":"Numeric_Default",
             "chartColour":"black",
             "chartRenderer":{
                "type":"IMAGE",
                "timePeriodType":"DAYS",
                "numberOfPeriods":1
             },
             "dataSourceXid":"DS_362292",
             "defaultCacheSize":1,
             "deviceName":"bugtest",
             "discardExtremeValues":false,
             "discardHighLimit":1.7976931348623157E308,
             "discardLowLimit":-1.7976931348623157E308,
             "intervalLoggingPeriod":1,
             "intervalLoggingSampleWindowSize":0,
             "overrideIntervalLoggingSamples":false,
             "purgeOverride":false,
             "purgePeriod":1,
             "readPermission":"",
             "setPermission":"",
             "textRenderer":{
                "type":"ANALOG",
                "useUnitAsSuffix":true,
                "unit":"",
                "renderedUnit":"",
                "format":"0.00"
             },
             "tolerance":0.0
          },
          {
             "xid":"DP_430617",
             "name":"rele1",
             "enabled":true,
             "loggingType":"INTERVAL",
             "intervalLoggingPeriodType":"MINUTES",
             "intervalLoggingType":"INSTANT",
             "purgeType":"YEARS",
             "pointLocator":{
                "range":"HOLDING_REGISTER",
                "modbusDataType":"TWO_BYTE_INT_UNSIGNED",
                "writeType":"SETTABLE",
                "additive":0.0,
                "bit":0,
                "charset":"ASCII",
                "multiplier":1.0,
                "offset":15,
                "registerCount":0,
                "slaveId":1,
                "slaveMonitor":false
             },
             "eventDetectors":[
             ],
             "plotType":"STEP",
             "unit":"",
             "chartColour":"black",
             "chartRenderer":null,
             "dataSourceXid":"DS_277802",
             "defaultCacheSize":1,
             "deviceName":"modSerial",
             "discardExtremeValues":false,
             "discardHighLimit":1.7976931348623157E308,
             "discardLowLimit":-1.7976931348623157E308,
             "intervalLoggingPeriod":1,
             "intervalLoggingSampleWindowSize":0,
             "overrideIntervalLoggingSamples":false,
             "purgeOverride":false,
             "purgePeriod":1,
             "readPermission":"",
             "setPermission":"",
             "textRenderer":{
                "type":"RANGE",
                "useUnitAsSuffix":true,
                "unit":"",
                "renderedUnit":"",
                "format":"bool",
                "rangeValues":[
                   {
                      "colour":"#000000",
                      "from":0.0,
                      "text":"Zero",
                      "to":0.0
                   },
                   {
                      "colour":"#00ff00",
                      "from":1.0,
                      "text":"One",
                      "to":1.0
                   }
                ]
             },
             "tolerance":0.0
          },
          {
             "xid":"DP_836397",
             "name":"rele2",
             "enabled":true,
             "loggingType":"ON_CHANGE",
             "intervalLoggingPeriodType":"MINUTES",
             "intervalLoggingType":"INSTANT",
             "purgeType":"YEARS",
             "pointLocator":{
                "range":"HOLDING_REGISTER",
                "modbusDataType":"TWO_BYTE_INT_UNSIGNED",
                "writeType":"SETTABLE",
                "additive":0.0,
                "bit":0,
                "charset":"ASCII",
                "multiplier":1.0,
                "offset":16,
                "registerCount":0,
                "slaveId":1,
                "slaveMonitor":false
             },
             "eventDetectors":[
             ],
             "plotType":"STEP",
             "unit":"",
             "chartColour":"blue",
             "chartRenderer":null,
             "dataSourceXid":"DS_277802",
             "defaultCacheSize":1,
             "deviceName":"modSerial",
             "discardExtremeValues":false,
             "discardHighLimit":1.7976931348623157E308,
             "discardLowLimit":-1.7976931348623157E308,
             "intervalLoggingPeriod":15,
             "intervalLoggingSampleWindowSize":0,
             "overrideIntervalLoggingSamples":false,
             "purgeOverride":false,
             "purgePeriod":1,
             "readPermission":"",
             "setPermission":"",
             "textRenderer":{
                "type":"RANGE",
                "useUnitAsSuffix":false,
                "unit":"",
                "renderedUnit":"",
                "format":"boolt",
                "rangeValues":[
                   {
                      "colour":null,
                      "from":0.0,
                      "text":"Zero",
                      "to":0.0
                   },
                   {
                      "colour":"#008000",
                      "from":1.0,
                      "text":"One",
                      "to":1.0
                   }
                ]
             },
             "tolerance":0.0
          }
       ],
       "publishers":[
          {
             "xid":"PUB_302755",
             "type":"BACnet",
             "points":[
                {
                   "dataPointId":"DP_430617",
                   "instanceNumber":0,
                   "objectName":"modSerial - rele1"
                },
                {
                   "dataPointId":"DP_836397",
                   "instanceNumber":1,
                   "objectName":"modSerial - rele2"
                },
                {
                   "dataPointId":"DP_829661",
                   "instanceNumber":2,
                   "objectName":"bugtest - a"
                }
             ],
             "snapshotSendPeriodType":"MINUTES",
             "localDeviceConfig":"62cb7655-d718-4c40-9552-202efb93cc91",
             "cacheDiscardSize":1000,
             "cacheWarningSize":100,
             "changesOnly":false,
             "enabled":true,
             "name":"bac1",
             "sendSnapshot":false,
             "snapshotSendPeriods":5
          }
       ],
       "BACnetLocalDevices":[
          {
             "baudRate":9600,
             "broadcastAddress":"255.255.255.255",
             "commPortId":"",
             "deviceId":31416,
             "deviceName":"Mango Automation",
             "id":"62cb7655-d718-4c40-9552-202efb93cc91",
             "localBindAddress":"0.0.0.0",
             "localNetworkNumber":0,
             "port":47808,
             "retries":2,
             "retryCount":1,
             "segTimeout":5000,
             "segWindow":5,
             "thisStation":0,
             "timeout":6000,
             "type":"ip"
          }
       ]
    }
    

    on the client side

    {
       "dataSources":[
          {
             "xid":"DS_467782",
             "name":"qwe",
             "enabled":true,
             "type":"BACnetIP",
             "alarmLevels":{
                "INITIALIZATION_EXCEPTION":"URGENT",
                "DEVICE_EXCEPTION":"URGENT",
                "MESSAGE_EXCEPTION":"URGENT"
             },
             "purgeType":"YEARS",
             "updatePeriodType":"MINUTES",
             "covSubscriptionTimeoutMinutes":60,
             "localDeviceConfig":"10d9ca6d-477a-41d2-93ab-9755780520e7",
             "updatePeriods":5,
             "purgeOverride":true,
             "purgePeriod":1
          }
       ],
       "dataPoints":[
          {
             "xid":"DP_166879",
             "name":"rele1",
             "enabled":true,
             "loggingType":"ON_CHANGE",
             "intervalLoggingPeriodType":"MINUTES",
             "intervalLoggingType":"INSTANT",
             "purgeType":"YEARS",
             "pointLocator":{
                "dataType":"NUMERIC",
                "objectType":"ANALOG_VALUE",
                "propertyIdentifier":"PRESENT_VALUE",
                "link":"",
                "mac":"192.168.3.145:47808",
                "networkNumber":0,
                "objectInstanceNumber":0,
                "remoteDeviceInstanceNumber":31416,
                "settable":true,
                "useCovSubscription":true,
                "writePriority":1
             },
             "eventDetectors":[
             ],
             "plotType":"STEP",
             "unit":"",
             "chartColour":"",
             "chartRenderer":null,
             "dataSourceXid":"DS_467782",
             "defaultCacheSize":1,
             "deviceName":"qwe",
             "discardExtremeValues":false,
             "discardHighLimit":1.7976931348623157E308,
             "discardLowLimit":-1.7976931348623157E308,
             "intervalLoggingPeriod":15,
             "intervalLoggingSampleWindowSize":0,
             "overrideIntervalLoggingSamples":false,
             "purgeOverride":true,
             "purgePeriod":1,
             "textRenderer":{
                "type":"PLAIN",
                "useUnitAsSuffix":true,
                "unit":"",
                "renderedUnit":"",
                "suffix":""
             },
             "tolerance":0.0
          },
          {
             "xid":"DP_946499",
             "name":"rele2",
             "enabled":true,
             "loggingType":"ON_CHANGE",
             "intervalLoggingPeriodType":"MINUTES",
             "intervalLoggingType":"INSTANT",
             "purgeType":"YEARS",
             "pointLocator":{
                "dataType":"NUMERIC",
                "objectType":"ANALOG_VALUE",
                "propertyIdentifier":"PRESENT_VALUE",
                "link":"",
                "mac":"192.168.3.145:47808",
                "networkNumber":0,
                "objectInstanceNumber":1,
                "remoteDeviceInstanceNumber":31416,
                "settable":true,
                "useCovSubscription":true,
                "writePriority":1
             },
             "eventDetectors":[
             ],
             "plotType":"STEP",
             "unit":"",
             "chartColour":"",
             "chartRenderer":null,
             "dataSourceXid":"DS_467782",
             "defaultCacheSize":1,
             "deviceName":"qwe",
             "discardExtremeValues":false,
             "discardHighLimit":0.0,
             "discardLowLimit":0.0,
             "intervalLoggingPeriod":15,
             "intervalLoggingSampleWindowSize":0,
             "overrideIntervalLoggingSamples":false,
             "purgeOverride":true,
             "purgePeriod":1,
             "textRenderer":{
                "type":"PLAIN",
                "useUnitAsSuffix":true,
                "unit":"",
                "renderedUnit":"",
                "suffix":""
             },
             "tolerance":0.0
          },
          {
             "xid":"DP_346289",
             "name":"a",
             "enabled":true,
             "loggingType":"ON_CHANGE",
             "intervalLoggingPeriodType":"MINUTES",
             "intervalLoggingType":"INSTANT",
             "purgeType":"YEARS",
             "pointLocator":{
                "dataType":"NUMERIC",
                "objectType":"ANALOG_VALUE",
                "propertyIdentifier":"PRESENT_VALUE",
                "link":"",
                "mac":"192.168.3.145:47808",
                "networkNumber":0,
                "objectInstanceNumber":2,
                "remoteDeviceInstanceNumber":31416,
                "settable":true,
                "useCovSubscription":true,
                "writePriority":1
             },
             "eventDetectors":[
             ],
             "plotType":"STEP",
             "unit":"",
             "chartColour":"",
             "chartRenderer":null,
             "dataSourceXid":"DS_467782",
             "defaultCacheSize":1,
             "deviceName":"qwe",
             "discardExtremeValues":false,
             "discardHighLimit":0.0,
             "discardLowLimit":0.0,
             "intervalLoggingPeriod":15,
             "intervalLoggingSampleWindowSize":0,
             "overrideIntervalLoggingSamples":false,
             "purgeOverride":true,
             "purgePeriod":1,
             "textRenderer":{
                "type":"PLAIN",
                "useUnitAsSuffix":true,
                "unit":"",
                "renderedUnit":"",
                "suffix":""
             },
             "tolerance":0.0
          }
       ],
       "BACnetLocalDevices":[
          {
             "baudRate":9600,
             "broadcastAddress":"255.255.255.255",
             "commPortId":"",
             "deviceId":31417,
             "deviceName":"Mango Automation",
             "id":"10d9ca6d-477a-41d2-93ab-9755780520e7",
             "localBindAddress":"0.0.0.0",
             "localNetworkNumber":0,
             "port":47808,
             "retries":2,
             "retryCount":1,
             "segTimeout":5000,
             "segWindow":5,
             "strict":true,
             "thisStation":0,
             "timeout":6000,
             "type":"ip"
          }
       ]
    }
    

    posted in User help read more
  • J
    jmpy

    I'm having a problem with my modbus datasource, in the point locator part of th ui, specifically in the
    write part, it works sometimes, i suspect that there's a bug and the frame doesn't use some parameter
    of the datasource config, guessing even more could be the command batch option, because the device
    I'm testing doesn't support the write batch command.

    I've put together a simple video showing the bug, writing the point from the watchlist or the main datapoint
    window works just fine, but trying to write from the point locator windows, throws "no response" although I've
    seen it working before (with another device, but same software version).

    [flash]http://www.youtube.com/embed/B61Mmtkgwsw[/flash]
    http://youtu.be/B61Mmtkgwsw

    Running on the mangoes, core v2.4.2, modbus v1.4.8.

    Regards

    PD.: The forum youtube tag doesn't seem to work.

    posted in User help read more
  • J
    jmpy

    Hi, I'm testing the bacnet in mango2.4 (latest at the date)

    java: ```

    java -version
    java version "1.7.0_55"
    OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1~deb7u1)
    OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)

    
    i add the data point, all works,  but looks like it fails to subscribe to COV, and throws a critical
    

    Cannot send a request in the socket listener thread

    but nothing on the console,
    
    and when i force the point refresh it throws the "DWR invocation exception" in the console,
    stack trace:
    

    ERROR 2014-07-30 10:23:14,925 (com.serotonin.m2m2.web.dwr.util.ExceptionDetectionFilter.doFilter:38) - DWR invocation exception
    java.lang.NullPointerException
    at com.serotonin.bacnet4j.LocalDevice.send(LocalDevice.java:396)
    at com.serotonin.ma.bacnet.BACnetDataSourceRT.forcePointRead(BACnetDataSourceRT.java:366)
    at com.serotonin.m2m2.rt.RuntimeManager.forcePointRead(RuntimeManager.java:482)
    at com.serotonin.m2m2.web.dwr.BaseDwr.forcePointRead(BaseDwr.java:238)
    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:606)
    at org.directwebremoting.impl.ExecuteAjaxFilter.doFilter(ExecuteAjaxFilter.java:34)
    at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428)
    at com.serotonin.m2m2.web.dwr.util.TranslationsFilter.doFilter(TranslationsFilter.java:37)
    at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428)
    at com.serotonin.m2m2.web.dwr.util.ExceptionDetectionFilter.doFilter(ExceptionDetectionFilter.java:26)
    at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428)
    at com.serotonin.m2m2.web.dwr.util.DwrPermissionFilter.doFilter(DwrPermissionFilter.java:38)
    at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428)
    at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:431)
    at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:283)
    at org.directwebremoting.servlet.PlainCallHandler.handle(PlainCallHandler.java:52)
    at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101)
    at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:538)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1352)
    at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:77)
    at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:141)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1323)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:476)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:517)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:937)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:871)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
    at org.eclipse.jetty.server.Server.handle(Server.java:346)
    at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589)
    at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1065)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:823)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:220)
    at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)
    at java.lang.Thread.run(Thread.java:744)

    
    
    Thoughts?
    
    Thanks.

    posted in User help read more
  • J
    jmpy

    I'm having a problem with my modbus datasource, in the point locator part of th ui, specifically in the
    write part, it works sometimes, i suspect that there's a bug and the frame doesn't use some parameter
    of the datasource config, guessing even more could be the command batch option, because the device
    I'm testing doesn't support the write batch command.

    I've put together a simple video showing the bug, writing the point from the watchlist or the main datapoint
    window works just fine, but trying to write from the point locator windows, throws "no response" although I've
    seen it working before (with another device, but same software version).

    [flash]http://www.youtube.com/embed/B61Mmtkgwsw[/flash]
    http://youtu.be/B61Mmtkgwsw

    Running on the mangoes, core v2.4.2, modbus v1.4.8.

    Regards

    PD.: The forum youtube tag doesn't seem to work.

    posted in User help read more