Smart gas grid