while waiting for my parts i’m experimenting a little bit on my devboard and some schematics.
the finally circuit will be look like this:
![Bild Text](http://www.youscreen.de/kxhvqjcwh57.jpg)
I’ve compilled R120 ESP Easy with the Pimatic Rest-API Plugin to communicate with Pimatic
main config
![Bild Text](http://www.youscreen.de/dnibljbua11.jpg)
SDA and SCL on GPIO 9+10, need them later for the 4-Row LCD
![Bild Text](http://www.youscreen.de/bjavxqvhw77.jpg)
for short tests i create 2 switch-inputs, uptemp1 and uptemp2 in the device-section and connect two buttons on GND and D6(GPIO12) and D7(GPIO13) on my node
![Bild Text](http://www.youscreen.de/ixukmczyd47.jpg)
![Bild Text](http://www.youscreen.de/hieqwvvcv05.jpg)
for getting some variables in the ESP, i’ve create a Dummy Device, they could store 4 variables with 2 decimals ![:) :)](../../plugins/nodebb-plugin-emoji-one/static/images/1f600.png)
![Bild Text](http://www.youscreen.de/avanexjzy75.jpg)
![Bild Text](http://www.youscreen.de/cmeovpqzt57.jpg)
in the rule-section i’ve add some code witch add 0.5°C to the variable if the defined button was pressed, so the complete code would look like this:
on System#Boot do
TaskValueSet 5,1,4.5 // default value at boot
TaskValueSet 5,2,4.5 // default value at boot
TaskValueSet 5,3,4.5 // default value at boot
TaskValueSet 5,4,4.5// default value at boot
endon
On uptemp1#Switch do
if [uptemp1#Switch]=1
TaskValueSet 5,1,[temp#thermostattemp1]+0.5
endon
On downtemp1#Switch do
if [downtemp1#Switch]=1
TaskValueSet 5,1,[temp#thermostattemp1]-0.5
endon
On uptemp2#Switch do
if [uptemp2#Switch]=1
TaskValueSet 5,2,[temp#thermostattemp2]+0.5
endon
On downtemp2#Switch do
if [downtemp2#Switch]=1
TaskValueSet 5,2,[temp#thermostattemp2]-0.5
endon
On uptemp3#Switch do
if [uptemp3#Switch]=1
TaskValueSet 4,3,[temp#thermostattemp3]+0.5
endon
On downtemp3#Switch do
if [downtemp3#Switch]=1
TaskValueSet 4,3,[temp#thermostattemp3]-0.5
endon
On uptemp4#Switch do
if [uptemp4#Switch]=1
TaskValueSet 4,4,[temp#thermostattemp4]+0.5
endon
On downtemp4#Switch do
if [downtemp4#Switch]=1
TaskValueSet 4,4,[temp#thermostattemp4]-0.5
endon
(in the final version the System#Boot-part could be ignored)
in Pimatic i create some variables…
![Bild Text](http://www.youscreen.de/pmwjksmyl37.jpg)
…and a rule for testing to assimilate the $thermostattemp1 variable …
{
"id": "heizung-arbeitszimmer-remotethermostat",
"name": "heizung: arbeitszimmer remotethermostat",
"rule": "when $thermostattemp1 changes then set temp of Arbeitszimmer Heizkörper to $thermostattemp1°C",
"active": true,
"logging": true
}
and by pressing the 2 buttons they looks well ![:) :)](../../plugins/nodebb-plugin-emoji-one/static/images/1f600.png)
EVENT: Clock#Time=Tue,18:17
WD : Uptime 90 ConnectFailures 0 FreeMem 18312
Dummy: value 1: 12.50
Dummy: value 2: 4.50
Dummy: value 3: 4.50
Dummy: value 4: 4.50
EVENT: temp#thermostattemp1=12.50
EVENT: temp#thermostattemp2=4.50
EVENT: temp#thermostattemp3=4.50
EVENT: temp#thermostattemp4=4.50
SW : State 0
EVENT: uptemp1#Switch=0.00
SW : State 1
EVENT: uptemp1#Switch=1.00
ACT : TaskValueSet 5,1,12.50+0.5
SW : State 0
EVENT: uptemp1#Switch=0.00
SW : State 1
EVENT: uptemp1#Switch=1.00
ACT : TaskValueSet 5,1,13.00+0.5
SW : State 0
EVENT: uptemp1#Switch=0.00
SW : State 1
EVENT: uptemp1#Switch=1.00
ACT : TaskValueSet 5,1,13.50+0.5
SW : State 0
EVENT: uptemp1#Switch=0.00
SW : State 1
EVENT: uptemp1#Switch=1.00
ACT : TaskValueSet 5,1,14.00+0.5
SW : State 0
EVENT: uptemp1#Switch=0.00
SW : State 1
EVENT: uptemp1#Switch=1.00
ACT : TaskValueSet 5,1,14.50+0.5
SW : State 0
EVENT: uptemp1#Switch=0.00
SW : State 1
EVENT: uptemp1#Switch=1.00
ACT : TaskValueSet 5,1,15.00+0.5
Dummy: value 1: 15.50
Dummy: value 2: 4.50
Dummy: value 3: 4.50
Dummy: value 4: 4.50
EVENT: temp#thermostattemp1=15.50
EVENT: temp#thermostattemp2=4.50
EVENT: temp#thermostattemp3=4.50
EVENT: temp#thermostattemp4=4.50
Dummy: value 1: 15.50
Dummy: value 2: 4.50
Dummy: value 3: 4.50
Dummy: value 4: 4.50
EVENT: temp#thermostattemp1=15.50
EVENT: temp#thermostattemp2=4.50
EVENT: temp#thermostattemp3=4.50
EVENT: temp#thermostattemp4=4.50
SW : State 0
EVENT: downtemp1#Switch=0.00
SW : State 1
EVENT: downtemp1#Switch=1.00
ACT : TaskValueSet 5,1,15.50-0.5
SW : State 0
EVENT: downtemp1#Switch=0.00
SW : State 1
EVENT: downtemp1#Switch=1.00
ACT : TaskValueSet 5,1,15.00-0.5
SW : State 0
EVENT: downtemp1#Switch=0.00
SW : State 1
EVENT: downtemp1#Switch=1.00
ACT : TaskValueSet 5,1,14.50-0.5
SW : State 0
EVENT: downtemp1#Switch=0.00
SW : State 1
EVENT: downtemp1#Switch=1.00
ACT : TaskValueSet 5,1,14.00-0.5
WD : Uptime 90 ConnectFailures 0 FreeMem 18496
SW : State 0
EVENT: downtemp1#Switch=0.00
SW : State 1
EVENT: downtemp1#Switch=1.00
ACT : TaskValueSet 5,1,13.50-0.5
Dummy: value 1: 13.00
Dummy: value 2: 4.50
Dummy: value 3: 4.50
Dummy: value 4: 4.50
EVENT: temp#thermostattemp1=13.00
EVENT: temp#thermostattemp2=4.50
EVENT: temp#thermostattemp3=4.50
EVENT: temp#thermostattemp4=4.50
![Bild Text](http://www.youscreen.de/eoohzlvlt15.jpg)