Comments (14)
You should set the TargetState and your system will set the state depending of the temparature: eg
TargetState > AUTO will give State > Heating or Cooling depending of the temperature.
Sure you can set target state Heating or cooling.
Let me know if not clear.
from homebridge-thermostat.
I would like to set the targetstate with the homekit widget. How will the plugin pass the targetstate to the script on the webserver (something like http://host/targetstate/auto)
from homebridge-thermostat.
Using the iOS Home app will allow you to chose different values that will invoque the 'setTargetHeatingCoolingState()' function. This function handle OFF/HEAT/AUTO/COOL according to Apple specifications.
Depending of the value, the plugin will send an HTTP request to apiRoute + action where action is defined bu this piece of code:
switch(value) {
case Characteristic.TargetHeatingCoolingState.OFF:
action = "/off";
break;
case Characteristic.TargetHeatingCoolingState.HEAT:
action = "/comfort";
break;
case Characteristic.TargetHeatingCoolingState.AUTO:
action = "/auto";
break;
case Characteristic.TargetHeatingCoolingState.COOL:
action = "/no-frost";
break;
default:
action = "/no-frost";
this.log("Not handled case:", value);
break;
}
In your case, this will call something like http://host/auto
. Please have a quick look to the implementation the code is supposed to be explicit enough. If not, I'll answer ;)
Best,
from homebridge-thermostat.
Cheers! I see the targetstate coming in now. For some reason it is not handling the returned information from the http://host/status. homekit "forgets" the targetstate after refreshing. Am I doing something wrong? The output is as follows...
{
"targetState": "HEAT",
"targetStateCode": 1,
"targetTemperature": 21,
"targetHeatingCoolingState": 3,
"currentHeatingCoolingState": 0,
"temperature": 22.3,
"humidity": 42.1,
"pressure": 104395
}
from homebridge-thermostat.
currentHeatingCoolingState can have only 3 values : HEAT/COOL/OFF. iOS Home app will call the getCurrentHeatingCoolingState and will display the result with the response of /status.
You want the system to handle the temperature automatically and the system chose to stay OFF. This is the case when the targetTemperature > currentTemperature but it's seems not to be the case.
Every single time you will open the iOS Home app, it will ask again to /status.
Please check the logic from the thermostat side cause I would expect the currentHeatingCoolingState to be heating (1) when the targetTemperature > currentTemperature.
Best,
from homebridge-thermostat.
In my view the logic is as follows. With homekit (or by other means) you set targetHeatingCoolingState to off, cool, heat or auto. You also set a targetTemperature. Depending on the targetHeatingCoolingState and the targetTemperature the currentHeatingCoolingState will be set. In this case the mode is auto with a target of 21 degrees. As the current temperature is 22.3 degrees the heating stays off. Theoretically it should actually go to a currentHeatingCoolingState of cooling, but I don't have an airconditioner hooked up :)
from homebridge-thermostat.
The problem is that the targetHeatingCoolingState is not getting back to homekit so it switches from auto to off after a refresh from http://host/status
from homebridge-thermostat.
Thx for this feedback, 2 things >
- For I don't know what reason, 2 lines were uncommented leading to loop call.
- The API/status
targetStateCode
need to be updated totargetHeatingCoolingState
. You can update this in you /status feedback but I just pushed a workaround for it to work without changes from API side.
This will be better now ;)
from homebridge-thermostat.
PS: I updated npm if reeded :)
from homebridge-thermostat.
I may update currentHumidity and targetHumidity in the same occasion, but not now (unfortunatelly not enought time to dedicate)
from homebridge-thermostat.
Cool, it works now! Thanks!
from homebridge-thermostat.
I updated the code and the readme for an API the closest possible from HAP convention. this clarify some situations.
BTW, did you saw my repo Acova? It's an heating system brand I handle with a couple of electronic component. Maybe the code base could help you? At least the API (which do more than needed...)
Best ;)
from homebridge-thermostat.
Looks nice. You are doing things there that I am going to let homekits automation handle. My heating is a simple one that only understands on or off which I am steering with a relay based on the settings I am making with your plugin. The relay is interfaced with an Onion Omega + power dock + relay expansion which is similar to a raspberry pi solution. The temperature is coming from a wireless riot air sensor.
from homebridge-thermostat.
The heating system is actually due for a replacement so I will in time replace it with one that understands opentherm so I can control it better :)
from homebridge-thermostat.
Related Issues (20)
- homebridge doesnt get the data HOT 3
- dummy thermostat HOT 5
- Does thermostat support adjust the fan state? HOT 1
- Error: connect EALREADY HOT 4
- Thermostat not working with Siri, but OK with Home app HOT 3
- Can't get it working with Infinitude HOT 5
- No Response error HOT 2
- Update status with one request HOT 4
- Pull request not merged HOT 2
- Fake.js not working HOT 2
- CurrentTemperature rounded to whole number HOT 7
- getting error message HOT 5
- Significant Variance in Temperatures in Home App HOT 3
- One click activation of thermostat devices HOT 3
- Work with Honeywell home t series thermostats HOT 1
- heatOnly option HOT 10
- pollInterval does not work HOT 5
- Cannot pair Homebridge bridge in Home app when homebridge-thermostat accessories are present in config.json HOT 1
- "heatOnly": true - ignores auto mode HOT 1
- Not working with Dantherm
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-thermostat.