Hello,
I jumped into your marvelous project and just at the beginning I discovered following problems:
1) Controller is polling TCP server for sensors' value even if no panel is connected
2) Controller is polling for ALL the sensors in ALL the panels and panels' screens
3) Controller is closing/reopening the TCP connection for every sensor in each polling loop
All of these increases a lot the traffic between the controller and the TCP server. My system is going to consist
of 3 panels (android, iphone, web) each containing about 100 sensors (on 10 screens). I can't imagine that my server will stand that
heavy load.
Instead of having 300 connections per second, it could be something like 10. If controller would poll only the sensors
from active screen of active panel.
I found on this forum solution to 3) by using Richard's
connection manager but I was not able to figure out how to solve 1) and 2).
Could you guide me on that?
Thanks and again I really like what you are doing 
Comments (4)
Jan 29
Marcus Redeker says:
If you reuse the same sensor for all panels, you should only have 100 sensors. I...If you reuse the same sensor for all panels, you should only have 100 sensors.
It does not matter how many screens are using those sensors. So 2) should not be an issue already.
The TCP protocol implementation is still based on our deprecated StatusCommand interface which means the socket request is performed every 500ms and the connection is closed and opened for each call. This will change to be based on our EventListener interface where (depending on the device) you can either define a polling interval or no polling is done but the device is informing about state changes while the connection stays open.
This is on the list but I cannot give you a release time yet.
Jan 29
Jacek Rosiak says:
OK. Thanks for the answer. It seems that this EventListener is going to resolve ...OK. Thanks for the answer. It seems that this EventListener is going to resolve most of my problems. Bad luck it is not ready yet.
Do you think that, for the moment, I would be able modify the Controller that it won't poll TCP server if any of the panels is not connected? I don't have an idea where to search...
Thanks.
Jan 29
Marcus Redeker says:
That would involve some deep code digging Right now the way it works is that th...That would involve some deep code digging
Right now the way it works is that the panel is only asking the status cache for the sensor values.
The controller is responsible for updating the statuc cache. So there is no real connection between a connected panel and the sensor update.
You could increase the polling interval if that would help in the moment.
The value is defined in org.openremote.controller.protocol.ReadCommand
Jan 29
Jacek Rosiak says:
I've already increased the polling interval. This change and kind of connection ...I've already increased the polling interval. This change and kind of connection manager which will keep the TCP connection must be enough for the moment. I'm not ready for exhaustive digging