A gateway (300, 600) for communicating with end devices and a remote server, comprising: a first server comprising a first management layer, the first server being configured to: i) communicate with a first end device; ii) communicate with the remote server comprising a second management layer; and: iii) be selectively operable in either: a first state wherein the first management layer controls the first server to enable one or more of the following at the gateway (300, 600): allowing a user to add and/or remove other gateways; allowing the user to add and/or remove end devices for connection to the gateway (300, 600), or another gateway; and to provide storage for data received at the gateway (300, 600); or: a second state wherein the second management layer controls the first server to enable one or more of the following remote from the gateway (300, 600): allowing the user to add and/or remove other gateways; allowing the user to add and/or remove end devices for connection to the gateway (300, 600), or another gateway; and to provide storage for data received at the gateway (300, 600). i) communicate with a first end device; ii) communicate with the remote server comprising a second management layer; and: iii) be selectively operable in either: a first state wherein the first management layer controls the first server to enable one or more of the following at the gateway (300, 600): allowing a user to add and/or remove other gateways; allowing the user to add and/or remove end devices for connection to the gateway (300, 600), or another gateway; and to provide storage for data received at the gateway (300, 600); or: a second state wherein the second management layer controls the first server to enable one or more of the following remote from the gateway (300, 600): allowing the user to add and/or remove other gateways; allowing the user to add and/or remove end devices for connection to the gateway (300, 600), or another gateway; and to provide storage for data received at the gateway (300, 600). a first state wherein the first management layer controls the first server to enable one or more of the following at the gateway (300, 600): allowing a user to add and/or remove other gateways; allowing the user to add and/or remove end devices for connection to the gateway (300, 600), or another gateway; and to provide storage for data received at the gateway (300, 600); or: allowing a user to add and/or remove other gateways; allowing the user to add and/or remove end devices for connection to the gateway (300, 600), or another gateway; and to provide storage for data received at the gateway (300, 600); or: a second state wherein the second management layer controls the first server to enable one or more of the following remote from the gateway (300, 600): allowing the user to add and/or remove other gateways; allowing the user to add and/or remove end devices for connection to the gateway (300, 600), or another gateway; and to provide storage for data received at the gateway (300, 600). allowing the user to add and/or remove other gateways; allowing the user to add and/or remove end devices for connection to the gateway (300, 600), or another gateway; and to provide storage for data received at the gateway (300, 600).