Add the following Rule on unit#1 (which has the BME280 sensor):
Code: Select all
on sendData do
SendToHTTP 192.168.0.7,80,/control?cmd=7dt,[bme280#temp]
endon
Code: Select all
on WiFi#Connected do
sendToHTTP 192.168.0.6,80,/control?cmd=event,sendData
timerSet,1,2
endon
on Rules#Timer=1 do
sendToHTTP 192.168.0/6,80,/control?cmd=event,sendData
timerSet,1,2
endon
Unit#2
- when unit#2 connects to the wifi, it sends a request to unit#1 to execute "sendData". It also starts a timer
- when the timer expires, it sends a request to unit#1 to execute "sendData". It also re-starts the timer
Unit#1
- contains simply sendData, which will call 7dt and send the temperature to unit#1 using sendToHTTP