Giter VIP home page Giter VIP logo

spring-social-ecobee's Introduction

Spring Social Ecobee Build Status Join%20Chat

Welcome to Spring Social Ecobee, the library that lets you talk to your Smart Thermostat from Ecobee.

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:

  1. Clone this project

  2. mvn package

  3. cd spring-social-ecobee-sample

  4. ECOBEE_APIKEY=your-ecobee-app-key mvn spring-boot:run

  5. Surf to localhost:8080

This small 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:

<dependencies>
	<dependency>
		<groupId>com.greglturnquist.spring.social.ecobee</groupId>
		<artifactId>spring-social-ecobee-core</artifactId>
		<version>${spring-social-ecobee.version}</version>
	</dependency>
</dependencies>

For gradle, add this to your build.gradle file:

dependencies {
	compile("com.greglturnquist.spring.social.ecobee:spring-social-ecobee-core:${springSocialEcobeeVersion}")
}

With this in place, you need to configure an EcobeeConnectionFactory:

@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 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.

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:

<repositories>
	...
	<repository>
		<id>sonatype-oss-snapshots</id>
		<name>Sonatype OSS Snapshots</name>
		<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		<snapshots>
			<enabled>true</enabled>
		</snapshots>
	</repository>
	...
</repositories>

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:

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

spring-social-ecobee's People

Contributors

gregturn avatar gitter-badger avatar

Stargazers

Aditya Panchal avatar

Watchers

 avatar James Cloos avatar

Forkers

girishanarayana

spring-social-ecobee's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.