dkilgore90 / google-sdm-api

Apache License 2.0
70 stars 22 forks source link

Initial install can't set heatpoint #46

Closed jabbera closed 4 years ago

jabbera commented 4 years ago

I just walked through the installation guide for thermostats. Upon trying to set the heatpoint I get the following exception:

java.lang.NullPointerException: Cannot invoke method toFloat() on null object on line 147 (setHeatingSetpoint)

The issue is here https://github.com/dkilgore90/google-sdm-api/blob/2527aa18ab00df96338c628f33c9d9103e3bc878/sdm-api-thermostat.groovy#L147 If a cooling\heating setpoint isn't set yet your get an NPE. You should initialize them to sane values or handle the null pointer properly.

As you can see I don't have a cooling setpoint yet.

image

coreybacklund commented 4 years ago

I wanted to chime in that I've had the SDM api running for about 2 weeks now successfully. I updated it to the latest version over the weekend and now my thermostat will not set any heatpoints either. The thermostat is receiving data just fine, but I cannot send commands to it.

I also do not have a cooling point set.

jabbera commented 4 years ago

It broke 2 days ago in this commit: https://github.com/dkilgore90/google-sdm-api/commit/1d5d4007feec6e50db057a2668a202354518420e

If you flip to cool and set it to 90 then flip back to heat the issue will resolve itself.

coreybacklund commented 4 years ago

Workaround worked perfectly. Thank you.