The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.
Hi,
I did this tutorial from PTC website -> Tutorial: Send Data to the ThingWorx Server from Java Edge SDK Programs and example is working well, but what I want to do is a bit different. I have a GUI application and I want to set "Temperature" and "Pressure" properties from GUI, and demonstrate them in my Mashup. I also want to be able to change those values without ending the Java Application.
The problem is, when the program is running as a Java Application, I am not able to demostrate those values in my Mashup, and output is:
15:44:32.891 [AWT-EventQueue-0] DEBUG i.n.u.i.l.InternalLoggerFactory - Using SLF4J as the default logging framework
15:44:32.906 [AWT-EventQueue-0] DEBUG i.n.c.MultithreadEventLoopGroup - -Dio.netty.eventLoopThreads: 8
15:44:32.906 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent0 - java.nio.Buffer.address: available
15:44:32.906 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available
15:44:32.906 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent0 - sun.misc.Unsafe.copyMemory: available
15:44:32.906 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent0 - java.nio.Bits.unaligned: true
15:44:32.906 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - Platform: Windows
15:44:32.906 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - Java version: 8
15:44:32.906 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.noUnsafe: false
15:44:32.906 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - sun.misc.Unsafe: available
15:44:32.906 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.noJavassist: false
15:44:32.906 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - Javassist: unavailable
15:44:32.906 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - You don't have Javassist in your class path or you don't have enough permission to load dynamically generated classes. Please check the configuration for better performance.
15:44:32.906 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.tmpdir: C:\Users\mueruen\AppData\Local\Temp (java.io.tmpdir)
15:44:32.906 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.bitMode: 32 (sun.arch.data.model)
15:44:32.906 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.noPreferDirect: false
15:44:32.922 [AWT-EventQueue-0] DEBUG io.netty.channel.nio.NioEventLoop - -Dio.netty.noKeySetOptimization: false
15:44:32.922 [AWT-EventQueue-0] DEBUG io.netty.channel.nio.NioEventLoop - -Dio.netty.selectorAutoRebuildThreshold: 512
15:44:32.954 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numHeapArenas: 2
15:44:32.954 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numDirectArenas: 2
15:44:32.954 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.pageSize: 8192
15:44:32.954 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxOrder: 11
15:44:32.954 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.chunkSize: 16777216
15:44:32.954 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.tinyCacheSize: 512
15:44:32.954 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.smallCacheSize: 256
15:44:32.954 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.normalCacheSize: 64
15:44:32.954 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxCachedBufferCapacity: 32768
15:44:32.954 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.cacheTrimInterval: 8192
15:44:32.970 [AWT-EventQueue-0] INFO c.t.c.c.p.ClientMessageProcessor - Created new ClientMessageProcessor [minPoolSize: 4, maxPoolSize: 10, maxThreadLife: 10000, maxQueueSize: 1000]
15:44:32.970 [AWT-EventQueue-0] DEBUG c.t.c.c.e.m.ConnectivityMonitorTask - Initializing CommunicationEndpoint Connection Monitor...
15:44:32.970 [AWT-EventQueue-0] INFO c.t.c.c.p.ClientMessageProcessor - Created new ClientMessageProcessor [minPoolSize: 4, maxPoolSize: 10, maxThreadLife: 10000, maxQueueSize: 1000]
15:44:32.970 [AWT-EventQueue-0] DEBUG c.t.c.c.e.m.ConnectivityMonitorTask - Initializing CommunicationEndpoint Connection Monitor...
Client started!
15:44:33.048 [Client-EndpointMonitor-1] DEBUG c.t.c.c.e.m.ConnectivityMonitorTask - Resetting duty cycle
15:44:33.048 [Client-EndpointMonitor-1] DEBUG c.t.c.c.e.m.ConnectivityMonitorTask - Entering duty cycle ON
15:44:33.048 [Client-EndpointMonitor-1] INFO c.t.c.c.e.m.ConnectivityMonitorTask - Endpoint not connected [name: SteamSensorGateway, id: 1]. Attempting [re]connect...
15:44:33.048 [Client-EndpointMonitor-1] DEBUG c.t.c.c.e.ClientCommunicationEndpoint - Clearing endpoint authentication data [id: 1]
15:44:33.048 [Client-EndpointMonitor-1] INFO c.t.c.c.e.ClientCommunicationEndpoint - Needed to refill connections on client endpoint [id: 1] : [active: 0, max: 1]
15:44:33.079 [Client-EndpointMonitor-1] DEBUG i.n.util.internal.ThreadLocalRandom - -Dio.netty.initialSeedUniquifier: 0x16f9076af7de616a (took 6 ms)
15:44:33.094 [Client-EndpointMonitor-1] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.allocator.type: unpooled
15:44:33.094 [Client-EndpointMonitor-1] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.threadLocalDirectBufferSize: 65536
15:44:33.126 [NettyClient-NIO-2] DEBUG io.netty.util.ResourceLeakDetector - -Dio.netty.leakDetectionLevel: simple
15:44:33.250 [NettyClient-NIO-2] DEBUG c.t.c.c.c.n.ThingworxClientConnectionHandler - WebSocket Channel is connected [is open: true]
15:44:33.250 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocketClientHandshaker13 - WebSocket version 13 client handshake key: OGX0Oes3TPOf8lBuXpEzcw==, expected response: KjSdOrYavyzhfFh0iXxHB4gfCFw=
15:44:33.250 [NettyClient-NIO-2] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.maxCapacity.default: 262144
15:44:33.391 [NettyClient-NIO-2] DEBUG c.t.c.c.c.n.ThingworxClientConnectionHandler - [ClientHandler: 26134443] Client websocket handshake is complete
15:44:33.391 [Client-EndpointMonitor-1] INFO c.t.c.c.e.ClientCommunicationEndpoint - Preparing new Connection Authentication Request: DispatchingClientEndpoint [id: 1, isConnected: false, open connections: 0, max connections: 1]
15:44:33.391 [Client-EndpointMonitor-1] DEBUG c.t.c.c.e.CommunicationEndpoint - Sending connection authentication message, waiting for response [sync key: 2, message: AuthRequestMessage [requestId: 2, endpointId: -1, sessionId: -1, method: AUTHREQUEST]]
15:44:33.406 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=2 length=60
15:44:33.516 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=2
15:44:33.516 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=17
15:44:33.516 [NettyClient-NIO-2] DEBUG c.t.c.c.e.DispatchingClientEndpoint - RESPONSE received [endpoint id: 1, duration: 125] ResponseMessage [requestId: 2, endpointId: 441, sessionId: 441, code: STATUS_SUCCESS, multipart: false, packet #: 0, total packets: 0]
15:44:33.516 [Client-EndpointMonitor-1] INFO c.t.c.c.e.ClientCommunicationEndpoint - Authentication Request was SUCCESSFUL [tworx session id: 441, connection group id: 441]
15:44:33.516 [Client-EndpointMonitor-1] DEBUG c.t.c.c.e.CommunicationEndpoint - [Endpoint id: 1, connection id: 1-0] added Connection
15:44:33.516 [Client-EndpointMonitor-1] INFO c.t.c.c.e.ClientCommunicationEndpoint - Successfully reconnected client endpoint [id: 1] : [active: 1, max: 1]
15:44:33.516 [Client-EndpointMonitor-1] INFO c.t.c.client.ConnectedThingClient - Communications Endpoint Opened
15:44:33.516 [Client-EndpointMonitor-1] DEBUG c.t.c.c.e.CommunicationEndpoint - Sending synchronous message, waiting for response [sync key: 3, message: BindRequestMessage [requestId: 3, method: BINDREQUEST, names: [*SN0001, SteamSensorGateway, SteamSensorGateway]]]
15:44:33.516 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=2 length=94
Processing scan request for SteamSensor1
Check the processScanRequest
Device scanned
Temperature is: 30.0°C
Pressure is: 25.0bar
Scan request processed for SteamSensor1
15:44:33.625 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=2
15:44:33.625 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=17
15:44:33.625 [NettyClient-NIO-2] DEBUG c.t.c.c.e.DispatchingClientEndpoint - RESPONSE received [endpoint id: 1, duration: 109] ResponseMessage [requestId: 3, endpointId: -1, sessionId: -1, code: STATUS_SUCCESS, multipart: false, packet #: 0, total packets: 0]
15:44:33.625 [Client-EndpointMonitor-1] INFO c.t.c.c.e.m.ConnectivityMonitorTask - Endpoint reconnected [name: SteamSensorGateway, id: 1]
15:44:34.630 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=2
15:44:34.630 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=48
15:44:34.630 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=2
15:44:34.630 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=59
15:44:34.630 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=2
15:44:34.630 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=59
15:44:34.630 [NettyClient-NIO-2] DEBUG c.t.c.c.e.DispatchingClientEndpoint - API REQUEST received [endpoint id: 1] APIRequestMessage [requestId: 1350, endpointId: -1, sessionId: -1, method: POST, entityName: *SN0001, characteristic: Unknown, target: ]
15:44:34.645 [NettyClient-NIO-2] DEBUG c.t.c.c.e.DispatchingClientEndpoint - API REQUEST received [endpoint id: 1] APIRequestMessage [requestId: 1351, endpointId: -1, sessionId: -1, method: POST, entityName: SteamSensorGateway, characteristic: Unknown, target: ]
15:44:34.645 [NettyClient-NIO-2] DEBUG c.t.c.c.e.DispatchingClientEndpoint - API REQUEST received [endpoint id: 1] APIRequestMessage [requestId: 1352, endpointId: -1, sessionId: -1, method: POST, entityName: SteamSensorGateway, characteristic: Unknown, target: ]
15:44:34.645 [ClientProcessor-1] DEBUG c.t.c.c.e.CommunicationEndpoint - Sending synchronous message, waiting for response [sync key: 6, message: APIRequestMessage [requestId: 6, endpointId: 1, sessionId: 441, method: POST, entityName: *SN0001, characteristic: Services, target: GetPropertySubscriptions]]
15:44:34.645 [ClientProcessor-2] DEBUG c.t.c.c.e.CommunicationEndpoint - Sending synchronous message, waiting for response [sync key: 5, message: APIRequestMessage [requestId: 5, endpointId: 1, sessionId: 441, method: POST, entityName: SteamSensorGateway, characteristic: Services, target: GetPropertySubscriptions]]
15:44:34.645 [ClientProcessor-3] DEBUG c.t.c.c.e.CommunicationEndpoint - Sending synchronous message, waiting for response [sync key: 4, message: APIRequestMessage [requestId: 4, endpointId: 1, sessionId: 441, method: POST, entityName: SteamSensorGateway, characteristic: Services, target: GetPropertySubscriptions]]
15:44:34.645 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=2 length=63
15:44:34.645 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=2 length=63
15:44:34.645 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=2 length=52
15:44:34.755 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=2
15:44:34.755 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=223
15:44:34.755 [NettyClient-NIO-2] DEBUG c.t.c.c.e.DispatchingClientEndpoint - RESPONSE received [endpoint id: 1, duration: 110] ResponseMessage [requestId: 4, endpointId: 1, sessionId: -1, code: STATUS_SUCCESS, multipart: false, packet #: 0, total packets: 0]
15:44:34.755 [ClientProcessor-3] DEBUG c.t.c.c.e.CommunicationEndpoint - Sending synchronous message, waiting for response [sync key: 7, message: APIRequestMessage [requestId: 7, endpointId: 1, sessionId: 441, method: POST, entityName: SteamSensorGateway, characteristic: Services, target: GetEventSubscriptions]]
15:44:34.755 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=2 length=60
15:44:34.755 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=2
15:44:34.755 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=223
15:44:34.755 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=2
15:44:34.755 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=414
15:44:34.755 [NettyClient-NIO-2] DEBUG c.t.c.c.e.DispatchingClientEndpoint - RESPONSE received [endpoint id: 1, duration: 110] ResponseMessage [requestId: 5, endpointId: 1, sessionId: -1, code: STATUS_SUCCESS, multipart: false, packet #: 0, total packets: 0]
15:44:34.755 [ClientProcessor-2] DEBUG c.t.c.c.e.CommunicationEndpoint - Sending synchronous message, waiting for response [sync key: 8, message: APIRequestMessage [requestId: 8, endpointId: 1, sessionId: 441, method: POST, entityName: SteamSensorGateway, characteristic: Services, target: GetEventSubscriptions]]
15:44:34.755 [NettyClient-NIO-2] DEBUG c.t.c.c.e.DispatchingClientEndpoint - RESPONSE received [endpoint id: 1, duration: 110] ResponseMessage [requestId: 6, endpointId: 1, sessionId: -1, code: STATUS_SUCCESS, multipart: false, packet #: 0, total packets: 0]
15:44:34.755 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=2 length=60
15:44:34.755 [ClientProcessor-1] DEBUG c.t.c.c.e.CommunicationEndpoint - Sending synchronous message, waiting for response [sync key: 9, message: APIRequestMessage [requestId: 9, endpointId: 1, sessionId: 441, method: POST, entityName: *SN0001, characteristic: Services, target: GetEventSubscriptions]]
15:44:34.755 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=2 length=49
15:44:34.865 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=2
15:44:34.865 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=63
15:44:34.865 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=2
15:44:34.865 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=63
15:44:34.865 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=2
15:44:34.865 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=63
15:44:34.865 [NettyClient-NIO-2] DEBUG c.t.c.c.e.DispatchingClientEndpoint - RESPONSE received [endpoint id: 1, duration: 110] ResponseMessage [requestId: 7, endpointId: 1, sessionId: -1, code: STATUS_SUCCESS, multipart: false, packet #: 0, total packets: 0]
15:44:34.865 [NettyClient-NIO-2] DEBUG c.t.c.c.e.DispatchingClientEndpoint - RESPONSE received [endpoint id: 1, duration: 110] ResponseMessage [requestId: 8, endpointId: 1, sessionId: -1, code: STATUS_SUCCESS, multipart: false, packet #: 0, total packets: 0]
15:44:34.865 [NettyClient-NIO-2] DEBUG c.t.c.c.e.DispatchingClientEndpoint - RESPONSE received [endpoint id: 1, duration: 110] ResponseMessage [requestId: 9, endpointId: 1, sessionId: -1, code: STATUS_SUCCESS, multipart: false, packet #: 0, total packets: 0]
15:44:34.865 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=2 length=17
15:44:34.865 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=2 length=17
15:44:34.887 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=2 length=17
but when I run the program in Debug mode, the Mashup gets new "Temperature" and "Pressure" properties and the output is:
15:46:26.996 [AWT-EventQueue-0] DEBUG i.n.u.i.l.InternalLoggerFactory - Using SLF4J as the default logging framework
15:46:26.996 [AWT-EventQueue-0] DEBUG i.n.c.MultithreadEventLoopGroup - -Dio.netty.eventLoopThreads: 8
15:46:26.996 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent0 - java.nio.Buffer.address: available
15:46:26.996 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available
15:46:26.996 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent0 - sun.misc.Unsafe.copyMemory: available
15:46:26.996 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent0 - java.nio.Bits.unaligned: true
15:46:26.996 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - Platform: Windows
15:46:26.996 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - Java version: 8
15:46:26.996 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.noUnsafe: false
15:46:27.011 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - sun.misc.Unsafe: available
15:46:27.011 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.noJavassist: false
15:46:27.011 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - Javassist: unavailable
15:46:27.011 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - You don't have Javassist in your class path or you don't have enough permission to load dynamically generated classes. Please check the configuration for better performance.
15:46:27.011 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.tmpdir: C:\Users\mueruen\AppData\Local\Temp (java.io.tmpdir)
15:46:27.011 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.bitMode: 32 (sun.arch.data.model)
15:46:27.011 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.noPreferDirect: false
15:46:27.027 [AWT-EventQueue-0] DEBUG io.netty.channel.nio.NioEventLoop - -Dio.netty.noKeySetOptimization: false
15:46:27.027 [AWT-EventQueue-0] DEBUG io.netty.channel.nio.NioEventLoop - -Dio.netty.selectorAutoRebuildThreshold: 512
15:46:27.046 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numHeapArenas: 2
15:46:27.046 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numDirectArenas: 2
15:46:27.046 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.pageSize: 8192
15:46:27.046 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxOrder: 11
15:46:27.046 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.chunkSize: 16777216
15:46:27.046 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.tinyCacheSize: 512
15:46:27.046 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.smallCacheSize: 256
15:46:27.046 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.normalCacheSize: 64
15:46:27.046 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxCachedBufferCapacity: 32768
15:46:27.046 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.cacheTrimInterval: 8192
15:46:27.061 [AWT-EventQueue-0] INFO c.t.c.c.p.ClientMessageProcessor - Created new ClientMessageProcessor [minPoolSize: 4, maxPoolSize: 10, maxThreadLife: 10000, maxQueueSize: 1000]
15:46:27.061 [AWT-EventQueue-0] DEBUG c.t.c.c.e.m.ConnectivityMonitorTask - Initializing CommunicationEndpoint Connection Monitor...
15:46:27.673 [AWT-EventQueue-0] INFO c.t.c.c.p.ClientMessageProcessor - Created new ClientMessageProcessor [minPoolSize: 4, maxPoolSize: 10, maxThreadLife: 10000, maxQueueSize: 1000]
15:46:27.673 [AWT-EventQueue-0] DEBUG c.t.c.c.e.m.ConnectivityMonitorTask - Initializing CommunicationEndpoint Connection Monitor...
Client started!
15:46:28.346 [Client-EndpointMonitor-1] DEBUG c.t.c.c.e.m.ConnectivityMonitorTask - Resetting duty cycle
15:46:28.346 [Client-EndpointMonitor-1] DEBUG c.t.c.c.e.m.ConnectivityMonitorTask - Entering duty cycle ON
15:46:28.346 [Client-EndpointMonitor-1] INFO c.t.c.c.e.m.ConnectivityMonitorTask - Endpoint not connected [name: SteamSensorGateway, id: 1]. Attempting [re]connect...
15:46:28.346 [Client-EndpointMonitor-1] DEBUG c.t.c.c.e.ClientCommunicationEndpoint - Clearing endpoint authentication data [id: 1]
15:46:28.346 [Client-EndpointMonitor-1] INFO c.t.c.c.e.ClientCommunicationEndpoint - Needed to refill connections on client endpoint [id: 1] : [active: 0, max: 1]
15:46:28.378 [Client-EndpointMonitor-1] DEBUG i.n.util.internal.ThreadLocalRandom - -Dio.netty.initialSeedUniquifier: 0x671281c7a168a229 (took 7 ms)
15:46:28.409 [Client-EndpointMonitor-1] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.allocator.type: unpooled
15:46:28.409 [Client-EndpointMonitor-1] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.threadLocalDirectBufferSize: 65536
15:46:28.440 [NettyClient-NIO-2] DEBUG io.netty.util.ResourceLeakDetector - -Dio.netty.leakDetectionLevel: simple
15:46:28.565 [NettyClient-NIO-2] DEBUG c.t.c.c.c.n.ThingworxClientConnectionHandler - WebSocket Channel is connected [is open: true]
15:46:28.565 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocketClientHandshaker13 - WebSocket version 13 client handshake key: 0XlirwhM6FNGzH9EENEQwg==, expected response: A7dnrolZJt4biAJ81H3Kkqe153E=
15:46:28.581 [NettyClient-NIO-2] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.maxCapacity.default: 262144
15:46:28.708 [NettyClient-NIO-2] DEBUG c.t.c.c.c.n.ThingworxClientConnectionHandler - [ClientHandler: 25238096] Client websocket handshake is complete
15:46:28.723 [Client-EndpointMonitor-1] INFO c.t.c.c.e.ClientCommunicationEndpoint - Preparing new Connection Authentication Request: DispatchingClientEndpoint [id: 1, isConnected: false, open connections: 0, max connections: 1]
15:46:28.723 [Client-EndpointMonitor-1] DEBUG c.t.c.c.e.CommunicationEndpoint - Sending connection authentication message, waiting for response [sync key: 2, message: AuthRequestMessage [requestId: 2, endpointId: -1, sessionId: -1, method: AUTHREQUEST]]
15:46:28.723 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=2 length=60
15:46:28.832 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=2
15:46:28.832 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=17
15:46:28.832 [NettyClient-NIO-2] DEBUG c.t.c.c.e.DispatchingClientEndpoint - RESPONSE received [endpoint id: 1, duration: 109] ResponseMessage [requestId: 2, endpointId: 442, sessionId: 442, code: STATUS_SUCCESS, multipart: false, packet #: 0, total packets: 0]
15:46:28.832 [Client-EndpointMonitor-1] INFO c.t.c.c.e.ClientCommunicationEndpoint - Authentication Request was SUCCESSFUL [tworx session id: 442, connection group id: 442]
15:46:28.832 [Client-EndpointMonitor-1] DEBUG c.t.c.c.e.CommunicationEndpoint - [Endpoint id: 1, connection id: 1-0] added Connection
15:46:28.832 [Client-EndpointMonitor-1] INFO c.t.c.c.e.ClientCommunicationEndpoint - Successfully reconnected client endpoint [id: 1] : [active: 1, max: 1]
15:46:28.832 [Client-EndpointMonitor-1] INFO c.t.c.client.ConnectedThingClient - Communications Endpoint Opened
15:46:28.832 [Client-EndpointMonitor-1] DEBUG c.t.c.c.e.CommunicationEndpoint - Sending synchronous message, waiting for response [sync key: 3, message: BindRequestMessage [requestId: 3, method: BINDREQUEST, names: [*SN0001, SteamSensorGateway, SteamSensorGateway]]]
15:46:28.848 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=2 length=94
15:46:28.960 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=2
15:46:28.960 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=17
15:46:28.960 [NettyClient-NIO-2] DEBUG c.t.c.c.e.DispatchingClientEndpoint - RESPONSE received [endpoint id: 1, duration: 128] ResponseMessage [requestId: 3, endpointId: -1, sessionId: -1, code: STATUS_SUCCESS, multipart: false, packet #: 0, total packets: 0]
15:46:28.960 [Client-EndpointMonitor-1] INFO c.t.c.c.e.m.ConnectivityMonitorTask - Endpoint reconnected [name: SteamSensorGateway, id: 1]
15:46:29.961 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=2
15:46:29.961 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=48
15:46:29.961 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=2
15:46:29.961 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=59
15:46:29.961 [NettyClient-NIO-2] DEBUG c.t.c.c.e.DispatchingClientEndpoint - API REQUEST received [endpoint id: 1] APIRequestMessage [requestId: 1353, endpointId: -1, sessionId: -1, method: POST, entityName: *SN0001, characteristic: Unknown, target: ]
15:46:29.961 [NettyClient-NIO-2] DEBUG c.t.c.c.e.DispatchingClientEndpoint - API REQUEST received [endpoint id: 1] APIRequestMessage [requestId: 1355, endpointId: -1, sessionId: -1, method: POST, entityName: SteamSensorGateway, characteristic: Unknown, target: ]
15:46:29.961 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=2
15:46:29.961 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=59
15:46:29.961 [NettyClient-NIO-2] DEBUG c.t.c.c.e.DispatchingClientEndpoint - API REQUEST received [endpoint id: 1] APIRequestMessage [requestId: 1354, endpointId: -1, sessionId: -1, method: POST, entityName: SteamSensorGateway, characteristic: Unknown, target: ]
15:46:29.961 [ClientProcessor-3] DEBUG c.t.c.c.e.CommunicationEndpoint - Sending synchronous message, waiting for response [sync key: 5, message: APIRequestMessage [requestId: 5, endpointId: 1, sessionId: 442, method: POST, entityName: SteamSensorGateway, characteristic: Services, target: GetPropertySubscriptions]]
15:46:29.961 [ClientProcessor-2] DEBUG c.t.c.c.e.CommunicationEndpoint - Sending synchronous message, waiting for response [sync key: 4, message: APIRequestMessage [requestId: 4, endpointId: 1, sessionId: 442, method: POST, entityName: SteamSensorGateway, characteristic: Services, target: GetPropertySubscriptions]]
15:46:29.961 [ClientProcessor-1] DEBUG c.t.c.c.e.CommunicationEndpoint - Sending synchronous message, waiting for response [sync key: 6, message: APIRequestMessage [requestId: 6, endpointId: 1, sessionId: 442, method: POST, entityName: *SN0001, characteristic: Services, target: GetPropertySubscriptions]]
15:46:29.961 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=2 length=63
15:46:29.977 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=2 length=63
15:46:29.977 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=2 length=52
15:46:30.075 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=2
15:46:30.075 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=223
15:46:30.075 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=2
15:46:30.075 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=414
15:46:30.075 [NettyClient-NIO-2] DEBUG c.t.c.c.e.DispatchingClientEndpoint - RESPONSE received [endpoint id: 1, duration: 114] ResponseMessage [requestId: 5, endpointId: 1, sessionId: -1, code: STATUS_SUCCESS, multipart: false, packet #: 0, total packets: 0]
15:46:30.075 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=2
15:46:30.075 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=223
15:46:30.075 [NettyClient-NIO-2] DEBUG c.t.c.c.e.DispatchingClientEndpoint - RESPONSE received [endpoint id: 1, duration: 114] ResponseMessage [requestId: 6, endpointId: 1, sessionId: -1, code: STATUS_SUCCESS, multipart: false, packet #: 0, total packets: 0]
15:46:30.075 [NettyClient-NIO-2] DEBUG c.t.c.c.e.DispatchingClientEndpoint - RESPONSE received [endpoint id: 1, duration: 114] ResponseMessage [requestId: 4, endpointId: 1, sessionId: -1, code: STATUS_SUCCESS, multipart: false, packet #: 0, total packets: 0]
15:46:30.091 [ClientProcessor-3] DEBUG c.t.c.c.e.CommunicationEndpoint - Sending synchronous message, waiting for response [sync key: 8, message: APIRequestMessage [requestId: 8, endpointId: 1, sessionId: 442, method: POST, entityName: SteamSensorGateway, characteristic: Services, target: GetEventSubscriptions]]
15:46:30.091 [ClientProcessor-2] DEBUG c.t.c.c.e.CommunicationEndpoint - Sending synchronous message, waiting for response [sync key: 7, message: APIRequestMessage [requestId: 7, endpointId: 1, sessionId: 442, method: POST, entityName: SteamSensorGateway, characteristic: Services, target: GetEventSubscriptions]]
15:46:30.091 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=2 length=60
15:46:30.091 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=2 length=60
15:46:30.091 [ClientProcessor-1] DEBUG c.t.c.c.e.CommunicationEndpoint - Sending synchronous message, waiting for response [sync key: 9, message: APIRequestMessage [requestId: 9, endpointId: 1, sessionId: 442, method: POST, entityName: *SN0001, characteristic: Services, target: GetEventSubscriptions]]
15:46:30.091 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=2 length=49
15:46:30.203 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=2
15:46:30.203 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=63
15:46:30.204 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=2
15:46:30.204 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=63
15:46:30.204 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=2
15:46:30.204 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=63
15:46:30.204 [NettyClient-NIO-2] DEBUG c.t.c.c.e.DispatchingClientEndpoint - RESPONSE received [endpoint id: 1, duration: 113] ResponseMessage [requestId: 9, endpointId: 1, sessionId: -1, code: STATUS_SUCCESS, multipart: false, packet #: 0, total packets: 0]
15:46:30.204 [NettyClient-NIO-2] DEBUG c.t.c.c.e.DispatchingClientEndpoint - RESPONSE received [endpoint id: 1, duration: 113] ResponseMessage [requestId: 8, endpointId: 1, sessionId: -1, code: STATUS_SUCCESS, multipart: false, packet #: 0, total packets: 0]
15:46:30.204 [NettyClient-NIO-2] DEBUG c.t.c.c.e.DispatchingClientEndpoint - RESPONSE received [endpoint id: 1, duration: 113] ResponseMessage [requestId: 7, endpointId: 1, sessionId: -1, code: STATUS_SUCCESS, multipart: false, packet #: 0, total packets: 0]
15:46:30.204 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=2 length=17
15:46:30.204 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=2 length=17
15:46:30.204 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=2 length=17
Processing scan request for SteamSensor1
Check the processScanRequest
15:46:34.224 [AWT-EventQueue-0] DEBUG c.t.c.c.e.CommunicationEndpoint - Sending synchronous message, waiting for response [sync key: 10, message: APIRequestMessage [requestId: 10, endpointId: 1, sessionId: 442, method: POST, entityName: *SN0001, characteristic: Services, target: UpdateSubscribedPropertyValues]]
15:46:34.224 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=2 length=379
15:46:34.341 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=2
15:46:34.341 [NettyClient-NIO-2] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=17
15:46:34.341 [NettyClient-NIO-2] DEBUG c.t.c.c.e.DispatchingClientEndpoint - RESPONSE received [endpoint id: 1, duration: 117] ResponseMessage [requestId: 10, endpointId: 1, sessionId: -1, code: STATUS_SUCCESS, multipart: false, packet #: 0, total packets: 0]
Device scanned
Temperature is: 25.0°C
Pressure is: 20.0bar
Scan request processed for SteamSensor1
I thought those questions Communications Endpoint Closed i JAVA SDK How to keep EMS/Java alive without any Pings can help me to figure out, but I ended up without answer.
Any idea of why it doesn't work?
Regards,
Meryem
I solved my problem with adding;Thread.sleep(1500); just before calling super.updateSubscribedProperties(10000);
I know the problem was the time till VirtualThing get the new property values but still I want to know more about this case. It will be nice if anyone has an explanation.
Thanks,
Meryem