SphtKr / homebridge-zway

Homebridge plugin for (better) HomeKit support of RaZBerry and Z-Way Server
ISC License
85 stars 37 forks source link

Thermostat cooling #32

Open silverhack77 opened 8 years ago

silverhack77 commented 8 years ago

I am able to set my thermostat heating temp, but not cooling. I saw the note that heating is currently only working. I also saw a note somewhere that cooling was not completed yet because there was no unit available for testing.
I have one available, is there a way I can help with testing?

I have been playing around a bit, and I am able to set my thermostat cooling temp using the both ZWave API and the Virtual Device API. For example, to set my cooling temp to 74 degrees Fahrenheit I can either do: http://raspberrypi:8083/ZWaveAPI/Run/devices[16].ThermostatSetPoint.Set(2,74) or http://raspberrypi:8083/ZAutomation/api/v1/devices/ZWayVDev_zway_16-0-67-2/command/exact?level=74

As far as I can tell, homebridge-zway is using the Virtual Device API (via JS) for heating. Since Heating and Cooling appear as two separate devices, I would think that cooling should work with the same commands, it's just that homebridge needs to add/setup the second device. That is, I have one device for heating: http://raspberrypi:8083/ZAutomation/api/v1/devices/ZWayVDev_zway_16-0-67-1 and one device for cooling: http://raspberrypi:8083/ZAutomation/api/v1/devices/ZWayVDev_zway_16-0-67-2

Is there anything else I can provide to be helpful?

silverhack77 commented 8 years ago

Here is the output from http://raspberrypi:8083/ZAutomation/api/v1/devices devices.txt

SphtKr commented 8 years ago

Thanks, this is perfect! Okay, I should be able to build support for this given this information, but it'll be a little tricky. Since Z-Way splits the heating and cooling set point into two devices/values, I have to figure out how to share those between a single HomeKit characteristic. I need to get these fixes for Z-Way 2.2.2 out first, so this is probably a 0.6.0 feature at earliest. But yes, this really helps!

silverhack77 commented 8 years ago

Another option is to simply have two separate HomeKit characteristics - one for Heater and one for Air Conditioner ("hey Siri, set Heater to 70" vs "hey Siri, set Air Conditioner to 74"). Then you also don't need to deal with setting the Thermostat mode of Heat vs Cool because it seems like setting the temperature via ZAutomation also changes the mode as well.

Otherwise If you want to have all 3 or 4 thermostat virtual devices as a single characteristic, would it be possible to use the Homebridge.Accessory.Id tag to merge them together in ZWay?

silverhack77 commented 8 years ago

I thought it would be good to provide some updated information. My thermostat was not setup quite right in ZWay, so I have fixed that and wanted to post the new API json results for you to use/review for this issue. Mostly, the only differences are with some of the 'metrics' being corrected to show the correct units (C vs F) and min/max values.

SmartHome UI has 4 elements:

I have not found any 'mode' switch to choose between heating and cooling. Just changing the temperature setpoint for either thermostat will also set that mode to be active.

image

Here is the output from

http://192.168.1.106:8083/ZWaveAPI/Run/devices[33]

devices[33].txt

VDev Information:

Temperature sensor

http://192.168.1.106:8083/ZAutomation/api/v1/devices/ZWayVDev_zway_33-0-49-1

{ "data": { "creationTime": 1465265506, "creatorId": 1, "deviceType": "sensorMultilevel", "h": -776681228, "hasHistory": false, "id": "ZWayVDev_zway_33-0-49-1", "location": 6, "metrics": { "probeTitle": "Temperature", "scaleTitle": "°F", "level": 74.5, "icon": "temperature", "title": "Temperature" }, "permanently_hidden": false, "probeType": "temperature", "tags": [], "visibility": true, "updateTime": 1465494000 }, "code": 200, "message": "200 OK", "error": null }

Thermostat operation mode

http://192.168.1.106:8083/ZAutomation/api/v1/devices/ZWayVDev_zway_33-0-64

{ "data": { "creationTime": 1465265507, "creatorId": 1, "deviceType": "switchBinary", "h": 128800649, "hasHistory": false, "id": "ZWayVDev_zway_33-0-64", "location": 6, "metrics": { "icon": "thermostat", "title": "Thermostat operation", "level": "on" }, "permanently_hidden": false, "probeType": "thermostat_mode", "tags": [], "visibility": true, "updateTime": 1465435946 }, "code": 200, "message": "200 OK", "error": null }

Heater

http://192.168.1.106:8083/ZAutomation/api/v1/devices/ZWayVDev_zway_33-0-67-1

{ "data": { "creationTime": 1465265507, "creatorId": 1, "deviceType": "thermostat", "h": -776623568, "hasHistory": false, "id": "ZWayVDev_zway_33-0-67-1", "location": 6, "metrics": { "scaleTitle": "°F", "level": 62, "min": 41, "max": 104, "icon": "thermostat", "title": "Heater" }, "permanently_hidden": false, "probeType": "thermostat_set_point", "tags": [], "visibility": true, "updateTime": 1465435753 }, "code": 200, "message": "200 OK", "error": null }

Air Conditioner

http://192.168.1.106:8083/ZAutomation/api/v1/devices/ZWayVDev_zway_33-0-67-2

{ "data": { "creationTime": 1465265507, "creatorId": 1, "deviceType": "thermostat", "h": -776623567, "hasHistory": false, "id": "ZWayVDev_zway_33-0-67-2", "location": 6, "metrics": { "scaleTitle": "°F", "level": 73, "min": 41, "max": 104, "icon": "thermostat", "title": "Air conditioner" }, "permanently_hidden": false, "probeType": "thermostat_set_point", "tags": [], "visibility": true, "updateTime": 1465435946 }, "code": 200, "message": "200 OK", "error": null }

Fingerz commented 8 years ago

I have also now got a Z-Wave thermostat that supports both heating and cooling and am looking forward to 0.6 to try and integrate it. In my case I will only be using the cooling function as I don't have heating in my home. I'm having a few issues integrating it with ZWay, but as soon as those are resolved I'll post virtual device API log here.

So far this is what I get from ZWay for this thermostat: (176.0.50.0)"},"permanently_hidden":false,"probeType":"meterElectric_kilowatt_per_hour","tags":[],"visibility":true,"updateTime":1471518632},{"creationTime":1471364076,"creatorId":1,"deviceType":"sensorMultilevel","h":-631951303,"hasHistory":false,"id":"ZWayVDev_zway_176-0-50-2","location":1,"metrics":{"probeTitle":"Electric","scaleTitle":"W","level":0,"icon":"meter","title":"Electric Meter (176.0.50.2)"},"permanently_hidden":false,"probeType":"meterElectric_watt","tags":[],"visibility":true,"updateTime":1471518667},{"creationTime":1471364075,"creatorId":1,"deviceType":"sensorMultilevel","h":-631972446,"hasHistory":false,"id":"ZWayVDev_zway_176-0-49-1","location":1,"metrics":{"probeTitle":"Temperature","scaleTitle":"°C","level":22,"icon":"temperature","title":"Temperature (176.0.49.1)"},"permanently_hidden":false,"probeType":"temperature","tags":[],"visibility":true,"updateTime":1471518670}]},"code":200,"message":"200 OK","error":null}

There is a bug in the thermostat Z-Wave firmware that prevents the Thermostat Setpoint from being exposed by ZWay, and they haven't implemented Fan Speed control in ZWay yet so that isn't exposed either. If the above device is active in ZWay, then the homebridge-zway plug-in gets stuck during initialization. I have to deactivate it for it Homebridge to complete launching.

Fingerz commented 7 years ago

OK, I've not got an updated version of the heating/cooling thermostat that I'm testing that fully conforms to the Z-Wave spec the way it's interpreted by ZWay, and as expected homebridge-zway only exposes it as a heating thermostat when I plan to use it only as a cooling thermostat. Here is the updated device description and I'm hoping you can now implement supporting for a cooling thermostat in the 0.6.0 release:

{"creationTime":1484110846,"creatorId":1,"deviceType":"sensorMultilevel","h":112730052,"hasHistory":false,"id":"ZWayVDev_zway_185-0-49-1","location":1,"metrics":{"probeTitle":"Temperature","scaleTitle":"°C","level":21.6,"icon":"temperature","title":"Passage Thermostat Ambient Temperature"},"permanently_hidden":false,"probeType":"temperature","tags":[],"visibility":true,"updateTime":1484112075},{"creationTime":1484110850,"creatorId":1,"deviceType":"thermostat","h":112787712,"hasHistory":false,"id":"ZWayVDev_zway_185-0-67-1","location":1,"metrics":{"scaleTitle":"°C","level":20,"min":7,"max":35,"icon":"thermostat","title":"Passage Thermostat Heat (185.0)"},"permanently_hidden":false,"probeType":"thermostat_set_point","tags":["Homebridge.Skip"],"visibility":true,"updateTime":1484111367},{"creationTime":1484110850,"creatorId":1,"deviceType":"thermostat","h":112787713,"hasHistory":false,"id":"ZWayVDev_zway_185-0-67-2","location":1,"metrics":{"scaleTitle":"°C","level":24,"min":7,"max":35,"icon":"thermostat","title":"Passage Thermostat Cooling Setpoint"},"permanently_hidden":false,"probeType":"thermostat_set_point","tags":[],"visibility":true,"updateTime":1484112082}]},"code":200,"message":"200 OK","error":null}

silverhack77 commented 7 years ago

Just wanted to say that I have upgraded to an Ecobee so I no longer need the thermostat controls via Homebridge / ZWay. That said.... I no longer need my old thermostat (2Gig CCT30) so if you would like it for testing/debugging, I would be willing to ship it to you.

SphtKr commented 7 years ago

@silverhack77 Huh--well that's nice of you, thanks! Is it a U.S. device though? I'm in Europe and I'm on Euro frequencies with my setup--so I might not be able to connect it.

Fingerz commented 7 years ago

@SphtKr I can send you a Euro frequency Z-Wave cooling thermostat to test. What country are you located in?

silverhack77 commented 7 years ago

Yep, mine is US frequency. I'll also see if anyone on the Z-Wave.me forums wants it.

acote5 commented 7 years ago

Not sure I entirely follow what was proposed in this thread. However, I was able to work around the issue with my thermostat (CT30). In Zway, the CT30 creates a Heating and Cooling device. Disabling the Heating device made everything work properly from a hombridge-zway perspective.

It still shows up as a "heating" device in homekit, but the interface with cooling works perfectly because homebridge-zway communicates with the "cooling" z-wave.me device (instead of the heating). I can now integrate my AC in the thermostat schedule, so I'm perfectly happy with the feature as is.

If others confirm my workaround works well, I'd recommend this bypass be added to the instructions, and this "limitation" be removed from the main documentation. Big thanks to the dev for this plugin. Works perfectly.

danabdul commented 7 years ago

I have a honeywell thermostat and need to get both heating and cooling working. I can provide device outputs if needed. Thanks

rexy666 commented 7 years ago

I can also help in any way needed. I have a RTCA thermostat. Moreover, I had set the thermostat itself to use the Fahrenheit scale, which works fine on the z-way interface but it shows some weird 3 digit number on the Home app, I'm assuming it is trying to calculate C > F? where do I fix this?

spacesuitdiver commented 6 years ago

Would a look at homebridge-smartthings help? I am considering zway because SmartThings doesn't seem to properly report back to homekit (or itself even usually) the status of CT100 thermostats. Is zway at least reliable?

josecarlosmoimaz commented 6 years ago

I've just started using zway server on raspberry pi, I really don't want to use the zway home control app, the apple HomeKit app is perfect, without speaking of siri. I already used Homebridge with fibaro HC and would be perfect if we could have total AC control over zway with Homebridge. (turning on, off, cooling, heating..). The experience would be very similar to the fibaro system but with much less cost.

hubert3 commented 4 years ago

I have a ZXT-120 Aircon IR remote blaster which exposes 4 devices in Z-Way - Temperature sensor, On/off switch, Heat (with target temperature setting) and Cool (with target temp)

Works exactly as expected in the Z-Way web interface, works somewhat in the Homebridge web interface but not at all in iOS Home app - I see the current temp display but toggling modes between off/heat/cool/auto doesn't work, and I can't select a target temperature

Has anyone made a device like this work in Homekit through homebridge-zway in a combined thermostat device or as 2 or 3 separate devices?