platform_driver.interfaces.thermostat_api module

Copyright (c) 2016, Alliance for Sustainable Energy, LLC All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

class platform_driver.interfaces.thermostat_api.ThermostatInterface(url)[source]

Bases: object

Base interface to get and set values on the thermostat

energy_led(data)[source]

Controls energy led, possible values: 0,1,2,4

fmode(data)[source]

Sets fan’s mode

get_cool_pgm(day='')[source]

get cool program for a week or a specific day day = {‘mon’,’tue’,’wed’,’thu’,’fri’,’sat’,’sun’}

for a specific day, say thursday: t.get_cool_pgm(‘thu’)

for a week: t.get_cool_pgm()

get_heat_pgm(day='')[source]

get heat program for a week or a specific day day = {‘mon’,’tue’,’wed’,’thu’,’fri’,’sat’,’sun’}

for a specific day, say thursday: t.get_heat_pgm(‘thu’)

for a week: t.get_heat_pgm()

hold(data)[source]

Sets hold controls

mode(data)[source]

Sets operating mode

model()[source]

Returns device model

over(data)[source]

Sets override controls

set_cool_pgm(schedules, day='')[source]

set cool program for a week or a specific day day = {‘mon’,’tue’,’wed’,’thu’,’fri’,’sat’,’sun’}

for a spefic day, say ‘thu’ t.set_cool_pgm(‘{“360, 80, 480, 80, 1080, 80, 1320 , 80”,’thu’)

t.set_cool_pgm(‘{

“1”: [360, 70, 480, 70, 1080, 70, 1320, 70], “0”: [360, 66, 480, 58, 1080, 66, 1320, 58], “3”: [360, 66, 480, 58, 1080, 66, 1320, 58], “2”: [360, 66, 480, 58, 1080, 66, 1320, 58], “5”: [360, 66, 480, 58, 1080, 66, 1320, 58], “4”: [360, 66, 480, 58, 1080, 66, 1320, 58], “6”: [360, 66, 480, 58, 1080, 66, 1320, 58]

}’)

set_heat_pgm(schedules, day='')[source]

set heat program for a week or a specific day day = {‘mon’,’tue’,’wed’,’thu’,’fri’,’sat’,’sun’}

for a spefic day, say ‘thu’

t.set_heat_pgm('{"360, 80, 480, 80, 1080, 80, 1320 , 80",'thu')

for a week

t.set_heat_pgm('{
            "1": [360, 70, 480, 70, 1080, 70, 1320, 70],
            "0": [360, 66, 480, 58, 1080, 66, 1320, 58],
            "3": [360, 66, 480, 58, 1080, 66, 1320, 58],
            "2": [360, 66, 480, 58, 1080, 66, 1320, 58],
            "5": [360, 66, 480, 58, 1080, 66, 1320, 58],
            "4": [360, 66, 480, 58, 1080, 66, 1320, 58],
            "6": [360, 66, 480, 58, 1080, 66, 1320, 58]
     }')
t_cool(data)[source]

Sets cooling setpoint

t_heat(data)[source]

Sets heating setpoint

t_setpoint(data, point, tmode='')[source]

Sets cooling setpoint

tstat()[source]

Returns current deicve paramenters

platform_driver.interfaces.thermostat_api.Thermostat_API(url)[source]

Call the interface