Page 48 of 49 FirstFirst ... 3843444546474849 LastLast
Results 471 to 480 of 483

Thread: Decoded - EvoHome API access to control remotely.

  1. #471
    Automated Home Jr Member
    Join Date
    Oct 2005
    Posts
    10

    Default

    Guys I am trying to make the hot water controls to work but no joy.(this is in lua portion code).
    I have managed to get the temp for Heating, Hot Water and control the Heating.
    I am using the api v1.
    Tbe end point i am using for controlling the Hot water is
    https://mytotalconnectcomfort.com/We...ngeableValues/
    with these headers
    headers = {
    ["sessionId"] = sessionId,
    ["Content-Type"] = "application/x-www-form-urlencoded",
    ["Accept"] = "*/*"

    but I am not sure about the body.
    Can someone indicate which body shall I use for controlling the hot water and if the endpoint is correct?

  2. #472
    Automated Home Guru
    Join Date
    Dec 2016
    Posts
    201

    Default

    Quote Originally Posted by 03397 View Post
    Guys I am trying to make the hot water controls to work but no joy.(this is in lua portion code).
    I have managed to get the temp for Heating, Hot Water and control the Heating.
    I am using the api v1.
    Tbe end point i am using for controlling the Hot water is
    https://mytotalconnectcomfort.com/We...ngeableValues/
    with these headers
    headers = {
    ["sessionId"] = sessionId,
    ["Content-Type"] = "application/x-www-form-urlencoded",
    ["Accept"] = "*/*"

    but I am not sure about the body.
    Can someone indicate which body shall I use for controlling the hot water and if the endpoint is correct?
    That will depend on the action you are trying to push and I think there are plenty of existing implementations that explain better what should be in the body than I could do here in some format that you may or may not be able to follow.

    The API is documented here: https://mytotalconnectcomfort.com/WebApi/Help/LogIn (use your application ID in the top form entry to login)

    Example implementations:
    - https://github.com/watchforstock/evohome-client (python)
    - https://github.com/gordonb3/evohomeclient (c++)
    - https://github.com/reines/evohome-client (java)

  3. #473
    Automated Home Jr Member
    Join Date
    Oct 2005
    Posts
    10

    Default

    Quote Originally Posted by gordonb3 View Post
    That will depend on the action you are trying to push and I think there are plenty of existing implementations that explain better what should be in the body than I could do here in some format that you may or may not be able to follow.

    The API is documented here: https://mytotalconnectcomfort.com/WebApi/Help/LogIn (use your application ID in the top form entry to login)

    Example implementations:
    - https://github.com/watchforstock/evohome-client (python)
    - https://github.com/gordonb3/evohomeclient (c++)
    - https://github.com/reines/evohome-client (java)

    Thanks for your reply.
    I have found these and I have based my code on this. Everything is working except the control of hot water.
    What I am trying to do here is to turn on the hot water for a specified amount of time.
    The API documentation does not have an explanation for the hot water.

    I have this code(based on the links) LUA
    HWStatus= "Temporary"
    HWMode= "DHWOn"
    getEpochTime=os.time(os.date("*t"))+addedTime
    HWNextTime=os.date("%Y-%m-%dT%H:%M:%S", getEpochTime)
    HWSpecialModes=""
    HWHeatSetpoint=""
    HWCoolSetpoint=""
    self:debug("Full date", HWNextTime)
    local requestBody = "Status=" .. HWStatus .. "&Mode=" .. HWMode .. "&NextTime=" .. HWNextTime .. "&SpecialModes=" .. HWSpecialModes .. "&HeatSetpoint=" .. HWHeatSetpoint .. "&CoolSetpoint=" .. HWCoolSetpoint
    self.http:request("https://mytotalconnectcomfort.com/WebApi/api/devices/xxZONEIDxx/thermostat/changeableValues/", {
    options = {
    data = requestBody,
    method = "PUT",
    headers = {
    ["sessionId"] = sessionId,
    ["Content-Type"] = "application/x-www-form-urlencoded",
    ["Accept"] = "*/*"
    }

    but I am getting this
    [24.02.2021] [10:54:30] [DEBUG] [QUICKAPP195]: Full date 2021-02-24T11:24:30
    [24.02.2021] [10:54:31] [DEBUG] [QUICKAPP195]: [ { "code": "ForbiddenParameter", "message": "'CoolSetpoint' is forbidden."
    [24.02.2021] [10:54:31] [DEBUG] [QUICKAPP195]: response status: 400

    I am pretty sure the there is something wrong with the values of the body but I did not manage to find anything.
    Your help will be really appreciated.

  4. #474
    Automated Home Lurker
    Join Date
    Dec 2016
    Posts
    6

    Default

    Hi, I think the HW device is not thermostat but dometicHotWater.

    I use this endpoint to control the HW:

    "https://tccna.honeywell.com/WebAPI/emea/api/v1/domesticHotWater/xxZONEIDxx/state/"

  5. #475
    Automated Home Jr Member
    Join Date
    Oct 2005
    Posts
    10

    Default

    Quote Originally Posted by William View Post
    Hi, I think the HW device is not thermostat but dometicHotWater.

    I use this endpoint to control the HW:

    "https://tccna.honeywell.com/WebAPI/emea/api/v1/domesticHotWater/xxZONEIDxx/state/"
    Which application id is this? I use 91db1612-73fd-4500-91b2-e63b069b185c
    Can you please post the headers and the body of your request?

  6. #476
    Automated Home Jr Member
    Join Date
    Oct 2005
    Posts
    10

    Default

    Quote Originally Posted by 03397 View Post
    Which application id is this? I use 91db1612-73fd-4500-91b2-e63b069b185c
    Can you please post the headers and the body of your request?
    I am getting unauthorized so I guess you are using a different application id.

  7. #477
    Automated Home Lurker
    Join Date
    Dec 2016
    Posts
    6

    Default

    Quote Originally Posted by 03397 View Post
    Which application id is this? I use 91db1612-73fd-4500-91b2-e63b069b185c
    Can you please post the headers and the body of your request?
    My application ID is b013aa26-9724-4dbd-8897-048b9aada249.

    Header:

    $Header = array('Authorization:bearer ' . $_SESSION[token] ,
    'applicationId=b013aa26-9724-4dbd-8897-048b9aada249',
    'Accept=application/json, application/xml, text/json, text/x-json, text/javascript, text/xml');

    Body to set HW:

    $url = BASEURL . 'domesticHotWater/xxHWZONEIDxx/state';
    $Result = CURL($url, $Header, 'PUT', 'State=1&Mode=2&UntilTime='.$time, true);

  8. #478
    Automated Home Jr Member
    Join Date
    Oct 2005
    Posts
    10

    Default

    Quote Originally Posted by William View Post
    My application ID is b013aa26-9724-4dbd-8897-048b9aada249.

    Header:

    $Header = array('Authorization:bearer ' . $_SESSION[token] ,
    'applicationId=b013aa26-9724-4dbd-8897-048b9aada249',
    'Accept=application/json, application/xml, text/json, text/x-json, text/javascript, text/xml');

    Body to set HW:

    $url = BASEURL . 'domesticHotWater/xxHWZONEIDxx/state';
    $Result = CURL($url, $Header, 'PUT', 'State=1&Mode=2&UntilTime='.$time, true);
    Yes I thought so. Different application id. I cannot use endpoint with the application id. I need to rewrite my code.
    Do you have any idea if the application id I have supports hot water?
    I have found out that it is supported. Can you please give me any help on this using my application id?

  9. #479
    Automated Home Lurker
    Join Date
    Dec 2016
    Posts
    6

    Default

    Quote Originally Posted by 03397 View Post
    Yes I thought so. Different application id. I cannot use endpoint with the application id. I need to rewrite my code.
    Do you have any idea if the application id I have supports hot water?
    I have found out that it is supported. Can you please give me any help on this using my application id?
    Sorry, can't help you as this is the only application ID I use and have experience with.

  10. #480
    Automated Home Jr Member
    Join Date
    Oct 2005
    Posts
    10

    Default

    Quote Originally Posted by William View Post
    Sorry, can't help you as this is the only application ID I use and have experience with.
    Can you please pm with your code to get an idea how you r did the whole functionality?

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
  •