Hello
Posted: 20 Mar 2021, 05:13
Hello,
My names Simon and live in New Zealand. Been playing around with IOT stuff for a few years now as a hobby but have a background in Avionics.
Looking at developing a better spa tub controller with Espeasy.
First question -:
I have used this example code from a You tube video and cant figure out why the first part does not set the 'Set Temp' to 20 degrees.
If I reboot the D1mini then the 20 degrees shows for a fraction of a second and then seems to reset to zero? Even if I just put the first rule in on its own it still does the same...
Doesnt make sense to me but I am a total noob on ESPEasy....
Any ideas?
All the best
Simon
My names Simon and live in New Zealand. Been playing around with IOT stuff for a few years now as a hobby but have a background in Avionics.
Looking at developing a better spa tub controller with Espeasy.
First question -:
I have used this example code from a You tube video and cant figure out why the first part does not set the 'Set Temp' to 20 degrees.
Code: Select all
on System#Boot do
TaskValueSet,2,1,20.0
TaskValueSet,2,2,19.5
TaskValueSet,2,3,20.5
endon
on Up#Switch do
if [Up#Switch]=1
if [Local#SetTemp]<40
TaskValueSet 2,1,[Local#SetTemp]+0.5
TaskValueSet 2,2,[Local#SetTemp]
TaskValueSet 2,3,[Local#SetTemp]+1
endif
endif
endon
on Down#Switch do
if [Down#Switch]=1
if [Local#SetTemp]>5
TaskValueSet 2,1,[Local#SetTemp]-0.5
TaskValueSet 2,2,[Local#SetTemp]-1
TaskValueSet 2,3,[Local#SetTemp]
endif
endif
endon
on DSB18b20#Temperature do
if [DSB18b20#Temperature] > [Local#TempHigh]
event,TurnOff
endif
endon
on DSB18b20#Temperature do
if [DSB18b20#Temperature] < [Local#TempLow]
event,TurnOn
endif
endon
on TurnOn do
gpio,0,0
oledframedcmd,3,Heating:ON
endon
on TurnOff do
gpio,0,1
oledframedcmd,3,Heating:OFF
endon
on SetTemp do
TaskValueSet 2,1,%eventvalue%
TaskValueSet 2,2,%eventvalue%-0.5
TaskValueSet 2,3,%eventvalue%+0.5
endon
Doesnt make sense to me but I am a total noob on ESPEasy....
Any ideas?
All the best
Simon