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


Sprinkler Auto/Off Control


Guest sameri

Recommended Posts

Guest sameri

Hi guys.

 

Apologies if this has already been answered but was wondering if there was a way to switch the individual sprinklers between Auto/Off using a VD or similar so I can do it from the phone App?

 

I'd like to be able to effectively disable my sprinklers during winter and only water automatically during summer.

 

I know there is a good VD for the "Sprinkler Panel" (here:

Please login or register to see this link.

but I really want access to the Auto/Off mode selection.

 

Thanks in advance.

 

Link to comment
Share on other sites

Hi @sameri ,

 

8 hours ago, sameri said:

Apologies if this has already been answered

 

Do you mean to tell me that you did not use the search tool ? ;)

Link to comment
Share on other sites

Guest sameri
  • Topic Author
  • 5 minutes ago, A.Smolinski said:

    Hi @sameri ,

     

     

    Do you mean to tell me that you did not use the search tool ? ;)

     

    Yes I did use the search tool but found nothing to help me. That doesn't mean the questions has never been answered, it just means I did not find the answer...?

    Link to comment
    Share on other sites

    Guest sameri
  • Topic Author
  • I've tried my hardest today to work this out myself but am seeking some guidance.

     

    Using Firefox Developer I've interrogated the commands and got the following:

    The API call as far as I can tell is /api/devices/xxx/action/setDrenchingMode

    where xxx = the device ID

     

    Then the paramater sent is for the 2 commands I am interested in are:

    {"args":["off"]}

    {"args":["auto"]}


    Using this article: 

    Please login or register to see this link.

    I have attempted to code these commands in Lua but the article does not explicitly state how to process the "arg" parameter...

     

    What I ended up with in my VD was (with all the General settings set the same as the example in the link above):

    POST /api/devices/xxx/action/setDrenchingMode HTTP/1.1
    Host: xxx.xxx.xxx.xxx
    Authorization: Basic Yxxxxxxxxxxxxxx=
    {"args":["off"]}

     

    and a few other versions of the above... Can anyone help point me in the right direction? Am I even close?

     

    I'm VERY new to this but trying to work through it...

    Link to comment
    Share on other sites

    Guest sameri
  • Topic Author
  • Well turns out I was VERY close... Just needed one more paragraph after the authorization.

     

    Very stoked. That's my first ever bit of "code" :-)

     

    I'll post up a finished VD later on for anyone that is interested.

    Link to comment
    Share on other sites

    • 4 months later...

    Just adding to this thread too.. as it is more pertinent here.. this is what I have done now.

    I have a VD with an Auto and OFF buttons.. the code below is for Auto. Simply replicate it for OFF and change the mode value to off. Some reason, when I upload the code to  the  thread below, it removes the square brackets.

     

    Please login or register to see this attachment.

    Edited by rajp
    Upload edits the code.
    Link to comment
    Share on other sites

    • 8 months later...

    Hello, 

     

    With this code:

     

    local localhost = '127.0.0.1';
    local port = 11111;
    HC2 = Net.FHttp(localhost, port)
    response ,status, errorCode = HC2:GET("/api/panels/drenchers")
    jsonTable = json.decode(response)
    dr = jsonTable.drenchers

    for i = 1, #dr do
        fibaro:debug("Device : " .. i)
            fibaro:debug(dr.id)
        fibaro:call(dr.id, "SetDrenchingMode", "off")
    end

    selfId = fibaro:getSelfId()
    fibaro:call(selfId, "SetProperty", "ui.lblSprinklerStatus.value", "ARRET")

     

    The Drenching Mode nothing changes with Firmware 4.541. What's the problem in this Code?

    Edited by speedoxx007
    Link to comment
    Share on other sites

    • 1 month later...
    On 5/17/2018 at 8:07 AM, sameri said:

    Well turns out I was VERY close... Just needed one more paragraph after the authorization.

     

    Very stoked. That's my first ever bit of "code" :-)

     

    I'll post up a finished VD later on for anyone that is interested.

     

    Hi @sameriI would be very interested in your finished VD.
    Do you want to share it with us?

     

    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
    Reply to this topic...

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