https://github.com/gregturn/spring-social-ecobee
Spring Social extension to talk to an Ecobee thermostat
https://github.com/gregturn/spring-social-ecobee
Last synced: 8 months ago
JSON representation
Spring Social extension to talk to an Ecobee thermostat
- Host: GitHub
- URL: https://github.com/gregturn/spring-social-ecobee
- Owner: gregturn
- Created: 2015-03-18T01:43:22.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-05-22T14:49:41.000Z (about 11 years ago)
- Last Synced: 2025-02-24T08:16:11.005Z (over 1 year ago)
- Language: Java
- Homepage: https://www.ecobee.com/home/developer/api/documentation/v1/index.shtml
- Size: 969 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
= Spring Social Ecobee image:https://travis-ci.org/gregturn/spring-social-ecobee.svg?branch=master["Build Status", link="https://travis-ci.org/gregturn/spring-social-ecobee"] image:https://badges.gitter.im/Join%20Chat.svg[link="https://gitter.im/gregturn/spring-social-ecobee?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"]
Welcome to Spring Social Ecobee, the library that lets you talk to your Smart Thermostat from Ecobee.
* https://github.com/gregturn/spring-social-ecobee/issues[Issues]
* https://github.com/gregturn/spring-social-ecobee/pulls[Pull Requests]
* See above for CI and chatting with gitter.
NOTE: Spring Social Ecobee is a community project and NOT officially supported by the Spring Social team. This should be clear given the project is under the domain *com.greglturnquist*.
== Getting Started
You can get started real fast:
. Clone this project
. `mvn package`
. `cd spring-social-ecobee-sample`
. `ECOBEE_APIKEY=your-ecobee-app-key mvn spring-boot:run`
. Surf to localhost:8080
This small http://projects.spring.io/spring-boot/[Spring Boot] application will fire up and let the user login and register with their Ecobee thermostat, then give you a tour of the basics.
Want to use the code in your own project? Spring Social Ecobee releases (i.e. releases, release candidates, and milestones) are published to Maven Central.
For maven, add this to your `pom.xml` file:
[source,xml]
----
com.greglturnquist.spring.social.ecobee
spring-social-ecobee-core
${spring-social-ecobee.version}
----
For gradle, add this to your `build.gradle` file:
[source,groovy]
----
dependencies {
compile("com.greglturnquist.spring.social.ecobee:spring-social-ecobee-core:${springSocialEcobeeVersion}")
}
----
With this in place, you need to configure an `EcobeeConnectionFactory`:
[source,java]
----
@Bean
public EcobeeConnectionFactory ecobeeConnectionFactory(ConnectionFactoryRegistry registry, Environment env) {
final EcobeeConnectionFactory ecobeeConnectionFactory = new EcobeeConnectionFactory(env.getProperty("ecobee.apiKey"));
registry.addConnectionFactory(ecobeeConnectionFactory);
return ecobeeConnectionFactory;
}
----
This fragment leans on Spring Framework's `Environment` class along with http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-external-config-relaxed-binding[Spring Boot's relaxed bindings] to fetch *ecobee.apiKey*. It will then create an `EcobeeTemplate` which you can fetch by auto-wiring. From there, you can explore it's features.
Checkout the showcase application for more details.
=== Working with snapshots
As you can see from the badges at the top, this project integrates with Travis for continuous integration. On top of that, all commits to master get deployed as snapshots to Sonatype OSS. Snapshots aren't synced to Maven Central, so if you wish to use a snapshot release in your build, you need to add some extra bits.
* https://oss.sonatype.org/content/repositories/snapshots - this is the repository where snapshot builds can be found
Below are some configuration options. If your tool isn't found, you will have to look it up and use the repo listed above.
==== Maven
For maven, the simplest option is to add this to your `pom.xml` file:
[source,xml]
----
...
sonatype-oss-snapshots
Sonatype OSS Snapshots
https://oss.sonatype.org/content/repositories/snapshots
true
...
----
With maven, it's possible to put repository settings inside profiles, etc. That isn't covered here.
==== Gradle
For gradle, the simplest option is to add this to your `build.gradle` file:
[source,groovy]
----
repositories {
...
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
----
This is nowhere near exhaustive. Gradle has a plethora of options.
== License
Spring Social Ecobee is released under version 2.0 of the Apache License