if P_cosIncidence > 0 then
--if P_SolarAzimuth >= P_BlindAzimuth and P_SolarAzimuth <= P_BlindAzimuth + 180 then
F_SunInTheFront = true -- the sun is in the front = where the blind is)
logWrite('Sun in the front')
else
logWrite('Sun in the back')
end
because the computing to give if the sun is behind or not is here
Can you please give us an update of the code?
At the moment I am unable to change the code from the previous version.
Hi,
sorry, I didn't know the script was really used... so I was not in a hurry to publish it again.
In the 1st post, I made an update with my last version
I've put in comment the "dz.time.matchesRule" after a discussion w rrozema, but I think I'm going to add something like this again because I don't want the store to open while I'm sleeping... (you could remove the comments if needed as before)
Be aware that I've changed the angle of the blind
=> Breaking change BLIND_AZIMUTH is now the Azimuth of the normal of the area
So you have to add 90° on the previous value you put
What kind of blind(s) do you have? A picture? A feedback?
hestia wrote: ↑Sunday 12 June 2022 13:02
What kind of blind(s) do you have? A picture? A feedback?
Sure.
I have 6 roll hatches.
2 situated on the south and 4 on the North.
The ones on the north I use to blind them when in the summer the sun shines through the window.
And of course in the winter to hold the warmth inside as much as possible.
This one is situated on the northside.
['BLIND_TYPE'] = 'V'
['SLAT_DOWN_ANGLE'] = -90, -- Angle from the horizontal when the slat is down (<0), -90 for vertical blind
['SLAT_UP_ANGLE'] = 90, -- Angle from the horizontal when the slat is up, 90 for vertical blind
['SLAT_LENGHT'] = '', -- Length of the slate, any unit (cm...), nil for vertical blind
['SLAT_DISTANCE'] = '', -- Distance between slates, any unit (cm...), nil for vertical blind
['BLIND_ANGLE'] = 90, -- Angle of the blind from the horizontal (>0)
['TTC_SLAT_SEC'] = 1
That seems to be good for the North and your blind
['SOLAR_ALTITUDE_MIN'] = 20, means that in the evening the sun is hidden by something like another building, and the sun altitude when the sun starts to disappear is 20°, so there is no longer need to have the roller closed and they open in summer time
Great.
Now I only have to wait until Domoticz has solved this problem for the blinds.
It seems to be a nasty one because they are busy with it since november last year.
I have RFX433 for the blinds, not so good as zwave but enough
For the script the bug doesn't seem a problem as the script only open and close the roller with no middle position.
Perhaps you could modify the script to put .open instead of .close and reverse?
hestia wrote: ↑Sunday 12 June 2022 19:52
I have RFX433 for the blinds, not so good as zwave but enough
For the script the bug doesn't seem a problem as the script only open and close the roller with no middle position.
Perhaps you could modify the script to put .open instead of .close and reverse?
It now works.
But If the temperature outside is more than 30 degrees, then all the blinds should closed.
I see you will make another function extreme hot.
Thanks again
a new change (1st post)
17/06/2022 - remove cosIncidence from the sunRadiationValue: thru a glass at any inclination, the sun strike a body the same?
So that I use the full radiation w/o taking into account the inclination of the windows, because by the end the sun go thru the windows and strike your body directly
Screenshot 2022-06-20 200252.png (104.1 KiB) Viewed 1774 times
hestia wrote: ↑Monday 20 June 2022 20:04
a new change (1st post)
17/06/2022 - remove cosIncidence from the sunRadiationValue: thru a glass at any inclination, the sun strike a body the same?
So that I use the full radiation w/o taking into account the inclination of the windows, because by the end the sun go thru the windows and strike your body directly
Screenshot 2022-06-20 200252.png
I think it is a good idea to close the blinds the moment the sun strikes the window and open them if the sun does not strike it anymore. It will defenately keep the house cooler.
Thanks for your feedback!
Math is one thing, experience is another one
Without sun, it was difficult to know what to do
And we need time to look how is the sun and what we feel inside!
Velux roof window blinds that are battery+PV powered also use PV panels to estimate sun radiation to automate open/close. This looks promising, but a neighbor have such blinds (mine are AC powered) and when it's a bit cloudy with wind, blinds moves several times a quarter (almost each cloud passing over).
Their system lacks a bit of hysteresis IMO and this may wear the blinds quickly. Not sure this will be before or after battery (typical annual roof temperature range is -20°/+60°C) will die?
local SUN_RADIATION_MARGING = 20 -- Marging to have an hysteresis
I did it more to be 'user-friendly' than to avoid to wear the blinds.
On the other hand, my blinds are not on battery and I have a separate system to get the sun radiation