This document discusses the joint design of data compression and medium access control (MAC) protocol for smart grids with renewable energy sources. It proposes using compressed sensing (CS) techniques to compress reported power injection data from multiple nodes in both space and time, and adapting the 802.15.4 MAC protocol to enable efficient data transmission and reliable data reconstruction. An analytical model is developed to determine optimal MAC parameter configurations that minimize reporting delay while achieving reliable data recovery. Numerical results are presented to demonstrate performance gains over existing solutions in terms of reporting delay, energy consumption, and bandwidth usage.