Coder Social home page Coder Social logo

homebridge-advanced-thermostat's Introduction

homebridge-advanced-thermostat

This is a HomeBridge plugin. Allows HomeKit to use your own Thermostat under HTTP protocol.

Installation

You need to be root or use command "sudo" to install this packages.

Is necessary has installed node.js with npm.

  1. Install homebridge using: npm install -g homebridge
  2. Install this plugin using: npm install -g homebridge-advanced-thermostat
  3. Update your configuration file. See bellow for a sample.

note If you are experimenting problems to install this plugin try to add "-unsafe--perm" (without ") - sudo npm install -g -unsafe--perm homebridge-advanced-thermostat -

Configuration

Configuration sample:

   {
       "bridge": {
           ...
       },
       
       "description": "...",

       "accessories": [
           {
               "accessory": "Thermostat",
               "name": "Thermostat name",
               "apiAdress": "http://url",
               "maxTemp": "25",                      // Optional Max Number 100
               "minTemp": "15",                      // Optional Min Numbber 0
               "username": "user",                   // Optional
               "password": "pass",                   // Optional
               "manufacturer": "manufacturer",       // Optional
               "model": "model",                     // Optional
               "serial_number": "serial number",     // Optional
               "units": "dispCelsius"                // Optional (Default dispCelsius = Celsius) dispFahrenheit = Fahrenheit 
               
           }
       ],

       "platforms":[]
   }

Node(API) Configuration or whatever be your Thermostat platform (What the plugin expects to receive)

The apiAdress is used for two main calls: Get and Set data to the Thermostat. Your Node(API) should provide

  1. Get Target and Current State from thermostat.

JSON Format with:

GET /status
{
    "currentState": SHORT_INT_VALUE,    // 0 OFF 1 HEAT 2 COOL
    "getTargetState": SHORT_INT_VALUE   // 0 OFF 1 HEAT 2 COOL 3 AUTO
}
  1. Set/Get Temperature, Humidity and Units(Temperature Units) from thermostat

JSON Format with:

GET /info
{
    "temperature": FLOAT_VALUE,         // Current Temperature 
    "tarTemperature": FLOAT_VALUE,      // Target Temperature 
    "heatThreshold": FLOAT_VALUE,       // Heat Threshold 
    "coolThreshold": FLOAT_VALUE,       // Cool Threshold 
    "humidity": FLOAT_VALUE,            // Current Humidity
    "units": SHORT_INT_VALUE            // 0 to SET Celsius 1 to SET Fahrenheit 
}
  1. Set target State
POST /setTargetState/{INT_VALUE}         // 0 OFF 1 HEAT 2 COOL 3 AUTO
OK (200)
  1. Set target Temperature
POST /targetTemperature/{FLOAT_VALUE}    // Target Temperature 
OK (200)
  1. Set target Heat Threshold
POST /heatThreshold/{FLOAT_VALUE}    // Target Heat Threshold 
OK (200)
  1. Set target Cool Threshold
POST /coolThreshold/{FLOAT_VALUE}    // Target Cool Threshold 
OK (200)
  1. Set Display Units
POST /units/{INT_VALUE}    // Set up Celsius or Fahrenheit, 0 to SET Celsius 1 to SET Fahrenheit 
OK (200)

Now you can SWAP between Cº to Fº.

To visualize the temperture in Fº, you must change your Display unit configuration in your Iphone.

You can do it going to

1º Settings 2º General 3º Language & Region 4º Temperature Unit

This function set up the node to display the units in Fº but internally HomeKit only works in Cº.

Here you can download an Arduino scketch for ESP8266 to get working your own Thermostat system https://github.com/SaMuELToLoKo/ESP8266-homebridge-advanced-thermostat.git

Thanks and hope this help someone to implement a cool Thermostat at home.

homebridge-advanced-thermostat's People

Contributors

lboue avatar samueltoloko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

homebridge-advanced-thermostat's Issues

Carrier Cor?

Thanks for this plugin! Can it work with the Carrier Cor TP-WEM01? That specific model isn't homekit enabled by default, though its predecessor TP-WEM01-A is homekit enabled by default.

I don't know how to find the API Address, but I am able to add 'apps' in the Cor's homepage via an authorization code..

POST requests

Are the POST requests actual POST requests? Seems to me they are GET requests. For example:

temperatureTarget is meant to be a POST request but when triggered the URI is "whatevertheespname.local/targetTemperature/whateverthevalue" which is a GET request.

Am I getting something wrong?

Errors with Carrier API??

Hi I am hoping you can help me out here... I have a Carrier MyInfinity system. It lists the myinfinity server as www.api.ing.carrier.com and port 80 I enter this into the config but get errors when I open homekit, the thermostat changes to no response. I do not see anywhere to enter the username or password and am looking to fix this error in connecting to the api. I am new to this and need help please.

Thanks!!!

Tutorial

Hi!
I would like to make a project with your files but i’m a newbie. Pluging for homebridge is easy for me, but i dont know how to configure an esp8266 (i have sonoffs, wemos mini D1 and nodemcus)
Now I use a hacked sonoff with DHT22 and espeasy but using rules in EVE app and cannot set an especific temperature in HomeKit
Do you have a tutorial?

Awesome work!

wrong declaration in README.md

First of all thank You for the great implementation of the homebridge thermostat.

I only have had one problem, cause you write in the README.md
Set target State

GET /targetTemperature/{FLOAT_VALUE}    // Target Temperature
OK (200)

but you use in your code:

return request.post({
					url: this.apiAdress + '/targetTemperature/' + value,
					auth: {
						user: this.username,
						pass: this.password
				}

so I think it has to be:

POST /targetTemperature/{FLOAT_VALUE}    // Target Temperature
OK (200)

Adding a thermometer

Hi,

Wondering if I might elicit your help in resolving an issue I’m having. I tried to extend @jmbwell version of your code to allow for a Temperature Sensor. See: https://github.com/cheitzig/homebridge-infinitive-thermostat Note: I would’ve also asked @jmbwell too, but I can’t figure out how to contact him on his GitHub because Issues seem to be disabled.

The code I added includes:

  • A new “getter” called getCurrentOutsideTemperature
  • A new service called TemperatureService

If I just hard-set the outdoor temperature (line 39), and update the TemperatureService’s CurrentTemperature characteristic to that value (lines 706-710), the Temperature Sensor shows up fine. Also, if I call the same “getter” that is used for the internal temperature (line 708, currently commented out), things work fine (or rather, then outside temperature is listed as the inside temperature, which at least appears to work).

If I write my own “getter” though, getCurrentOutdoorTemperature, and call it on line 709, the TemperatureSensor gives an error that says "This accessory isn't responding". getCurrentOutdoorTemperature is almost identical to the existing getCurrentTemperature function with the exception of getting the outside vs. the inside temperature from my furnace API (infinitive, another GitHub project).

Any insights?

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.