Closed HighMasterGogo closed 7 years ago
hi, i wanna start to work with this plugin, how is ur setup? how u publish your current and target temperature? and how u turn on/off heating/cooling? i have an arduino with dht22 temperature (for the current temp) and a relay to control the heating. don't know how could we have to set the target temperature, maybe there is nothing to set up and just press the icon on iphone and set it like the dimmer for the lightìs brightness?
Please start your own thread for your own issues. Also, the "issues" tab is meant for reporting possible bugs or issues with the code. It is not meant for general support with setup. Please find forums for that.
Hello, what does homebrige logs provides, the plugin is quite "talkative@ and may provide useful info. I suspect the last pull request to be unstable ;)
Thanks, I'll take a look into this and get back to you. Great plugin BTW!
Just a though, in the configuration Json, use the full API path, including http:// ;)
Thanks, I'm busy for a few days but I'll check that and the logs and let you know. Thanks for the quick responses.
OK, had a minute to take a look and my start up logs say:
[2/4/2017, 4:29:33 PM] [Heating] getTargetHeatingCoolingState from: /thermostat/status [2/4/2017, 4:29:33 PM] [Heating] getHeatingThresholdTemperature : 25 [2/4/2017, 4:29:33 PM] [Heating] getTemperatureDisplayUnits: 0 [2/4/2017, 4:29:33 PM] [Heating] getTargetRelativeHumidity: 0.5 [2/4/2017, 4:29:33 PM] [Heating] getCurrentHeatingCoolingState from: /thermostat/status [2/4/2017, 4:29:33 PM] [Heating] getTargetTemperature from: /thermostat/status [2/4/2017, 4:29:33 PM] [Heating] getCurrentTemperature from: /thermostat/status [2/4/2017, 4:29:33 PM] [Heating] response success [2/4/2017, 4:29:33 PM] [Heating] TargetHeatingCoolingState received is 3 undefined [2/4/2017, 4:29:33 PM] [Heating] TargetHeatingCoolingState is now 3 [2/4/2017, 4:29:33 PM] [Heating] response success [2/4/2017, 4:29:33 PM] [Heating] Target temperature is 19 [2/4/2017, 4:29:33 PM] [Heating] response success [2/4/2017, 4:29:33 PM] [Heating] currentHeatingCoolingState is 3 [2/4/2017, 4:29:33 PM] [Heating] response success [2/4/2017, 4:29:33 PM] [Heating] CurrentTemperature 18
error logs say:
Sat, 04 Feb 2017 16:29:33 GMT EventedHTTPServer [::ffff:192.168.1.13] HTTP request: /characteristics?id=5.10,5.16,5.13,5.15,5.9,5.12,5.11 Sat, 04 Feb 2017 16:29:33 GMT HAPServer [CC:22:3D:E3:CE:30] HAP Request: GET /characteristics?id=5.10,5.16,5.13,5.15,5.9,5.12,5.11 Sat, 04 Feb 2017 16:29:33 GMT Accessory [Homebridge] Getting value for Characteristic "Target Heating Cooling State" Sat, 04 Feb 2017 16:29:33 GMT Accessory [Homebridge] Getting value for Characteristic "Heating Threshold Temperature" Sat, 04 Feb 2017 16:29:33 GMT Accessory [Homebridge] Got Characteristic "Heating Threshold Temperature" value: 25 Sat, 04 Feb 2017 16:29:33 GMT Accessory [Homebridge] Getting value for Characteristic "Temperature Display Units" Sat, 04 Feb 2017 16:29:33 GMT Accessory [Homebridge] Got Characteristic "Temperature Display Units" value: 0 Sat, 04 Feb 2017 16:29:33 GMT Accessory [Homebridge] Getting value for Characteristic "Target Relative Humidity" Sat, 04 Feb 2017 16:29:33 GMT Accessory [Homebridge] Got Characteristic "Target Relative Humidity" value: 0.5 Sat, 04 Feb 2017 16:29:33 GMT Accessory [Homebridge] Getting value for Characteristic "Current Heating Cooling State" Sat, 04 Feb 2017 16:29:33 GMT Accessory [Homebridge] Getting value for Characteristic "Target Temperature" Sat, 04 Feb 2017 16:29:33 GMT Accessory [Homebridge] Getting value for Characteristic "Current Temperature" Sat, 04 Feb 2017 16:29:33 GMT Accessory [Homebridge] Got Characteristic "Target Heating Cooling State" value: 3 Sat, 04 Feb 2017 16:29:33 GMT Accessory [Homebridge] Got Characteristic "Target Temperature" value: 19 Sat, 04 Feb 2017 16:29:33 GMT Accessory [Homebridge] Got Characteristic "Current Heating Cooling State" value: 3 Sat, 04 Feb 2017 16:29:33 GMT Accessory [Homebridge] Got Characteristic "Current Temperature" value: 18 Sat, 04 Feb 2017 16:29:33 GMT EventedHTTPServer [::ffff:192.168.1.13] HTTP Response is finished
Looks to be ok from the the plugin side, I’m about to have a look to. I compare the values your api provide results as strings
{"targetHeatingCoolingState":"3","targetTemperature":"19","currentHeatingCoolingState":"3","currentTemperature":"18","currentRelativeHumidity":"0.5"}
Mine provides
{"targetHeatingCoolingState":3,"targetTemperature":20,"currentHeatingCoolingState":1,"currentTemperature":19,"currentRelativeHumidity":30}
This might be covered but it’s a first hint.
I’m digging
Best,
I provided into the wirelessthermostat
branch a fake api that may help you at least to diagnose. It works pretty well with de default Apple app "Home".
{
"accessory": "Thermostat",
"name": "Thermostat",
"apiroute": "http://API_IP_ADRESS:4321"
}
Be carefull, the branch is not stable, do not take the index.js from there, it works on my mac but not on my Pi for unknown reaseon.
Hope this helps :)
Best,
Thank you. This sounds great. I'm not very good with Git. I installed homebridge-thermostat via NPM. Is there an easy way to update the code to use the wirelessthermostat branch? Thanks again for your help.
You can update to my last npm publication with npm install -g homebridge-thermostat
and manually download the fake api file from GitHub by navigating with you browser ;)
Awesome. Thanks, I'll try that now.
I see what you've done now. The API I have setup is already fake and have variables hard coded. Even if I try your fake api, I still think I'll have the same issue.
If I force a reponse code of 201 on /status, the home app then responds and I'm able to set temperature and heating state. However, it's unable to correctly get the status as shown here:
[2/5/2017, 1:25:43 PM] [Heating] Error getting state: null [2/5/2017, 1:25:43 PM] [Heating] Error getting CurrentHeatingCoolingState: null [2/5/2017, 1:25:43 PM] [Heating] Error getting state: null [2/5/2017, 1:25:43 PM] [Heating] Error getting TargetHeatingCoolingState: null [2/5/2017, 1:25:53 PM] [Heating] setTargetHeatingCoolingState from/to: 1 1 [2/5/2017, 1:25:53 PM] [Heating] Error getting state: null [2/5/2017, 1:26:00 PM] [Heating] setTargetHeatingCoolingState from/to: 1 0 [2/5/2017, 1:26:00 PM] [Heating] Error getting state: null [2/5/2017, 1:27:13 PM] [Heating] setTargetHeatingCoolingState from/to: 1 1 [2/5/2017, 1:27:13 PM] [Heating] Error getting state: null [2/5/2017, 1:27:16 PM] [Heating] setTargetHeatingCoolingState from/to: 1 2 [2/5/2017, 1:27:17 PM] [Heating] response success [2/5/2017, 1:27:21 PM] [Heating] setTargetHeatingCoolingState from/to: 2 3 [2/5/2017, 1:27:21 PM] [Heating] response success [2/5/2017, 1:27:23 PM] [Heating] setTargetHeatingCoolingState from/to: 3 0 [2/5/2017, 1:27:24 PM] [Heating] Error getting state: null [2/5/2017, 1:27:26 PM] [Heating] setTargetHeatingCoolingState from/to: 3 1 [2/5/2017, 1:27:26 PM] [Heating] Error getting state: null [2/5/2017, 1:27:37 PM] [Heating] setTargetTemperature from: /thermostat/targetTemperature/18 [2/5/2017, 1:27:38 PM] [Heating] response success [2/5/2017, 1:27:39 PM] [Heating] setTargetTemperature from: /thermostat/targetTemperature/20 [2/5/2017, 1:27:39 PM] [Heating] response success [2/5/2017, 1:27:40 PM] [Heating] setTargetTemperature from: /thermostat/targetTemperature/21
The previous log was way more optimistic > Here most the responses looks empty. A plugged the setup at home and everything looks to works. Let me know if you find out.
I have problem - if use several thermostats (for example 10) homebridge server not responding. Start normally, but doesn't do next. For example it (homebridge) doesn't join to iPad (like new bridge)
@HighMasterGogo is your problem solved ? @JJiri can you try with one only, make sure it work, then try with two. this may provide usefull information.
Apologies for the lack of follow up.
I ended up abandoning this in favour of an MQTT thermostat implementation.
Thanks anyway for all your help.
@PJCzx yes - one is to work normally, two also, but three - here start problems .. homebridge work very slowly, till it stop responding (any reactions in HomeKit and console)
@HighMasterGogo And Yes - I think (also) it is better way: using MQTT. I will go research use MQTT ....
THX for all
Ok, I close the topic then ;)
I'm getting a "no response" in iOS home app. Logs are showing that my API is correctly returning all the values.