https://photos.google.com/album/AF1QipN ... w9mG5l3Zph
Help need with script.
Moderator: leecollings
-
- Posts: 41
- Joined: Sunday 26 June 2016 20:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Help need with script.
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
https://photos.google.com/album/AF1QipN ... w9mG5l3Zph
- jvdz
- Posts: 2269
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: Help need with script.
Can you show your script? (The image link isn't working, but prefer text anyways)
Jos
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- Posts: 139
- Joined: Tuesday 06 September 2016 20:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version: L stab
- Location: Belgium
- Contact:
Re: Help need with script.
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
Verstuurd vanaf mijn SM-G920F met Tapatalk
Domoicz on RPI3 (wifi) directly connected 3x ds18b20 for CV temp, Evohome (9 zone), 1 remote 220V switch based on ESP-12. RFXtrx433E, 16x AMST-606, 5 Somfy RTS motors
Domoticz on RPI3(wifi) as slave for terraruim control
More to come
Domoticz on RPI3(wifi) as slave for terraruim control
More to come
-
- Posts: 135
- Joined: Friday 02 January 2015 9:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands
- Contact:
Re: Help need with script.
That is prevented if you add the switch you want to switch on/off in the if statement like so:
* a small difference to prevent switching on and off rapidly when the lux value is around 27000
Code: Select all
If [[lux] >= [27000]] and [[boiler2] = [Off]]
Do [Set [boiler2] = [On]]
Else if [[lux <= [26500*]] and [[boiler2] = [On]]
Do [Set [boiler2] = [Off]]
-
- Posts: 41
- Joined: Sunday 26 June 2016 20:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Help need with script.
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
Sent from my iPhone using Tapatalk
-
- Posts: 135
- Joined: Friday 02 January 2015 9:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands
- Contact:
Re: Help need with script.
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.
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.
-
- Posts: 41
- Joined: Sunday 26 June 2016 20:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Help need with script.
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.
-
- Posts: 135
- Joined: Friday 02 January 2015 9:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands
- Contact:
Re: Help need with script.
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
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
-
- Posts: 41
- Joined: Sunday 26 June 2016 20:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Help need with script.
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.
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.
-
- Posts: 41
- Joined: Sunday 26 June 2016 20:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Help need with script.
I cant add daytime swtching for this night skript. And if i check this in morning every minute was swtch off switching off this.
- Attachments
-
- blockly.png (37.46 KiB) Viewed 2302 times
-
- Posts: 135
- Joined: Friday 02 January 2015 9:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands
- Contact:
Re: Help need with script.
because you STILL haven't editted your 'Else if' block to what I said it should be.....
-
- Posts: 41
- Joined: Sunday 26 June 2016 20:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Help need with script.
I try tomorrow.
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
-
- Posts: 41
- Joined: Sunday 26 June 2016 20:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Help need with script.
E
This triggered.
Sent from my iPhone using Tapatalk

This triggered.
Sent from my iPhone using Tapatalk
Who is online
Users browsing this forum: No registered users and 1 guest