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

localProtectionState json


Question

Posted

Hello:-)

Bonjour

 

 

The following code passes: localProtectionState from 0 to 2

le code suivant passe : localProtectionState de 0 à 2

 

local deviceID=547
local json = api.get("/devices/" ..deviceID)
json.properties.localProtectionState = 2
api.put("/devices/" ..deviceID, json)

 

To fully validate the update, I am obliged to go into the parameters of the FGRM and click on the floppy disk:-(
mai il y un problème, pour valider le changement il faut aller dans les paramètres du module et cliqué sur la disquette 

 

 

That miss has my code ?

 

Thanks for help

9 answers to this question

Recommended Posts

  • 0
Posted

HI @971jmd3

 

Welcome to the forum.

Could you expand a little more on context, what you are trying to achieve and what problem you have encountered

 

-f

  • 0
  • Inquirer
  • Posted

    salut

     

     


    I wish to deactivate the wall controls of my roller shutters.

     

    Please login or register to see this attachment.

     

     

    By

     

    Please login or register to see this attachment.

     


    With the following code :

     

    local deviceID=547
    local json = api.get("/devices/" ..deviceID)
    json.properties.localProtectionState = 2
    api.put("/devices/" ..deviceID, json)

     

    Please login or register to see this code.

    Please login or register to see this image.

    /monthly_2017_04/58e2a595f2e8a_controlfgrm3.JPG.b7611fcd363bd15f5fd42853998d86c3.JPG" alt="58e2a595f2e8a_controlfgrm3.JPG.b7611fcd363bd15f5fd42853998d86c3.JPG" />

     

     

     

     

    ----------------No operation possible----------------------

    local deviceID=547
    local json = api.get("/devices/" ..deviceID)
    json.properties.localProtectionState = 2
    api.put("/devices/" ..deviceID, json)

     

    ----------------Unprotected---------------------

    local deviceID=547
    local json = api.get("/devices/" ..deviceID)
    json.properties.localProtectionState = 0
    api.put("/devices/" ..deviceID, json)

    • 0
  • Inquirer
  • Posted
    • 0
    Posted (edited)
    On 4/3/2017 at 9:09 AM, 971jmd3 said:

    Hello:)

    Bonjour

     

     

    The following code passes: localProtectionState from 0 to 2

    le code suivant passe : localProtectionState de 0 à 2

     

    local deviceID=547
    local json = api.get("/devices/" ..deviceID)
    json.properties.localProtectionState = 2
    api.put("/devices/" ..deviceID, json)

     

    To fully validate the update, I am obliged to go into the parameters of the FGRM and click on the floppy disk:(
    mai il y un problème, pour valider le changement il faut aller dans les paramètres du module et cliqué sur la disquette 

     

     

    That miss has my code ?

     

    Thanks for help

    hi @971jmd3,

     

    You can using my virtual Device. 

    You need change HC2 user and password, ID of the roller shutter and status Protection

     

    Please login or register to see this attachment.

    Please login or register to see this attachment.

     

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Edited by annhan91
    • 0
  • Inquirer
  • Posted

    hello

    Thank you, :)

     

    but I have error

     

    Please login or register to see this code.

     

    • 0
    Posted
    9 hours ago, 971jmd3 said:

    hello

    Thank you, :)

     

    but I have error

     

    Please login or register to see this code.

     

    Hi @971jmd3,

    It wasn't the code fault. it is just my debug

    • 0
  • Inquirer
  • Posted

    salut

     

     

    Unprotected=0
    No_remoteControl=0
    No_operation_possible=0

     

    What is the correct configuration to lock the shutter

     

     

     

     

     

    • 0
    Posted
    7 hours ago, 971jmd3 said:

    salut

     

     

    Unprotected=0
    No_remoteControl=0
    No_operation_possible=0

     

    What is the correct configuration to lock the shutter

     

     

     

     

     

    you try change:

     

    change(USER,PASSWORD, ID_DEVICE, Status_Lock1, Status_LOck2)
    With Status_LOck_1 number is 0 or 1

    Status_Lock2 number is 0 or 2

    • 0
  • Inquirer
  • Posted

    hello

     


    Whatever combination is always the same

     

    [DEBUG] 23:45:37: {"args":[0,0]}
    [DEBUG] 23:45:37: Sended 14 content bytes with result [0].

     

     

    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...