- Platform information:
- Hardware: Raspberry Pi 3
- OS: OpenHABian
- Java Runtime Environment: which java platform is used and what version
- openHAB version: 3.0.2
I’m a complete newbie with OpenHAB, the Nest API, OAuth, and with non-windows environments in general. As such, I’m struggling a lot with figuring out the basics of how all this works and what I can do with it. I’ve been trying to look for examples of how to get started with using OpenHAB to interact with my Nest thermostats, but haven’t found anything that really makes sense to me yet. I have 2 Nest thermostats (upstairs and downstairs). I have OpenHAB 3.0.2 running on a Raspberry Pi 3, and I have already set up the Nest SDM Bindings with the OAuth credentials. The binding says it is “ONLINE”, which is good, but now I’m like “Ok, now what?”.
Here’s what I’m trying to do:
I want to be able to programatically retrieve information from the Nest thermostats (such as reading the current setpoint, temperature, or heating/cooling mode), and send some basic commands (such as changing the set point, or cycling the HVAC on/off). Do I do this using rules? Using scripts?
The goal is for the RPi to read some data (or receive push commands) from an external web server and then based on that external data, use OpenHAB to run some logic to tell one or both thermostats to pre-cool or turn off so that they are not both running at the same time. I’m hoping that I can write a java script in OpenHAB to query our external web server, but before I get that far, I need to figure out the basics of controlling the thermostats.
I’m looking for some examples of how to
- detect and communicate with the 2 thermostats,
- how to know which thermostat is which,
- how to read the current setpoint and temperature from each thermostat, and
- how to send a command to change the current setpoint of one or both thermostats.
I’m assuming that I can do all of this in java code…