This paper describes the design and implementationof a network scheduler prototype for IoT networks within the e-healthcare domain. The network scheduler combines a constraint-based task planner with the Lightweight Machine-to-Machine (LwM2M) protocol to be able to reconfigure IoT networks at run-time based on recognized activities and changes in the environment. To support such network scheduling, we implement a LwM2M application layer for the IoT devices that provides sensor data, network stack information, and a set of controllable parameters that affect the communication performance and the energy consumption.