Get Started with ecobee Thermostats
Learn how to connect and control your Ecobee devices with the Seam API

Overview
Seam provides a universal API to connect and control many brands of devices such as smart locks, thermostats, and sensors. This guide provides a rapid introduction to connecting and controlling your ecobee thermostats using the Seam API. To learn more about other brands of devices supported by Seam, head over to our integration page.
1. Install Seam SDK
Seam provides client libraries for many languages, such as JavaScript, Python, Ruby, PHP, and others, as well as a Postman collection and OpenAPI spec.
npm i seam
Once installed, sign-up for Seam to get your API key and export it as an environment variable:
$ export SEAM_API_KEY=seam_test2ZTo_0mEYQW2TvNDCxG5Atpj85Ffw
2. Link ecobee Account with Seam
To control your ecobee device using the Seam API, you must first authorize your Seam workspace against your ecobee account. To do so, Seam provides Connect Webviews: pre-built UX flows that walk you through authorizing your application to control your ecobee device.
Create a Connect Webview
from seam import Seam
seam = Seam()
webview = seam.connect_webviews.create(accepted_providers=["ecobee"])
assert webview.login_successful is False
# Send the Connect Webview URL to your user.
print(webview.url)
Authorize Your Workspace
Navigate to the URL that the Connect Webview object returns. Because you are using a sandbox workspace, complete the login flow by entering the following ecobee sandbox test account credentials:
email: [email protected]
password: 1234

Get the New Connect Webview
After you complete the authorization login, you receive an event for connected_account.created
if you set up a webhook handler. Otherwise, you can poll for the Connect Webview until the status of this Connect Webview changes, as follows:
updated_webview = seam.connect_webviews.get(
webview.connect_webview_id
)
assert updated_webview.login_successful # true
3. Retrieve your ecobee Thermostat
ecobee thermostats appear with the device_type
"ecobee_thermostat"
.
devices = seam.devices.list(device_type="ecobee_thermostat")
pprint(devices[0])
# Device(
# {
# "device_id": "5ce2cd35-09b1-458c-bb08-51ee83c35be7",
# "device_type": "ecobee_thermostat",
# "capabilities_supported": [
# "thermostat"
# ],
# "properties": {
# "online": true,
# "is_cooling": false,
# "is_heating": false,
# "manufacturer": "ecobee",
# "is_fan_running": false,
# "ecobee_metadata": {
# "device_name": "Office",
# "ecobee_device_id": "b489215e-2e2d-4179-b4d9-bbaa9f531514"
# },
# "has_direct_power": true,
# "relative_humidity": 0.54,
# "temperature_celsius": 21.2,
# "temperature_fahrenheit": 70.2,
# "current_climate_setting": {
# "hvac_mode_setting": "off",
# "manual_override_allowed": false,
# },
# "available_hvac_mode_settings": [
# "off",
# "cool",
# "heat",
# "heat_cool"
# ],
# "is_temporary_manual_override_active": false,
# "name": "Office",
# "image_url": "https://connect.getseam.com/assets/images/devices/ecobee_logo_square.png",
# "image_alt_text": "Ecobee Thermostat Image",
# "is_climate_setting_schedule_active": false
# },
# "location": null,
# "connected_account_id": "83d9062d-8f8e-4ec8-8f84-427595f94e10",
# "workspace_id": "cd9f2ac9-b201-4591-80ec-0edf08645014",
# "created_at": "2023-06-08T17:49:50.196Z",
# "errors": [],
# "warnings": []
# }
# )
4. Set the Current HVAC and Fan Mode Settings
Seam enables you to adjust the current heating and cooling settings on a smart thermostat, including the HVAC mode and the corresponding set points. It also enables you to configure the fan mode. These two operations return action attempts.
For example, use the following code samples to set your thermostat to heat mode and the fan mode to on:
heat_request = seam.thermostats.heat(
device = "5ce2cd35-09b1-458c-bb08-51ee83c35be7",
heating_set_point_celsius = 20
)
pprint(heat_request)
# ActionAttempt(action_attempt_id='97125745-15d9-4970-b5be-c34ec3ce1c81',
# action_type='SET_HEAT',
# status='success',
# result={},
# error=None)
fan_on_request = seam.thermostats.set_fan_mode(
device = "5ce2cd35-09b1-458c-bb08-51ee83c35be7",
fan_mode = "on"
)
pprint(fan_on_request)
# ActionAttempt(action_attempt_id='9c9b584b-c645-4ce0-a9c2-79b6f1db2396',
# action_type='SET_FAN_MODE',
# status='success',
# result={},
# error=None)
Next Steps
Now that you have completed this guide, you can try to connect a real ecobee device. To do so, make sure to switch to a non-sandbox workspace and API key because you cannot connect real devices to sandbox workspaces.
If you have any questions or want to report an issue, email us at [email protected]
Last updated
Was this helpful?