An integrated system for intensive collection of energy consumption and microclimate data for smart grid and climate control research is presented. The system is aimed at collecting datasets for intelligent control algorithms learning and assessment. Prospective applications (energy disaggregation, load forecasting, demand-side management, learning network structure from data, collaborative energy storage use) impose strong requirements on all its physical and logical layers: sensors, data collection, storage and processing, analysis and visualization. A combination of open-source IoT components and modern hardware has been chosen to provide a convenient and cost-efficient solution that consists of three main subsystems. The energy subsystem collects information about electric energy consumption, active and reactive power and many other parameters of the energy infrastructure in a building. The subsystem covers all groups of consumers in a building and supports per-second sampling rate. The climate subsystem collects information about temperature, light, and humidity in the selected rooms of the building. The sensing network is built on the LoRaWAN technology with autonomous battery-powered multi-sensors. The heating subsystem collects data from radiators and pipes to enable energy-efficient heat control. It is also based on the wireless LoRaWAN sensors. By implementing efficient data compression algorithms, the sensor network provides intensive sampling rate with acceptable lifetime of battery-powered sensors.