Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

HC3 Honeywell Evohome API Call


ArjanC
 Share

Question

On the HC2 iv'e used the marketplace scripts to connect to my Honeywell EvoHome.

These obviously arn't working on HC3.

 

My goal for now is only to read the current temperature in the different rooms.

I've got it working in Postman, first i need to execute an POST with username, password and applicationid to retrieve a SessionID. with this sessionID i can do different API call's.

 

There is an option in Postman to convert to code, but, LUA isn't one of them ;-)

i've tried figuring the first post code out myself but it doesn't seem to work :

 

Please login or register to see this code.

The response i got : 

 

Please login or register to see this code.

 

In postman (in ruby): 

 

Please login or register to see this code.

 

Does anyone have a idea what the problem could be?

 

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • Found it.. guess it's the heat : 

     

    Please login or register to see this code.

    body isn't in JSON ?

    Link to comment
    Share on other sites

    • 0

    Hi Arjan!

     

    Did you get this working?

     

    Very interested in EvoHome on a HC3.

     

    Regards,

    Also an Arjan

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Just now, ArjanP said:

    Hi Arjan!

     

    Did you get this working?

     

    Very interested in EvoHome on a HC3.

     

    Regards,

    Also an Arjan

    Yes, but only reading the current temparature.

    There is probably an better way of doing it but this is what i got.
    First upload Honeywell_SessionID.fqa and set the variables. this wil set two global variables for UserID and SessionID.
    then upload Honeywell_LocationID.fqa, this wil use the global variables and retreive the LocationID from the API.

    Then upload the 1.02_Radiatortemp.fqa, this will use the UserID and LocationID. in the code there is a part that will select the correct temperature (the api call gets all settings) :
     

    Please login or register to see this code.

     

    where [3] is the thermostat.

     

    Just re-create 1.02_Radiatortemp for each thermostat..

     

     


     

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    • 0
    2 hours ago, ArjanC said:

    Yes, but only reading the current temparature.

    There is probably an better way of doing it but this is what i got.
    First upload Honeywell_SessionID.fqa and set the variables. this wil set two global variables for UserID and SessionID.
    then upload Honeywell_LocationID.fqa, this wil use the global variables and retreive the LocationID from the API.

    Then upload the 1.02_Radiatortemp.fqa, this will use the UserID and LocationID. in the code there is a part that will select the correct temperature (the api call gets all settings) :
     

    Please login or register to see this code.

     

    where [3] is the thermostat.

     

    Just re-create 1.02_Radiatortemp for each thermostat..

     

     


     

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Thanks a lot! Will test this tonight and let you know if it works.

    Link to comment
    Share on other sites

    • 0

    I'm sorry to say that it's not working.

    The second LocationId app gives me the following error.

    [18.08.2020] [20:20:01] [ERROR] [QUICKAPP131]: /usr/share/lua/5.3/json/decode/util.lua:35: unexpected character @ character: 1 0:1 [n] line:

     

    Any ideas? 

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • The error comes from the json decode. could you please past the complete log?

    Link to comment
    Share on other sites

    • 0

    It doesn't really give any more info. Maybe it doesn't get a response? I tried with Postman to recreate it. But it mostly gives an error about to many questions asked, (response 429). This might be correlated? (this is the location id app btw)

    [27.08.2020] [10:48:27] [ERROR] [QUICKAPP136]: QuickApp crashed

    [27.08.2020] [10:48:27] [ERROR] [QUICKAPP136]: /usr/share/lua/5.3/json/decode/util.lua:35: unexpected character @ character: 1 0:1 [n] line:

    [27.08.2020] [10:48:37] [ERROR] [QUICKAPP136]: QuickApp crashed

    [27.08.2020] [10:48:37] [ERROR] [QUICKAPP136]: /usr/share/lua/5.3/json/decode/util.lua:35: unexpected character @ character: 1 0:1 [n] line

    :[27.08.2020] [10:49:00] [ERROR] [QUICKAPP136]: QuickApp crashed

    [27.08.2020] [10:49:00] [ERROR] [QUICKAPP136]: /usr/share/lua/5.3/json/decode/util.lua:35: unexpected character @ character: 1 0:1 [n] line:

    [27.08.2020] [10:49:20] [ERROR] [QUICKAPP136]: QuickApp crashed

    [27.08.2020] [10:49:20] [ERROR] [QUICKAPP136]: /usr/share/lua/5.3/json/decode/util.lua:35: unexpected character @ character: 1 0:1 [n] line:

    Here is some of the log for the session id app. (app 135).

     

    [27.08.2020] [10:47:19] [DEBUG] [QUICKAPP135]: response status: 500

    [27.08.2020] [10:47:19] [DEBUG] [QUICKAPP135]: headers: application/json; charset=utf-8

    [27.08.2020] [10:48:01] [DEBUG] [QUICKAPP135]: response status: 500

    [27.08.2020] [10:48:01] [DEBUG] [QUICKAPP135]: headers: application/json; charset=utf-8

    [27.08.2020] [10:48:10] [DEBUG] [QUICKAPP135]: response status: 200

    [27.08.2020] [10:48:10] [DEBUG] [QUICKAPP135]: headers: application/json; charset=utf-8

    [27.08.2020] [10:48:10] [DEBUG] [QUICKAPP135]: sessionId: "755F09CB-2B38-4E03-AA3E-F9BB62C5CEB1"

    [27.08.2020] [10:48:10] [DEBUG] [QUICKAPP135]: userId: 1278338

    [27.08.2020] [10:48:10] [ERROR] [QUICKAPP135]: QuickApp crashed

    [27.08.2020] [10:48:10] [ERROR] [QUICKAPP135]: /usr/share/lua/5.3/json/decode/util.lua:35: unexpected character @ character: 1 0:1 [n] line:

    [27.08.2020] [10:49:01] [DEBUG] [QUICKAPP135]: response status: 200

    [27.08.2020] [10:49:01] [DEBUG] [QUICKAPP135]: headers: application/json; charset=utf-8

    [27.08.2020] [10:49:01] [DEBUG] [QUICKAPP135]: sessionId: "8C54D58D-3D93-47D1-9BCB-878714865D19"

    [27.08.2020] [10:49:01] [DEBUG] [QUICKAPP135]: userId: 1278338

    [27.08.2020] [10:49:01] [ERROR] [QUICKAPP135]: QuickApp crashed

    [27.08.2020] [10:49:01] [ERROR] [QUICKAPP135]: /usr/share/lua/5.3/json/decode/util.lua:35: unexpected character @ character: 1 0:1 [n] line:

    [27.08.2020] [10:50:01] [DEBUG] [QUICKAPP135]: response status: 200

    [27.08.2020] [10:50:01] [DEBUG] [QUICKAPP135]: headers: application/json; charset=utf-8

    [27.08.2020] [10:50:01] [DEBUG] [QUICKAPP135]: sessionId: "4892DAC4-BD0B-4D44-BAE6-936870A11DBE"

    [27.08.2020] [10:50:01] [DEBUG] [QUICKAPP135]: userId: 1278338

    [27.08.2020] [10:50:01] [ERROR] [QUICKAPP135]: QuickApp crashed

    [27.08.2020] [10:50:01] [ERROR] [QUICKAPP135]: /usr/share/lua/5.3/json/decode/util.lua:35: unexpected character @ character: 1 0:1 [n] line:

    [27.08.2020] [10:51:01] [DEBUG] [QUICKAPP135]: response status: 200

    Edited by ArjanP
    Link to comment
    Share on other sites

    • 0

    @

    Please login or register to see this link.

    I have uploaded all three files. I have changed the two variables username/password but I am getting the errors attached which is the one above.

    Any help will be really appreciated

     

     

     

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    • 0

    It seems that the problem is at line local data = json.decode(response.data)  which you correctly pinpointed above is the json decode.

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

     Share

    ×
    ×
    • Create New...