Page 1 of 1

[Solved]How to? set switch (via GPIO) with temperature?

Posted: Wednesday 16 November 2016 18:27
by PeM1664
Hi all, I'm using a raspberry for seeing temperature and GPIO for controlling light and heat but how can i set low temperature to turn on a Gpio port? I am looking on the documentation and my raspi domoticz (local)web site but even if I make a scene, I don't find an option for automation heat (switch) function of temperature...
do you have any idea?
tks to you :)

Re: How to? set switch (via GPIO) with temperature?

Posted: Sunday 20 November 2016 21:25
by stlaha2007
You need a script for this lua/php/bash. Even Blockly can help you to start with.

So start with blockly is the easiest.
You create a if block where you define your tempsensor with equal or lower then temp, then define the do part where yku set the switch on.
Also build a second if block within where you set upper limit to switch off the switch.

Re: How to? set switch (via GPIO) with temperature?

Posted: Monday 21 November 2016 11:10
by PeM1664
Thanks for your answer! If I understand well I have to use Blockly in event menu in Domoticz and create 2 blocks for define the lowest temperature and the action and the highest temperature and the other action?

Re: How to? set switch (via GPIO) with temperature?

Posted: Monday 21 November 2016 11:28
by PeM1664
something like this?

Re: How to? set switch (via GPIO) with temperature?

Posted: Monday 21 November 2016 11:46
by PeM1664
Greats!! Thanks to you! It's working!

Re: RE: Re: How to? set switch (via GPIO) with temperature?

Posted: Monday 21 November 2016 13:10
by stlaha2007
PeM1664 wrote:Greats!! Thanks to you! It's work!
Nice to hear it works...