Page 2 of 2

Re: SendToHTTP not working

Posted: 02 Oct 2018, 18:38
by sentinel
you can try the following:
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
And add the following Rules on unit#2 (which has the display):

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
So my idea is:
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

Re: SendToHTTP not working

Posted: 03 Oct 2018, 21:27
by esp8266
sentinel
it works ! :D
thank you very much for your help

Re: SendToHTTP not working

Posted: 04 Oct 2018, 18:05
by sentinel
you are welcome :D