Honeywell Smart Wi-Fi Thermostat Compatibility

Take a look at my code above to fix your degree symbol problem. You can just copy the degree symbol from mine into Elchison’s code.

1 Like

Super cool! Thx! That fixed the weird characters.
Where do I find the list of values available from Honeywell or how would I go about checking this part of the code to see why the outdoor humidity value is off?? I’m new to the programming side of things, but willing to give it a shot.

	def curTemp = response.data.latestData.uiData.DispTemperature
    def fanMode = response.data.latestData.fanData.fanMode
    def switchPos = response.data.latestData.uiData.SystemSwitchPosition
    def coolSetPoint = response.data.latestData.uiData.CoolSetpoint
    def heatSetPoint = response.data.latestData.uiData.HeatSetpoint

	def IndoorHumiditySensorAvailable = response.data.latestData.uiData.IndoorHumiditySensorAvailable
    //def OutdoorHumidityAvailable = response.data.latestData.uiData.OutdoorHumidityAvailable
    //def OutdoorHumidity = response.data.latestData.uiData.OutdoorHumidity
    def IndoorHumidity = response.data.latestData.uiData.IndoorHumidity
	def OutdoorHumidity = response.data.latestData.uiData.OutdoorHumidity
	//def WeatherHumidity = response.data.latestData.uiData.WeatherHumidity
    //def Humidity = IndoorHumidity

	IndoorHumidity = IndoorHumidity
	OutdoorHumidity = OutdoorHumidity

The honeywell api is not open to the general public but you can glean some useful info from the source code of the website.

 ///////////////////// pass model data to client-side logic /////////////////////
        Control.Model.set(Control.Model.Property.displayedUnits, 'F');
        Control.Model.set(Control.Model.Property.commercial, false);
        Control.Model.set(Control.Model.Property.communicationLost, false);
        Control.Model.set(Control.Model.Property.coolLowerSetpLimit, 50.0000);
        Control.Model.set(Control.Model.Property.coolNextPeriod, 0);
        Control.Model.set(Control.Model.Property.coolSetpoint, 78.0000);
        Control.Model.set(Control.Model.Property.coolUpperSetptLimit, 99.0000);
        Control.Model.set(Control.Model.Property.deadband, 3.0000);
        Control.Model.set(Control.Model.Property.deviceID, xxxxxx);
        Control.Model.set(Control.Model.Property.dispTemperature, 75.0000);
        Control.Model.set(Control.Model.Property.dispTemperatureAvailable, true);
        Control.Model.set(Control.Model.Property.dualSetpointStatus, false);
        Control.Model.set(Control.Model.Property.heatLowerSetptLimit, 40.0000);
        Control.Model.set(Control.Model.Property.heatNextPeriod, 0);
        Control.Model.set(Control.Model.Property.heatSetpoint, 75.0000);
        Control.Model.set(Control.Model.Property.heatUpperSetptLimit, 90.0000);
        Control.Model.set(Control.Model.Property.holdUntilCapable, false);
        Control.Model.set(Control.Model.Property.indoorHumidity, 128.0000);
        Control.Model.set(Control.Model.Property.indoorHumiditySensorAvailable, false);
        Control.Model.set(Control.Model.Property.isInVacationHoldMode, false);
        Control.Model.set(Control.Model.Property.outdoorHumidity, 128.0000);
        Control.Model.set(Control.Model.Property.outdoorTemp, 128.0000);
        Control.Model.set(Control.Model.Property.schedCoolSp, 0.0000);
        Control.Model.set(Control.Model.Property.schedHeatSp, 0.0000);
        Control.Model.set(Control.Model.Property.scheduleCapable, true);
        Control.Model.set(Control.Model.Property.setpointChangeAllowed, true);
        Control.Model.set(Control.Model.Property.statusCool, 2);
        Control.Model.set(Control.Model.Property.statusHeat, 2);
        Control.Model.set(Control.Model.Property.switchAutoAllowed, true);
        Control.Model.set(Control.Model.Property.switchCoolAllowed, true);
        Control.Model.set(Control.Model.Property.switchEmergencyHeatAllowed, false);
        Control.Model.set(Control.Model.Property.switchHeatAllowed, true);
        Control.Model.set(Control.Model.Property.switchOffAllowed, true);
        Control.Model.set(Control.Model.Property.systemSwitchPosition, 1);
                Control.Model.set(Control.Model.Property.temporaryHoldUntilTime, null);

        Control.Model.set(Control.Model.Property.vacationHold, 0);
                Control.Model.set(Control.Model.Property.vacationHoldUntilTime, null);

        Control.Model.set(Control.Model.Property.fanMode, 0);

        Control.Model.set(Control.Model.Property.fanModeAutoAllowed, true);

        Control.Model.set(Control.Model.Property.fanModeOnAllowed, true);

        Control.Model.set(Control.Model.Property.fanModeCirculateAllowed, false);

        Control.Model.set(Control.Model.Property.fanModeFollowScheduleAllowed, false);
        Control.Model.set(Control.Model.Property.hasFan, true);
        Control.Model.set(Control.Model.Property.weatherPhrase, 'Clear');
        if (60 != 0) {
            Control.Model.set(Control.Model.Property.weatherHumidity, '60');
        } else {
            Control.Model.set(Control.Model.Property.weatherHumidity, formatHumidity(0, false));
        }
        if (51 != 0) {
            Control.Model.set(Control.Model.Property.weatherTemperature, '51');
        } else {
            Control.Model.set(Control.Model.Property.weatherTemperature, formatTemperature(0, false));
        }
        Control.Model.set(Control.Model.Property.weatherHasStation, false);
        Control.Model.set(Control.Model.Property.weatherIcon, 33);
        Control.Model.set(Control.Model.Property.canControlHumidification, false);


        Control.Model.clearPropertyUpdates();

        ///////////////////// pass resources to client-side logic /////////////////////
        Control.Res.F1DataSessionStarted = "Data Session started successfully.";
        Control.Res.F1DataSessionFailed = "Data Session initialization failed.";
        Control.Res.F1DataSessionOpen = "Data Session is open.";
        Control.Res.F1StatusCommunicationLost = "Communication with your thermostat has been lost.";
        Control.Res.F1DataSessionTimeout = "Data Session is no longer open.";
        Control.Res.FollowingSchedule = "Following Schedule";
        Control.Res.Help = "Help";
        Control.Res.FollowingScheduleInRecovery = "Following Schedule in Recovery";
        Control.Res.FanHelpTextOnMode = "<p><b>On</b>: Fan is always on.</p>";
        Control.Res.FanHelpTextAutoMode = "<p><b>Auto</b>: Fan runs only when the heating or cooling system is on.</p>";
        Control.Res.FanHelpTextCirculateMode = "<p><b>Circulate</b>: Fan runs randomly, about 35% of the time.</p>";
        Control.Res.FanHelpTextFollowScheduleMode = "<p><b>Follow Schedule</b>: Fan controlled by the program schedule.</p>";
        Control.Res.FanHelpText = "<p>After you select your desired setting, press <b>Submit</b> to save your changes.</p>";
        Control.Res.LocationCodeChange = "Please contact the account owner to have the location code changed.";
        Control.Res.UnsavedChanges = "You have unsaved changes. Click Submit in the lower right corner of control panel.";

I think this maybe the value you are looking for. As my humidities all read 128 as well.

Yea - I think that’s probably it too.
Ok, so I tried to change this in the device type code, but kept getting %null so I am likely doing something incorrectly.

I’m not asking you do to this for me, but any guidance would be appreciated. If anything, this is a good learning experience for me.

CC

I don’t use that code, but you could un-comment the WeatherHumidity line.

Then below set OutdoorHumidity = WeatherHumidity

Yes, that’s one of the things I tried that produced the null%…
Do you think there is something in the tile setup or later down like the log.dubug, or sendevent that is causing it to not work?

    valueTile("outdoorhumidity", "device.outdoorhumidity", inactiveLabel: false, decoration: "flat") {
        state "default", label:'${currentValue}%', unit:"OutdoorHumidity"
    }



	def OutdoorHumidity = response.data.latestData.uiData.OutdoorHumidity
	def WeatherHumidity = response.data.latestData.uiData.WeatherHumidity
    //def Humidity = IndoorHumidity

	IndoorHumidity = IndoorHumidity
	OutdoorHumidity = WeatherHumidity
    
    log.debug curTemp
    log.debug fanMode
    log.debug switchPos
    log.debug IndoorHumidity
    log.debug OutdoorHumidity
    //log.debug weatherHumidity
	//fan mode 0=auto, 2=circ, 1=on
    
    if(fanMode==0)
    	fanMode = 'auto'
    if(fanMode==2)
    	fanMode = 'circulate'
    if(fanMode==1)
    	fanMode = 'on'

    if(switchPos==1)
    	switchPos = 'heat'
    if(switchPos==2)
    	switchPos = 'off'
    if(switchPos==3)
    	switchPos = 'cool'


    sendEvent(name: 'thermostatFanMode', value: fanMode)
    sendEvent(name: 'thermostatMode', value: switchPos)
    sendEvent(name: 'coolingSetpoint', value: coolSetPoint as Integer)
    sendEvent(name: 'heatingSetpoint', value: heatSetPoint as Integer)
    sendEvent(name: 'temperature', value: curTemp as Integer, state: switchPos)
    sendEvent(name: 'indoorhumidity', value: IndoorHumidity as Integer)
    sendEvent(name: 'outdoorhumidity', value: OutdoorHumidity as Integer)

does it use batteries or do i need a line for power?

thanks again…

@kirsten27

Most of these thermostats require a C (common) wire, some use a small battery as a backup as well (maintain clock time etc during power outages).

Kirsten,
There might be a spare wire in the t-stat cable that’s in the wall. Take a look and see if there is, you may be able to use this for power off of the transformer in the furnace.

Is there any way to pull from the API whether a given thermostat’s system is running at the moment? I’ve been working on some graphing of my SmartThings devices and just got one of those fancy Energy Meters. I’d like to be able to overlay on my energy usage graph the times when the HVAC was active in one or both zones and which mode it’s in (cool, heat, emergency heat).

I found these two values:

    Control.Model.set(Control.Model.Property.statusCool, 0);
    Control.Model.set(Control.Model.Property.statusHeat, 0);

…but it seems like whenever my system kicks on, they BOTH get set to 1. Anyone know what these two actually mean?

It has been a while since I have played with the code… but I think you are on the right track. I think that those get set to 1, but you what you also need to look at is the SystemSwitchPosition and then you can know whether it is ON and on HEAT or on COOL.

1 Like

@dave

I have made some modifications to to the code, still working on the humidity setting. Fan mode works and I made some changes to the way heat and cool are displayed.

@jodyalbritton

Sweet!
I like the Heat and Cool labels, seems like the fan is working better, I better quit turning it on and off or I will break my AC? :frowning:

My old (dumb) tsat had humidity, I wish my new (smart) one did as well!

Great job!

I just sent in a pull request to add “thermostatOperatingState” to the states this device supports. This gets us the ability to tell whether or not the HVAC system for this thermostat is running and if so, in which mode. The state gets set to one of “heating”, “cooling”, or “idle”.

I wanted this for a project I’m working on, but it’d be handy to see in the app UI as well. I just haven’t gotten around to figuring out how the UI stuff works. =)

I just merged your changes @btk, I will add it to the ui tonight. @dave I am working on the humidity but my unit does not have the sensors, so I am working in the dark on that one.

What needs done? Mine has the indoor and outdoor humidity sensors, so I might be able to help.

I will comment the areas to look at in the next code push.

@btk I updated the code with the operating state tile and commented the section about the humidities.

@david I fixed the error in the new version if you want to grab it too.

So for systems that support both indoor and outdoor humidity, how should we handle that?

I was thinking of by default reporting the indoor humidity, since that’s what the thermostat is primarily concerned with. On the other hand, I can certainly see someone wanting to use the thermostat to get the outdoor humidity if they have one or more z-wave humidity sensors for indoors.

I could add a preference to “Report outdoor humidity sensor”, but I don’t think there’s any way to only provide that option if they actually have an outdoor sensor, so it could potentially confuse people.

Alternatively, we could write up another device type specifically to handle the outdoor temp/humidity reporting and have the current thermostat device type just handle the indoor stuff.

Thoughts?