Пример #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));
        }
Пример #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));
        }
Пример #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);
        }
Пример #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);
        }
Пример #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);
        }
Пример #6
0
        /* ---------- luminosity ----------*/

        public static List <Record <double> > getLuminosityRecord()
        {
            return(RESTManager.request <double>(Method.GET, "domotic/luminosity", null));
        }
Пример #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);
        }
Пример #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);
        }