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


Watering - adjust and history 1.3

   (0 reviews)

1 Screenshot

About This File

1. Adjust Watering Scene

 

Features:

  • adjusts watering time
  • sends email/push about watering conditions
  • saves historical watering conditions

 

This scene allows you to adjust watering time based on

  • current rain
  • forecast rain (till noon)
  • current temperature
  • forcast temperature

 

You can change watering conditions as you like in adjustWatering() function.
For example:

  • if current rain >= 1 mm then turn off watering for 24h
  • if forecast rain >= 2 mm then turn off watering for 24h
  • if current rain >= 0.5 mm then decrease watering duration by 30%
  • if current temperature >= 30°C then increase watering duration by 40%
  • if current temperature <= 1°C then turn off watering for 24h
  • if forecast temperature <= 1°C then send warning about frost

 

The scene requires Sankotronic's 'Weather State and Forecast VD'.
Tested with "Weather State and Forecast v2.7.1 standalone"
Supports almost all services supported by 'Weather State and Forecast VD':

  • OpenWeatherMap (only daily version)
  • Dark Sky
  • WeatherBit
  • Weather HERE

 

You can change it as always at Sankotronic's 'Weather State VD'.
 
Customization:

local vdID = 476         -- ID of 'Weather State VD' from which we will take data
local sendEmail = true   -- change to false if you don't want to receive emails
local sendPush  = true   -- change to false if you don't want to receive push messages
local emailUserId  = 2   -- user id to send emails
local pushDeviceId = 0   -- mobile device id to send push messages

Watering schedule should be set in sprinkler panel.

I scheduled running this scene everyday 15 minutes before planned start of irrigation.

The scene increases/decreases watering time of all sprinklers.

 

Optional modules:

 

2. Watering History VD

 

Features:

  • shows watering time for the last 7 days
  • shows watering conditions for the last 7 days (gathered by Adjust Watering Scene)
  • shows current watering state (on/off)
  • shows current watering mode (auto/manual)
  • shows watering plan
  • allows to change watering mode (auto/off)
  • allows to run watering once (15/30/60 min)

 
Customization:
buttons code:

local sprinklerNr = 1 -- sprinkler number (1, 2, 3, ...)

VD supports only one sprinkler. If you want to see the watering history of more sprinklers then you have to create separete VD for every sprinkler. Remember to set sprinklerNr variable for every of them.

 

3. Netatmo Scene

 

If you don't have your own Netatmo Station, then you can use the neareast station in your location.
All public stations you can check here: https://weathermap.netatmo.com

 

The rain data from the netatmo are much better than the data from Forecast Weather Service. Especially if the rain Netatmo station is near your location.

 

All you need is:
a) copy the code from Netatmo.lua and paste it into Sankotronic's 'SA_Weather_Module_scene' at the end of file
b) sign up to get access data (https://auth.netatmo.com) and fill these fields in pasted Netatmo Scene code. Client ID and Client Secret token you can get when you create app on site https://dev.netatmo.com/apps/

local n_client_id = ""
local n_client_secret = ""
local n_username = ""
local n_password = ""

c) then change these variables values in the main loop of Sankotronic's 'Weather State VD' as follows:

local netatmoWeather = true
local netatmoRain    = true

d) if Sankotronic's 'Weather State VD' doesn't show netatmo values then increase distance to find a rain gauge in pasted Netatmo Scene code:

local long_lat_adjust = 0.1

Enjoy...

 

1470682134_Wateringhistory.thumb.png.dcd8ba989027c5dcf5d068f104974f85.png

 


What's New in Version 1.3   See changelog

Released

Netatmo.lua scene code changed to use new Netatmo API grant access credentials with refresh tokens instead of username and password


Other Files from szmyk


User Feedback

Recommended Comments

Hello:

 

I am having problem to run the scene, can you help me please

 

I al ready have running Weather State and Forecast VD' with no problem

I have a Netatmo station

 

I have 5 different sprinklers, and I have running 5 VD one for each sprinkler 

 

I can control manualy the sprinklers but the auto function its not working

 

Thanks.

 

Mario Carrillo

Link to comment
Share on other sites

Hello @szmyk

 

thanks to share your work, I was looking for this since many months.

I've installed Weather State and Forecast VD and also have a Netatmo Weather Station. 

 

All seems working correctly, but when I start you scene, I've the following error message:

 

[DEBUG] 17:19:47: 2021-05-01. Forecast error for watering. Empty forecast data.

 

Any idea where the problem is ? where I should take a look ?

 

Many thanks in advance

 

Thierry

Link to comment
Share on other sites

Hi @Thierry Linder

 

Try to run scene in the morning. Sometimes when you run scene in the afternoon there is no forecast for current day.

Or try to use other weather service.

Edited by szmyk
Link to comment
Share on other sites

Hello @szmyk
I installed WS and WP, it is working correctly for me (thanks for your work). I'm having trouble with the same error:
[DEBUG] 10:27:38: 2023-11-01. Irrigation forecast error. Empty forecast data.

Well, I already tried with other weather services, and I couldn't get it to work, I also tried to run it in the morning as in the previous comment and I didn't find a solution. Would you know what the problem could be?

 

Edited by castillo marco arturo
Link to comment
Share on other sites

It seems that Forecast VD doesn't work correctly.

Does the 'Weather State and Forecast VD' show correct forecast data?

  • Like 1
Link to comment
Share on other sites

This error means there is a problem with global variable "WeatherFore". Can you paste here value of this variable?

  • Like 1
Link to comment
Share on other sites

Hello!!
@szmyk
I can solve it now. It was a problem with the api I was using (OpenWeatherMap (only daily version)), and it didn't work with Weather Fore. 2.8.1, (I don't really know why). My solution was to change the API to WeatherBit.
Now I was testing for several days and today I got this error:
[DEBUG] 10:28:24: 2023-11-10. Forecast error for watering. Too old current weather date: 2023-11-10 01:25.

Edited by castillo marco arturo
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
Add a comment...

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