Esempio n. 1
0
        /* ---------- presence ----------*/

        public static List <Record <bool> > isTherePresence(Period period)
        {
            Dictionary <string, string> parameters = new Dictionary <string, string>();

            parameters.Add("period", period.ToString());

            return(RESTManager.request <bool>(Method.GET, "domotic/presence", parameters));
        }
Esempio n. 2
0
        /* ---------- temperature ----------*/

        public static List <Record <double> > getTemperature(Period period)
        {
            Dictionary <string, string> parameters = new Dictionary <string, string>();

            parameters.Add("period", period.ToString());

            return(RESTManager.request <double>(Method.GET, "domotic/temperature", parameters));
        }
Esempio n. 3
0
        public static bool setLight(Action action)
        {
            Dictionary <string, string> parameters = new Dictionary <string, string>();

            parameters.Add("action", action.ToString());

            List <Record <bool> > result = RESTManager.request <bool>(Method.POST, "domotic/light/status", parameters);

            return(result[0].value);
        }
Esempio n. 4
0
        public static bool setHeatingAutomaticManagment(Action action)
        {
            Dictionary <string, string> parameters = new Dictionary <string, string>();

            parameters.Add("action", action.ToString());

            List <Record <bool> > result = RESTManager.request <bool>(Method.POST, "domotic/heater/automatic", parameters);

            return(result[0].value);
        }
Esempio n. 5
0
        /* ----- luminosity/light -----*/


        public static bool isLightOn()
        {
            List <Record <bool> > result = RESTManager.request <bool>(Method.GET, "domotic/light/status", null);

            return(result[0].value);
        }
Esempio n. 6
0
        /* ---------- luminosity ----------*/

        public static List <Record <double> > getLuminosityRecord()
        {
            return(RESTManager.request <double>(Method.GET, "domotic/luminosity", null));
        }
Esempio n. 7
0
        /* -- temperature/heater/automatic -- */


        public static bool isHeatingAutomaticManagmentOn()
        {
            List <Record <bool> > result = RESTManager.request <bool>(Method.GET, "domotic/heater/automatic", null);

            return(result[0].value);
        }
Esempio n. 8
0
        /* ----- temperature/heater -----*/


        public static bool isHeatingSystemOn()
        {
            List <Record <bool> > result = RESTManager.request <bool>(Method.GET, "domotic/heater/status", null);

            return(result[0].value);
        }