Page 1 of 1

rule: is it possible to use another ESP module sensor value in test condition ?

Posted: 31 Jul 2019, 14:37
by tparvais
Hello

I've a soil moister probe in one ESP
Another ESP is controlling a water valve with sime timer rules.
I want to implement a extra condition to open the valve depending on the soil probe measurement from the other ESP

is it possible to simply read a value from another ESP module ?

I see we can send data to an ESP, but read ?

Thomas

Re: rule: is it possible to use another ESP module sensor value in test condition ?

Posted: 01 Aug 2019, 08:42
by grovkillen
Either inter-esp-easy p2p using UDP or import values using MQTT.

Re: rule: is it possible to use another ESP module sensor value in test condition ?

Posted: 04 Sep 2019, 17:18
by sentinel
Consider also the following:
esp-1 (ip address: 192.168.1.101) has the sensor and esp-2 (ip address: 192.168.1.102) controls the water valve. You can the create the following rules:
esp-1 Rule:

Code: Select all

on moistureSensor#value=123 do
  SendToHTTP 192.168.1.102,80,/control?cmd=event,openValve
endon
esp-2 Rule:

Code: Select all

on openValve do
  //code to open the valve
endon
So basically you use SendToHTTP to send a command to the other esp and open the valve. I haven't tested it but I'm doing something similar.

Re: rule: is it possible to use another ESP module sensor value in test condition ?

Posted: 29 Jan 2020, 23:43
by tparvais
Thanks both !