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

CURL from scene - application/vnd.api+json automover husqvarna


domin12

Question

Guys, please help me to fetch data on HC2:

curl -X GET "

Please login or register to see this link.

" -H "accept: application/vnd.api+json" -H "X-Api-Key: ea6ac712-8d9-48e-9fd-8f2ab8a781b" -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Imh1c3F2YXJuYSJ9.eyJqdGkiOixNTE1OGQ4Zi03M2YzLTRhNDctYjM5Ny04NGQ3OGJlNTM2YTYiLCJpc3MiOiJodXNxdmFybmEiLCJyb2xlcyI6W10sImdyb3VwcyI6WyJhbWMiLCJkZXZlbG9wZXItcG9ydGFsIiwic21hcnRnYXJkZW4iXSwic2NvcGVzIjpbImlhbTpyZWFkIiwiYW1jOmFwaSJdLCJjbGllbnRfaWQiOiJlYTZhYzcxMi04Y2Q5LTQ3OGUtOWZkNy04ZjJhMmI4YTc4MWIiLCJ1c2VyIjp7ImZpcnN0X25hbWUiOiJEb21pbmlrIiwibGFzdF9uYW1lIjoiQmVybmFzenVrIiwiY3zdG9tX2F0dHJpYnV0ZXMiOnt9LCJjdXN0b21lcl9pZCI6IiJ9LCJpYXQiOjE2NTEwNzEzODIsImV4cCI6MTY1MTE1Nzc4Miwic3ViIjoiZDczMGRlNWYtYWM4Ny00ZDUzLTlhZTAtZTAwN2U3NDFhYzNhIn0.jORy-VOO2bHiyR1i849cyoVEkv17FtKKLeZMsFRC4UgEnD9rgNh6vhMGn_-qdE2pLSmy-SOrhXmECTFyCY6dzFfWaQXUGRTeX2-1sQt4VmRhzBvYhA2PZMmyXOzkQZwFB2y1D5IClhQqB8gHUF94tzc1i1yyGMbPp4AFu7G3gTteaeouF-P0NJR-FK93-O9SiS4db9avOkKTCXOidgQg3D2K1U1d68MMiUAHZnxmgNgYq0p1dSPVPULs_qV-YKNF7NTLvBZ80qeXYPRNkDkLE5xT9i-f5ZmVLyD_4wmtTntrqTg_-7e-z2o9ZDyYHxuLIw3XbYEk_mKcY2MtwB2Kg" -H "Authorization-Provider: husqvarna"

this I can simply run from terminal, but how to do it from scene , it's not simple application/json content but application/vnd.api+json

 

thnx

Edited by domin12
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Not an answer to your question, sorry!

But a piece of friendly advice; don't post auth tokens in public!

 

(Happy to see the battery of your mower is fully charged, however i doubt you want the whole world to know where to find your device ;))

 

 

Link to comment
Share on other sites

  • 0
  • Inquirer
  • 31 minut temu, TomPf napisał:

    Not an answer to your question, sorry!

    But a piece of friendly advice; don't post auth tokens in public!

     

    (Happy to see the battery of your mower is fully charged, however i doubt you want the whole world to know where to find your device ;))

     

     

    True , thnx

    Link to comment
    Share on other sites

    • 0

    this works:

     

    Please login or register to see this code.

    response gives you the json output which is described on the husqvarna dev site.

     

    If the repsonsecode is not 200, check the response.data for errors. If you get a 403 returncode, there's probably something wrong with the key and/or token. Generate new keys/tokens and it should work. I even sometimes have to delete the app at husqvarna and completely make a new one.

    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.

    ×
    ×
    • Create New...