While I do not know the internals of the M1G, traditionally for each connection you spawn a new thread to handle it. There is a lot of overhead creating and maintaining all of these threads. There is also additional overhead for simply having an open socket. The limitations are not bandwidth related, but more the aforementioned overhead related to each connection. In TCP, a connection is 'active' if the connection was established; regardless of if any data is being sent or received. UDP on the other hand, is a connection-less protocol, faster, but unreliable (usually used in games), and not appropriate for a security system at all. If you're on a windows machine, open a command prompt and type 'netstat -no' (no quotes) and press enter. That will list all of the connections on your computer. It is a basic requirement of any network to know what connections have been made (otherwise how do you send/receive data?), and finding idle connections is as simple as storing a timestamp of the last data sent/received and comparing that to the current system time.I don't quite understand how that limit would work. With IP, the connections aren't active except for when info is actually being transferred, right? It isn't like there is some handshake and then a continuous streaming connection. Or is there? So how would the system know if there were thousands of items all hooked up but not communicating at any given point in time?
I have had connections maintained for long periods -- several weeks or more. Of course there is activity at least every 30 secs with the M1 keep-alive string.The M1 does a lot of proactive notifications so to benefit from those the TCP connections would need to stay up.
Right it's better to track the spontaneous activity coming out of the M1 on a continuous basis. But you can pull all lighting status, all zone status and all touble status with just a few commands, in way less than one second. Counters -- I don't know, 64 distinct queries, right? Still I'd be surprised if it took more than a few seconds (Ethernet at 100 mbps).If you just connected/talked/disconnected you would need to re-poll for all the changes and that can take a long time on the M1 (most notably) counters. So probably 30sec-1min to get all the updated info via polling. So the polling method is not really ideal for a near-real-time interface like ElkRM.
Right, the connections are maintained, but traffic stops until the "installer mode" is ended. After this I don't trust the data that I have, so just to be sure I didn't miss anything, my code refreshes all tracked states via polling.One other note is when ElkRP is connected, all other communication must is suspended, but I believe the TCP connections can remain up.