Exemple #1
0
 /// <summary>
 /// Create a new manager for a user.
 /// </summary>
 /// <param name="applicationId"> Your application ID (more information at <see href="https://dev.netatmo.com/myaccount/createanapp"/>).</param>
 /// <param name="applicationSecret">Your application Secret (more information at <see href="https://dev.netatmo.com/myaccount/createanapp"/>).</param>
 /// <param name="username">Netatmo account username</param>
 /// <param name="password">Netatmo account password</param>
 public NetatmoManager(string applicationId, string applicationSecret, string username, string password)
 {
     _APICommands = new APICommands
     {
         ApplicationId     = applicationId,
         ApplicationSecret = applicationSecret,
         Username          = username,
         Password          = password,
         Scope             = "read_station read_thermostat write_thermostat read_camera write_camera access_camera read_presence access_presence read_homecoach read_smokedetector"
     };
     WeatherStation  = new WeatherStation(_APICommands);
     EnergyStation   = new EnergyStation(_APICommands);
     SecurityStation = new SecurityStation(_APICommands);
 }
Exemple #2
0
 /// <summary>
 /// Loads all data related to the energy station.
 /// </summary>
 /// <returns>Return <see cref="bool">true</see> if the data has been correctly loaded.</returns>
 public async Task <bool> LoadEnergyDataAsync()
 {
     return(await EnergyStation.LoadDataAsync().ConfigureAwait(false));
 }