Page 1 of 1
Help need with script.
Posted: Sunday 16 April 2017 9:27
by insippo
I have 2 boilers and solar panel + luxmeter. If lux 27000 ja want to set boiler 2 ON and if lux <27000 boiler 2 off. This is easy but lux is smaller or bigger domoticz switch every minute on or off. Sample: If lux > 27000 boiler 2 switch on and after minute again switch on and again and again. All night boiler 2 switch off. Every minute.
https://photos.google.com/album/AF1QipN ... w9mG5l3Zph
Re: Help need with script.
Posted: Sunday 16 April 2017 9:51
by jvdz
Can you show your script? (The image link isn't working, but prefer text anyways)
Jos
Re: Help need with script.
Posted: Sunday 16 April 2017 11:08
by Lebo2d9
I created a 2nd dummy switch containing the old status of the switch. If actual switch is on and old is off then set boiler and old status to o
Verstuurd vanaf mijn SM-G920F met Tapatalk
Re: Help need with script.
Posted: Sunday 16 April 2017 11:13
by insippo
I create Boiler INT for this.
https://aiamaa.wordpress.com/
Re: Help need with script.
Posted: Sunday 16 April 2017 11:36
by tozzke
That is prevented if you add the switch you want to switch on/off in the if statement like so:
Code: Select all
If [[lux] >= [27000]] and [[boiler2] = [Off]]
Do [Set [boiler2] = [On]]
Else if [[lux <= [26500*]] and [[boiler2] = [On]]
Do [Set [boiler2] = [Off]]
*
a small difference to prevent switching on and off rapidly when the lux value is around 27000
Help need with script.
Posted: Sunday 16 April 2017 13:31
by insippo
And this will switch on after every minute boiler 2 ? I make notification for boiler 2 switch, On and Off over pushbullet and this send messages every minute boiler switch off.
Sent from my iPhone using Tapatalk
Re: Help need with script.
Posted: Sunday 16 April 2017 16:15
by insippo
Re: Help need with script.
Posted: Sunday 16 April 2017 22:13
by tozzke
I don't really understand what you mean...
I thought you didn't want to let it switch every minute? that thát was your problem in the first place.
So does it work now as you want? Or else try and describe your problem once more and try to make it clear.
Re: Help need with script.
Posted: Monday 17 April 2017 6:47
by insippo
OK. My mother tongue is Estonian. I try to speak. All working perfect. I create notification for boiler 2 main switch.If lux is more than boiler2 switch on and pushbullet send notification. If lux is smaller than need boiler 2 switch off and send me notification Boiler 2 off. I look log and what i see. Boiler 2 switch off every minute after first switch off. This is not normal. I'm in work and can't look controller.
Re: Help need with script.
Posted: Monday 17 April 2017 11:42
by tozzke
If you make your Blockly exactly like mine (you forgot to add 'and [[boiler2] = [On]]' to the Else if) it won't switch every minute anymore because the condition isn't true anymore.
In your example you say that the 'else if' should trigger only when the lux is beneath 26500 and that keeps being true until it exeeds 27000. That's why it keeps retriggering and turning the boiler2 off
Re: Help need with script.
Posted: Wednesday 19 April 2017 8:26
by insippo
Yesterday i add temperature sensors for boiler 1 and 2. I need create bigger Blockly script.
Night 1.05 -4.35 if boiler 1 temp <65C need switch ON. Off if temp boiler1 is >=65C or time =4.35. I have solar panels and lux meter. 27000 lux is good for switch boilers ON but only one by one. If lux is > 27000 (if lower than 27000 lux ,boiler1 and 2 need switch off) and boiler 1 temp <65c then need this boiler 1 switch ON. If boiler1 temp >=65C need switch this off and if boiler2 temp is <65C need this swich ON. Off if temp is >=65C. And again control boiler 1 temp and boiler 2 temp if lux >27000.
How to add these functions to Blockly correctly ....... Without errors. I try write something today morning but..... Im in work and not see what happened. Today is sunny day.
Re: Help need with script.
Posted: Thursday 20 April 2017 12:23
by insippo
I cant add daytime swtching for this night skript. And if i check this in morning every minute was swtch off switching off this.
Re: Help need with script.
Posted: Thursday 20 April 2017 17:43
by tozzke
because you STILL haven't editted your 'Else if' block to what I said it should be.....
Re: Help need with script.
Posted: Thursday 20 April 2017 21:51
by insippo
I try tomorrow.
Sent from my iPhone using Tapatalk
Re: Help need with script.
Posted: Thursday 20 April 2017 21:53
by insippo
E
This triggered.
Sent from my iPhone using Tapatalk