Page 35 of 47 FirstFirst ... 25303132333435363738394045 ... LastLast
Results 341 to 350 of 470

Thread: Decoded - EvoHome API access to control remotely.

  1. #341
    Automated Home Guru
    Join Date
    Dec 2016
    Posts
    150

    Default

    I think the Hot Water system is only visible in status. Don't have such a device myself (I'm on city block heating) so I can't verify this. However I just looked in my main code and I also retrieve zone names from status.

    Straight forward app would look something like this:
    Code:
        eclient.login(user,password);
        eclient.full_installation();
        int location = 0;
        int gateway = 0;
        int temperatureControlSystem = 0;
        EvohomeClient::temperatureControlSystem* tcs = &eclient.locations[location].gateways[gateway].temperatureControlSystems[temperatureControlSystem];
        eclient.get_status(location);
    At this point one method to get to a zone name is `eclient.json_get_val(tcs->zones[0].status, "name")`

  2. #342
    Automated Home Jr Member
    Join Date
    Jun 2017
    Posts
    48

    Default

    Just found the hot water temp, it's under "dhw" "temperatureStatus" "temperature".

    Now I've got the basics working and a very basic understanding of how the json objects work, it should be just a question of reading bits I want for now, control can come later.

    Thanks for all your help so far!

  3. #343
    Automated Home Jr Member
    Join Date
    Jun 2017
    Posts
    48

    Default

    Steadily making progress, the Evohome planned maintenance this morning did not help.

    I found that the evohomeclient object leaks a lot of memory because it does not clean up the json objects that it creates. When finished with an object it should call json_object_put to reduce the reference count and free the memory once it reaches 0.

  4. #344
    Automated Home Ninja
    Join Date
    Aug 2016
    Posts
    489

    Default

    Quote Originally Posted by RichardP View Post
    I found that the evohomeclient object leaks a lot of memory because it does not clean up the json objects that it creates. When finished with an object it should call json_object_put to reduce the reference count and free the memory once it reaches 0.
    I'm so glad that I stopped using languages that required explicit memory management about 20 years ago!

  5. #345

    Default

    Using this right?

    https://mytotalconnectcomfort.com/WebApi/Help

    Assume you have a login? (if not apply and it will get done)
    getconnected.honeywell.com | I work for Honeywell. Any posts I make are purely to help if I can. Any personal views expressed are my own

  6. #346
    Automated Home Guru
    Join Date
    Dec 2016
    Posts
    150

    Default

    Quote Originally Posted by RichardP View Post
    Steadily making progress, the Evohome planned maintenance this morning did not help.

    I found that the evohomeclient object leaks a lot of memory because it does not clean up the json objects that it creates. When finished with an object it should call json_object_put to reduce the reference count and free the memory once it reaches 0.
    Did have some reservations about that memory allocation bit. It didn't seem to hurt the single run client application though so I let it pass.

    Integrating the client into the Domoticz core I found myself with the challenge to convert the json-c code to jsoncpp and rather than maintaining two fundamentally different branches I think it's probably best if I do the same with the stand-alone library which appears to automatically destroy Json objects when they get out of focus.

  7. #347
    Automated Home Jr Member
    Join Date
    Jun 2017
    Posts
    48

    Default

    Quote Originally Posted by Rameses View Post
    Using this right?

    https://mytotalconnectcomfort.com/WebApi/Help

    Assume you have a login? (if not apply and it will get done)
    Yes I am using that as a reference now that I've got the basic mechanics working in my Windows app.

    Here's a screen grab of my monitoring app as it is now. The temperature of the hot water is displayed on the main screen and I have a small debug output window with the zone temperatures listed.



    I'm now saving the temperature data so I can implement some plots of temperature and set temperature over time.

  8. #348
    Automated Home Jr Member
    Join Date
    Jun 2017
    Posts
    48

    Default

    Quote Originally Posted by gordonb3 View Post
    Did have some reservations about that memory allocation bit. It didn't seem to hurt the single run client application though so I let it pass.

    Integrating the client into the Domoticz core I found myself with the challenge to convert the json-c code to jsoncpp and rather than maintaining two fundamentally different branches I think it's probably best if I do the same with the stand-alone library which appears to automatically destroy Json objects when they get out of focus.
    In a single run client it would not be a problem. As my app runs 24/7, it was a problem!

  9. #349
    Automated Home Guru
    Join Date
    Dec 2016
    Posts
    150

    Default

    Got that. In any case, it was on my ToDo list already but I'll push the conversion to jsoncpp through. You may actually like it better because it eliminates the need to retrieve an object before getting its content.

  10. #350
    Automated Home Ninja
    Join Date
    Aug 2016
    Posts
    489

    Default

    Richard, what are you doing that graphing in?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •