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 Panel


pt13

Recommended Posts

Hi All,

I'm trying to implement this solution on my HC2 with the newest firmware 4.120, and it crash my HC2 , every time when executing the code HC2 displaying me website where i can restart or refresh page. Any idea ?

i only want to delay sprinklers :)

SOLVED

Edited by domin12
Link to comment
Share on other sites

  • 1 month later...
21 godzin temu, Sankotronic napisał:

Hi @domin12 and @lroovers,

 

are you using this code:

Please login or register to see this code.

or original code from Vesternet?

Hi Sankotronic

Yes, I'm using this code exactly.

Dnia 24.06.2017 o 23:01, lroovers napisał:

How did you solve the crashing? mine is crashing too..

Hi lroovers

The answer to your question is in this post. This code works fine with my HC2.

Edited by domin12
Link to comment
Share on other sites

  • 2 weeks later...
Guest AxelS

Hi Guys and "LUA cracks",

 

is there a possibility to add a label with the next watering time to to VD, e.g. Next Watering: Wednesday 06:00am? 

 

Best

Axel

Edited by AxelS
Link to comment
Share on other sites

  • 1 month later...

Hi,

 

Here is my little contribution to the sprinkler control topic.

 

The attached virtual device allows controlling the Sprinkler Panel parameters (so that you can define your own complex scenes tied to e.g. a Popp rain meter and any thermometer) and is compatible with the most recent Fibaro HC2 API (version 4.130).

It is inspired by the Vesternet solution cited many times before, which unfortunately does not work anymore and causes HC2 restarts, probably because of the changes in the undocumented features of the API.

 

Please take in consideration, that my solution also uses an undocumented API features (mainly: using PUT to change just the adjustWater and rainDelay parameters, as hinted by other users before - neither of these are documented in the api listed at http://[your.h2c.local.address]/docs ) and it may stop working in the future. But it works now :) 

Oh, the Fibaro API now REQUIRES the superadmin account (because of the PUT request). I always try to avoid that (instead using a dedicated "api" user with limited privileges), but in this case there does not seem any other way.

You need to set the account in the code of the "Submit" button (clearly indicated).

 

My VD is a bit more complex than in the Vesternet solution in order NOT to repeat the user/password sections (and reduce boilerplate code). Instead, I keep the values to submit to the panel in the sliders (that is why they are important, as is the "submit" button). A little bonus of this solution is that you can use the sliders to manually modify the adjustWater and rainDelay parameters if you like.

 

Have fun!

 

qnstie

 

Please login or register to see this attachment.

Edited by qnstie
Correction of VFIB
Link to comment
Share on other sites

  • 6 months later...
Guest sameri

Hi guys. I hope it's ok that I'm posting this in an older topic and 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?

 

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

Link to comment
Share on other sites

  • 5 months later...
On 3/28/2018 at 1:50 AM, sameri said:

Hi guys. I hope it's ok that I'm posting this in an older topic and 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?

 

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

I have the same question.. for the life of me, I can't work out how to set the mode to auto or off.. I am able to set the raindelay without a problem...

Link to comment
Share on other sites

OK.. this code works for me.. I have a VD with 2 buttons on it.. Auto and Off.

 

The below code is for Off.

____________________________________________________________________________________________________________________________________________________________

-- Set authentication 
HC2 = Net.FHttp("xxx.xxx.x.xxx",80)
HC2:setBasicAuthentication("xxx", "xxx")
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", "auto")
end


selfId = fibaro:getSelfId()
fibaro:call(selfId, "setProperty", "ui.lblSprinklerStatus.value", "AUTO");

____________________________________________________________________________________________________________________________________________________________

 

Do the same for Auto with the Value of Auto.

Edited by rajp
Link to comment
Share on other sites

Guest sameri
10 hours ago, rajp said:

OK.. this code works for me.. I have a VD with 2 buttons on it.. Auto and Off.

 

The below code is for Off.

____________________________________________________________________________________________________________________________________________________________

HC2 = Net.FHttp("xxx.xxx.x.xxx",80)
HC2:setBasicAuthentication("xxx", "xxx")

 

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", "OFF");

____________________________________________________________________________________________________________________________________________________________

 

Do the same for Auto with the Value of Auto.

 

Yours looks better than mine ended up. I had another post here with my thought process:

 

 

Link to comment
Share on other sites

I have uploaded the answer there too. Not sure why, when I upload my script which has square bracket, it removes that. The code looks like below screenshot.

Please login or register to see this attachment.

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