Controlling lots of distributed remote devices can be a real pain. To make this easier, we decided to use Digi's XBEE modules with DigiMesh firmware. They are operating on free ISM band at 2.4 GHz. These modules are FCC certified which is a very important aspect. Also, they support encryption out of the box, so one thing less to think about. We have ~10 of these modules, and they work great. The only unknown parameter is how many of these can work on a single mesh network? We are hoping that the network can operate with at least two thousand of these modules. We asked Digi, but we didn't get any sensible reply from them. (They still contact us asking how many of modules we will need in our final project, to give us a quote :). Also, we still don't have any clue about the message propagation times, retries and lots of other things until the system is deployed for testing.
The application protocol is a simple key-value pair thing and travels in ASCII. This could be optimized if some custom binary protocol is used, but lets see how this idea works first (lots of other things to do now).
It should be possible to access the system online (think IoT), OR just locally (more secure). In order for these two options to happen, we need to implement the system in a distributed manner. So, we need a Server (on the internet, or in-house), one XBee connected to Raspberry PI which connects to the Server (in case Server is online) or that same XBee connected directly to th Server itself (local version). This Server will accept all messages arriving on XBee, store them to local database and give to clients on request. Nest, we need client application that connects to the Server.
Naturally, Server will be in NodeJS and Client should connect to the Server using Websockets for a realtime feeling.