Humidity change recorded everywhere except on thermostat

I have written a perl script to control the humidity using an HRV wired as a dehumidifier. The script works great and changes the humidity levels through the API and I can see the value changing on my Android phone app as well as on the web portal but the thermostat itself remains unchanged (I waited for about an hour to see if it would eventually change but does not).

If I change the humidity in any other way (on the thermostat, phone app or web portal), I can see the change reflected everywhere, including on the thermostat.

What am I doing wrong? (FYI, I have a Smart EB-STAT-02 thermostat)

POST request:
{
"selection":
{
"selectionType":"registered",
"selectionMatch":""
},
"thermostat":
{
"settings":
{
"dehumidifierMode":"off"
}
}
}

API response:
{
"status":
{
"code": 0,
"message": ""
}
}
1 person has
this question
+1
Reply
  • I’m hopeful
    I think I may have figured it out. There seems to be a missing "send" to thermostat on your end:

    If I make a different change (such as a "hold until next transition") from the Android app, this seems to send an update from your servers to the thermostat and THEN I see the change I made through the API appear on the thermostat.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • I wrote another quick script to perform a thermostatSummary hoping to prove that the update didn't get sent to the thermostat. Now, for some reason, the humidity change request is getting through and working as expected.

    I'm guessing the Web Portal and phone app have a higher priority channel than the API does and it was just buffering my request from the API whereas the other two were not.

    So for now, I'd say I've answered my own question :)
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • MarkK (API Architect) November 24, 2014 20:39
    Hi,

    We do not prioritize or buffer input. Our web portals and applications take into account time it takes for the message to go through the servers and to the thermostat. If you poll too soon, the request will not have gone through yet and been accepted by the thermostat. The system is highly asynchronous and waiting for the revision change is standard practice before polling for the changed data.

    The communication is documented here: https://www.ecobee.com/home/developer...
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • Hi Mark, thanks for the reply. I understand what you are saying. However, I don't know how to explain this:
    Script sends command through API
    Open phone app and change is visible
    Open web portal and same change is visible
    **Wait 30 minutes or more**
    Go to thermostat and change is not applied
    Use phone app and make a different change (different parameter)
    Go to thermostat and both changes are instantly visible (from previous API command and from phone app)
    Make another change through API
    Same as before.

    It eventually started working after much experimentation. Nothing else changed.
    Anyway, the important thing is that it seems to work now. As this is my first real application using the API, I may very well be doing things wrong. I will go read up some more about waiting for the revision change as I'm not doing this currently.

    Thanks,
    Daniel
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • One more question if I may:
    My script worked at some point but is now back to not working as I explained earlier.

    Here is the general setup so far:
    On my linux server, I have a crontab entry to call my perl script once every 30 minutes:
    perl script does the following:
    GET thermostat request (includeSettings, includeRuntime, includeWeather)
    {do some fancy calculations and decide if a change needs to be posted}
    POST update thermostat with one or two parameters (dehumidifierMode, dehumidifierLevel) only if something changes
    exit

    Do I need to get a thermostatSummary before my change and then poll for a summary change before exiting? My script sends the request to the server and is visible on the phone app and web portal but not on the thermostat.

    If I run a separate "get thermostat summary" script before and after my other script called from the crontab, the thermostat revision does not change. If I trigger another change from the phone app, both app and script changes are reflected and thermostat revision changes.

    What am I missing?

    Thanks,
    Daniel
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • Ok, got it working. thanks :)

    I get the thermostat revision before my POST and then loop (with a sleep 1) and get new thermostat revisions until it changes. That seems to have done it.

    So it appears to be more than "standard practice" but rather a requirement for the change to be pushed to the thermostat.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • A few days ago, I had a case of non-functional Smart Recovery heat in the morning. I wonder if it might have anything to do with this particular situation?

    The evening before the Smart Recovery failed to kick in, I was experimenting with my script... (my wife is not too happy when she needs to get up in a freezing house in the morning, so I didn't dare try to test my theory to see if I could reproduce) :-)

    In any case, I have an open ticket with ecobee support about this SR situation.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited