bwssytems / ha-bridge

Home automation bridge that emulates a Philips Hue light system and can control other systems such as a Vera, Harmony Hub, Nest, MiLight bulbs or any other system that has an http/https/tcp/udp interface. This is a compact impl to run on small format computers. This is impl started from this project https://github.com/armzilla/amazon-echo-ha-bridge.
Apache License 2.0
1.45k stars 198 forks source link

Z-Wave thermostat #103

Closed emiliosic closed 8 years ago

emiliosic commented 8 years ago

How can I set on ha-bridge a z-wave thermostat through a Vera? Right now I have something working via Vera scenes (as in Turn on heat, turn off heat), but if I say, "Set thermostat to 65", and the thermostat is configured as a dimmer, it sends a command to Vera but doesn't change the temp. Any suggestions?

bwssytems commented 8 years ago

If the thermostat is a device that can be dimmed, you will need to use the intensity percent dim control when using the helper for generating a bridge device. Otherwise it may be a specific call that you will need to look up in the Vera API. The best place to get this answered would be on the micassverde forum.

emiliosic commented 8 years ago

For reference, it works. Took a look at the LUUP API here: http://wiki.micasaverde.com/index.php/Luup_UPnP_Variables_and_Actions

The 'Dim URL' for a device named 'Thermostat' is this: http://[VERA IP]:3480/data_request?id=action&output_format=json&DeviceNum=[Vera Device ID]&serviceId=urn:upnp-org:serviceId:TemperatureSetpoint1&action=SetCurrentSetpoint&NewCurrentSetpoint=${intensity.percent}

The Alexa utterance (the command spoken to Alexa is): "set thermostat to XX" (as in 70 for 70 degrees).

Note that the C/F setting is set on Vera. Alexa converts the value requested (70) to the 70% of 255. In other words, converts a 'percentage' between 0..100 to a byte 0..255. ha-bridge converts the '175' back to '70' that Vera expects. Vera also has commands to set the mode heat/cool/auto, but I'm leaving those as-is for now.

bwssytems commented 8 years ago

Great! Glad it is working.